@anzaui/engine - v0.6.0
    Preparing search index...

    Interface SignOptions

    How envelopes are signed, passed to SetupOptions.signing.

    Mode sig Verify with
    ed25519 lowercase hex Ed25519 signature, using privateKey verifyEnvelope({ mode: 'ed25519', publicKey }, …)
    hmac lowercase hex HMAC-SHA256, using secret verifyEnvelope({ mode: 'hmac', secret }, …)
    none none (the default) —

    Keys are checked once, in Setup.run (or Signer.from), which throws CRYPTO for a missing or short HMAC secret, a missing or malformed Ed25519 private key, or a public key that does not match. The engine never falls back to unsigned envelopes. Prefer Ed25519 when verifiers should not be able to sign; HMAC when every verifier is trusted with the secret.

    const hmac: SignOptions = { mode: 'hmac', secret: process.env.ANZA_SECRET! };
    const ed: SignOptions = { mode: 'ed25519', privateKey: process.env.ANZA_ED25519_SEED! }; // 64-char hex
    interface SignOptions {
        mode: "ed25519" | "hmac" | "none";
        privateKey?: Ed25519Key;
        publicKey?: Ed25519Key;
        secret?: string | Uint8Array<ArrayBufferLike>;
    }
    Index
    mode: "ed25519" | "hmac" | "none"

    The signing algorithm, or 'none' for unsigned envelopes.

    privateKey?: Ed25519Key

    Ed25519 private key: 32-byte seed, 64-char hex seed, PEM, or KeyObject.

    publicKey?: Ed25519Key

    Optional Ed25519 public key; must match privateKey when given.

    secret?: string | Uint8Array<ArrayBufferLike>

    HMAC secret, at least 32 bytes (a string counts its UTF-8 bytes).