From 7aa6977f85ba2d6284e1a44ac806a5ef237d1189 Mon Sep 17 00:00:00 2001 From: Michael Huang Date: Wed, 23 Oct 2024 22:06:19 -0400 Subject: [PATCH] Remove GetStakeActivationResp RPC --- src/solana/rpc/api.py | 24 ------------------------ src/solana/rpc/async_api.py | 24 ------------------------ 2 files changed, 48 deletions(-) diff --git a/src/solana/rpc/api.py b/src/solana/rpc/api.py index c6aea847..b049180e 100644 --- a/src/solana/rpc/api.py +++ b/src/solana/rpc/api.py @@ -42,7 +42,6 @@ GetSignatureStatusesResp, GetSlotLeaderResp, GetSlotResp, - GetStakeActivationResp, GetSupplyResp, GetTokenAccountBalanceResp, GetTokenAccountsByDelegateJsonParsedResp, @@ -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. diff --git a/src/solana/rpc/async_api.py b/src/solana/rpc/async_api.py index b64a059b..bccba254 100644 --- a/src/solana/rpc/async_api.py +++ b/src/solana/rpc/async_api.py @@ -41,7 +41,6 @@ GetSignatureStatusesResp, GetSlotLeaderResp, GetSlotResp, - GetStakeActivationResp, GetSupplyResp, GetTokenAccountBalanceResp, GetTokenAccountsByDelegateJsonParsedResp, @@ -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.