Trait wamu_core::IdentityProvider
source · pub trait IdentityProvider: Clone + Debug {
// Required methods
fn verifying_key(&self) -> VerifyingKey;
fn sign(&self, msg: &[u8]) -> Signature;
fn sign_message_share(&self, msg: &[u8]) -> ([u8; 32], [u8; 32]);
}
Expand description
Interface for a decentralized identity provider.
NOTE: For interoperability with existing wallet solutions, the only requirement for decentralized identity providers is the ability to compute cryptographic signatures for any arbitrary message in such a way that the output signature can be verified in a non-interactive manner.
Required Methods§
sourcefn verifying_key(&self) -> VerifyingKey
fn verifying_key(&self) -> VerifyingKey
Returns the verifying key (i.e public key or address) for the identity.
Computes signature for a message and returns (r
, s
) as ([u8; 32]
, [u8; 32]
).
Implementors§
impl IdentityProvider for MockECDSAIdentityProvider
Available on crate feature
dev
only.