Version
Show / Hide Table of Contents

sendfrom Method

Transfer from the specified address to the destination address.

Before you can invoke this method you must:

  • Open the wallet in NEO-CLI.

  • Install the plugin RpcWallet .

Parameters

  • asset_id:Asset ID(asset identifier),The RegistTransaction ID of the asset at the time of registration.

    For NEO:c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b

    For NeoGas:602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7

    The remaining asset IDs can be passed through the CLI commandline, the list Asset command query can also be queried in the block chain browser.

  • from:transfering address.

  • to: destination address.

  • value:Transfer amount

  • fee:Optional parameter. Paying the handling fee helps elevate the priority of the network to process the transfer. It defaults to 0, and can be set to a minimum of 0.00000001.

  • Change_address: Change address, optional parameter, default is the first standard address in the wallet.

Example

Request body:

{
  "jsonrpc": "2.0",
  "method": "sendfrom",
  "params": ["602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7","AWg3L6W68bFfSS13Tf4rt8CRdG2ktaAjGb","AWg3L6W68bFfSS13Tf4rt8CRdG2ktaAjGb",1],
  "id": 1
}

Request body

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "txid": "0x60170ad03627ce45c7dd56ececbf33b26eab0845aa8b2cbbeecaefc5771b9eb1",
    "size": 262,
    "type": "ContractTransaction",
    "version": 0,
    "attributes": [],
    "vin": [
      {
        "txid": "0xd2188c1bd454ac883d79826e5c677deedb91cc61ec6d819df48ff4a963873adb",
        "vout": 1
      }
    ],
    "vout": [
      {
        "n": 0,
        "asset": "0x602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7",
        "value": "1",
        "address": "AWg3L6W68bFfSS13Tf4rt8CRdG2ktaAjGb"
      },
      {
        "n": 1,
        "asset": "0x602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7",
        "value": "17.4798197",
        "address": "AWg3L6W68bFfSS13Tf4rt8CRdG2ktaAjGb"
      }
    ],
    "sys_fee": "0",
    "net_fee": "0",
    "scripts": [
      {
        "invocation": "40a8d40e1652d7ad0c7bb59ef8217237037824af54ee5e46f2fd096c44dd46ef27fa7255010e2a8a2166af8a904e13b96bd3ac82e791633685824c35e7f2731e79",
        "verification": "2102883118351f8f47107c83ab634dc7e4ffe29d274e7d3dcf70159c8935ff769bebac"
      }
    ]
  }
}

Response Description:

Returns the transaction details as above if the transaction was sent successfully; otherwise the transaction is failed.

If the signature is incomplete, a pending transaction is returned. If the balance is insufficient, an error message is returned.