Bitcoin

NBitcoin, how to implement wallet restoration? How does it work?

Restore your wallet balance:

To restore your wallet balance with just your mnemonic password and determine which UTXOs are available, you will need to perform a UTXO scan with a trusted local node that has verified the blockchain.

with Bitcoind Consider servers and queries scantxoutsetThis allows us to determine (by public key/address) the unused output controlled by the wallet.

Restore your wallet history:

To restore your wallet’s receipt/spend history, you need to build an “address index” for all transactions and index txs associated with addresses you manage.

Libbitcoin-Server It already indexes all transactions by standard address by default, so you can query the standard Libbitcoin servers to get a full history of each address in your wallet.

Note: There is no need to verify the signature during wallet restoration because the local Bitcoin server has verified the signature. If you are running a self-validating full node, you do not need to deploy an SPV client.

Related Articles

Back to top button