Skip to content
Discussion options

You must be logged in to vote

The transaction fee is the sum of all inputs minus the sum of all inputs, so if you create enough output value no extra change address is needed.

For example:

pkwif = 'BC19UtECk2r9PVQYhYH3by5bMhUpzg97pFSNiM1fH2Xb7t87JAem4WHh8KL824sAdGqsxMsGAoq7C5KVY8htddF3Lb5LW8FnxpMzCTwBYKv8AaR5'

w = wallet_create_or_open('bcl_test_wallet', pkwif)
w.utxos_update()
w.info()

outputs = []
outputs.append(Output(value=0, lock_script='6a0160', script_type='nulldata', network="bitcoinlib_test"))
outputs.append(Output(30000000, 'blt1qqpap3e5m8udm2kp7gatchacqu66x54ktqqr2ut', network="bitcoinlib_test"))
outputs.append(Output(69999000, 'blt1qu345x9thyydhj4dfjxwnz2f9gr5ua4um3w50lw', network="bitcoinlib_test"))

t = w

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@wilonx
Comment options

@mccwdev
Comment options

Answer selected by mccwdev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants