Blockdaemon Documentation
Post Withdrawal Intent
The Staking Integration API endpoint described on this page allows you to create a withdrawal intent.
POST Create a New Withdrawal Intent
Authentication Using API Key as an X-API-Key
Solana API Usage Example
POST Create a New Withdrawal Intent
https://svc.blockdaemon.com/boss/v1/{protocol}/{network}/withdrawal-intents
This endpoint is used to request withdrawal transactions that will be executed against available deactivated accounts. If you request more funds than are currently unlocked, the API will return an error indicating the maximum possible withdrawal.
You will receive at least one unsigned transaction (potentially multiple) that needs to be signed in order to complete the withdrawal.
Learn more: Solana API Usage Example
Note: You need to authorize your request via an API key provided when signing up for a staking account.
Path Parameters
You should specify a protocol and a network as path parameters, e.g.:
solana/mainnet
Supported Networks
Here is a full list of supported networks with their path parameters:
Protocol | Network | Path parameters |
Solana | Mainnet | solana/mainnet |
Solana | Devnet | solana/devnet |
Example Query
To create a new withdrawal intent in the Solana Mainnet, use the following:
https://svc.blockdaemon.com/boss/v1/solana/mainnet/deactivation-intents
Request Body
In the request body you need to specify the following:
amount
: The amount of SOL you want to withdrawwithdrawal address
: The receiving address – i.e. where the withdrawn funds should go
Example Body
{
"amount": "100",
"withdrawal_address": "5xot9PVkphiX2adznghwrAuxGs2zeWisNSxMW6hU6Hkj"
}
Example Response
The following is a typical response from POST Create a New Withdrawal Intent:
{
"solana": {
"withdraws": [
{
"unsigned_transaction": "0x22895118000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120087fed394b43849eebef1e88873cd9efdbe33136656e5148e659b8b2f33625d40000000000000000000000000000000000000000000000000000000000000030b81748644e23c4d950f9dd709f3eb73d5eacd9657997e1d9dde7c4ebd8a6519ecb9d0a7fb603d3b68e023278f9650122000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020010000000000000000000000c509bb854c526af4cee5e037089f7aa8e091d8870000000000000000000000000000000000000000000000000000000000000060b36b79b4b206c0310472c117fa40c05342b5dc3e89f98f42c9da3ce6450d4c603cad55248017fd4eca3ab277cca64569193e4d487f5b2ea78a2bcdc81926c313c05842a3af318967a775783bba22519e8b8886587efa99aa7dab5784f792b187\n",
"withdrawal_authority_public_key": "5xot9PVkphiX2adznghwrAuxGs2zeWisNSxMW6hU6Hkj",
"stake_account_address": "5xot9PVkphiX2adznghwrAuxGs2zeWisNSxMW6hU6Hkj",
"amount": "100"
}
],
"total_withdraw_amount": "100"
}
}
Authentication Using API Key as an X-API-Key
When signing up for a staking account, you are provided with an API key.
To authenticate a Staking API request, pass your API key in the X-API-Key header:
curl -X POST \
'https://svc.blockdaemon.com/boss/v1/solana/mainnet/withdrawal-intents' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"amount": "100", "withdrawal_address": "5xot9PVkphiX2adznghwrAuxGs2zeWisNSxMW6hU6Hkj"}'
Solana API Usage Example
In this section you will find a TypeScript example showing how to send a Solana transaction using the Solana Staking Integration API: