paicoin icon indicating copy to clipboard operation
paicoin copied to clipboard

Support for paper key RPC methods

Open dartdart26 opened this issue 6 years ago • 0 comments

This PR provides support for the following RPC methods:

  1. restorewallet - restores a wallet from user provided 12-word BIP39 phrase
  2. dumppaperkey - dumps the current paper key phrase (if wallet has any) from the current wallet
  3. generatepaperkey - generates a 12-word BIP39 phrase for use in restorewallet or for later use

Backward compatibility is preserved, meaning that if a wallet hasn't been restored through a paper key, it uses existing HD key derivation, seeded by the randomly-generated master key. If a wallet has been restored through a paper key, HD key derivation uses the BIP39 phrase as a seed. Discrimination between the two modes is done by saving the paper key in the wallet and checking if it is there to determine mode.

Additionally, paper key is being encrypted when wallet encryption feature is used.

dartdart26 avatar Sep 28 '18 12:09 dartdart26