Feature/add wallet to gateway init (#984)

* Moving sign_text method into common/crypto to dry it up

* Moved bech32 address validation into common/crypto

* ibid

* Gateway now requires a --wallet-address arg on init
This commit is contained in:
Dave Hrycyszyn
2021-12-18 12:45:55 +00:00
committed by GitHub
parent ed2b515a83
commit 8e99ae8979
19 changed files with 101 additions and 48 deletions
+1 -2
View File
@@ -3,7 +3,6 @@
use crate::commands::validate_bech32_address_or_exit;
use crate::config::Config;
use crate::crypto::ed25519::sign_text;
use crate::node::http::{
description::description,
not_found,
@@ -91,7 +90,7 @@ impl MixNode {
let identity_keypair = load_identity_keys(&pathfinder);
let address = self.config.get_wallet_address();
validate_bech32_address_or_exit(address);
let verification_code = sign_text(identity_keypair.private_key(), address);
let verification_code = identity_keypair.private_key().sign_text(address);
verification_code
}