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:

  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 0xf61eebf573ea36593fd43aa150c055ad7906ab83

​ GAS is 0x70e2301955bf1e74cbb31d18c2f96972abadb328 * 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": [
        "0x70e2301955bf1e74cbb31d18c2f96972abadb328",
        "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.