-
Notifications
You must be signed in to change notification settings - Fork 119
feat(wallet): implement HD multi-address support for message signing #2432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 27 commits
c5ccb30
7c61845
529f2a6
8a42b0e
b23b8fc
d323812
ad7e0b5
032faff
6d4332e
9e9081e
187284d
b10fd57
5fcef99
791c64b
8489bb0
67266b1
ca176d8
38eb5dd
b453126
e7add30
ecc6eb7
98a5b6c
df2bbed
935409d
9f0bde4
8180da3
4d91373
860c208
3ade61b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| use super::{BalanceError, CoinBalance, HistorySyncState, MarketCoinOps, MmCoin, RawTransactionFut, | ||
| RawTransactionRequest, SwapOps, TradeFee, TransactionEnum}; | ||
| use crate::hd_wallet::HDAddressSelector; | ||
| use crate::{coin_errors::MyAddressError, AddressFromPubkeyError, BalanceFut, CanRefundHtlc, CheckIfMyPaymentSentArgs, | ||
| ConfirmPaymentInput, DexFee, FeeApproxStage, FoundSwapTxSpend, NegotiateSwapContractAddrErr, | ||
| PrivKeyBuildPolicy, PrivKeyPolicy, RawTransactionResult, RefundPaymentArgs, SearchForSwapTxSpendInput, | ||
|
|
@@ -8,6 +9,7 @@ use crate::{coin_errors::MyAddressError, AddressFromPubkeyError, BalanceFut, Can | |
| ValidateAddressResult, ValidateFeeArgs, ValidateOtherPubKeyErr, ValidatePaymentInput, | ||
| ValidatePaymentResult, VerificationResult, WaitForHTLCTxSpendArgs, WatcherOps, WeakSpawner, WithdrawFut, | ||
| WithdrawRequest}; | ||
| use crate::{SignatureError, VerificationError}; | ||
| use async_trait::async_trait; | ||
| use common::executor::AbortedError; | ||
| pub use ed25519_dalek::{Keypair, PublicKey, SecretKey, Signature}; | ||
|
|
@@ -321,14 +323,18 @@ impl MarketCoinOps for SiaCoin { | |
| Ok(address.to_string()) | ||
| } | ||
|
|
||
| async fn get_public_key(&self) -> Result<String, MmError<UnexpectedDerivationMethod>> { unimplemented!() } | ||
| async fn get_public_key(&self) -> Result<String, MmError<UnexpectedDerivationMethod>> { | ||
| MmError::err(UnexpectedDerivationMethod::InternalError("Not implemented".into())) | ||
| } | ||
|
|
||
| fn sign_message_hash(&self, _message: &str) -> Option<[u8; 32]> { unimplemented!() } | ||
| fn sign_message_hash(&self, _message: &str) -> Option<[u8; 32]> { None } | ||
|
|
||
| fn sign_message(&self, _message: &str) -> SignatureResult<String> { unimplemented!() } | ||
| fn sign_message(&self, _message: &str, _account: Option<HDAddressSelector>) -> SignatureResult<String> { | ||
| MmError::err(SignatureError::InternalError("Not implemented".into())) | ||
| } | ||
|
|
||
| fn verify_message(&self, _signature: &str, _message: &str, _address: &str) -> VerificationResult<bool> { | ||
| unimplemented!() | ||
| MmError::err(VerificationError::InternalError("Not implemented".into())) | ||
|
Comment on lines
+330
to
+337
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we will need those once SIA implementation is completed. Can you please open an issue for both this and tendermint and any other missing implementation @borngraced
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
|
|
||
| fn my_balance(&self) -> BalanceFut<CoinBalance> { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.