Skip to content

Commit

Permalink
Remove GetStakeActivationResp RPC
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhly committed Oct 24, 2024
1 parent da4e1db commit 7aa6977
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 48 deletions.
24 changes: 0 additions & 24 deletions src/solana/rpc/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
GetSignatureStatusesResp,
GetSlotLeaderResp,
GetSlotResp,
GetStakeActivationResp,
GetSupplyResp,
GetTokenAccountBalanceResp,
GetTokenAccountsByDelegateJsonParsedResp,
Expand Down Expand Up @@ -761,29 +760,6 @@ def get_slot_leader(self, commitment: Optional[Commitment] = None) -> GetSlotLea
body = self._get_slot_leader_body(commitment)
return self._provider.make_request(body, GetSlotLeaderResp)

def get_stake_activation(
self,
pubkey: Pubkey,
epoch: Optional[int] = None,
commitment: Optional[Commitment] = None,
) -> GetStakeActivationResp:
"""Returns epoch activation information for a stake account.
Args:
pubkey: Pubkey of stake account to query
epoch: (optional) Epoch for which to calculate activation details. If parameter not provided,
defaults to current epoch.
commitment: Bank state to query. It can be either "finalized", "confirmed" or "processed".
Example:
>>> solana_client = Client("http://localhost:8899")
>>> solana_client.get_stake_activation().value.active # doctest: +SKIP
124429280
"""
warn("get_stake_activation is deprecated. Use get_account_info instead.", DeprecationWarning)
body = self._get_stake_activation_body(pubkey, epoch, commitment)
return self._provider.make_request(body, GetStakeActivationResp)

def get_supply(self, commitment: Optional[Commitment] = None) -> GetSupplyResp:
"""Returns information about the current supply.
Expand Down
24 changes: 0 additions & 24 deletions src/solana/rpc/async_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
GetSignatureStatusesResp,
GetSlotLeaderResp,
GetSlotResp,
GetStakeActivationResp,
GetSupplyResp,
GetTokenAccountBalanceResp,
GetTokenAccountsByDelegateJsonParsedResp,
Expand Down Expand Up @@ -772,29 +771,6 @@ async def get_slot_leader(self, commitment: Optional[Commitment] = None) -> GetS
body = self._get_slot_leader_body(commitment)
return await self._provider.make_request(body, GetSlotLeaderResp)

async def get_stake_activation(
self,
pubkey: Pubkey,
epoch: Optional[int] = None,
commitment: Optional[Commitment] = None,
) -> GetStakeActivationResp:
"""Returns epoch activation information for a stake account.
Args:
pubkey: Pubkey of stake account to query
epoch: (optional) Epoch for which to calculate activation details. If parameter not provided,
defaults to current epoch.
commitment: Bank state to query. It can be either "finalized", "confirmed" or "processed".
Example:
>>> solana_client = AsyncClient("http://localhost:8899")
>>> (await solana_client.get_stake_activation()).value.active # doctest: +SKIP
124429280
"""
warn("get_stake_activation is deprecated. Use get_account_info instead.", DeprecationWarning)
body = self._get_stake_activation_body(pubkey, epoch, commitment)
return await self._provider.make_request(body, GetStakeActivationResp)

async def get_supply(self, commitment: Optional[Commitment] = None) -> GetSupplyResp:
"""Returns information about the current supply.
Expand Down

0 comments on commit 7aa6977

Please sign in to comment.