pub struct SessionSigner { /* private fields */ }Implementations§
Source§impl SessionSigner
impl SessionSigner
Sourcepub fn from_seed(seed: [u8; 32]) -> Self
pub fn from_seed(seed: [u8; 32]) -> Self
Build a signer from a 32-byte seed. The verifying key id is
computed as "sha256:" + hex(sha256(verifying_key_bytes))[..32]
so the same seed always produces the same signed_by.key_id.
pub fn key_id(&self) -> &str
pub fn verifying_key(&self) -> VerifyingKey
pub fn sign_event(&self, event: &StoredEvent) -> EventSignature
Sourcepub fn sign_receipt(&self, receipt_root_hash: &str) -> EventSignature
pub fn sign_receipt(&self, receipt_root_hash: &str) -> EventSignature
Sign a finalisation receipt over the full event-root hash. The payload bytes are folded into the receipt event so a verifier can recompute them from the stored chain alone.
Trait Implementations§
Source§impl Clone for SessionSigner
impl Clone for SessionSigner
Source§fn clone(&self) -> SessionSigner
fn clone(&self) -> SessionSigner
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SessionSigner
impl RefUnwindSafe for SessionSigner
impl Send for SessionSigner
impl Sync for SessionSigner
impl Unpin for SessionSigner
impl UnsafeUnpin for SessionSigner
impl UnwindSafe for SessionSigner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more