scoin / multichain-node

A simple wrapper for Multichain's JSON RPC api that parses your input.
MIT License
73 stars 54 forks source link

how to format the arg for method "createRawSendFrom" #25

Closed veyhong closed 6 years ago

veyhong commented 6 years ago

in command.js : createRawSendFrom: ["from", "amounts", {"data": []}, {"action": ""}];

but in the API document : reaterawsendfrom SENDER_ADDRESS '{"RECEIVER_1":{"asset3":20,"asset4":30},"REEIVER_2":{"asset3":30,"asset4":20}}' '["5554584f732046545721"]' send // This command will send from sender multiple assets to multiple addresses, but I cannot guess any arg to input in this API in multichain-node at all. Could anyone help to point me the right direction, or if the command in nodejs api is not yet support this api call yet ? Thank you in advance.

veyhong commented 6 years ago

Solved: I finally found the right combination.

let arg = {
        "from":sender,
        "amounts":{receivers[i]:{"asset1":1}},
        "action":"send"
    };