Skip to main content

ProofSigner

Trait ProofSigner 

Source
pub trait ProofSigner:
    Send
    + Sync
    + 'static {
    // Required methods
    fn verification_method(&self) -> &str;
    fn prove<'a>(
        &'a self,
        document: &'a Value,
    ) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'a>>;
}
Expand description

Where a proof comes from: a key the server holds, or one it reaches through a signing service or the user’s device. What is signed is a whole document, and what comes back is that document with its proof.

Required Methods§

Source

fn verification_method(&self) -> &str

The DID URL of the key, which a proof names as its verificationMethod.

Source

fn prove<'a>( &'a self, document: &'a Value, ) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'a>>

document with an integrity proof attached.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<S: ProofSigner + ?Sized> ProofSigner for Arc<S>

Source§

fn verification_method(&self) -> &str

Source§

fn prove<'a>( &'a self, document: &'a Value, ) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'a>>

Implementors§