Skip to content

feature request: Wallet should recover all funds restored by a mnemonic phrase #83

@fumin

Description

@fumin

Currently, restoring a wallet only by a mnemonic phrase does not recover coins belonging to the wallet.
This is because:

  • Wallet balance is calculated from the uxtos table.
  • Wallet does not even recover addresses belonging to the mnemonic phrase, since they are stored in a separate index_to_address table.

I think there are 3 ways for wallet to recover coins:

  • In addition to backing up the mnemonic phrase, backup the uxtos table, too.
  • Alternatively, backup all addresses belong the mnemonic phrase, and scan through all previous transactions to collect uxtos belonging to the wallet.
  • Instead of backing up all addresses, one could backup only the index of the top most address, since addresses are generated iteratively. For example, if we know that the number of addresses is n, we know all previously generated addresses are m/1/0/0/0, m/1/0/0/1,... m/1/0/0/n.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions