import { Header } from './header'; import { type Label } from './map'; import { Key, type Verifier, Signer } from './key'; export declare class Signature { protected: Header | null; unprotected: Header | null; signature: Uint8Array; constructor(protectedHeader?: Header, unprotected?: Header); } /** * SignMessage represents a COSE_Sign object, carrying one or more signatures. * * Use {@link Sign1Message} for the common single-signer case. Use this class * when a payload needs multiple signatures, potentially with different * algorithms or key identifiers. * * @example * ```ts * const a = Ed25519Key.generate() * const b = ECDSAKey.generate(iana.AlgorithmES256) * // With no Signature structures, toBytes() creates one per key. * const cose = new SignMessage(payload).toBytes([a, b]) * SignMessage.fromBytes([a.public(), b.public()], cose) * ``` * * @see https://datatracker.ietf.org/doc/html/rfc9052#name-signing-with-one-or-more-si */ export declare class SignMessage { payload: Uint8Array; protected: Header | null; unprotected: Header | null; signatures: Signature[]; private static signBytes; static withTag(coseData: Uint8Array): Uint8Array; static fromBytes(keys: (Key & Verifier)[], coseData: Uint8Array, externalData?: Uint8Array, understoodCriticalLabels?: Iterable