Skip to main content

sendfrom Method

Transfer from the specified address to the destination address.

note

Before you can invoke this method you must:

  1. Install the plugin RpcServer
  2. Call the RPC method openwallet to open the wallet first.

Parameter Description#

  • asset_id: Asset ID(asset identifier), the script hash of nep-17 contract.

    e.g. NEO is 0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5

​ GAS is 0xd2a4cff31913016155e38e474a2c06d08be276cf

  • from: transfering address.
  • address: destination address.
  • value: Transfer amount
  • signers: The signature account of transaction

Example#

Request body:

{    "jsonrpc": "2.0",    "id": 1,    "method": "sendfrom",    "params": [        "0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5",        "NgaiKFjurmNmiRzDRQGs44yzByXuSkdGPF",        "NikhQp1aAD1YFCiwknhM5LQQebj4464bCJ",        100000000    ]}

Request body:

{    "jsonrpc": "2.0",    "id": 1,    "result": {        "hash": "0xe01b16626dec583941c1053467100041ce868e3b35e5fe3a85e530792cc9149d",        "size": 252,        "version": 0,        "nonce": 2114899852,        "sender": "NgaiKFjurmNmiRzDRQGs44yzByXuSkdGPF",        "sysfee": "9999540",        "netfee": "1235610",        "validuntilblock": 5810,        "signers": [            {                "account": "0x86df72a6b4ab5335d506294f9ce993722253b6e2",                "scopes": "CalledByEntry"            }        ],        "attributes": [],        "script": "CwIA4fUFDBT6ifssFN8PWd3fBPblZRfys0qu6wwU4rZTInKT6ZxPKQbVNVOrtKZy34YUwB8MCHRyYW5zZmVyDBQos62rcmn5whgds8t0Hr9VGTDicEFifVtSOQ==",        "witnesses": [            {                "invocation": "DEAUQ3hUPg/qi77rnSzXRgd2RYdZCsPDBa/n0a6M+sCsOpC/YyLPeeoqcVNAyh73qpocOqdX1tnGeizh+C8cXoK0",                "verification": "EQwhAs7UMjl93ETtugMcC8O5M/KP3ZZ3eS17IObANt2qrPHiEQtBE43vrw=="            }        ]    }}

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.