Syntax for sendwithmetadatafrom

+2 votes
Hi,

I've setup multichain, am using JSON-RPS, and am able to use basic APIs like getinfo, getaccountaddress, sendfrom using both JSON-RPC and command line client. However, I'm having issues using sendwithmetadatafrom.

I'm able to send 0 amount from one account to another using both JSON-RPC and CLI using sendfrom, but not using sendwithmetadatafrom. I get 500 using JSON-RPC, CLI gives following error - error: {"code":-4,"message":"Insufficient funds"}.

Following is the CLI command -

./multichain-cli <chain_name> sendwithmetadatafrom <from_address> <to_address> 0.0 0xA

 

What is the correct syntax for this command? What is the data type of metadata? Is it a single integer or an array of integers?
asked Feb 15, 2016 by dum

1 Answer

0 votes

First, the metadata should be expressed as hex directly, e.g. A1B2C3, without the 0x prefix. But it sounds like there might be another issue, so please let me know if that helps, and if not, we'll look into it further.

answered Feb 15, 2016 by MultiChain
I am having the same problem. This has not resolved it.
We can't yet reproduce this problem - can you please (a) confirm which MultiChain version you are using, and (b) reproduce the whole transcript from the moment of blockchain creation, if it's not too long?
Actually - I suspect it is because I'm sending from an address that has no funds/assets. It works when sending from an address that has assets.
If send permissions have been granted to an address, it should still be able to use sendwithmetadatafrom, even if it is sending a zero amount.
Is there a limit on the length of String that gets sent as metadata?
It's limited by the max-std-op-return-size parameter of your blockchain, but if you set that parameter high enough, we've tested it successfully up to 8MB of metadata per transaction.
...