v0.2.2-pre.003

This commit is contained in:
2026-08-18 07:31:07 +02:00
parent bec1f2ec08
commit f15448ff6e
19 changed files with 1113 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-onchain-transport-lib/src/rpc_common.rs
// version: 3
// version: 4
/// Commitment level accepted by typed Solana HTTP RPC adapters.
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
@@ -45,7 +45,6 @@ impl SolanaCommitmentConfig {
/// Serializes this config to the Solana JSON-RPC wire object.
#[must_use]
#[cfg(test)]
pub(crate) fn to_json_value(self) -> serde_json::Value {
let mut object = serde_json::Map::new();
if let std::option::Option::Some(commitment) = self.commitment {
@@ -149,8 +148,7 @@ impl<T> SolanaRpcResponse<T> {
return &self.value;
}
/// Creates a contextual response after wire decoding and validation for staged DTO tests.
#[cfg(test)]
/// Creates a contextual response after wire decoding and validation.
#[must_use]
pub(crate) const fn new(context: crate::SolanaRpcContext, value: T) -> Self {
return Self { context, value };
@@ -171,7 +169,6 @@ pub(crate) fn decode_wire_json<T: serde::de::DeserializeOwned>(method: &str, val
}
/// Parses a base58 public key from one wire field without echoing its value into diagnostics.
#[cfg(test)]
pub(crate) fn parse_wire_pubkey(method: &str, field: &str, value: &str) -> ksp_core_lib::Result<ksp_core_lib::Pubkey> {
let parsed = value.parse::<ksp_core_lib::Pubkey>();
return match parsed {