1

I am working on a NodeJS script that allows you to enter your 12-words-long Bitcoin secret recovery phrase and automatically withdraw all of your coins to a defined wallet address.

The script is for people like me (with a hundred paper wallets) to withdraw their funds quickly to one wallet without restoring every wallet by hand.

How can I do this? I did some research myself, but it seems impossible.

1 Answer 1

1

This is possible with bcoin, a NodeJS bitcoin library that supports mnemonics, private keys, tx construction, etc... but you will still need a full node (or blockexplorer API) to get the UTXO you can spend with your key. Also, keep in mind handling seed phrases or typing seed phrases into anything is fraught with risk and you should be very careful the tools you choose to do this.

Anyway, I have an applet called brainsweeper (source code here) that does the second part of your question, using bcoin: it uses the blockstream.info API to get UTXO associated with an address, constructs a transaction that sweeps all the UTXO to a new address, signs it and the uses the blockstream.info API again to broadcast the completed TX.

If you need help using bcoin there is a discussion channel on telegram

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.