Skip to content

Send BTC #373

Answered by mccwdev
Jayke770 asked this question in Q&A
Feb 4, 2024 · 4 comments · 1 reply
Discussion options

You must be logged in to vote

You can spend a single utxo and specify all output addresses like this:

wallet = wallet_delete_if_exists('example_btctestnet', force=True)
w = Wallet.create('example_btctestnet', network='bitcoinlib_test')
w.utxos_update()
t = w.send([('blt1qwx3vf0jlwpxvc5cl9g6gj4sltpluqem9jt0cde', 50000000),
            ('blt1qlkwskkwudqgee9az2cjqgncns5phykwx6eav3t', 49999000)], fee=1000, max_utxos=1)
t.info()

You can also use the input_arr or input_key_id argument to use specific utxo's

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by mccwdev
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mikeywaites
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #372 on February 06, 2024 13:25.