LogoLogo
LogoLogo
  • Solana Staking API (GraphQL)
  • Overview
  • Supported Networks
  • GraphQL Base URL
  • Getting Started
  • Authentication
    • Obtaining an API Key
  • Mutation
    • SolanaStakeIntent
    • SolanaDeactivateIntent
    • SolanaCancelDeactivateIntent
    • SolanaWithdrawalIntent
    • SolanaCancelWithdrawalIntent
  • Query
    • SolanaGetStakeAccounts
    • SolanaGetDeactivationIntents
    • SolanaGetDeactivatableAmount
    • SolanaGetWithdrawableAmount
    • SolanaListWithdrawalIntents
Powered by GitBook
On this page
  1. Mutation

SolanaWithdrawalIntent

POST SolanaWithdrawalIntent

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.

Headers

Name
Value

Content-Type

application/json

Authorization

<API Key>

Body

### 🧪 Example Mutation

```graphql
mutation SolanaWithdrawalIntent {
    SolanaWithdrawalIntent(
        input: {
            network: "devnet"               # String!
            amount: "1000000000"            # String!
            withdrawal_address: "5xo1...",  # String!
            delegator_address: "5xo1..."    # String!
            withdrawal_authority: "5xo1..." # String!
        }
    ) {
        ... on WithdrawalIntentResponse {
            withdrawal_intent_id
            customerId
            protocol
            network
            solana {
                total_withdraw_amount
                withdraws {
                    unsigned_transaction
                    withdrawal_authority_public_key
                    stake_account_address
                    stake_id
                    amount
                    expiration_time
                }
            }
        }
        ... on ErrorResponse {
            code
            message
        }
    }
}
{
    data: {
        WithdrawalIntentResponse {
            withdrawal_intent_id, # String
            customerId, # String
            protocol, # String
            network, # String
            solana {
                total_withdraw_amount, # String!
                withdraws {
                    unsigned_transaction, # String!
                    withdrawal_authority_public_key, # String!
                    stake_account_address, # String!
                    stake_id, # String!
                    amount, # String!
                    expiration_time, # Int!
                }
            }
        }
    }
}
{
    data: {
        ErrorResponse: {
            __typename: "ErrorResponse",        # String!
            code: 500,                          # Int!
            message: "Invalid public key input" # String!
        }
    }
}

Last updated 1 month ago

Page cover image