Disburse a neuron
Intermediate
Tutorial
Since version | 1.4.0 |
Idempotent? | No |
Minimal access level | controller |
This section will show you how to use Rosetta to disburse an existing neuron.
Prerequisites:
account.address
is the ledger address of the neuron controller or hotkey.amount
is the amount that should be extracted form the dissolved neuron and needs to be eqal or less than the amount of ICP locked in the neuron.metadata.recipient
contains an account_identifier that should receive the ICP after the neuron is disbursed.- The neuron needs to be in a
DISSOLVED
state to be able to be disbursed.
Postconditions:
- The neurons locked funds were reduced by the amount specified in the request.
metadata.recipient
received the specified amount.
curl --location '0.0.0.0:8081/construction/payloads' --header 'Content-Type: application/json' --data '{
"network_identifier": {
"blockchain": "Internet Computer",
"network": "00000000000000020101"
},
"public_keys": [
{
"hex_bytes": "047a83e378053f87b49aeae53b3ed274c8b2ffbe59d9a51e3c4d850ca8ac1684f7131b778317c0db04de661c7d08321d60c0507868af41fe3150d21b3c6c757367",
"curve_type": "secp256k1"
}
],
"operations": [
{
"operation_identifier": {
"index": 0
},
"type": "DISBURSE",
"account": {
"address": "8b84c3a3529d02a9decb5b1a27e7c8d886e17e07ea0a538269697ef09c2a27b4"
},
"amount": {
"value": "1000000000",
"currency": {
"symbol": "ICP",
"decimals": 8
}
},
"metadata": {
"neuron_index": 2,
"recipient": "47e0ae0de8af04a961c4b3225cd77b9652777286ce142c2a07fab98da5263100"
}
}
],
"metadata": null
}'