export { d as AnchorNetwork, A as AttestationDetail, e as ChainAnchor, C as ConsistencyProofResponse, E as Envelope, f as EnvelopeV1, g as EnvelopeVersion, h as InclusionView, I as IssuerDetail, L as LabelCommit, i as RecordType, j as RegistryLabelView, R as RegistryListFilters, a as RegistryPage, k as RegistryRow, S as SegmentDetail, l as SigningAlg, b as SthListResponse, m as SthView, c as StreamEvent } from './api-CGCo5O7M.cjs'; export { STH } from './types/index.cjs'; export { B as BUNDLE_FILES, a as BUNDLE_SUFFIX, b as BundleLabel, L as LabelsJson, M as ManifestEntry, c as MerkleProofJson, O as OnchainProofJson, R as RevealedLabel, U as UnrevealedLabel, i as isRevealedLabel } from './bundle-CKS7FPC4.cjs'; export { envelopeHash, hex, isValidSha256Hex, jcs, leafHash, nodeHash, parseManifest, serializeManifest, sha256, sha256Hex, sthHash, unhex, verifyConsistency, verifyInclusion } from './crypto/index.cjs'; export { ClientOptions, DeepidvChainClient, FetchLike, RequestOptions, createClient } from './client/index.cjs'; export { BundleFiles, VerifyChecks, VerifyResult, unzipBundle, verifyBundle } from './verify/index.cjs'; /** * Typed error hierarchy for `@deepidv/chain`. * * `DeepidvApiError` is the parent class — every error thrown from * the client extends it, and consumers can `catch (err instanceof * DeepidvApiError)` once for the whole surface. Specific subclasses * exist so common failure modes (auth, not-found, rate-limit) can * be branched on without inspecting `status`. * * Design notes: * - Stack traces include the full prototype chain so `instanceof` * works across the dual ESM/CJS build boundaries. * - `cause` is propagated via the standard ES2022 `cause` option * so wrappers can retain the underlying network error. * - Error messages NEVER include claim bodies, salts, or * authentication headers. Privacy is enforced at construction * time, not at logging time. */ interface DeepidvApiErrorContext { /** Bundle-relative URL path, e.g. `/v1/registry`. Never query string. */ path?: string; /** HTTP status when applicable. */ status?: number; /** Request id from the `X-Request-Id` response header, if present. */ requestId?: string; /** Underlying network or parse error. */ cause?: unknown; } declare class DeepidvApiError extends Error { readonly path?: string; readonly status?: number; readonly requestId?: string; readonly cause?: unknown; constructor(message: string, ctx?: DeepidvApiErrorContext); } declare class DeepidvAuthError extends DeepidvApiError { constructor(message?: string, ctx?: DeepidvApiErrorContext); } declare class DeepidvNotFoundError extends DeepidvApiError { constructor(message?: string, ctx?: DeepidvApiErrorContext); } declare class DeepidvRateLimitError extends DeepidvApiError { /** Seconds, parsed from the `Retry-After` header when available. */ readonly retryAfterSeconds?: number; constructor(message?: string, ctx?: DeepidvApiErrorContext & { retryAfterSeconds?: number; }); } declare class DeepidvServerError extends DeepidvApiError { constructor(message?: string, ctx?: DeepidvApiErrorContext); } declare class DeepidvNetworkError extends DeepidvApiError { constructor(message: string, ctx?: DeepidvApiErrorContext); } /** * Map an HTTP status to the most specific error class. * * Used by `client.ts::request` to construct the right subclass * before throwing. Public so consumers can plug in their own retry * policy: `if (mapStatusToError(res.status) === DeepidvRateLimitError) ...` */ declare function statusToErrorClass(status: number): typeof DeepidvApiError; /** * @deepidv/chain — Node SDK entry point. * * Public surface for the chain layer at api.proof.deepidv.com: * - typed clients for the public registry API * - typed envelope, STH, and bundle shapes * - canonicalization (JCS) and hashing primitives that are * byte-identical with the Python SDK and the backend * - partial offline bundle verification (5 of 6 checks per * ARCHITECTURE.md §8 D.5; TSA tokens are deliberately skipped) * * Subpath imports are supported and recommended for tree-shakability: * * import { createClient } from "@deepidv/chain/client"; * import { verifyBundle } from "@deepidv/chain/verify"; * import { jcs, envelopeHash } from "@deepidv/chain/crypto"; * import type { AttestationDetail } from "@deepidv/chain/types"; * * Or pull everything from the root export. */ declare const SDK_VERSION = "1.1.0"; export { DeepidvApiError, type DeepidvApiErrorContext, DeepidvAuthError, DeepidvNetworkError, DeepidvNotFoundError, DeepidvRateLimitError, DeepidvServerError, SDK_VERSION, statusToErrorClass };