Transfer and stake tokens
#
Transfer tokensTo send tokens to another address use the following request:
{ "jsonrpc": "2.0", "method":"account.submit_transaction_single_step", "params": { "actions": [ { "type": "TokenTransfer", "from": "<from address>", "to": "<to address>", "amount":"<amount>", "rri":"<token id>" } ] }, "id": 1}
where:
<from address>
is the address of your wallet. For example: tdx1qspspt3pdggje2sx9n6qg29skscyac7rahyez3qsd7s26c4h3sfpqpqtw55e5
<to address>
is the address of the receiver. For example: tdx1qspxrm6q0dpr6kh58c6xnynt8g9wut9e44gs2mr4v07aks08zdc2xfqt0mpdt
<amount>
is the amount of the token. For example 1 token is 1000000000000000000
. 2 tokens is 2000000000000000000
, etc.
<token id>
is the RRI ID of the token. For XRD use the native token id: xrd_rr1qy5wfsfh
You should receive an output like this:
{ "result": { "txID": "ca1d43ad509ae4d2178b1d70a1a2864934e40379a4618627dc089ef45bf2cbd0" }, "id": 1, "jsonrpc": "2.0"}
Tip
You can lookup your transaction identifier using a Radix explorer or by an RPC call to an archive node
#
Stake tokensTo stake tokens to a validator use the following request:
{ "jsonrpc": "2.0", "method":"account.submit_transaction_single_step", "params": { "actions": [ { "type": "StakeTokens", "from": "<from address>", "validator": "<validator address>", "amount":"1000000000000000000000" } ] }, "id": 1}
where:
<from address>
is the address of your wallet. For example: tdx1qspspt3pdggje2sx9n6qg29skscyac7rahyez3qsd7s26c4h3sfpqpqtw55e5
<validator address>
is the address of the validator to stake to. For example the address of StakeSafe Amsterdam.
<amount>
is the amount of the tokens to stake. Minimum is 100 XRD. For example 100 tokens is 100000000000000000000
. 200 tokens is 200000000000000000000
, etc.
Make sure to use our validator address when staking with us:
rv1q0v80rfgsldx3zksfzurumdf5g3us8xa9sykf3fdevtrr557lgrmjv2cft5
You should receive an output like this:
{ "result": { "txID": "abc34b1055d18b3d560a449ad5b772c47751f257007fb3f4bafce480f403aa67" }, "id": 1, "jsonrpc": "2.0"}
#
Unstake tokensTo unstake your tokens from a validator use the following request:
{ "jsonrpc": "2.0", "method":"account.submit_transaction_single_step", "params": { "actions": [ { "type": "UnstakeTokens", "from": "<from address>", "validator": "<validator address>", "amount":"<amount>" } ] }, "id": 1}
where:
<from address>
is the address of your wallet. For example: tdx1qspspt3pdggje2sx9n6qg29skscyac7rahyez3qsd7s26c4h3sfpqpqtw55e5
<validator address>
is the address of the validator to unstake from. For example the address of StakeSafe Amsterdam.
<amount>
is the amount of the tokens to unstake. Minimum is 100 XRD. For example 100 tokens is 100000000000000000000
. 200 tokens is 200000000000000000000
, etc.
You should receive an output like this:
{ "result": { "txID": "4cedcfa94f9c3c3f33fca38f86e09df77309ec2f170c4feb68d89e69e32589e3" }, "id": 1, "jsonrpc": "2.0"}