export type PsbtDocumentErrorCode = "INVALID_PSBT" | "INVALID_FIELD" | "MISSING_REQUIRED_FIELD" | "FORBIDDEN_FIELD"; interface PsbtDocumentErrorOptions { code?: PsbtDocumentErrorCode; location?: PsbtMapLocation; keyType?: number; } export declare class PsbtDocumentError extends Error { readonly name = "PsbtDocumentError"; readonly code: PsbtDocumentErrorCode; readonly location: PsbtMapLocation | undefined; readonly keyType: number | undefined; constructor(message: string, options?: PsbtDocumentErrorOptions); } export interface PsbtDocumentLimits { maxPsbtBytes?: number; maxKeyBytes?: number; maxValueBytes?: number; maxMaps?: number; maxEntriesPerMap?: number; } export type PsbtMapLocation = { readonly kind: "global"; } | { readonly kind: "input" | "output"; readonly index: number; }; export interface PsbtDocumentEntry { readonly keyType: number; readonly keyData: Buffer; readonly completeKey: Buffer; readonly value: Buffer; readonly keyBytes: number; readonly valueBytes: number; readonly completeKeySha256: string; readonly valueSha256: string; } export interface PsbtDocumentMap { readonly location: PsbtMapLocation; readonly entries: readonly PsbtDocumentEntry[]; } export declare class PsbtDocument { private readonly raw; private readonly parsedMaps; readonly psbtVersion: number; readonly inputCount: number; readonly outputCount: number; private constructor(); static parse(encoded: string, limits?: PsbtDocumentLimits): PsbtDocument; get byteLength(): number; get sha256(): string; get mapCount(): number; get bytes(): Buffer; get maps(): readonly PsbtDocumentMap[]; } export declare function parsePsbtDocument(encoded: string, limits?: PsbtDocumentLimits): PsbtDocument; export declare function requireUniquePsbtEntryValue(encoded: string, location: PsbtMapLocation, keyType: number): Buffer; export {}; //# sourceMappingURL=document.d.ts.map