import type { SignatureSuite } from './types.js'; export declare class Sign { /** * Single-shot sign. Returns the attached envelope blob. */ static sign(suite: SignatureSuite, sk: Uint8Array, msg: Uint8Array, ctx: Uint8Array): Uint8Array; /** * Single-shot verify. Returns the extracted payload on success. * * @throws SigningError('sig-blob-too-short') blob cannot fit the wire shape. * @throws SigningError('sig-suite-mismatch') wire suite_byte mismatch. * @throws SigningError('sig-ctx-mismatch') caller ctx != wire ctx. * @throws SigningError('verify-failed') suite.verify returned false. */ static verify(suite: SignatureSuite, pk: Uint8Array, blob: Uint8Array, ctx: Uint8Array): Uint8Array; /** * Detached sign. Returns just the raw signature bytes (no envelope). * Caller is responsible for transmitting (suite, msg, sig, ctx) * out-of-band. signDetached is the interop surface; the wire is * exactly what the underlying primitive emits, no leviathan-specific * framing. */ static signDetached(suite: SignatureSuite, sk: Uint8Array, msg: Uint8Array, ctx: Uint8Array): Uint8Array; /** * Detached verify. Returns boolean; does NOT throw on signature failure. * Contract violations in the suite (wrong-size key, ctx too long) still * throw SigningError per the suite contract. */ static verifyDetached(suite: SignatureSuite, pk: Uint8Array, msg: Uint8Array, sig: Uint8Array, ctx: Uint8Array): boolean; /** * Introspect a blob without verifying. Validates structural shape only * (ctx_len and payload_len in range); does NOT call suite.verify and * does NOT compare ctx. Returns offsets the caller can use to extract * wire ctx, payload, and sig themselves. * * @throws SigningError('sig-blob-too-short') blob cannot fit the wire shape. */ static peek(blob: Uint8Array, suite: SignatureSuite): { suiteByte: number; ctx: Uint8Array; payloadOffset: number; payloadLength: number; sigOffset: number; }; }