import type { InTotoStatement } from './attest.js'; export declare const PAYLOAD_TYPE = "application/vnd.in-toto+json"; export type DsseEnvelope = { payload: string; payloadType: typeof PAYLOAD_TYPE; signatures: Array<{ keyid: string; sig: string; }>; }; /** DSSE v1 Pre-Authentication Encoding over the raw payload bytes. */ export declare function preAuthEncoding(payloadType: string, payload: Buffer): Buffer; export declare function generateSigningKey(): { privateKeyPem: string; publicKeyPem: string; keyid: string; }; export declare function keyidFor(publicKeyPem: string): string; export declare function signStatement(statement: InTotoStatement, privateKeyPem: string, publicKeyPem: string): DsseEnvelope; export type VerifyResult = { ok: true; statement: InTotoStatement; keyid: string; } | { ok: false; reason: 'payload-type' | 'no-signature' | 'keyid-mismatch' | 'bad-signature' | 'malformed'; }; export declare function verifyEnvelope(envelope: DsseEnvelope, publicKeyPem: string): VerifyResult;