sending metadata along with sendassetfrom method

+1 vote

Hello,
Is it possible to append metadata to sendassetfrom method ?

asked Nov 11, 2015 by anonymous

1 Answer

+1 vote

Unfortunately we don't yet have a direct API for doing this, but it's planned for inclusion shortly.

In the meantime, you can send a transaction with metadata using the following calls in sequence:

preparelockunspentcreaterawtransaction → appendrawmetadata → signrawtransaction → sendrawtransaction

Each one uses the output of the previous call. Please note there's a problem in the current alpha 9 with sending transactions which spend the output from preparelockunspent, so you should wait for alpha 10 to do this.

answered Nov 11, 2015 by MultiChain
Is there another way to send metadata from wallet to wallet?
when you guys planing to release the next version?
Hopefully in a couple of weeks we'll have a version with an easier API for sending transactions with metadata. In the meantime FYI there's a full step-by-step example of sending metadata in section 6 of the Getting Started guide: http://www.multichain.com/getting-started/
in example 6 transaction sent from node to wallet\address, i would like to send it from\to wallet.
I'm afraid I don't understand the distinction you're making, because every address belongs to a wallet. Can you please explain further what's different between that example and what you want to achieve?
my aim is to send some assets from address[1] to address[2] along with metadata.
i meant wallet=address.
In that case you just need to replace preparelockunspent with preparelockunspentfrom, to choose the specific source address.
oh, great, can you send my the syntax of the preparelockunspentfrom and  createrawtransaction with source and destination addresses?
It's exactly the same as the example in the tutorial, except there's an additional parameter to preparelockunspentfrom which is the 'from address'. That extra parameter comes first.
You may be interested that alpha 12 adds new sendwithmetadata and sendwithmetadatafrom APIs that make all this a lot easier.
...