v0.2.7-pre.009

This commit is contained in:
2026-08-22 23:08:47 +02:00
parent 93199d1856
commit d17161234a
15 changed files with 1093 additions and 35 deletions

View File

@@ -1,11 +1,11 @@
// file: crates/ksp-onchain-transport-lib/src/rpc_accounts.rs
// version: 6
// version: 7
const MAX_MEMCMP_BYTES: usize = 128;
const MAX_MULTIPLE_ACCOUNTS: usize = 100;
const MAX_PROGRAM_ACCOUNT_FILTERS: usize = 4;
/// Account-data encoding accepted by Solana HTTP account methods.
/// Account-data encoding accepted by Solana account HTTP and WebSocket methods.
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SolanaAccountEncoding {
/// Legacy binary/base58 request encoding.
@@ -71,7 +71,8 @@ impl SolanaDataSliceConfig {
return self.length;
}
fn to_json_value(self) -> serde_json::Value {
/// Serializes this data-slice configuration to the Solana JSON-RPC wire object.
pub(crate) fn to_json_value(self) -> serde_json::Value {
return serde_json::json!({"offset": self.offset, "length": self.length});
}
}
@@ -277,7 +278,8 @@ pub enum SolanaProgramAccountFilter {
}
impl SolanaProgramAccountFilter {
fn to_json_value(&self) -> serde_json::Value {
/// Serializes this program-account filter to the Solana JSON-RPC wire representation.
pub(crate) fn to_json_value(&self) -> serde_json::Value {
return match self {
Self::DataSize(size) => serde_json::json!({"dataSize": size}),
Self::Memcmp(filter) => serde_json::json!({"memcmp": filter.to_json_value()}),
@@ -385,7 +387,7 @@ impl SolanaParsedAccountData {
}
}
/// Wire-preserving account data returned by Solana HTTP account methods.
/// Wire-preserving account data returned by Solana account HTTP and WebSocket methods.
#[derive(Clone, Debug, PartialEq)]
pub enum SolanaAccountData {
/// Legacy single-string binary form retained for backwards compatibility.