Trait fuel_crypto::Signer
source · [−]pub trait Signer {
type Error: From<Error> + From<<Self::Keystore as Keystore>::Error>;
type Keystore: Keystore;
fn keystore(&self) -> Result<&Self::Keystore, Self::Error>;
fn id_secret(
&self,
id: &<Self::Keystore as Keystore>::KeyId
) -> Result<Borrown<'_, SecretKey>, Self::Error> { ... }
fn id_public(
&self,
id: &<Self::Keystore as Keystore>::KeyId
) -> Result<Borrown<'_, PublicKey>, Self::Error> { ... }
fn sign(
&self,
id: &<Self::Keystore as Keystore>::KeyId,
message: &Message
) -> Result<Signature, Self::Error> { ... }
fn sign_with_key(
&self,
secret: &SecretKey,
message: &Message
) -> Result<Signature, Self::Error> { ... }
}
Expand description
Signature provider based on a keystore
Required Associated Types
Required Methods
Provided Methods
sourcefn id_secret(
&self,
id: &<Self::Keystore as Keystore>::KeyId
) -> Result<Borrown<'_, SecretKey>, Self::Error>
fn id_secret(
&self,
id: &<Self::Keystore as Keystore>::KeyId
) -> Result<Borrown<'_, SecretKey>, Self::Error>
Secret key indexed by id
.
sourcefn id_public(
&self,
id: &<Self::Keystore as Keystore>::KeyId
) -> Result<Borrown<'_, PublicKey>, Self::Error>
fn id_public(
&self,
id: &<Self::Keystore as Keystore>::KeyId
) -> Result<Borrown<'_, PublicKey>, Self::Error>
Public key indexed by id
.