Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

after transfer the asset has no data #500

Open
robelkebede opened this issue Apr 20, 2019 · 0 comments
Open

after transfer the asset has no data #500

robelkebede opened this issue Apr 20, 2019 · 0 comments

Comments

@robelkebede
Copy link

robelkebede commented Apr 20, 2019

  • 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'}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant