September 25, 2026

Trying to create a bitcoin based webapp in python which takes BTC deposits. How would I use pybitcointools to implement this?

Trying to create a Bitcoin based webapp in python which takes BTC deposits (New to Bitcoin in general, but want to get involved).

Although I would preferably want to use a different address for each deposit, (I read the docs and found out how this could be done, but still slightly confused), I would want to allow for users to deposit back into their own wallets. Though I think I got withdrawals figured out.

I tried to understand the (Now unsupported docs) but decided to come here for help because I was still confused. How would I use pybitcointools to

  1. Generate an BTC Address. (New address for each user). I believe I could do the below for each user. So this would generate a unique address upon the creation of each user for them to deposit to.

    my_private_key = sha256('I guess whatever I please')
    my_public_key = privtopub(my_private_key)
    my_address = pubtoaddr(my_public_key)
    
  2. Accept a Deposit into this Address.

  3. Return the BTC value of this address.
  4. When the time comes, send the balance of this address to the users own address.
Previous Article

Looking for JS/Node.js code example to sign a transaction (with multiple UTXOs) with only the extended private key

Next Article

How do I get the value of a btc address transaction with pybitcoin tools?