how to get the information of asset created in hyperledger composer in case of with out transaction?

0 votes
Mar 13 in Blockchain by Bhemeswararao
• 210 points
95 views

1 answer to this question.

+1 vote
Best answer

First, get the list of all existing assets using the following:

return getAssetRegistry('org.example.Vehicle')
  .then(function (vehicleAssetRegistry) {
    // Get all of the vehicles in the vehicle asset registry.
    return assetRegistry.getAll();
  })

This will display all the assets present along with their string ID

And then get the particular asset:

return getAssetRegistry('org.example.Vehicle')
  .then(function (vehicleAssetRegistry) {
    // Get the specific vehicle from the vehicle asset registry.
    return assetRegistry.get('<String ID>');
  })
answered Mar 13 by Omkar
• 67,120 points

selected Mar 20 by Bhemeswararao
thank you  for your response

Related Questions In Blockchain

0 votes
1 answer

How to get the already existing channels in Hyperledger v1.0?

You cannot see all available channels,  but you ...READ MORE

answered Jun 4, 2018 in Blockchain by Perry
• 17,010 points
146 views
0 votes
1 answer
0 votes
1 answer

How to get the number of tokens in the Bitcoin network?

This information can easily be calculated by ...READ MORE

answered Aug 31, 2018 in Blockchain by Christine
• 15,790 points
22 views
0 votes
1 answer
+1 vote
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 27,620 points
55 views
0 votes
1 answer

How to get TimeStamps in Hyperledger Composer?

Here's an example that works with basic-sample-network network: asset SampleAsset ...READ MORE

answered Oct 26, 2018 in Blockchain by Omkar
• 67,120 points
178 views
0 votes
1 answer

Hyperledger composer: How to allow create in transaction? Access Control

This is how you can do it: /** @returns ...READ MORE

answered Nov 8, 2018 in Blockchain by Omkar
• 67,120 points
132 views