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)
| 132 | return tx |
| 133 | |
| 134 | def 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 | |
| 145 | def create_raw_transaction(node, txid, to_address, *, amount): |
| 146 | """ Return raw signed transaction spending the first output of the |
no test coverage detected