v0.3.6-pre.006

This commit is contained in:
2026-09-01 14:08:53 +02:00
parent ea5f756d17
commit 032919fa07
13 changed files with 1172 additions and 57 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-job-backfill-lib/src/request.rs
// version: 1
// version: 2
use sha2::Digest; // rust-rules: trait-import
@@ -45,10 +45,10 @@ impl BackfillCommitment {
}
}
/// Bounded Base58-shaped transaction signature text used before canonical 64-byte decoding.
/// Bounded Base58-shaped transaction signature text used by discovery and RAW conversion.
///
/// This type deliberately validates only the encoded shape required by discovery. Exact decoding
/// to the Store-owned 64-byte signature is introduced by the RAW conversion tranche.
/// Construction validates the encoded shape required by discovery. Exact conversion to the
/// Store-owned 64-byte signature is available through [`Self::to_raw_transaction_signature`].
#[derive(Clone, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct BackfillSignature(std::string::String);
@@ -67,6 +67,11 @@ impl BackfillSignature {
pub fn as_str(&self) -> &str {
return self.0.as_str();
}
/// Decodes this Base58 text to the exact Store-owned 64-byte Solana signature.
pub fn to_raw_transaction_signature(&self) -> ksp_core_lib::Result<ksp_store_lib::RawTransactionSignature> {
return crate::decode_backfill_signature(self);
}
}
impl std::fmt::Debug for BackfillSignature {