diff --git a/client/src/nonblocking/rpc_client.rs b/client/src/nonblocking/rpc_client.rs index f68cd2627f9f3a..ead129fa26ac60 100644 --- a/client/src/nonblocking/rpc_client.rs +++ b/client/src/nonblocking/rpc_client.rs @@ -5019,6 +5019,16 @@ impl RpcClient { pub async fn get_token_largest_accounts( &self, mint: &Pubkey, + ) -> ClientResult> { + Ok(self + .get_token_largest_accounts_with_commitment(mint, self.commitment()) + .await? + .value) + } + + pub async fn get_token_largest_accounts_with_commitment( + &self, + mint: &Pubkey, commitment_config: CommitmentConfig, ) -> RpcResult> { self.send( diff --git a/client/src/rpc_client.rs b/client/src/rpc_client.rs index fba04128c5d7d5..13baaa0cc3eb2a 100644 --- a/client/src/rpc_client.rs +++ b/client/src/rpc_client.rs @@ -3904,11 +3904,21 @@ impl RpcClient { pub fn get_token_largest_accounts( &self, mint: &Pubkey, + ) -> ClientResult> { + self.invoke( + (self.rpc_client.as_ref()) + .get_token_largest_accounts(mint), + ) + } + + pub fn get_token_largest_accounts_with_commitment( + &self, + mint: &Pubkey, commitment_config: CommitmentConfig, ) -> RpcResult> { self.invoke( - self.rpc_client - .get_token_largest_accounts(mint, commitment_config), + (self.rpc_client.as_ref()) + .get_token_largest_accounts_with_commitment(mint, commitment_config), ) }