thetacli.Send

This API sends the Theta/TFuel tokens. Note the API call can send either Theta tokens or TFuel tokens, or both in one shot.

Parameters

Object NameRequiredTypeDetail
chain_idStringID of the chain
fromStringThe address of the account to send tokens from
toStringThe address of the receipient account
thetaweiStringThe amount of Theta tokens to be sent (in ThetaWei, 1 Theta = 10^18 ThetaWei)
tfuelweiStringThe amount of TFuel tokens to be sent (in TFuelWei, 1 TFuel = 10^18 TFuelWei)
feeStringThe transaction fee in TFuelWei
sequenceStringThe expected sequence number of the from account
asyncBooleanA boolean flag. If async is set to false, the RPC call will wait until the transaction has been included in a block, or a timeout reached. Otherwise, the RPC call will return immediately with the transaction hash
"params": [
    {
      "chain_id": "privatenet",
      "from": "0x2E833968E5bB786Ae419c4d13189fB081Cc43bab",
      "to": "0xA47B89c94a50C32CEACE9cF64340C4Dce6E5EcC6",
      "thetawei": "99000000000000000000",
      "tfuelwei": "88000000000000000000",
      "fee": "1000000000000",
      "sequence": "6",
      "async": true
    }
]

Result

Result Fields

KeyTypeDetail
hashStringthe hash of the transaction
blockStringthe details of the block that has included the transaction

Example

Async Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"thetacli.Send","params":[{"chain_id":"privatenet", "from":"0x2E833968E5bB786Ae419c4d13189fB081Cc43bab", "to":"0xA47B89c94a50C32CEACE9cF64340C4Dce6E5EcC6", "thetawei":"99000000000000000000", "tfuelwei":"88000000000000000000", "fee":"1000000000000", "sequence":"6", "async":true}],"id":1}'

Async Return

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "hash": "0xe3e82ae1e08ca49f85842729bd3c70ba0874d59cca3812fe0807506463851d22",
        "block": null
    }
}

Sync Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"thetacli.Send","params":[{"chain_id":"privatenet", "from":"0x2E833968E5bB786Ae419c4d13189fB081Cc43bab", "to":"0xA47B89c94a50C32CEACE9cF64340C4Dce6E5EcC6", "thetawei":"99000000000000000000", "tfuelwei":"88000000000000000000", "fee":"1000000000000", "sequence":"6", "async":false}],"id":1}'

Sync Return

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "hash": "0xd4dfa1b763cac0c18c816e31ff585c01f2c4f2604dfff01cb6638d6d19e1bd1e",
        "block": {
            "ChainID": "privatenet",
            "Epoch": 170511,
            "Height": 170472,
            "Parent": "0xe36483c52eeee44634038252bb33dfe6b70c439c94c89236c6f18c1a4a676e01",
            "HCC": {
                "Votes": {},
                "BlockHash": "0xe36483c52eeee44634038252bb33dfe6b70c439c94c89236c6f18c1a4a676e01"
            },
            "TxHash": "0xff0d7f1bd6aa699369a935de46c287b30917958c6dbd2d542d31548eaf279525",
            "ReceiptHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
            "Bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
            "StateHash": "0x49374ccea64633a51358816d29a55f372d0fbe7e2f9cb1447ddd2c7519fc17e5",
            "Timestamp": 1550129583,
            "Proposer": "0x2e833968e5bb786ae419c4d13189fb081cc43bab",
            "Signature": "0x96dad1ff2ccc4eb2e18ca99f488cb9d6e6f3333c53a3347d7f8ded5f7301b613763bf0301a85b8f8e7342858c29dd1b262b1b6bdb9552fa5c9b6b61a9b4f6d5c01"
        }
    }
}
Language
Click Try It! to start a request and see the response here!