Adding metadata inside raw issue transaction

+1 vote

I've been following a guide to issue assets by creating raw transaction (from http://www.multichain.com/developers/raw-transactions/) and i would like to add additional metadata into it. However it is impossible to do so because there are 2 OP-RETURNs inside one transaction so my questions are:

1. Is there any other way to issue asset via raw transaction other than appending metadata (When using createrawtransaction we add JSON object that contains quantity, is there a possibility to insert total asset information inside that JSON so we would not need to add metadata precisely for asset? (By doing so we would have one OP-RETURN transaction with metadata that we add, if i am correct?)

2. If not, how can we bypass the restriction of having two OP-RETURN data transactions in one?

3. If none of the above is possible, is there any way to append my data inside issue transaction?

Thank you in advance.

P.S I have tried to put additional fields besides "raw" inside issue object (inside createrawtransaction api call), however, issue doesnt recognize those fields ("asset", "multiple", "open" etc).

Would it be possible to extend that object to accept those fields so this issue from createrawtransaction would represent "issue" object inside decoded transaction JSON instead of appending metadata and then filling that issue object with metadata JSON Object combined with "raw" from previous api call? That way there would be no need to append asset metadata in order to create an issue transaction if i am correct?

asked Jun 3, 2016 by Mile
edited Jun 3, 2016 by Mile

1 Answer

0 votes

I'm afraid it's not possible in the current version of MultiChain to put issuance metadata inside the raw output, or to have two OR_RETURNs. I think you have two reasonable options for now:

a) Store the extra information as a custom field inside the issuance metadata. You can consider this equivalent to putting it in a separate OP_RETURN, so long as you don't mind seeing it in the listassets API.

b) First store the extra information in a separate transaction which sends no assets, i.e. using sendwithmetadatafrom with amount=0, then add the txid of that transaction as a custom field inside the issuance metadata. This means you'll be able to store up to 8 MB of data and only the txid of that separate transaction will show up in listassets.

answered Jun 6, 2016 by MultiChain
...