MerosCrypto / Meros

An instant and feeless cryptocurrency for the future, secured by the Merit Caching Consensus Mechanism.
https://meroscrypto.io
Other
83 stars 19 forks source link

You should be able to claim funds to a Wallet that isn't on the local node. #313

Open kayabaNerve opened 3 years ago

kayabaNerve commented 3 years ago

Currently, the funds are claimed to the local Wallet. You should be able to claim funds to an imported, watch only, wallet.

This does have two blockers. 1) Current key derivation is where the BLS private key is the result of the BIP39 mnemonic's seed, and the Ristretto HD wallet uses the SHA256 hash of said seed. This would need to be flipped so the funded wallet cannot be recovered from the Merit Holder key. As we have no specific reason to keep it as is, yet do have this reason to flip it, I'm fine with this.

2) The current wallet code doesn't optimally handle receiving funds to addresses it has yet to generate. It does, of course, handle this, yet the getUTXOs call doesn't check if the next unused address has been updated or not. A dummy call to getAddress in WalletDB's getUTXOs should be performed. This should be done regardless of this issue, to be honest.

Then the actual functionality (import a Watch Wallet WITH A Merit Holder private key) would need to be done.