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

0 votes
Mar 13, 2019 in Blockchain by Bhemeswararao
• 210 points
1,582 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, 2019 by Omkar
• 69,220 points

selected Mar 20, 2019 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,100 points
2,525 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
1,190 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,468 views
+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
• 26,740 points
1,035 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
• 69,220 points
1,350 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
• 69,220 points
964 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP