Skip to content

after transfer the asset has no data #500

Open
@robelkebede

Description

@robelkebede
  • bigchaindb-driver==0.5.3:
  • bigchaindb:all_in_one docker image
    python 3.6
  • Ubuntu

i created an asset in javascript driver and transfer using python driver the asset transfer successfully but there is no data { } when i try to load the transaction

def transfer(tx_id,pub_key,user_pri):
     create_tx = b.transactions.retrieve(tx_id)

     asset_id = create_tx["id"]
     transfer_asset = {'id':asset_id}

     output_index = 0

     print(transfer_asset,file=sys.stderr)

     output = create_tx['outputs'][output_index]

     transfer_input = {'fulfillment': output['condition']['details'],
                                    'fulfills': {'output_index': output_index,
                                        'transaction_id': transfer_asset['id']},
                                    'owners_before': output['public_keys'],
                                    'the_Data':'data'
                                    }

     print(transfer_input,file=sys.stderr)

     prepared_transfer_tx  = b.transactions.prepare(
``` operation="TRANSFER",
             asset = transfer_asset,
             inputs = transfer_input,
             recipients =pub_key
             )

     fulfilled_transfer_tx = b.transactions.fulfill(
             prepared_transfer_tx,
             private_keys=user_pri,
             )

     sent_transfer_tx = b.transactions.send_commit(fulfilled_transfer_tx)

     print(fulfilled_transfer_tx,file=sys.stderr)



out put fulfilled_transfer_tx

{'inputs': [{'owners_before': ['Em5T8m1hACodi485y19zBbEn5mKsE9YgjFQFz7grrz8U'], 'fulfills': {'transaction_id': 'd31f6a283d7eb6702c698fca8e11bf4ea1146eaf6cab20874fbacd7a6a70fe79', 'output_index': 0}, 'fulfillment': 'pGSAIMxyhJclql2L-NWu4zIT0oiV2pJPrl2UAxdZ6InGT5PNgUBaBPHDDdKrm0w_JlxvGlQcqTtO3D_nsBLGHWcsRXK1lqaw0Dpch009sDXmbGTQFcMYZjs2T69c5mzin58EQXgC'}], 'outputs': [{'public_keys': ['DgtLE5EveLUpaKJ55KLWpvHutvuLYGmZfcC1Gw9stLHq'], 'condition': {'details': {'type': 'ed25519-sha-256', 'public_key': 'DgtLE5EveLUpaKJ55KLWpvHutvuLYGmZfcC1Gw9stLHq'}, 'uri': 'ni:///sha-256;YOFOqgvXNOu32sQugAH9nCV6U7gGVi3SG-6iAAih5cw?fpt=ed25519-sha-256&cost=131072'}, 'amount': '1'}], 'operation': 'TRANSFER', 'metadata': None, 'asset': {'id': 'd31f6a283d7eb6702c698fca8e11bf4ea1146eaf6cab20874fbacd7a6a70fe79'}, 'version': '2.0', 'id': '47224714b3f7b1542cf39f2b49be79472a7d5e19cd212f1564353ba7b055b091'}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions