Trait ic_agent::identity::Identity [−][src]
pub trait Identity: Send + Sync { fn sender(&self) -> Result<Principal, String>; fn sign(&self, blob: &[u8]) -> Result<Signature, String>; }
Expand description
An Identity takes a request id and returns the Signature. Since it also knows about the Principal of the sender.
Agents are assigned a single Identity object, but there can be multiple identities used
Required methods
fn sender(&self) -> Result<Principal, String>
[src]
Expand description
Returns a sender, ie. the Principal ID that is used to sign a request. Only one sender can be used per request.
fn sign(&self, blob: &[u8]) -> Result<Signature, String>
[src]
Expand description
Sign a blob, the concatenation of the domain separator & request ID, creating the sender signature.
Implementors
impl Identity for AnonymousIdentity
[src]
impl Identity for AnonymousIdentity
[src]impl Identity for BasicIdentity
[src]
impl Identity for BasicIdentity
[src]