This commit is contained in:
2026-04-18 11:03:41 +02:00
parent 0dc797298e
commit b5cde7d512
5 changed files with 128 additions and 2 deletions

View File

@@ -60,6 +60,10 @@ pub struct KhbbHttpRpcCallOutput<TResult>
where
TResult: serde::Serialize + serde::de::DeserializeOwned,
{
/// Request identifier.
pub request_id: u64,
/// Request method.
pub method: std::string::String,
/// Serialized request body sent to the server.
pub request_body: std::string::String,
/// Raw response body received from the server.
@@ -113,6 +117,13 @@ impl KhbbSolanaHttpRpcClient {
TParams: serde::Serialize,
{
let request_result = build_json_rpc_request(rpc_request, params, id);
let method_name_result = rpc_request_method_name(rpc_request);
let method_name = match method_name_result {
Ok(value) => value,
Err(error) => {
return Err(error);
},
};
let request = match request_result {
Ok(value) => value,
Err(error) => {
@@ -169,6 +180,8 @@ impl KhbbSolanaHttpRpcClient {
});
}
Ok(KhbbHttpRpcCallOutput {
request_id: id,
method: std::string::String::from(method_name),
request_body,
response_body,
response: parsed_response,