Skip to main content

state.Transfer RPC

Sends the given amount of coins from default wallet of the node to the given account address.

Updated on
Nov 7, 2024

state.Transfer RPC

Parameters

to
string
REQUIRED
The account address of the recipient to whom the funds will be transferred
amount
integer
REQUIRED
The amount of funds to be transferred, represented as an integer
object
object
REQUIRED
An object with the following fields:
gas_price
integer
The cost per gas unit for executing the transaction.
is_gas_price_set
boolean
Indicates if the gas price has been explicitly defined.
gas
integer
The maximum gas allocated for the transaction.
key_name
string
Identifier for the key used to sign the transaction
signer_address
string
REQUIRED
The address responsible for signing the transaction
fee_granter_address
string
The address covering the transaction fee on behalf of the signer.

Returns

result
object
The result object which contains the following fields:
height
integer
The block height at which the transaction was included
txhash
string
The unique hash of the transaction
data
string
Encoded data of the transaction response
raw_log
string
Stringified JSON log of raw transaction events
logs
array
An array of logs
msg_index
integer
Index of the message within the transaction
events
array
An array of events, which contains the following fields:
type
string
The type of event triggered
attributes
array
Key-value attributes associated with the event
key
string
The attribute key within the event
value
string
The value associated with the attribute key
gas_wanted
integer
Gas limit requested for the transaction
gas_used
integer
The amount of gas consumed by the transaction
events
array
Events triggered at the transaction level
type
string
The type of the transaction-level event.
attributes
array
Attributes of the transaction-level event
key
string
The encoded key for the attribute.
value
string
The value associated with the attribute key
index
boolean
Boolean indicating if the attribute is indexed
Request
1
curl --location 'https://docs-demo.celestia-mainnet.quiknode.pro/' \
2
--header 'Content-Type: application/json' \
3
--data '{
4
"id": 1,
5
"jsonrpc": "2.0",
6
"method": "state.Transfer",
7
"params": [
8
"ACCOUNT_ADDRESS",
9
42,
10
{
11
"gas_price": 0.002,
12
"is_gas_price_set": true,
13
"gas": 142225,
14
"key_name": "YOUR_CELESTIA_KEYS",
15
"signer_address": "GRANTER_ADDRESS",
16
"fee_granter_address": "GRANTER_ADDRESS"
17
}
18
]
19
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free