API Command 'Issue' Custom field

+1 vote
The RPC API documentation states that when creating assets, the Issue command can take metadata as JSON into a Custom Field parameter.  I have looked into this both using the multichain-cli command and through the C# client supplied.  Neither seem to allow this, am I missing something?
asked Jan 14, 2016 by anonymous
Please post exactly what you entered in multichain-cli and we can take a look. It is likely just a JSON formatting issue.
Hello, I'm trying to connect via rpc api.
I tried to use bitcoin-json-rpc-client API, but not found a way/method to connect with the Multichain.

Can you explain me how you managed to connect?

My topic with this doubt
http://www.multichain.com/qa/714/trying-to-connect-via-java-client

Thank you!
This is what I entered into the multichain-cli

multichain-cli chain1 issue <addressId> asset1 10 0.1 '{"asset1":50}'
I connected using the C# example code provided, I haven't tried using Java im afriad

1 Answer

0 votes

Based on your comment above, you missed out the native-amount parameter, which you should set as zero. It comes before the custom metadata parameter. Please see the API documentation for more details.

answered Jan 15, 2016 by MultiChain
Great thanks, so the Command Line works with the native-amount parameter specified.  However the JSON-RPC API gives an error stating "Invalid extra-params" when the JSON is passed through.  Is there a specific format that the API is expecting the additional parameter to be in?
The native-amount should be a number rather than a string. In general you can look at the first line output by multichain-cli to see exactly the JSON it's sending.
Great thanks for that.  You tip on inspecting the JSON returned when using the multichain-cli allowed me to compare it to the JSON returned from the API and spot the issue.
...