This commit is contained in:
2026-04-30 00:04:43 +02:00
parent 0f228b2ae5
commit 2f4d80d5ef
6 changed files with 982 additions and 11 deletions

View File

@@ -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(