sendmany method - where should asset class be specified?

+1 vote

Hi there,

 

I'm trying to create a transaction to many addresses with the sendmany method like so:

multichain-cli chain1 sendmany "1D1FYAEBKT6RgmPxcnZK7NRqgCpryNt18KMv4i" "{\"1SVdbBG23BcDwiB9o2woA7c6YddNaFMN9wFRPK\":2.0,\"1X8sZWWDmjZANgKx4oBqYofPo2wKox5fJqYNhY\":7.0}"

 

I'm getting the error: {"code":-3,"message":"Invalid amount"}

 

I suspect this is happening because I'm not specifying the asset class, and I couldn't find any reference in the documentation. How is it implemented?

 

Thanks!

asked Dec 27, 2015 by Nico

1 Answer

+1 vote
 
Best answer

MultiChain doesn't yet have an update version of the sendmany API for sending to multiple recipients in a single transaction. You can either use the raw transaction interface (quite tricky but feasible) or else just issue many sendassetfrom or sendfromaddress calls in sequence. In a private blockchain with no transaction fees there's less advantage to combining multiple recipients in a single transaction.

answered Dec 27, 2015 by MultiChain
...