NEAR Protocol Staking

Instructions: https://help.allnodes.com/en/articles/6759442-near-protocol-staking-api

Stake coins

POST https://www.allnodes.com/api/v1/staking

This endpoint allows you to get serialized unsigned transaction for staking coins.

Headers

NameTypeDescription

Authorization*

string

Bearer TOKEN

Request Body

NameTypeDescription

currencySymbol*

string

Must be "NEAR"

action*

string

Must be "stake"

accountID*

string

You wallet ID (Example: "allnodes.near")

accountPublicKey*

string

Your wallet public key (Example: "ed25519:1sTWdHCPJL3xkzxdg4ZkQm4d8A4TakDePXbpaGh4dAVE")

amount*

string

Amount to stake (in NEAR)

validatorID*

string

Validator ID to delegate (Example: "allnodes.poolv1.near")

{
  serializedTransaction: string;
}

Unbond coins

POST https://www.allnodes.com/api/v1/staking

This endpoint allows you to get serialized unsigned transaction for unbonding coins.

Headers

NameTypeDescription

Authorization*

string

Bearer TOKEN

Request Body

NameTypeDescription

currencySymbol*

string

Must be "NEAR"

action*

string

Must be "unbond"

accountID*

string

You wallet ID (Example: "allnodes.near")

accountPublicKey*

string

Your wallet public key (Example: "ed25519:1sTWdHCPJL3xkzxdg4ZkQm4d8A4TakDePXbpaGh4dAVE")

validatorID*

string

Validator ID to unbond from (Example: "allnodes.poolv1.near")

{
  serializedTransaction: string;
}

Withdraw stake (after unbonding period finished)

POST https://www.allnodes.com/api/v1/staking

This endpoint allows you to get serialized unsigned transaction for withdraw stake.

Unbonding period: 2 days

Headers

NameTypeDescription

Authorization*

string

Bearer TOKEN

Request Body

NameTypeDescription

currencySymbol*

string

Must be "NEAR"

action*

string

Must be "withdraw-stake"

accountID*

string

You wallet ID (Example: "allnodes.near")

accountPublicKey*

string

Your wallet public key (Example: "ed25519:1sTWdHCPJL3xkzxdg4ZkQm4d8A4TakDePXbpaGh4dAVE")

validatorID*

string

Validator ID to withdraw stake from (Example: "allnodes.poolv1.near")

{
  serializedTransaction: string;
}

Last updated