pub struct Signer { /* private fields */ }Expand description
The inner signer which can sign requests for both on-chain and off-chain operations. Both issuers and authenticators use this.
Both keys are zeroized on drop.
Implementations§
Source§impl Signer
impl Signer
Sourcepub fn from_seed_bytes(seed: &[u8]) -> Result<Self, PrimitiveError>
pub fn from_seed_bytes(seed: &[u8]) -> Result<Self, PrimitiveError>
Initializes a new signer from an input seed.
§Errors
Returns PrimitiveError::InvalidInput if the seed is not exactly 32 bytes.
Sourcepub fn onchain_signer(&self) -> &PrivateKeySigner
pub fn onchain_signer(&self) -> &PrivateKeySigner
Returns a mutable reference to the internal signer.
Sourcepub const fn offchain_signer_private_key(&self) -> &SecretBox<EdDSAPrivateKey>
pub const fn offchain_signer_private_key(&self) -> &SecretBox<EdDSAPrivateKey>
Returns a reference to the internal offchain signer.
Sourcepub const fn onchain_signer_address(&self) -> Address
pub const fn onchain_signer_address(&self) -> Address
Returns the address of the on-chain signer.
Sourcepub fn offchain_signer_pubkey(&self) -> EdDSAPublicKey
pub fn offchain_signer_pubkey(&self) -> EdDSAPublicKey
Returns the public key of the off-chain signer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Signer
impl RefUnwindSafe for Signer
impl Send for Signer
impl Sync for Signer
impl Unpin for Signer
impl UnsafeUnpin for Signer
impl UnwindSafe for Signer
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more