0.7.18
This commit is contained in:
@@ -278,6 +278,60 @@ impl HttpEndpointPool {
|
||||
};
|
||||
client.get_transaction_raw(signature, config).await
|
||||
}
|
||||
|
||||
/// Executes `getProgramAccounts` through the pool and returns the raw result value.
|
||||
pub async fn get_program_accounts_raw_for_role(
|
||||
&self,
|
||||
required_role: &str,
|
||||
program_id: std::string::String,
|
||||
config: std::option::Option<serde_json::Value>,
|
||||
) -> Result<serde_json::Value, crate::KbError> {
|
||||
let client_result = self
|
||||
.select_client_for_role_and_method(required_role, "getProgramAccounts")
|
||||
.await;
|
||||
let client = match client_result {
|
||||
Ok(client) => client,
|
||||
Err(error) => return Err(error),
|
||||
};
|
||||
client.get_program_accounts_raw(program_id, config).await
|
||||
}
|
||||
|
||||
/// Executes `getSignaturesForAddress` through the pool and returns the raw result value.
|
||||
pub async fn get_signatures_for_address_raw_for_role(
|
||||
&self,
|
||||
required_role: &str,
|
||||
address: std::string::String,
|
||||
config: std::option::Option<serde_json::Value>,
|
||||
) -> Result<serde_json::Value, crate::KbError> {
|
||||
let client_result = self
|
||||
.select_client_for_role_and_method(required_role, "getSignaturesForAddress")
|
||||
.await;
|
||||
let client = match client_result {
|
||||
Ok(client) => client,
|
||||
Err(error) => return Err(error),
|
||||
};
|
||||
client.get_signatures_for_address_raw(address, config).await
|
||||
}
|
||||
|
||||
/// Executes typed `getSignaturesForAddress` through the pool.
|
||||
pub async fn get_signatures_for_address_for_role(
|
||||
&self,
|
||||
required_role: &str,
|
||||
address: std::string::String,
|
||||
config: std::option::Option<solana_rpc_client_api::config::RpcSignaturesForAddressConfig>,
|
||||
) -> Result<
|
||||
std::vec::Vec<solana_rpc_client_api::response::RpcConfirmedTransactionStatusWithSignature>,
|
||||
crate::KbError,
|
||||
> {
|
||||
let client_result = self
|
||||
.select_client_for_role_and_method(required_role, "getSignaturesForAddress")
|
||||
.await;
|
||||
let client = match client_result {
|
||||
Ok(client) => client,
|
||||
Err(error) => return Err(error),
|
||||
};
|
||||
client.get_signatures_for_address(address, config).await
|
||||
}
|
||||
}
|
||||
|
||||
fn kb_pool_build_optional_config_only_params(
|
||||
|
||||
Reference in New Issue
Block a user