Skip To Content

Blockdaemon Documentation

Post Stake Intent

The Staking Integration API endpoint in this page allows you to create your stake intents.

POST Create a New Stake Intent
Authentication Using API Key as an X-API-Key
Solana API Usage Example


POST Create a New Stake Intent

https://svc.blockdaemon.com/boss/v1/{protocol}/{network}/stake-intents

Returns an unsigned transaction that can be used to delegate your tokens to the validator specified in the request.

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 stake intent in the Solana Mainnet, use the following:

https://svc.blockdaemon.com/boss/v1/solana/mainnet/stake-intents

Request Body

In the request body you need to specify the following:

  • amount: The amount of SOL you want to stake
  • validator_address: The public address of the validator node that you intend to delegate your tokens to
  • delegator_address: The address sending the funds to be staked
  • staking_authority(optional): The stake authority can be considered the manager of the stake account. It is used to sign transactions for the following operations but doesn’t have control over the funds:
    • Delegating stake
    • Deactivating the stake delegation
    • Splitting the stake account (creating a new stake account with a portion of the funds)
    • Merging two stake accounts into one
    • Setting a new stake authority
    • Note:  When not specified, this will default to the delegator_address
  • withdrawal_authority (optional): The withdraw authority is used to sign transactions for the following operations:
    • Withdrawing an un-delegated stake into a wallet address
    • Setting a new withdrawal authority
    • Setting a new stake authority (thus, the withdrawal authority is the ultimate owner of the account)
    • Note: When not specified, this will default to the delegator_address

Example Request Body

{
    "amount": "100",
    "validator_address": "5xot9PVkphiX2adznghwrAuxGs2zeWisNSxMW6hU6Hkj",
    "delegator_address": "5xot9PVkphiX2adznghwrAuxGs2zeWisNSxMW6hU6Hkj",
    "staking_authority": "5xot9PVkphiX2adznghwrAuxGs2zeWisNSxMW6hU6Hkj",
    "withdrawal_authority": "5xot9PVkphiX2adznghwrAuxGs2zeWisNSxMW6hU6Hkj"
}

Response Example

The following is a typical response from POST Create a New Stake Intent:

{
    "stake_intent_id": "stake_intent_Wgx98Rbi8nQuL9ddn3mTk1",
    "platform": "solana",
    "network": "mainnet",
    "solana": {
        "unsigned_transaction":                        
"0x22895118000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120087fed394b43849eebef1e88873cd9efdbe33136656e5148e659b8b2f33625d40000000000000000000000000000000000000000000000000000000000000030b81748644e23c4d950f9dd709f3eb73d5eacd9657997e1d9dde7c4ebd8a6519ecb9d0a7fb603d3b68e023278f9650122000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020010000000000000000000000c509bb854c526af4cee5e037089f7aa8e091d8870000000000000000000000000000000000000000000000000000000000000060b36b79b4b206c0310472c117fa40c05342b5dc3e89f98f42c9da3ce6450d4c603cad55248017fd4eca3ab277cca64569193e4d487f5b2ea78a2bcdc81926c313c05842a3af318967a775783bba22519e8b8886587efa99aa7dab5784f792b187\n",
        "stake_account_public_key": "5xot9PVkphiX2adznghwrAuxGs2zeWisNSxMW6hU6Hkj"
    },
    "customer_id": "4d2517d1-3059-4720-8e52-a51c6a0f1f77"
}

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/stake-intents' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"amount": "100", "validator_address": "5xot9PVkphiX2adznghwrAuxGs2zeWisNSxMW6hU6Hkj", "delegator_address": "5xot9PVkphiX2adznghwrAuxGs2zeWisNSxMW6hU6Hkj", "staking_authority": "5xot9PVkphiX2adznghwrAuxGs2zeWisNSxMW6hU6Hkj", "withdrawal_authority": "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:

We don't support Internet Explorer

Please use Chrome, Safari, Firefox, or Edge to view this site.