Is it possible to add metadata to an exchange using appendrawexchange?

+1 vote


in this page ( it is described how to perform an atomic exchange. It is also said how to append metadata using completerawexchange. What if I wanted to add metadata using appendrawexchange instead (or some other quick way)?

Is it possible or my only option is to use createrawsendfrom as described in section ‘Exchanging with external private keys’ (using private key obtained with dumpprivkey)?


asked Nov 21, 2018 by multichain_user123

1 Answer

+1 vote
Best answer

Because of the way that partial signatures work, only the last party to add to an exchange can add metadata in a separate output.

However with MultiChain 2.0 (alphas) you can add inline metadata, which is metadata that sits inside a regular transaction output. This will go into the output added by whoever calls appendrawexchange. Example:

appendrawexchange [tx-hex] [txid] [vout] '{"asset1":100,"data":{"json":[1,2,3]}}'

answered Nov 22, 2018 by MultiChain
selected Nov 25, 2018 by multichain_user123
Thank you very much.