getStakeActivation RPC Method

Returns epoch activation information for a stake account

Info

Ожидается, что этот метод будет удален в solana-core v2.0. Please use this alternative approach instead.

Параметры #

string required

Pubkey of stake Account to query, as base-58 encoded string

object optional

Объект конфигурации, содержащий следующее поле:

commitment string optional

minContextSlot number optional

Минимальный слот, который запрос может быть рассмотрен на

epoch u64 optional

epoch for which to calculate activation details. If parameter not provided, defaults to current epoch. DEPRECATED, inputs other than the current epoch return an error.

Результат #

The result will be a JSON object with the following fields:

  • state: <string> - the stake account's activation state, either: active, inactive, activating, or deactivating
  • active: <u64> - stake active during the epoch
  • inactive: <u64> - stake inactive during the epoch

Пример кода #

curl https://api.devnet.solana.com -X POST -H "Content-Type: application/json" -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getStakeActivation",
    "params": [
      "CYRJWqiSjLitBAcRxPvWpgX3s5TvmN2SuRY3eEYypFvT",
      {
        "epoch": 4
      }
    ]
  }
'

Замечание #

{
  "jsonrpc": "2.0",
  "result": {
    "active": 124429280,
    "inactive": 73287840,
    "state": "activating"
  },
  "id": 1
}