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

    Interface SignOptions<H, A>

    Options of sign.

    const options: SignOptions<"SHA-256", "ECDSA"> = {
    hash: "SHA-256",
    algorithm: "ECDSA",
    prepare: (certificate) => digestFor(certificate),
    signal: AbortSignal.timeout(120_000),
    };
    interface SignOptions<
        H extends HashAlgorithm = HashAlgorithm,
        A extends SignatureAlgorithm = SignatureAlgorithm,
    > {
        hash: H;
        algorithm?: A | readonly A[];
        certificate?: string | Certificate;
        prepare: Prepare<H, A>;
        signal?: AbortSignal;
    }

    Type Parameters

    Index
    hash: H

    The hash prepare computes.

    algorithm?: A | readonly A[]

    Acceptable algorithm(s), preferred first. Default: ECDSA for EC keys, PKCS#1 v1.5 for RSA.

    certificate?: string | Certificate

    Preselect a certificate (from an earlier certificates()), by object or fingerprint.

    prepare: Prepare<H, A>

    Builds the digest once the certificate is known. See Prepare.

    signal?: AbortSignal

    Aborts the request (the window closes; the promise rejects with Aborted).