how to update asset in multichain

+1 vote

Hi Multichain team you guys have been awesome. i have one more doubt regarding asset.

lets suppose i created an asset along with metadata like price,status etc. i used createrawsendfrom api to create an asset and sign this from private key outside of the wallet.

now how can i update the asset later.lets say i want to update the status field of asset to available. i understand in blockchain there is no concept of update so do i have to use issuemore command with qty=0 and different metadata to update the asset or if i can use stream in some way. what do you suggest? how to go about it

asked May 11, 2018 by anshuman

1 Answer

+1 vote
Best answer

Yes, this is exactly right. The asset needs to be issued as open, then you can use further issuemore API calls to update the metadata with a zero quantity.

An alternative is to just use a stream as the place to store the asset metadata, perhaps where the stream's name is related to the asset's name. MultiChain 2.0 (alpha 2) supports JSON stream items, and the liststreamkeysummary API can be helpful for "flattening" or "merging" JSON items together, to give the latest value for each key in the JSON objects.

answered May 13, 2018 by MultiChain
selected May 14, 2018 by anshuman