sendmany

Initiates multiple transfers to multiple addresses in a transaction.

πŸ“˜

Before you can invoke this method, wallet must be open first.

Parameters

  • FROM ADDRESS
Object NameRequiredTypeDetail
FROM ADDRESS❌StringThe transferring address.
  • ADDRESSES ARRAY - an array of objects, each contains assets and destination information
KeyRequiredTypeDetail
assetβœ…StringThe NEP-17 contract scripthash.
valueβœ…IntegerThe transfer amount.
addressβœ…StringThe destination address.
signers❌ArrayThe signature account of transaction.

The asset ID for NEO is 0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5

The asset ID for Gas is 0xd2a4cff31913016155e38e474a2c06d08be276cf

🚧

VALUE must be whole number

"params": [
  "NSk8xEBm3FNAFDueUf21cMugkWidJn5N1n",
  [{
      "asset": "0xd2a4cff31913016155e38e474a2c06d08be276cf",
      "value": 1,
      "address": "NUkaNyPbML2QYfxK99WqZYpR8rR4CyUoth"
    },
    {
      "asset": "0xd2a4cff31913016155e38e474a2c06d08be276cf",
      "value": 2,
      "address": "NbEsLzt9J1eMw5mbuStYBSwMfPBuWDx9DL"
    }
  ]
]

Result

The transaction details.

Example

Request

curl <your-endpoint> \
   -X POST \
   -H "Content-Type: application/json" \
   -d '{"jsonrpc": "2.0","id": 1,"method": "sendmany","params": ["NSk8xEBm3FNAFDueUf21cMugkWidJn5N1n",[{"asset": "0xd2a4cff31913016155e38e474a2c06d08be276cf","value": 100,"address": "NUkaNyPbML2QYfxK99WqZYpR8rR4CyUoth"},{"asset": "0xd2a4cff31913016155e38e474a2c06d08be276cf","value": 200,"address": "NbEsLzt9J1eMw5mbuStYBSwMfPBuWDx9DL"}]]}'

Return

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "hash": "0x5d382cdf5161b282ccc8ce5861b2b245d41f14cb71c1519a301c222d1684377a",
        "size": 335,
        "version": 0,
        "nonce": 1478966502,
        "sender": "NSk8xEBm3FNAFDueUf21cMugkWidJn5N1n",
        "sysfee": "1995556",
        "netfee": "131852",
        "validuntilblock": 1352961,
        "signers": [
            {
                "account": "0xcb285efa97f33e48e1bf47cf78790e25aedfec4a",
                "scopes": "CalledByEntry"
            }
        ],
        "attributes": [],
        "script": "CwBkDBRg8lm0LQTyz4p2dP9CgRHqcvdwJAwUSuzfriUOeXjPR7/hSD7zl/peKMsUwB8MCHRyYW5zZmVyDBTPduKL0AYsSkeO41VhARMZ88+k0kFifVtSOQsByAAMFKgc6h1F4NoM+nIwEDSlXkOCjlMEDBRK7N+uJQ55eM9Hv+FIPvOX+l4oyxTAHwwIdHJhbnNmZXIMFM924ovQBixKR47jVWEBExnzz6TSQWJ9W1I5",
        "witnesses": [
            {
                "invocation": "DEA2aOIriFFJS8LLN/ZH3NA8Ohaigj5AESX2aes6bKb9b8PQ2SyXU6DOKuFxJUPGWBrx9j3mVxX+F2LFYxQASkf/",
                "verification": "DCED3k3+UTmOhKZSHB3DKihzMPPA7YvgkWC0V6AW33D9EDhBVuezJw=="
            }
        ]
    }
}
Language
Click Try It! to start a request and see the response here!