MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / create_transaction

Function create_transaction

test/functional/test_framework/blocktools.py:134–143  ·  view source on GitHub ↗

Return signed transaction spending the first output of the input txid. Note that the node must be able to sign for the output that is being spent, and the node must not be running multiple wallets.

(node, txid, to_address, *, amount)

Source from the content-addressed store, hash-verified

132 return tx
133
134def create_transaction(node, txid, to_address, *, amount):
135 """ Return signed transaction spending the first output of the
136 input txid. Note that the node must be able to sign for the
137 output that is being spent, and the node must not be running
138 multiple wallets.
139 """
140 raw_tx = create_raw_transaction(node, txid, to_address, amount=amount)
141 tx = CTransaction()
142 tx.deserialize(BytesIO(hex_str_to_bytes(raw_tx)))
143 return tx
144
145def create_raw_transaction(node, txid, to_address, *, amount):
146 """ Return raw signed transaction spending the first output of the

Callers 8

run_testMethod · 0.90
run_testMethod · 0.90
create_bip112specialFunction · 0.90
send_generic_input_txFunction · 0.90
create_bip68txsFunction · 0.90
create_bip112txsFunction · 0.90
run_testMethod · 0.90
run_testMethod · 0.90

Calls 4

deserializeMethod · 0.95
create_raw_transactionFunction · 0.85
hex_str_to_bytesFunction · 0.85
CTransactionClass · 0.70

Tested by

no test coverage detected