-
Beta Was this translation helpful? Give feedback.
Answered by
mccwdev
Jan 1, 2026
Replies: 1 comment 2 replies
-
|
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.transaction_create(outputs, fee=1000)
t.info()If needed you can specify inputs with input_arr or input_key_id |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
mccwdev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


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: