This script allows to stake DOT via the Fireblocks system using the RAW signing API feature.
All staking operations now happen on Polkadot Asset Hub, not the Relay Chain.
After the November 2025 migration:
- ✅ Staking operations (bond, unbond, nominate, chill, etc.) execute on Asset Hub
- ✅ DOT balances remain on Asset Hub
- ✅ No cross-chain transfers needed for staking
- ℹ️ The SDK automatically connects to the correct endpoint (Asset Hub)
Version 2.0.0 introduces a breaking change; as per this forum post on Polkadot - the controller is being deprecated.
As a result the following breaking changes were introduced:
- The function
setControllerwill no longer work and will results in an error - The function
bondno longer accepts 4 arguments, instead only 3 arguments -vaultAccountId: string, amount?: number, rewardDestination?: string(thecontrollerargument was removed)
- Clone this repo locally
- cd into the directory
- Run:
npm install
- Make sure that typescript is installed globally:
npm install -g typescript
Prerequisites:
-
Create the following vault accounts with DOT wallet within each:
a. Stash Account - holds the amount to stake
b. (optional) Proxy account - for security reasons, will get permission to sign staking operations on behalf of the stash
-
Enable RAW signing feature by contacting Fireblocks's support team
-
Set transaction authorization policy rule that governs the RAW signing operation, the policy should include the following parameters:
a. Initiator
b. Designated Signer
c. Asset - DOT
d. Source (vault accounts) - Optional
e. Authorizers - Optional
How to stake DOT
-
addProxy(<stash_account_vault_account_id>, <proxy_dot_address>);
-
bond(<stash_account_vault_account_id>, <amount_to_stake>, <stash_account_address>, optional - <reward_destination>);
reward_destination - Can be one of the following:
1. Stash (Default)
2. Staked - the rewards are sent back to the Stash and automatically bonded
How to stake extra DOT
- bondExtra(<stash_account_vault_account_id>, <amount_to_bond>)
How to stop staking
-
chill(<vault_account_id>); // stash or proxy
-
unbond(<vault_account_id>, <amount_to_unbond>);
-
28 days after unbond() - withdrawUnbonded(<vault_account_id>);
-
Optional - removeProxy(<vault_account_id>, <proxy_dot_address>);
How to change controller
- setController(<stash_vault_account_id>, <controller_address>) // Deprecated, see update above
How to call methods from a proxy account
With the following structure of accounts:
- Stash account:
vaultAccountId = 0
address = 131AxR1JdcYdtnzT5nqzVRwDJC5GWqP4S8bKpixdMGcwRhhQ
2. Proxy account:
vaultAccountId = 2
address = 14ZGCffp5gMerBPHpC75aM4y5THxfUnDrtFGebGLrQUD2sME
**_Following the examples in 'How To Stake DOT', we executed:_**
- addProxy('1', '14ZGCffp5gMerBPHpC75aM4y5THxfUnDrtFGebGLrQUD2sME')
- bond('0', 100, '16Co1rwKf7XdRF8JBBX5uAxP23XZKdXYp5w9pax3zY7t2Kk4')