Skip to main content
Version: main branch

state_sendTransaction

Sends a raw CBOR encoded signed transaction to the network. Returns the transaction hash, that can be used with state_getTransactionProof method to confirm the execution of the transaction.

Parameters

  1. tx (string) - Hex encoded raw transaction. See transactions API reference for details.

    params: [
    "0x838500657472616e7341018344830001f601f6830000f64101f6"
    ]

Returns

  • txHash (string) - Hex encoded transaction hash. The hash algorithm is a dependent on the partition configuration.

Example

Request

curl http://127.0.0.1:26866/rpc \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "state_sendTransaction",
"params": [
"0x838500657472616e7341018344830001f601f6830000f64101f6"
]
}'

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe883f3919c4072e459642a012cf7737cee311da0ade88aa14780484797784cd9"
}