Restoring the wallet balance:
To restore the wallet balance from just the mnemonic passphrase, and determine your spendable UTXO’s, you need to perform a UTXO-scan with a trusted local node which has validated the Blockchain.
With Bitcoind
server, consider querying scantxoutset
, which allows you to determine (per public key/address) which unspent outputs are controlled by your wallets.
Restoring the wallet history:
Restoring the receiving/spending history of the wallet will require you to build an “address-index” over all transaction, indexing the tx’s associated with addresses you control.
Libbitcoin-Server
already indexes all transactions by standard addresses per default, so you can query a standard Libbitcoin server to get the full-history for each address in your wallet.
Note: You do not need to validate signatures during wallet restoration, because your local bitcoin server has validated these. You don’t need to build an SPV client if you are running your own validating full-node.