I programmed a few small things with python bitcoinlib. It is truly mindblowing how easy to use it is.
Just Wallet.create('wallet-for-customer-xyz') and you created a wallet. Just w.balance()and it spits out the balance or w.name for the 24 words that one could store in a sql database for each customer.
Python bitcoinlib is truly amazing. It really feels like standing on the shoulders of giants - so much power with so few lines of code.
Thank you for this, I would like to build a simple wallet for learning purposes, any idea on how to get started, familiar with Python and JavaScript, thanks.
This depends on personal preferences but for learning purposes I prefer Python. I'd define a scope for starters and work through each item and then add more support from there on, eg:
generate memoic seedphrase (bip-39)
only support HD wallet (bip-32)
only support segwit addresses (p2wpkh, p2wsh)
query Bitcoin RPC for data (balances and nr of tx confirmations)
I haven't checked if there's more JS support for Bitcoin so not sure if it would be easier or not. Might be a good section for bitcoinpy.dev to include an example how to build a light cli python wallet. :)
Hi, I developed the linked resource earlier in the year and started writing some code examples using python-buidl and python-bitcoinlib. I didn't have much time to write more examples in the past weeks but am hopeful to produce some new content soon(ish). Also we website is open source so feel free to correct any of my mistakes or even write some new examples! :)
Wallet.create('wallet-for-customer-xyz')
and you created a wallet. Justw.balance()
and it spits out the balance orw.name
for the 24 words that one could store in a sql database for each customer.