/** * Serialization types supported by the KERI and ACDC protocols and this Signify implementation. */ export declare enum Serials { JSON = "JSON" } /** * Protocol types supported by the KERI and ACDC protocols and this Signify implementation. */ export declare enum Protocols { KERI = "KERI", ACDC = "ACDC" } /** * Represents a protocol version of the KERI, ACDC, or other protocol specified in a CESR version string. */ export declare class Version { major: number; minor: number; constructor(major?: number, minor?: number); } /** * Denotes version 1.0 of a protocol. */ export declare const Vrsn_1_0: Version; /** * Types of KERI and ACDC events. */ export declare const Ilks: { icp: string; rot: string; ixn: string; dip: string; drt: string; rct: string; vrc: string; rpy: string; exn: string; vcp: string; iss: string; rev: string; bis: string; brv: string; }; /** * Field labels for an inception event in V1 of the KERI protocol. */ export declare const IcpLabels: string[]; /** * Field labels for an delegated inception event in V1 of the KERI protocol. */ export declare const DipLabels: string[]; /** * Field labels for a rotation event in V1 of the KERI protocol. */ export declare const RotLabels: string[]; /** * Field labels for an delegated rotation event in V1 of the KERI protocol. */ export declare const DrtLabels: string[]; /** * Field labels for an interaction event in V1 of the KERI protocol. */ export declare const IxnLabels: string[]; /** * Field labels for a key state notice event in V1 of the KERI protocol. */ export declare const KsnLabels: string[]; /** * Field labels for a reply event in V1 of the KERI protocol. */ export declare const RpyLabels: string[]; /** * Full size of a CESR version string in bytes. */ export declare const VERFULLSIZE = 17; /** * Minimum number of bytes a CESR parser must sniff to receive the entire version string. */ export declare const MINSNIFFSIZE: number; export declare const MINSIGSIZE = 4; /** * Regular expression for a version 1 CESR object version string. */ export declare const VEREX = "(KERI|ACDC)([0-9a-f])([0-9a-f])([A-Z]{4})([0-9a-f]{6})_"; /** * An interface for a basic dictionary type keyed by string with any value type. * Mimics the Python dictionary type. */ export interface Dict { [id: string]: TValue; } /** * Parses a serialization version string into the protocol, protocol version, serialization type, and raw size. * Uses regex matchers to validate and extract version string parts. * @param {string} versionString version string * @return {Object} tuple of prototol (KERI or ACDC), kind of serialization like cbor,json, or mgpk, * protocol version, and raw size of serialization */ export declare function deversify(versionString: string): [Protocols, Serials, Version, string]; /** * Returns a valid KERI serialization version string specifying the protocol, * protocol version, serialization type, and raw byte size of the serialization. * * Defaults to version 1.0. * @param ident * @param version * @param kind * @param size */ export declare function versify(ident?: Protocols, version?: Version, kind?: Serials, size?: number): string; /** * Map allowing lookup of Base64URLSafe characters by index. */ export declare const B64ChrByIdx: Map; /** * Map allowing lookup of Base64URLSafe index by character. */ export declare const B64IdxByChr: Map; /** * Converts an integer to a Base64URLSafe encoded string, left padded as specified. * @param i integer to convert * @param l minimum length of Base64 digits left padded with Base64 0 == 'A' character. */ export declare function intToB64(i: number, l?: number): string; /** * Converts an integer to a Base64URLSafe encoded string to a byte array, left padded as specified. * @param i integer to convert * @param l minimum length of Base64 digits left padded with Base64 0 == 'A' character. */ export declare function intToB64b(n: number, l?: number): Uint8Array; /** * Converts a Base64URLSafe encoded string to an integer. * @param s string to convert */ export declare function b64ToInt(s: string): number; /** * Converts a UTF-8 string to bytes. * Output is an encoded array of bytes. Assumes UTF-8 encoding. * @param s string to be encoded as an array of bytes */ export declare function b(s?: string): Uint8Array; /** * Convert bytes to UTF-8 string. * @param u array of bytes to be converted to UTF-8 string. */ export declare function d(u?: Uint8Array): string; /** * Concatenates two byte arrays together in a new byte array. * @param one first byte array to be concatenated * @param two second byte array to be concatenated */ export declare function concat(one: Uint8Array, two: Uint8Array): Uint8Array; /** * Converts a big-endian byte array into an integer. * * @param array - A `Uint8Array` of bytes representing a big-endian integer. * @returns The integer represented by the byte array. * * Example: * readInt(Uint8Array([0x01, 0x02, 0x03])) // returns 66051 * * How it works: * - The function interprets the array as a big-endian number. * - Each byte is added to the integer after shifting the previous value left by 8 bits (multiplying by 256). */ export declare function readInt(array: Uint8Array): number;