v0.3.6-pre.006
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user