/** * constants.ts * MajikSignature protocol constants. */ /** Current per-signer envelope version. Increment when the signing payload format changes. */ export declare const MAJIK_SIGNATURE_VERSION: 1; /** * Current multi-sig envelope wrapper version. * Increment when the MultiSigEnvelope structure changes. * Kept separate from MAJIK_SIGNATURE_VERSION so the two can evolve independently. */ export declare const MAJIK_ENVELOPE_VERSION: 1; /** * Domain separator prefix prepended to every canonical signing payload. * Prevents cross-protocol signature reuse against other systems. * MUST NOT change — changing it invalidates all existing signatures. */ export declare const MAJIK_SIGNATURE_DOMAIN: "majik-signature-v1:"; /** * Domain separator for the seal hash payload. * Distinct from MAJIK_SIGNATURE_DOMAIN to prevent cross-protocol reuse. */ export declare const MAJIK_SEAL_DOMAIN: "majik-seal-v1:"; /** * Supported content type hints. * These are advisory — verification does not enforce content type. * They exist so consumers can display meaningful UI and reject unexpected types. */ export declare const CONTENT_TYPES: { readonly BINARY: "application/octet-stream"; readonly JSON: "application/json"; readonly TEXT: "text/plain"; readonly PDF: "application/pdf"; readonly WAV: "audio/wav"; readonly MP3: "audio/mpeg"; readonly FLAC: "audio/flac"; readonly PNG: "image/png"; readonly JPEG: "image/jpeg"; readonly WEBP: "image/webp"; }; export type ContentType = (typeof CONTENT_TYPES)[keyof typeof CONTENT_TYPES] | string; /** Minimum base64 length sanity checks */ export declare const MIN_ED_PUBLIC_KEY_B64_LEN = 40; export declare const MIN_DSA_PUBLIC_KEY_B64_LEN = 100; export declare const MIN_SIGNATURE_B64_LEN = 80; export declare const CONTENT_HASH_B64_LEN = 44; /** * Allowlist hash is also a SHA-256 output — identical length to CONTENT_HASH_B64_LEN. * Defined separately for clarity at validation call sites. */ export declare const ALLOWLIST_HASH_B64_LEN = 44; /** * Seal hash is SHA3-512 → 64 bytes → 128 hex chars. * Distinct from SHA-256 hashes — longer length makes tampering obvious at a glance. * This is the encoding computeSealHash() actually returns and validateSeal() checks against. */ export declare const SEAL_HASH_HEX_LEN = 128; export declare const MAJIK_TIMESTAMP_VERSION: 1; export declare const MAJIK_TSA_DOMAIN: "majikah-tsa-v-1:"; export declare const MAJIK_NOTARY_VERSION: 1; export declare const MAJIK_NOTARY_MEMO_DOMAIN: "majik-notary-v-1:"; export declare const MJKSIG_MAGIC: number[]; export declare const MJKSIG_MAGIC_LEN: number; export declare const MJKSIG_VERSION = 1; export declare const MJKSIG_SUPPORTED_VERSIONS: readonly [1]; export declare const MJKSIG_HEADER_LEN: number; /** * Proposed IANA media type / conventional file extension for this format. * Referenced here so both live in one place ahead of registration — * update if/when the registration settles on different values. */ export declare const MJKSIG_MEDIA_TYPE: "application/vnd.majikah.mjksig"; export declare const MJKSIG_FILE_EXTENSION: ".mjksig"; export declare const MJKSMAP_MAGIC: number[]; export declare const MJKSMAP_MAGIC_LEN: number; export declare const MJKSMAP_VERSION = 1; export declare const MJKSMAP_SUPPORTED_VERSIONS: readonly [1]; export declare const MJKSMAP_HEADER_LEN: number; export declare const MJKSMAP_MEDIA_TYPE = "application/vnd.majikah.mjksmap"; export declare const MJKSMAP_FILE_EXTENSION = ".mjksmap"; /** Conventional name/location when packaged in a signed batch zip. */ export declare const MJKSMAP_DEFAULT_FILENAME = "signatures.mjksmap";