import { n as FheChain, t as AtLeastOneChain } from "./types-BgczXqW2.js"; import { E as ShieldPath, M as GenericStorage, N as GenericProvider, P as GenericSigner, S as RelayerWorkerClient, _ as PublicParamsData, c as DelegatedUserDecryptParams, d as EncryptParams, f as EncryptResult, ft as GenericLogger, g as PublicDecryptResult, l as EIP712TypedData, m as FheEncryptionKey, n as RelayerSDK, o as TransportKeyPair, p as EncryptedValue, s as ClearValue, t as RelayerCleartext, x as UserDecryptParams, y as RelayerWebConfig, z as RawLog } from "./relayer-cleartext-DkKKjfI6.js"; import { Address, Hex } from "viem"; import { InputProofBytesType, KmsDelegatedUserDecryptEIP712Type, ZKProofLike } from "@zama-fhe/relayer-sdk/bundle"; //#region src/events/onchain-events.d.ts /** * Event topic0 constants (keccak256 of the canonical Solidity signature). * Pass to `getLogs({ topics: [Object.values(Topics)] })` to fetch all events. */ declare const Topics: { /** `ConfidentialTransfer(address indexed from, address indexed to, bytes32 indexed amount)` */readonly ConfidentialTransfer: `0x${string}`; /** `Wrap(address indexed to, uint256 roundedAmount, euint64 encryptedWrappedAmount)` */ readonly Wrap: `0x${string}`; /** `UnwrapRequested(address indexed receiver, bytes32 indexed unwrapRequestId, bytes32 amount)` */ readonly UnwrapRequested: `0x${string}`; /** `UnwrapFinalized(address indexed receiver, bytes32 indexed unwrapRequestId, bytes32 encryptedAmount, uint64 cleartextAmount)` */ readonly UnwrapFinalized: `0x${string}`; }; /** Decoded `ConfidentialTransfer` event — an encrypted token transfer. */ interface ConfidentialTransferEvent { readonly eventName: "ConfidentialTransfer"; /** Sender address. */ readonly from: Address; /** Receiver address. */ readonly to: Address; /** FHE encrypted value for the transferred amount. */ readonly encryptedAmount: EncryptedValue; } /** * Decoded `Wrap` event — an ERC-20 shield (wrap) operation. Emitted alongside a * `ConfidentialTransfer(from=zeroAddress, ...)`; `encryptedWrappedAmount` is the same FHE * handle that lands in `ConfidentialTransfer.encryptedAmount`. */ interface WrapEvent { readonly eventName: "Wrap"; /** Receiver of the minted confidential tokens. */ readonly to: Address; /** Cleartext underlying ERC-20 tokens deposited, rounded down to a multiple of the rate. */ readonly roundedAmount: bigint; /** FHE encrypted value for the wrapped (minted) amount. */ readonly encryptedWrappedAmount: EncryptedValue; } /** Decoded `UnwrapRequested` event — an unshield request submitted. */ interface UnwrapRequestedEvent { readonly eventName: "UnwrapRequested"; /** Address that will receive the unwrapped ERC-20 tokens. */ readonly receiver: Address; /** FHE encrypted value for the requested unshield amount. */ readonly encryptedAmount: EncryptedValue; /** Request identifier from the `UnwrapRequested` event topic. */ readonly unwrapRequestId?: EncryptedValue; } /** Decoded `UnwrapFinalized` event — an unshield completed on-chain. */ interface UnwrapFinalizedEvent { readonly eventName: "UnwrapFinalized"; /** Address receiving the unwrapped ERC-20 tokens. */ readonly receiver: Address; /** FHE encrypted value of the burnt confidential balance. */ readonly encryptedAmount: EncryptedValue; /** Cleartext amount of underlying ERC-20 tokens returned. */ readonly cleartextAmount: bigint; /** Request identifier from the `UnwrapFinalized` event topic. */ readonly unwrapRequestId?: EncryptedValue; } /** Union of all decoded confidential token event types. */ type OnChainEvent = ConfidentialTransferEvent | WrapEvent | UnwrapRequestedEvent | UnwrapFinalizedEvent; /** * ConfidentialTransfer(address indexed from, address indexed to, bytes32 indexed amount) * All 3 params indexed → topics[1..3], no data. */ declare function decodeConfidentialTransfer(log: RawLog): ConfidentialTransferEvent | null; /** * Wrap(address indexed to, uint256 roundedAmount, euint64 encryptedWrappedAmount) * Indexed: to (topics[1]) * Data: roundedAmount (uint256), encryptedWrappedAmount (bytes32) */ declare function decodeWrap(log: RawLog): WrapEvent | null; /** * UnwrapRequested(address indexed receiver, bytes32 indexed unwrapRequestId, bytes32 amount) */ declare function decodeUnwrapRequested(log: RawLog): UnwrapRequestedEvent | null; /** * UnwrapFinalized(address indexed receiver, bytes32 indexed unwrapRequestId, bytes32 encryptedAmount, uint64 cleartextAmount) */ declare function decodeUnwrapFinalized(log: RawLog): UnwrapFinalizedEvent | null; /** * Try all decoders on a single log and return the first match, or `null`. * * @example * ```ts * const event = decodeOnChainEvent(log); * if (event?.eventName === "ConfidentialTransfer") { * console.log(event.from, event.to); * } * ``` */ declare function decodeOnChainEvent(log: RawLog): OnChainEvent | null; /** * Batch-decode an array of logs, skipping unrecognized entries. * * @example * ```ts * const events = decodeOnChainEvents(receipt.logs); * ``` */ declare function decodeOnChainEvents(logs: readonly RawLog[]): OnChainEvent[]; /** * Find the first {@link UnwrapRequestedEvent} in a logs array. * * @example * ```ts * const event = findUnwrapRequested(receipt.logs); * if (event) console.log(event.receiver, event.encryptedAmount); * ``` */ declare function findUnwrapRequested(logs: readonly RawLog[]): UnwrapRequestedEvent | null; /** * Find the first {@link WrapEvent} in a logs array. * * @example * ```ts * const event = findWrap(receipt.logs); * if (event) console.log(event.to, event.roundedAmount); * ``` */ declare function findWrap(logs: readonly RawLog[]): WrapEvent | null; /** * All confidential token event topic0 hashes. * Pass to `getLogs({ topics: [TOKEN_TOPICS] })` to fetch * all confidential token events in a single RPC call. */ declare const TOKEN_TOPICS: readonly [`0x${string}`, `0x${string}`, `0x${string}`, `0x${string}`]; /** * ACL delegation event topic0 constants (keccak256 of the canonical Solidity signature). * These are ACL events, NOT token events — they are emitted by the ACL contract. */ declare const AclTopics: { /** `DelegatedForUserDecryption(address indexed delegator, address indexed delegate, address contractAddress, uint64 delegationCounter, uint64 oldExpirationDate, uint64 newExpirationDate)` */readonly DelegatedForUserDecryption: `0x${string}`; /** `RevokedDelegationForUserDecryption(address indexed delegator, address indexed delegate, address contractAddress, uint64 delegationCounter, uint64 oldExpirationDate)` */ readonly RevokedDelegationForUserDecryption: `0x${string}`; }; /** Decoded `DelegatedForUserDecryption` event — a delegation was created or renewed. */ interface DelegatedForUserDecryptionEvent { readonly eventName: "DelegatedForUserDecryption"; /** Address of the delegator (the account granting access). */ readonly delegator: Address; /** Address of the delegate (the account receiving access). */ readonly delegate: Address; /** Contract address the delegation applies to. */ readonly contractAddress: Address; /** Monotonic delegation counter. */ readonly delegationCounter: bigint; /** Previous expiration timestamp (0 if first delegation). */ readonly oldExpirationDate: bigint; /** New expiration timestamp. */ readonly newExpirationDate: bigint; } /** Decoded `RevokedDelegationForUserDecryption` event — a delegation was revoked. */ interface RevokedDelegationForUserDecryptionEvent { readonly eventName: "RevokedDelegationForUserDecryption"; /** Address of the delegator. */ readonly delegator: Address; /** Address of the delegate. */ readonly delegate: Address; /** Contract address the revocation applies to. */ readonly contractAddress: Address; /** Monotonic delegation counter. */ readonly delegationCounter: bigint; /** Expiration date that was active before revocation. */ readonly oldExpirationDate: bigint; } /** Union of all decoded ACL delegation event types. */ type AclEvent = DelegatedForUserDecryptionEvent | RevokedDelegationForUserDecryptionEvent; /** * DelegatedForUserDecryption(address indexed delegator, address indexed delegate, * address contractAddress, uint64 delegationCounter, uint64 oldExpirationDate, uint64 newExpirationDate) * Indexed: delegator (topics[1]), delegate (topics[2]) * Data: contractAddress, delegationCounter, oldExpirationDate, newExpirationDate */ declare function decodeDelegatedForUserDecryption(log: RawLog): DelegatedForUserDecryptionEvent | null; /** * RevokedDelegationForUserDecryption(address indexed delegator, address indexed delegate, * address contractAddress, uint64 delegationCounter, uint64 oldExpirationDate) * Indexed: delegator (topics[1]), delegate (topics[2]) * Data: contractAddress, delegationCounter, oldExpirationDate */ declare function decodeRevokedDelegationForUserDecryption(log: RawLog): RevokedDelegationForUserDecryptionEvent | null; /** * Try all ACL delegation decoders on a single log and return the first match, or `null`. */ declare function decodeAclEvent(log: RawLog): AclEvent | null; /** * Batch-decode an array of logs for ACL delegation events, skipping unrecognized entries. */ declare function decodeAclEvents(logs: readonly RawLog[]): AclEvent[]; /** * Find the first {@link DelegatedForUserDecryptionEvent} in a logs array. */ declare function findDelegatedForUserDecryption(logs: readonly RawLog[]): DelegatedForUserDecryptionEvent | null; /** * Find the first {@link RevokedDelegationForUserDecryptionEvent} in a logs array. */ declare function findRevokedDelegationForUserDecryption(logs: readonly RawLog[]): RevokedDelegationForUserDecryptionEvent | null; /** * Both ACL delegation event topic0 hashes. * Pass to `getLogs({ topics: [ACL_TOPICS] })` to fetch * all delegation events in a single RPC call. */ declare const ACL_TOPICS: readonly [`0x${string}`, `0x${string}`]; //#endregion //#region src/events/sdk-events.d.ts /** * All SDK event keys, accessible as `ZamaSDKEvents.EncryptStart` etc. */ declare const ZamaSDKEvents: { readonly EncryptStart: "encrypt:start"; readonly EncryptEnd: "encrypt:end"; readonly EncryptError: "encrypt:error"; readonly DecryptStart: "decrypt:start"; readonly DecryptEnd: "decrypt:end"; readonly DecryptError: "decrypt:error"; readonly TransactionError: "transaction:error"; readonly ShieldSubmitted: "shield:submitted"; readonly TransferSubmitted: "transfer:submitted"; readonly TransferFromSubmitted: "transferFrom:submitted"; readonly SetOperatorSubmitted: "setOperator:submitted"; readonly ApproveUnderlyingSubmitted: "approveUnderlying:submitted"; readonly UnwrapSubmitted: "unwrap:submitted"; readonly FinalizeUnwrapSubmitted: "finalizeUnwrap:submitted"; readonly DelegationSubmitted: "delegation:submitted"; readonly RevokeDelegationSubmitted: "revokeDelegation:submitted"; readonly UnshieldPhase1Submitted: "unshield:phase1_submitted"; readonly UnshieldPhase2Started: "unshield:phase2_started"; readonly UnshieldPhase2Submitted: "unshield:phase2_submitted"; }; /** Union of all SDK event type strings. */ type ZamaSDKEventType = (typeof ZamaSDKEvents)[keyof typeof ZamaSDKEvents]; interface BaseEvent { tokenAddress?: Address; timestamp: number; /** Shared identifier linking related events in multi-phase operations (e.g. unshield). */ operationId?: string; } interface EncryptStartEvent extends BaseEvent { type: typeof ZamaSDKEvents.EncryptStart; } interface EncryptEndEvent extends BaseEvent { type: typeof ZamaSDKEvents.EncryptEnd; durationMs: number; } interface EncryptErrorEvent extends BaseEvent { type: typeof ZamaSDKEvents.EncryptError; /** The error that caused the encryption to fail. */ error: Error; durationMs: number; } interface DecryptStartEvent extends BaseEvent { type: typeof ZamaSDKEvents.DecryptStart; /** Encrypted values being decrypted — correlate with matching DecryptEnd/DecryptError. */ encryptedValues: EncryptedValue[]; } interface DecryptEndEvent extends BaseEvent { type: typeof ZamaSDKEvents.DecryptEnd; durationMs: number; /** Encrypted values that were decrypted. */ encryptedValues: EncryptedValue[]; /** Decrypted values keyed by encrypted value — use this to correlate events to specific entries. */ result: Record; } interface DecryptErrorEvent extends BaseEvent { type: typeof ZamaSDKEvents.DecryptError; /** The error that caused the decryption to fail. */ error: Error; durationMs: number; /** Encrypted values that were being decrypted when the error occurred. */ encryptedValues: EncryptedValue[]; } interface TransactionErrorEvent extends BaseEvent { type: typeof ZamaSDKEvents.TransactionError; /** Which SDK operation failed. */ operation: TransactionOperation; /** The error that caused the transaction to fail. */ error: Error; } interface ShieldSubmittedEvent extends BaseEvent { type: typeof ZamaSDKEvents.ShieldSubmitted; txHash: Hex; /** Which execution path was used: single-tx `transferAndCall` or two-tx `approveAndWrap`. */ shieldPath: ShieldPath; } interface TransferSubmittedEvent extends BaseEvent { type: typeof ZamaSDKEvents.TransferSubmitted; txHash: Hex; } interface TransferFromSubmittedEvent extends BaseEvent { type: typeof ZamaSDKEvents.TransferFromSubmitted; txHash: Hex; } interface SetOperatorSubmittedEvent extends BaseEvent { type: typeof ZamaSDKEvents.SetOperatorSubmitted; txHash: Hex; } interface ApproveUnderlyingSubmittedEvent extends BaseEvent { type: typeof ZamaSDKEvents.ApproveUnderlyingSubmitted; txHash: Hex; /** Which approval transaction was submitted. */ step: "reset" | "approve"; } interface UnwrapSubmittedEvent extends BaseEvent { type: typeof ZamaSDKEvents.UnwrapSubmitted; txHash: Hex; } interface FinalizeUnwrapSubmittedEvent extends BaseEvent { type: typeof ZamaSDKEvents.FinalizeUnwrapSubmitted; txHash: Hex; } interface DelegationSubmittedEvent extends BaseEvent { type: typeof ZamaSDKEvents.DelegationSubmitted; txHash: Hex; } interface RevokeDelegationSubmittedEvent extends BaseEvent { type: typeof ZamaSDKEvents.RevokeDelegationSubmitted; txHash: Hex; } interface UnshieldPhase1SubmittedEvent extends BaseEvent { type: typeof ZamaSDKEvents.UnshieldPhase1Submitted; txHash: Hex; } interface UnshieldPhase2StartedEvent extends BaseEvent { type: typeof ZamaSDKEvents.UnshieldPhase2Started; } interface UnshieldPhase2SubmittedEvent extends BaseEvent { type: typeof ZamaSDKEvents.UnshieldPhase2Submitted; txHash: Hex; } /** * Discriminated union of all SDK events. * * Decrypt events carry encrypted values and decrypted clear-text values so event * subscribers can correlate and bind them in UI layers. Events never carry * private keys, permit signatures, or ZK proofs. */ type ZamaSDKEvent = EncryptStartEvent | EncryptEndEvent | EncryptErrorEvent | DecryptStartEvent | DecryptEndEvent | DecryptErrorEvent | TransactionErrorEvent | ShieldSubmittedEvent | TransferSubmittedEvent | TransferFromSubmittedEvent | SetOperatorSubmittedEvent | ApproveUnderlyingSubmittedEvent | UnwrapSubmittedEvent | FinalizeUnwrapSubmittedEvent | DelegationSubmittedEvent | RevokeDelegationSubmittedEvent | UnshieldPhase1SubmittedEvent | UnshieldPhase2StartedEvent | UnshieldPhase2SubmittedEvent; type ZamaSDKEventListener = (event: ZamaSDKEvent) => void; /** Distributive Omit that preserves the discriminated union. */ type ZamaSDKEventInput = ZamaSDKEvent extends infer E ? E extends ZamaSDKEvent ? Omit : never : never; /** * Single source of truth for each transaction operation's submitted-event payload. * * Adding a write op = adding one entry here. `TransactionOperation` is then * `keyof typeof transactionOperationMetadata`, so the dispatch table and the * operation union cannot drift. * * The `satisfies` check enforces that every entry produces a valid * {@link ZamaSDKEventInput}. */ declare const transactionOperationMetadata: { approveUnderlying: { submittedEvent: (txHash: Hex) => { type: "approveUnderlying:submitted"; txHash: `0x${string}`; step: "approve"; }; }; "approveUnderlying:reset": { submittedEvent: (txHash: Hex) => { type: "approveUnderlying:submitted"; txHash: `0x${string}`; step: "reset"; }; }; delegateDecryption: { submittedEvent: (txHash: Hex) => { type: "delegation:submitted"; txHash: `0x${string}`; }; }; finalizeUnwrap: { submittedEvent: (txHash: Hex) => { type: "finalizeUnwrap:submitted"; txHash: `0x${string}`; }; }; revokeDelegation: { submittedEvent: (txHash: Hex) => { type: "revokeDelegation:submitted"; txHash: `0x${string}`; }; }; setOperator: { submittedEvent: (txHash: Hex) => { type: "setOperator:submitted"; txHash: `0x${string}`; }; }; "shield:transferAndCall": { submittedEvent: (txHash: Hex) => { type: "shield:submitted"; txHash: `0x${string}`; shieldPath: "transferAndCall"; }; }; "shield:approveAndWrap": { submittedEvent: (txHash: Hex) => { type: "shield:submitted"; txHash: `0x${string}`; shieldPath: "approveAndWrap"; }; }; transfer: { submittedEvent: (txHash: Hex) => { type: "transfer:submitted"; txHash: `0x${string}`; }; }; transferFrom: { submittedEvent: (txHash: Hex) => { type: "transferFrom:submitted"; txHash: `0x${string}`; }; }; unwrap: { submittedEvent: (txHash: Hex) => { type: "unwrap:submitted"; txHash: `0x${string}`; }; }; unwrapAll: { submittedEvent: (txHash: Hex) => { type: "unwrap:submitted"; txHash: `0x${string}`; }; }; }; /** * SDK transaction operations that emit submitted/error lifecycle events. * * Operation strings encode the execution-path discriminator for flows that have * one (`shield:transferAndCall` vs. `shield:approveAndWrap`), routing both error * and success events on a single field — see {@link transactionOperationMetadata}. */ type TransactionOperation = keyof typeof transactionOperationMetadata; //#endregion //#region src/relayer/relayer-dispatcher.d.ts /** Anything with a synchronous `terminate()` method (workers, pools). */ interface WorkerLike { terminate(): void; } /** * Owns chain management (chains / activeChain / switchChain) and delegates * every {@link RelayerSDK} operation to the relayer for the currently active * chain. * * Groups chains by relayer config reference identity, calls `createWorker` * once per group with all chain configs, then calls `createRelayer` * per chain with the shared worker. * * Workers/pools are held separately from relayers so the dispatcher can * terminate them directly — relayers never own worker lifecycle. */ declare class RelayerDispatcher implements RelayerSDK, Disposable { #private; constructor(chains: readonly [FheChain, ...FheChain[]], configs: Readonly>, logger: GenericLogger); get chains(): readonly FheChain[]; get chain(): FheChain; switchChain(chainId: number): void; generateTransportKeyPair(): Promise; createEIP712(publicKey: Hex, contractAddresses: Address[], startTimestamp: number, durationDays?: number): Promise; encrypt(params: EncryptParams): Promise; userDecrypt(params: UserDecryptParams): Promise>>; publicDecrypt(encryptedValues: EncryptedValue[]): Promise; createDelegatedUserDecryptEIP712(publicKey: Hex, contractAddresses: Address[], delegatorAddress: Address, startTimestamp: number, durationDays?: number): Promise; delegatedUserDecrypt(params: DelegatedUserDecryptParams): Promise>>; requestZKProofVerification(zkProof: ZKProofLike): Promise; fetchFheEncryptionKeyBytes(): Promise; getPublicParams(bits: number): Promise; getAclAddress(): Promise
; terminate(): void; [Symbol.dispose](): void; } //#endregion //#region src/relayer/base-relayer.d.ts declare abstract class BaseRelayer { #private; protected abstract readonly chain: FheChain; protected abstract init(): Promise; protected ensureInit(): Promise; protected resetInit(): void; getAclAddress(): Promise
; } //#endregion //#region src/relayer/relayer-web.d.ts /** * RelayerWeb — single-chain browser encryption/decryption layer. * The worker is injected at construction time; the relayer does not own its lifecycle. */ declare class RelayerWeb extends BaseRelayer implements RelayerSDK, Disposable { #private; constructor(config: RelayerWebConfig); protected get chain(): FheChain; protected init(): Promise; /** * Terminate clears the artifact cache only. * The worker is externally owned — the relayer does not terminate it. */ terminate(): void; /** Calls {@link terminate}. */ [Symbol.dispose](): void; /** * Generate a transport key pair (ML-KEM public + private key) used for user-decryption. */ generateTransportKeyPair(): Promise; /** * Create EIP712 typed data for user decryption authorization. */ createEIP712(publicKey: Hex, contractAddresses: Address[], startTimestamp: number, durationDays?: number): Promise; /** * Encrypt values for use in smart contract calls. * Each value must specify its FHE type (ebool, euint8–256, eaddress). */ encrypt(params: EncryptParams): Promise; /** * Decrypt ciphertexts using user's private key. * Requires a valid EIP712 signature. */ userDecrypt(params: UserDecryptParams): Promise>>; /** * Public decryption - no authorization needed. * Used for publicly visible encrypted values. */ publicDecrypt(encryptedValues: EncryptedValue[]): Promise; /** * Create EIP712 typed data for delegated user decryption authorization. */ createDelegatedUserDecryptEIP712(publicKey: Hex, contractAddresses: Address[], delegatorAddress: Address, startTimestamp: number, durationDays?: number): Promise; /** * Decrypt ciphertexts via delegation. * Requires a valid EIP712 signature from the delegator. */ delegatedUserDecrypt(params: DelegatedUserDecryptParams): Promise>>; /** * Submit a ZK proof to the relayer for verification. */ requestZKProofVerification(zkProof: ZKProofLike): Promise; /** * Fetch the network's FHE encryption key (ID + bytes). * When storage is configured, the result is cached persistently. */ fetchFheEncryptionKeyBytes(): Promise; /** * Get public parameters for encryption capacity. * When storage is configured, the result is cached persistently. */ getPublicParams(bits: number): Promise; } //#endregion //#region src/config/types.d.ts /** * Options for web() relayer (threads, security, storage). * * Logging is configured once, SDK-wide, via `createConfig({ logger })` — there * is deliberately no per-relayer logger option. */ type WebRelayerOptions = Partial>; /** * Base relayer config. * * Groups chains by config reference identity, calls `createWorker` * once per group with all chain configs, then calls `createRelayer` * per chain with the shared worker. */ interface RelayerConfig { readonly type: string; /** * Create a shared worker/pool for all chains in this relayer group. * `logger` is the SDK-wide logger from `createConfig`, threaded through so * worker diagnostics route through the consumer's logger. */ readonly createWorker?: (chains: FheChain[], logger: GenericLogger) => any; /** * Create a single-chain relayer. `worker` is the return value of * `createWorker`; `logger` is the SDK-wide logger from `createConfig`. */ readonly createRelayer: (chain: FheChain, worker: any, logger: GenericLogger) => RelayerSDK; } /** Web relayer config — narrows worker type to `RelayerWorkerClient`. */ interface WebRelayerConfig extends RelayerConfig { readonly type: "web"; readonly createWorker: (chains: FheChain[], logger: GenericLogger) => RelayerWorkerClient; readonly createRelayer: (chain: FheChain, worker: RelayerWorkerClient, logger: GenericLogger) => RelayerWeb; } /** Cleartext relayer config — no worker, returns `RelayerCleartext`. */ interface CleartextRelayerConfig extends RelayerConfig { readonly type: "cleartext"; readonly createRelayer: (chain: FheChain, worker: unknown, logger: GenericLogger) => RelayerCleartext; } /** Shared options across all adapter paths. */ interface ZamaConfigBase { /** FHE chain configurations. Defines which chains support FHE operations. */ chains: TChains; /** Per-chain relayer configuration. Every chain must have a relayer entry. */ relayers: { [K in TChains[number]["id"]]: RelayerConfig }; /** Credential storage. Default: IndexedDB in browser, memory in Node. */ storage?: GenericStorage; /** Optional dedicated storage for permits. Defaults to `storage`. */ permitStorage?: GenericStorage; /** ML-KEM transport key pair TTL in seconds. Default: 2592000 (30 days). */ transportKeyPairTTL?: number; /** Permit lifetime in days. Default: 30. Clamped to `transportKeyPairTTL / 86400`. */ permitTTL?: number; /** Registry cache TTL in seconds. Default: 86400 (24h). */ registryTTL?: number; /** SDK lifecycle event listener. */ onEvent?: ZamaSDKEventListener; /** * Optional logger for SDK diagnostics. Conforms to the four-level * {@link GenericLogger} interface (`error`/`warn`/`info`/`debug`), which * common loggers (console, pino, winston, OpenTelemetry's `DiagLogger`) * satisfy directly. When omitted, the SDK emits no log output of its own. * The SDK never bundles a logging library or imposes a format. */ logger?: GenericLogger; } /** Generic config — pass any {@link GenericSigner} and {@link GenericProvider} directly. */ interface ZamaConfigGeneric extends ZamaConfigBase { /** * Optional wallet signer. Omit for read-only usage (indexers, SSR, * pre-wallet-connect states). Signer-required SDK operations throw * `SignerNotConfiguredError` when invoked without a signer. */ signer?: GenericSigner; provider: GenericProvider; } declare const zamaConfigBrand: unique symbol; /** * Resolved, validated config object. Obtain via `createConfig()` or an * adapter-specific factory — never construct by hand. */ type ZamaConfig = { readonly chains: readonly FheChain[]; readonly relayer: RelayerDispatcher; readonly provider: GenericProvider; readonly signer: GenericSigner | undefined; readonly storage: GenericStorage; readonly permitStorage: GenericStorage; readonly transportKeyPairTTL: number; readonly permitTTL: number; readonly registryTTL: number; readonly onEvent: ZamaSDKEventListener | undefined; /** * The SDK-wide logger, always present. Wraps the optional consumer-supplied * {@link GenericLogger}; silent when none was configured. */ readonly logger: GenericLogger; } & { readonly [zamaConfigBrand]: true; }; //#endregion export { decodeDelegatedForUserDecryption as $, UnshieldPhase2StartedEvent as A, AclTopics as B, SetOperatorSubmittedEvent as C, TransferFromSubmittedEvent as D, TransactionOperation as E, ZamaSDKEventListener as F, TOKEN_TOPICS as G, DelegatedForUserDecryptionEvent as H, ZamaSDKEventType as I, UnwrapRequestedEvent as J, Topics as K, ZamaSDKEvents as L, UnwrapSubmittedEvent as M, ZamaSDKEvent as N, TransferSubmittedEvent as O, ZamaSDKEventInput as P, decodeConfidentialTransfer as Q, ACL_TOPICS as R, RevokeDelegationSubmittedEvent as S, TransactionErrorEvent as T, OnChainEvent as U, ConfidentialTransferEvent as V, RevokedDelegationForUserDecryptionEvent as W, decodeAclEvent as X, WrapEvent as Y, decodeAclEvents as Z, DelegationSubmittedEvent as _, ZamaConfig as a, decodeWrap as at, EncryptStartEvent as b, RelayerWeb as c, findUnwrapRequested as ct, WorkerLike as d, decodeOnChainEvent as et, ApproveUnderlyingSubmittedEvent as f, DecryptStartEvent as g, DecryptErrorEvent as h, WebRelayerOptions as i, decodeUnwrapRequested as it, UnshieldPhase2SubmittedEvent as j, UnshieldPhase1SubmittedEvent as k, BaseRelayer as l, findWrap as lt, DecryptEndEvent as m, RelayerConfig as n, decodeRevokedDelegationForUserDecryption as nt, ZamaConfigBase as o, findDelegatedForUserDecryption as ot, BaseEvent as p, UnwrapFinalizedEvent as q, WebRelayerConfig as r, decodeUnwrapFinalized as rt, ZamaConfigGeneric as s, findRevokedDelegationForUserDecryption as st, CleartextRelayerConfig as t, decodeOnChainEvents as tt, RelayerDispatcher as u, EncryptEndEvent as v, ShieldSubmittedEvent as w, FinalizeUnwrapSubmittedEvent as x, EncryptErrorEvent as y, AclEvent as z }; //# sourceMappingURL=types-BjDu-RZg.d.ts.map