pub struct ActorKey { /* private fields */ }Expand description
An actor’s signing keypair.
Implementations§
Source§impl ActorKey
impl ActorKey
Sourcepub fn from_secret_bytes(bytes: &[u8; 32]) -> Self
pub fn from_secret_bytes(bytes: &[u8; 32]) -> Self
Restores a keypair from its 32 secret bytes (e.g. loaded from an on-disk key file).
Sourcepub fn secret_bytes(&self) -> [u8; 32]
pub fn secret_bytes(&self) -> [u8; 32]
The 32 secret bytes; callers own keeping them off disk or 0600.
Sourcepub fn public_key_bytes(&self) -> [u8; 32]
pub fn public_key_bytes(&self) -> [u8; 32]
Public key bytes to publish/register.
Sourcepub fn actor_id(&self) -> ContentHash
pub fn actor_id(&self) -> ContentHash
This actor’s id: the content address of its public key.
Sourcepub fn sign_submission(&self, channel: &str, payload: &[u8]) -> Witness
pub fn sign_submission(&self, channel: &str, payload: &[u8]) -> Witness
Signs a submission’s content — (channel, payload) — before
the sequencer assigns it a position. See
choir_oplog::signing_hash for what is and isn’t covered.
Sourcepub fn sign_entry(&self, entry: &mut OpEntry)
pub fn sign_entry(&self, entry: &mut OpEntry)
Signs entry in place: sets author_sig over the entry’s
OpEntry::signing_hash. Any existing signature is replaced.
Auto Trait Implementations§
impl Freeze for ActorKey
impl RefUnwindSafe for ActorKey
impl Send for ActorKey
impl Sync for ActorKey
impl Unpin for ActorKey
impl UnsafeUnpin for ActorKey
impl UnwindSafe for ActorKey
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