@websign/sdk - v0.1.0
    Preparing search index...

    Type Alias Prepare<H, A>

    Prepare: (
        certificate: Certificate,
        context: PrepareContext<H, A>,
    ) => Bytes | Promise<Bytes>

    Returns the digest to sign with certificate: exactly DigestLength bytes for the hash. May run more than once if the person switches certificate; only the last digest is signed. Throwing aborts the request.

    Type Parameters

    Type Declaration

    const prepare: Prepare<"SHA-256"> = async (certificate, { hash }) =>
    crypto.subtle.digest(hash, signedAttributesFor(certificate));