[][src]Function hdk::api::sign_one_time

pub fn sign_one_time<S: Into<String>>(
    payloads: Vec<S>
) -> ZomeApiResult<SignOneTimeResult>

Signs a vector of payloads with a private key that is generated and shredded. Returns the signatures of the payloads and the public key that can be used to verify the signatures.

Examples

pub fn handle_one_time_sign(key_id: String, message: String) -> ZomeApiResult<Signature> {
   hdk::sign(message).map(Signature::from)
}