export declare abstract class ByteValue { readonly bytes: Uint8Array; protected constructor(bytes: Uint8Array | ArrayBuffer); } /** * Represents a public key hash (32 bytes, SHA-256 of raw public key) */ export declare class KeyHash extends ByteValue { constructor(bytes: Uint8Array | ArrayBuffer); } /** * Represents a Merkle tree hash (32 bytes) */ export declare class Hash extends ByteValue { constructor(bytes: Uint8Array | ArrayBuffer); } /** * Ed25519 64-byte signature */ export declare class Signature extends ByteValue { constructor(bytes: Uint8Array | ArrayBuffer); } /** * Raw Ed25519 public key (32 bytes) */ export declare class RawPublicKey extends ByteValue { constructor(bytes: Uint8Array | ArrayBuffer); } /** * WebCrypto CryptoKey wrapper */ export declare class PublicKey { readonly key: CryptoKey; constructor(key: CryptoKey); } /** * Base64 encoded KeyHash */ export declare class Base64KeyHash { readonly value: string; constructor(value: string); /** * Compare this key to another Base64KeyHash or a string. * This allows Map lookup by value instead of object identity. */ equals(other: Base64KeyHash | string): boolean; /** * Helper: lookup in a Map by Base64KeyHash or string */ static lookup(map: Map, key: Base64KeyHash | string): T | undefined; } export interface Cosignature { Timestamp: number; Signature: Signature; } export interface TreeHead { Size: number; RootHash: Hash; } export interface SignedTreeHead { TreeHead: TreeHead; Signature: Signature; } export interface CosignedTreeHead { SignedTreeHead: SignedTreeHead; Cosignatures: Map; } export declare class Leaf { readonly checksum: Hash; readonly signature: Signature; readonly keyHash: KeyHash; constructor(checksum: Hash, signature: Signature, keyHash: KeyHash); /** * Return the raw leaf bytes, prefixed with the leaf node identifier. * * Layout (129 bytes): * [0] PrefixLeafNode (0x00) * [1..32] checksum (32 bytes) * [33..96] signature (64 bytes) * [97..128] key hash (32 bytes) */ toBytes(): Uint8Array; hashLeaf(): Promise; } export interface InclusionProof { LeafIndex: number; Path: Hash[]; } export declare class ShortLeaf { KeyHash: KeyHash; Signature: Signature; constructor(keyHash: KeyHash, signature: Signature); toLeaf(checksum: Hash): Leaf; }