The staking proxy flow for Polkadot will walk your application through the process of adding proxy rights to another account.
Proxy On-Chain depositProxies require deposits in the native currency (i.e. DOT) to be created. The deposit is required because adding a proxy requires some storage space on-chain, which must be replicated across every peer in the network.
Once the proxy is removed, both the storage space and the deposited amount are returned.
The required deposit amount for n proxies is equal to:
ProxyDepositBase + ProxyDepositFactorWhere the ProxyDepositBase is the required amount to be reserved for an account to have a proxy list (creates one new item in storage). For every proxy the account has, an additional amount defined by the ProxyDepositFactor is reserved as well.
The ProxyDepositBase is 20.008 DOT and the ProxyDepositFactor is 0.033 DOT.
If testing on WestendPlease use
5FsrYox6CGyZ7rovGAmn17mJyHXf8QFN82KoGYWz6eHnRRXWas your proxy account address. For mainnet, please ask Figment
Create New Add Staking Proxy Flow
To add a staking proxy, create a new flow with a POST request to /api/v1/flows.
URL
POST https://api.figment.io/flows
Request
flow:objectnetwork_code* :stringNetwork this flow operates on (ex.polkadot).chain_code* :stringChain this flow operates on (ex.westend).operation* :stringThe operation to perform (ex.add_proxy).
{
"protocol": "polkadot",
"network": "westend",
"operation": "add_proxy"
}Response
id:stringID of the flow.operation:stringThe Staking API operation being performed by this flow.state:stringThe current state of the flow.actions:arrayIt includes thename&inputsof all next possible actions.create_add_proxy_tx: Use this action to generate an add proxy transaction.proxy_account_address: The address to which you want to grant proxy rights.proxied_account_address: The account whose rights will be proxied.
data:objectFlow & transaction data.
{
"id": "d04c0129-50b8-4a44-8df0-b52f2d1d6919",
"operation": "add_proxy",
"state": "initialized",
"actions": [
{
"name": "create_add_proxy_tx",
"inputs": [
{
"name": "proxy_account_address",
"display": "Proxy Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "proxied_account_address",
"display": "Proxied Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
}
]
}
],
"data": {
"proxy_account_address": null,
"proxied_account_address": null,
"add_proxy_transaction": null
},
"protocol": "polkadot",
"network": "westend",
"created_at": "2025-03-27T18:03:41.296Z",
"updated_at": "2025-03-27T18:03:41.296Z"
}
Submit Add Proxy Data
After collecting the required inputs, send a PUT request to /api/v1/flows/[:flow_id]/next to proceed to the next step.
URL
PUT https://api.figment.io/flows/[:flow_id]/next
Request
name* :create_add_proxy_txinputs* :objectproxy_account_address* :stringThe address to which you want to add proxy rights.proxied_account_address* :stringThe account whose rights will be proxied.
{
"name": "create_add_proxy_tx",
"inputs": {
"proxy_account_address": "5FsrYox6CGyZ7rovGAmn17mJyHXf8QFN82KoGYWz6eHnRRXW",
"proxied_account_address": "5DqYk5FDueD5NFxySRx2co5xg5cEChpsPhQTHUB9uAHERRaE"
}
}Response
id:stringID of the flow.operation:stringThe Staking API operation being performed by this flow.state:stringThe current state of the flow.actions:arrayIt includes thename&inputsof all next possible actions.refresh_add_proxy_tx: If you need to get a fresh version of the transaction payload (i.e., the nonce has increased).sign_add_proxy_tx: Submit a signed transaction payload or an array of signatures to continue the flow. Refer to the guides Signing Transactions with Figment's npm Package and Signing Transactions with the Fireblocks API for details.confirm_add_proxy_tx_by_hash: Submit a previously completed transaction hash to continue the flow. Refer to the guide Advance Flows Using a Transaction Hash.
data:objectFlow & transaction data.
{
"id": "d04c0129-50b8-4a44-8df0-b52f2d1d6919",
"operation": "add_proxy",
"state": "add_proxy_tx_signature",
"actions": [
{
"name": "refresh_add_proxy_tx",
"inputs": [
{
"name": "proxy_account_address",
"display": "Proxy Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "5FsrYox6CGyZ7rovGAmn17mJyHXf8QFN82KoGYWz6eHnRRXW"
},
{
"name": "proxied_account_address",
"display": "Proxied Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "5DqYk5FDueD5NFxySRx2co5xg5cEChpsPhQTHUB9uAHERRaE"
}
]
},
{
"name": "sign_add_proxy_tx",
"inputs": [
{
"name": "transaction_payload",
"display": "Transaction Payload",
"description": "",
"type": "signed_transaction",
"validations": [],
"array": false,
"default_value": null,
"signers": [
"5DqYk5FDueD5NFxySRx2co5xg5cEChpsPhQTHUB9uAHERRaE"
],
"transaction_payload": "0xa404160100a8aa7e9be09ceb0d3db02ae159bd105253e553bb6c944de7d4c35dfda4ae772c0300000000"
},
{
"name": "signatures",
"display": "Signatures",
"description": "",
"type": "array_of_signatures",
"validations": [],
"array": true,
"default_value": null,
"element_type": "signature_data",
"signers": [
"5DqYk5FDueD5NFxySRx2co5xg5cEChpsPhQTHUB9uAHERRaE"
],
"transaction_payload": "0xa404160100a8aa7e9be09ceb0d3db02ae159bd105253e553bb6c944de7d4c35dfda4ae772c0300000000",
"signing_payload": "0x160100a8aa7e9be09ceb0d3db02ae159bd105253e553bb6c944de7d4c35dfda4ae772c03000000000048000091880f001b000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e00",
"inputs": [
{
"name": "account_address",
"display": "Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "signature",
"display": "Signature",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
}
]
}
]
},
{
"name": "confirm_add_proxy_tx_by_hash",
"inputs": [
{
"name": "hash",
"display": "Hash",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "block_number",
"display": "Block Number",
"description": "",
"type": "integer",
"validations": [],
"array": false,
"default_value": null
}
]
}
],
"data": {
"proxy_account_address": "5FsrYox6CGyZ7rovGAmn17mJyHXf8QFN82KoGYWz6eHnRRXW",
"proxied_account_address": "5DqYk5FDueD5NFxySRx2co5xg5cEChpsPhQTHUB9uAHERRaE",
"add_proxy_transaction": {
"raw": "0xa404160100a8aa7e9be09ceb0d3db02ae159bd105253e553bb6c944de7d4c35dfda4ae772c0300000000",
"signing_payload": "0x160100a8aa7e9be09ceb0d3db02ae159bd105253e553bb6c944de7d4c35dfda4ae772c03000000000048000091880f001b000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e00",
"signed": null,
"hash": null,
"status": null,
"error": null,
"signatures": null,
"block_time": null,
"block_number": null,
"last_valid_block_height": null,
"proxy": null
}
},
"protocol": "polkadot",
"network": "westend",
"created_at": "2025-03-27T18:03:41.296Z",
"updated_at": "2025-03-27T18:08:54.600Z"
}Submit Signed Add Proxy Transaction for Broadcast
Before broadcasting the transaction, you must sign the transaction_payload you received in the previous step. After signing the transaction, you will PUT /api/v1/flows/[:flow_id]/next (as always!) and the Staking API will broadcast the transaction to the Polkadot network.
URL
PUT https://api.figment.io/flows/[:flow_id]/next
Request
name* :sign_add_proxy_txinputs* :objecttransaction_payload* : Signed transaction payload from the previous step's response.signatures:arrayofobjectThe signatures array can be used instead of sending a transaction payload when the signing keys are kept in a custodial solution, such as Fireblocks. Refer to the guide Signing Transactions with the Fireblocks API for details.
{
"name": "sign_add_proxy_tx",
"inputs": {
"transaction_payload": "0x3d0284004e6f98e193d7ab454d3fad247b17f76d2249df6ac865a4c7e2b599c49392fd33017cdeb40b087efb56cc5b21b05477c1d3c52d0b4cdcee6cc6bea3d64c689f8439d5aa5776d13e4bde360932fe2b2ae6462709eb76959b3bb4f255c70db3a9498400480000160100a8aa7e9be09ceb0d3db02ae159bd105253e553bb6c944de7d4c35dfda4ae772c0300000000"
}
}Response
id:stringID of the flow.operation:stringThe Staking API operation being performed by this flow.state:stringThe current state of the flow.add_proxy_tx_broadcasting: Transaction has been broadcast and is waiting confirmation.registered: Transaction has been confirmed and the proxy is complete.
actions:arrayIt includes thename&inputsof all next possible actions.data:objectFlow & transaction data.
{
"id": "d04c0129-50b8-4a44-8df0-b52f2d1d6919",
"operation": "add_proxy",
"state": "add_proxy_tx_broadcasting",
"actions": [
{
"name": "wait",
"estimated_state_change_at": "2025-03-27T18:16:11.278Z",
"inputs": [
]
}
],
"data": {
"transactions": [
{
"code": "add_proxy",
"amount": null,
"raw": "0xa404160100a8aa7e9be09ceb0d3db02ae159bd105253e553bb6c944de7d4c35dfda4ae772c0300000000",
"signing_payload": "0x160100a8aa7e9be09ceb0d3db02ae159bd105253e553bb6c944de7d4c35dfda4ae772c03000000000048000091880f001b000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e00",
"signed": "0x3d0284004e6f98e193d7ab454d3fad247b17f76d2249df6ac865a4c7e2b599c49392fd33017cdeb40b087efb56cc5b21b05477c1d3c52d0b4cdcee6cc6bea3d64c689f8439d5aa5776d13e4bde360932fe2b2ae6462709eb76959b3bb4f255c70db3a9498400480000160100a8aa7e9be09ceb0d3db02ae159bd105253e553bb6c944de7d4c35dfda4ae772c0300000000",
"hash": "0x8f95f6d7dd524d97c7e75e22a37ed6e2734e33d168aaa3be6c6f51fe4d2e5cc1",
"status": null,
"error": null,
"signatures": [
{
"account_address": "5DqYk5FDueD5NFxySRx2co5xg5cEChpsPhQTHUB9uAHERRaE",
"signature": ""
}
],
"block_time": null,
"block_number": 25343973,
"last_valid_block_height": null,
"proxy": null,
"inputs": {
"proxy_account_address": "5FsrYox6CGyZ7rovGAmn17mJyHXf8QFN82KoGYWz6eHnRRXW",
"proxied_account_address": "5DqYk5FDueD5NFxySRx2co5xg5cEChpsPhQTHUB9uAHERRaE"
}
}
]
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2025-03-27T18:03:41.296Z",
"updated_at": "2025-03-27T18:15:11.111Z"
}Get Add Staking Proxy Flow Status
To get the current state of the existing flow, send a GET request to /api/v1/flows/[:flow_id] using the flow ID from the previous step.
URL
GET https://api.figment.io/flows/[:flow_id]
Request
- None
Response
id:stringID of the flow.operation:stringThe Staking API operation being performed by this flow.state:stringThe current state of the flow.add_proxy_tx_broadcasting: Broadcasting transactionregistered: Transaction broadcasted & confirmed
actions:arrayIt includes thename&inputsof all next possible actions.data:objectFlow & transaction data.
{
"id": "d04c0129-50b8-4a44-8df0-b52f2d1d6919",
"operation": "add_proxy",
"state": "registered",
"actions": [],
"data": {
"proxy_account_address": "5FsrYox6CGyZ7rovGAmn17mJyHXf8QFN82KoGYWz6eHnRRXW",
"proxied_account_address": "5DqYk5FDueD5NFxySRx2co5xg5cEChpsPhQTHUB9uAHERRaE",
"add_proxy_transaction": {
"raw": "0xa404160100a8aa7e9be09ceb0d3db02ae159bd105253e553bb6c944de7d4c35dfda4ae772c0300000000",
"signing_payload": "0x160100a8aa7e9be09ceb0d3db02ae159bd105253e553bb6c944de7d4c35dfda4ae772c03000000000048000091880f001b000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e00",
"signed": "0x3d0284004e6f98e193d7ab454d3fad247b17f76d2249df6ac865a4c7e2b599c49392fd33017cdeb40b087efb56cc5b21b05477c1d3c52d0b4cdcee6cc6bea3d64c689f8439d5aa5776d13e4bde360932fe2b2ae6462709eb76959b3bb4f255c70db3a9498400480000160100a8aa7e9be09ceb0d3db02ae159bd105253e553bb6c944de7d4c35dfda4ae772c0300000000",
"hash": "0x8f95f6d7dd524d97c7e75e22a37ed6e2734e33d168aaa3be6c6f51fe4d2e5cc1",
"status": "confirmed",
"error": null,
"signatures": [
{
"account_address": "5DqYk5FDueD5NFxySRx2co5xg5cEChpsPhQTHUB9uAHERRaE",
"signature": ""
}
],
"block_time": "2025-03-27T18:15:59.769Z",
"block_number": 25343976,
"last_valid_block_height": null,
"proxy": null
}
},
"protocol": "polkadot",
"network": "westend",
"created_at": "2025-03-27T18:03:41.296Z",
"updated_at": "2025-03-27T18:15:59.780Z"
}