getStakingAccounts()
Return information about staking accounts.
This method calls /solana/{network}/staking/getStakingAccounts and returns a list of accounts that can be used for staking in the Solana network.
Parameters
await client.solana.getStakingAccounts({
stakeAuthorities: [
'9i5cTqci1W6DHdYfT7WbiNhP5DXvnPNTXvS9fTBFfuSw',
'AaMC5y1RofbY3unyrahRzyCzsesp7rfGuaGegbAg1Hxb',
],
stakeAccounts: [
'9i5cTqci1W6DHdYfT7WbiNhP5DXvnPNTXvS9fTBFfuSw',
'AaMC5y1RofbY3unyrahRzyCzsesp7rfGuaGegbAg1Hxb',
],
withdrawAuthorities: [
'9i5cTqci1W6DHdYfT7WbiNhP5DXvnPNTXvS9fTBFfuSw',
'AaMC5y1RofbY3unyrahRzyCzsesp7rfGuaGegbAg1Hxb',
],
status: 'active',
});| network string Solana network: mainnet-beta — production network.testnet — testnet.If not specified, the method will use the default value from the constructor . |
| stakeAuthorities string[] List of account addresses that can perform staking operations with staking accounts. |
| stakeAccounts string[] List of staking account addresses. |
| withdrawAuthorities string[] List of account addresses that can perform withdrawal operations with staking accounts. |
| status string Staking account status: active, inactive, activating, deactivating. |
Result
In the resulting object, the field accounts is a list of objects, each representing a staking account.
{
"accounts": [
{
"stakeAccount": "Fw82VhehY4yazX6tcZfNQWTsqHDSXaGmwVkbJYegDMbG",
"stakeAuthority": "9i5cTqci1W6DHdYfT7WbiNhP5DXvnPNTXvS9fTBFfuSw",
"withdrawAuthority": "9i5cTqci1W6DHdYfT7WbiNhP5DXvnPNTXvS9fTBFfuSw",
"voteAccount": "9i5cTqci1W6DHdYfT7WbiNhP5DXvnPNTXvS9fTBFfuSw",
"status": "active",
"amount": 1,
"amountWithoutRentExemption": 1,
"stakeAmounts": {
"active": 1000000000000,
"inactive": 1000000000000
}
}
]
}| stakeAccount string Account address that stores tokens for staking. |
| stakeAuthority string Account address that can perform staking operations with the staking account. |
| withdrawAuthority string Account address that can perform withdrawal operations with the staking account. |
| voteAccount string Vote account address. |
| status string Stake account status: active, inactive, activating, deactivating. |
| amount number Amount of tokens to stake in lamports (1 SOL = 10⁹ lamports). |
| amountWithoutRentExemption number Amount of tokens to stake in lamports (1 SOL = 10⁹ lamports) without rent exemption. |
| stakeAmounts object Information about delegated stake amounts. active — amount of active stake in lamports.inactive — amount of inactive stake in lamports. |
What's next?
- stake()
- Staking API reference
Updated 4 months ago
Did this page help you?