Trait holochain_types::prelude::AgentPubKeyExt [−][src]
pub trait AgentPubKeyExt {
fn new_from_pure_entropy(
keystore: &GhostSender<LairClientApi>
) -> MustBoxFuture<'static, Result<HoloHash<Agent>, KeystoreError>>;
fn sign<S>(
&self,
keystore: &GhostSender<LairClientApi>,
data: S
) -> MustBoxFuture<'static, Result<Signature, KeystoreError>>
where
S: Serialize + Debug;
fn sign_raw(
&self,
keystore: &GhostSender<LairClientApi>,
data: &[u8]
) -> MustBoxFuture<'static, Result<Signature, KeystoreError>>;
fn verify_signature<D>(
&self,
signature: &Signature,
data: D
) -> MustBoxFuture<'static, Result<bool, KeystoreError>>
where
D: TryInto<SerializedBytes, Error = SerializedBytesError>;
fn verify_signature_raw(
&self,
signature: &Signature,
data: &[u8]
) -> MustBoxFuture<'static, Result<bool, KeystoreError>>;
}
Expand description
Extend holo_hash::AgentPubKey with additional signature functionality from Keystore.
Required methods
fn new_from_pure_entropy(
keystore: &GhostSender<LairClientApi>
) -> MustBoxFuture<'static, Result<HoloHash<Agent>, KeystoreError>>
fn new_from_pure_entropy(
keystore: &GhostSender<LairClientApi>
) -> MustBoxFuture<'static, Result<HoloHash<Agent>, KeystoreError>>
create a new agent keypair in given keystore, returning the AgentPubKey
fn sign<S>(
&self,
keystore: &GhostSender<LairClientApi>,
data: S
) -> MustBoxFuture<'static, Result<Signature, KeystoreError>> where
S: Serialize + Debug,
fn sign<S>(
&self,
keystore: &GhostSender<LairClientApi>,
data: S
) -> MustBoxFuture<'static, Result<Signature, KeystoreError>> where
S: Serialize + Debug,
sign some arbitrary data
fn sign_raw(
&self,
keystore: &GhostSender<LairClientApi>,
data: &[u8]
) -> MustBoxFuture<'static, Result<Signature, KeystoreError>>
fn sign_raw(
&self,
keystore: &GhostSender<LairClientApi>,
data: &[u8]
) -> MustBoxFuture<'static, Result<Signature, KeystoreError>>
sign some arbitrary raw bytes
fn verify_signature<D>(
&self,
signature: &Signature,
data: D
) -> MustBoxFuture<'static, Result<bool, KeystoreError>> where
D: TryInto<SerializedBytes, Error = SerializedBytesError>,
fn verify_signature<D>(
&self,
signature: &Signature,
data: D
) -> MustBoxFuture<'static, Result<bool, KeystoreError>> where
D: TryInto<SerializedBytes, Error = SerializedBytesError>,
verify a signature for given data with this agent public_key is valid
fn verify_signature_raw(
&self,
signature: &Signature,
data: &[u8]
) -> MustBoxFuture<'static, Result<bool, KeystoreError>>
fn verify_signature_raw(
&self,
signature: &Signature,
data: &[u8]
) -> MustBoxFuture<'static, Result<bool, KeystoreError>>
verify a signature for given raw bytes with this agent public_key is valid