Open
Description
Currently it is the following:
In [14]: cid = 0
In [15]: condition = creation_tx['transaction']['conditions'][cid]
In [16]: transfer_input = {
....: 'fulfillment': condition['condition']['details'],
....: 'input': {
....: 'cid': cid,
....: 'txid': creation_tx['id'],
....: },
....: 'owners_before': condition['owners_after'],
....: }
....:
In [17]: prepared_transfer_tx = bdb.transactions.prepare(
....: operation='TRANSFER',
....: asset=creation_tx['transaction']['asset'],
....: inputs=transfer_input,
....: owners_after=bob.verifying_key,
....: )
....:
while it could be simply:
prepared_transfer_tx = bdb.transactions.prepare_transfer(input_tx, output_id, owners_after, metadata)
Notice that the operation, transfer_input, asset are all derived from the input_tx (full transaction, not only the tx_id). The complex transfer_input object is legacy of the common code, but can easily be abstracted away in the driver until the common code is fixed
Metadata
Metadata
Assignees
Labels
No labels