import { Header } from './header'; import { type Label } from './map'; import { Key, type Verifier, Signer } from './key'; /** * Sign1Message represents a COSE_Sign1 object. * * The optional externalData argument on toBytes()/fromBytes() is included in * the Sig_structure and must match exactly on signing and verification. * * @example * ```ts * const key = Ed25519Key.generate() * const aad = utf8ToBytes('profile:v1') * const cose = new Sign1Message(utf8ToBytes('hello')).toBytes(key, aad) * const verified = Sign1Message.fromBytes(key.public(), cose, aad) * ``` * * Reference https://datatracker.ietf.org/doc/html/rfc9052#name-signing-with-one-signer */ export declare class Sign1Message { payload: Uint8Array; protected: Header | null; unprotected: Header | null; private static signBytes; static fromBytes(key: Key & Verifier, coseData: Uint8Array, externalData?: Uint8Array, understoodCriticalLabels?: Iterable