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§

source

fn verifying_key(&self) -> VerifyingKey

Returns the verifying key (i.e public key or address) for the identity.

source

fn sign(&self, msg: &[u8]) -> Signature

Computes signature for a message.

source

fn sign_message_share(&self, msg: &[u8]) -> ([u8; 32], [u8; 32])

Computes signature for a message and returns (r, s) as ([u8; 32], [u8; 32]).

Implementors§

source§

impl IdentityProvider for MockECDSAIdentityProvider

Available on crate feature dev only.