@zama-fhe/sdk 3.6.0 → 3.7.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/base-signer.cjs +1 -1
- package/dist/cjs/base-signer.cjs.map +1 -1
- package/dist/cjs/chains.cjs +1 -1
- package/dist/cjs/chains.cjs.map +1 -1
- package/dist/cjs/ethers/index.cjs +1 -1
- package/dist/cjs/ethers/index.cjs.map +1 -1
- package/dist/cjs/fhevm-relayer.cjs +2 -2
- package/dist/cjs/fhevm-relayer.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/query/index.cjs +1 -1
- package/dist/cjs/query/index.cjs.map +1 -1
- package/dist/cjs/relayer.cjs +1 -1
- package/dist/cjs/relayer.cjs.map +1 -1
- package/dist/cjs/token.cjs +1 -1
- package/dist/cjs/token.cjs.map +1 -1
- package/dist/cjs/viem/index.cjs +1 -1
- package/dist/cjs/viem/index.cjs.map +1 -1
- package/dist/cjs/wrappers-registry.cjs +1 -1
- package/dist/cjs/wrappers-registry.cjs.map +1 -1
- package/dist/esm/base-signer--sBO2qJp.js +2 -0
- package/dist/esm/base-signer--sBO2qJp.js.map +1 -0
- package/dist/esm/{base-signer-Iu5Lszrf.d.ts → base-signer-S2Ogf6L4.d.ts} +2 -2
- package/dist/esm/chains/index.d.ts +1 -1
- package/dist/esm/chains/index.js +1 -1
- package/dist/esm/chains-DEpKup1n.js +2 -0
- package/dist/esm/chains-DEpKup1n.js.map +1 -0
- package/dist/esm/cleartext/index.d.ts +2 -2
- package/dist/esm/cleartext/index.js +1 -1
- package/dist/esm/{cleartext-iE4sWgSP.js → cleartext-DcbDCDXj.js} +2 -2
- package/dist/esm/{cleartext-iE4sWgSP.js.map → cleartext-DcbDCDXj.js.map} +1 -1
- package/dist/esm/{cleartext-B2DI8fgm.d.ts → cleartext-pv2blbFU.d.ts} +2 -2
- package/dist/esm/encrypt.worker.js +51 -51
- package/dist/esm/{encryption-BKoalB4o.js → encryption-DJljZ2oV.js} +2 -2
- package/dist/esm/{encryption-BKoalB4o.js.map → encryption-DJljZ2oV.js.map} +1 -1
- package/dist/esm/ethers/index.d.ts +5 -5
- package/dist/esm/ethers/index.js +1 -1
- package/dist/esm/ethers/index.js.map +1 -1
- package/dist/esm/fhevm-relayer-CPmCytDX.js +8 -0
- package/dist/esm/fhevm-relayer-CPmCytDX.js.map +1 -0
- package/dist/esm/{index-BCh3VaZo.d.ts → index-DRrrBtMX.d.ts} +2000 -1115
- package/dist/esm/{index-ijgDL4IC.d.ts → index-Gk1S0gjO.d.ts} +14 -1
- package/dist/esm/{index-S6QjPkZE.d.ts → index-tfvbrVa2.d.ts} +4 -4
- package/dist/esm/index.d.ts +108 -8
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/node/index.d.ts +4 -4
- package/dist/esm/node/index.js +1 -1
- package/dist/esm/query/index.d.ts +4 -537
- package/dist/esm/query/index.js +1 -1
- package/dist/esm/query/index.js.map +1 -1
- package/dist/esm/relayer-B6Zo6EkX.js +2 -0
- package/dist/esm/relayer-B6Zo6EkX.js.map +1 -0
- package/dist/esm/token-BMQ6xlrk.js +2 -0
- package/dist/esm/{token-BejFVO8m.js.map → token-BMQ6xlrk.js.map} +1 -1
- package/dist/esm/{types-D3W3J65M.d.ts → types-BOyFfG7D.d.ts} +42 -7
- package/dist/esm/{types-Ce9Lhvrf.d.ts → types-BRIpBy9n.d.ts} +3 -3
- package/dist/esm/{types-CFDG6lIJ.d.ts → types-OXQqX_kH.d.ts} +3 -3
- package/dist/esm/{validation-BRu06AM_.js → validation-DWe2k89s.js} +2 -2
- package/dist/esm/{validation-BRu06AM_.js.map → validation-DWe2k89s.js.map} +1 -1
- package/dist/esm/viem/index.d.ts +5 -5
- package/dist/esm/viem/index.js +1 -1
- package/dist/esm/viem/index.js.map +1 -1
- package/dist/esm/web/index.d.ts +1 -1
- package/dist/esm/web/index.js +1 -1
- package/dist/esm/wrappers-registry-BfQr2QHn.js +2 -0
- package/dist/esm/wrappers-registry-BfQr2QHn.js.map +1 -0
- package/package.json +2 -2
- package/dist/esm/base-signer-DGIEzavu.js +0 -2
- package/dist/esm/base-signer-DGIEzavu.js.map +0 -1
- package/dist/esm/chains-ByyCdrrd.js +0 -2
- package/dist/esm/chains-ByyCdrrd.js.map +0 -1
- package/dist/esm/fhevm-relayer-Cm-ZR1vP.js +0 -8
- package/dist/esm/fhevm-relayer-Cm-ZR1vP.js.map +0 -1
- package/dist/esm/relayer-CVKO9GmQ.js +0 -2
- package/dist/esm/relayer-CVKO9GmQ.js.map +0 -1
- package/dist/esm/token-BejFVO8m.js +0 -2
- package/dist/esm/wrappers-registry-BLe7PkZi.js +0 -2
- package/dist/esm/wrappers-registry-BLe7PkZi.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wrappers-registry-BLe7PkZi.js","names":[],"sources":["../../src/errors/credential.ts","../../src/errors/signing.ts","../../src/errors/transaction.ts","../../src/errors/signer.ts","../../src/events/sdk-events.ts","../../src/utils/swallow.ts","../../src/abi/confidential-wrapper.abi.ts","../../src/contracts/confidential-wrapper.ts","../../src/contracts/erc20.ts","../../src/abi/erc165.abi.ts","../../src/contracts/erc165.ts","../../src/contracts/wrappers-registry.ts"],"sourcesContent":["import { ZamaError, ZamaErrorCode } from \"./base\";\n\n/** Transport key pair has expired and needs regeneration. */\nexport class TransportKeyPairExpiredError extends ZamaError {\n constructor(message: string, options?: ErrorOptions) {\n super(ZamaErrorCode.TransportKeyPairExpired, message, options);\n this.name = \"TransportKeyPairExpiredError\";\n }\n}\n\n/** Relayer rejected the transport key pair (stale, expired, or malformed). */\nexport class InvalidTransportKeyPairError extends ZamaError {\n constructor(message: string, options?: ErrorOptions) {\n super(ZamaErrorCode.InvalidTransportKeyPair, message, options);\n this.name = \"InvalidTransportKeyPairError\";\n }\n}\n\n/**\n * The permit's KMS context has been revoked on-chain, so the permit (and every\n * other permit signed under that context) is permanently unusable. The SDK\n * already tried to self-heal before surfacing this. Check `cause` to tell why\n * it failed: a `SigningFailedError` means the configured signer could not\n * produce a new permit, waiting will not help, establish a new permit with a\n * working signer. Any other cause means the retry hit the same revoked\n * context, typically because the upstream validity check caches a stale\n * \"valid\" verdict for up to 15 minutes; wait out that window and retry.\n */\nexport class RevokedKmsContextError extends ZamaError {\n constructor(message: string, options?: ErrorOptions) {\n super(ZamaErrorCode.RevokedKmsContext, message, options);\n this.name = \"RevokedKmsContextError\";\n }\n}\n\n/** No FHE ciphertext exists for this account (never shielded). */\nexport class NoCiphertextError extends ZamaError {\n constructor(message: string, options?: ErrorOptions) {\n super(ZamaErrorCode.NoCiphertext, message, options);\n this.name = \"NoCiphertextError\";\n }\n}\n\n/**\n * Wrapping or unwrapping the transport private key with `transportKeyPairDerivationSecret` failed:\n * a scoped entry that fails to unwrap may belong to a peer using a different secret, so it fails\n * loudly instead of silently regenerating and clobbering that peer's entry, or the underlying\n * WebCrypto operation itself failed (e.g. `crypto.subtle` unavailable in this environment).\n */\nexport class KeyWrappingError extends ZamaError {\n constructor(message: string, options?: ErrorOptions) {\n super(ZamaErrorCode.KeyWrappingFailed, message, options);\n this.name = \"KeyWrappingError\";\n }\n}\n\n/**\n * The transport key pair changed between `preparePermit` and `registerPermit`\n * (expired, evicted, or rotated in between). The prepared EIP-712 payload was\n * signed against the old key pair's public key — registering it under a\n * different one would persist a permit bound to the wrong key. Call\n * `preparePermit` again to rebind the signature request to the current key pair.\n */\nexport class TransportKeyPairChangedError extends ZamaError {\n constructor(message: string, options?: ErrorOptions) {\n super(ZamaErrorCode.TransportKeyPairChanged, message, options);\n this.name = \"TransportKeyPairChangedError\";\n }\n}\n\n/**\n * A prepared permit's `chainId` doesn't match the chain `registerPermit` is\n * running against. The EIP-712 payload's domain is bound to the chain it was\n * prepared for; registering it under a different chain would persist a permit\n * whose signed payload disagrees with its storage scope.\n */\nexport class PreparedPermitChainMismatchError extends ZamaError {\n /** Chain ID the permit was prepared for. */\n readonly preparedChainId: number;\n /** Chain ID `registerPermit` is currently running against. */\n readonly activeChainId: number;\n\n constructor(\n { preparedChainId, activeChainId }: { preparedChainId: number; activeChainId: number },\n options?: ErrorOptions,\n ) {\n super(\n ZamaErrorCode.PreparedPermitChainMismatch,\n `registerPermit: prepared.chainId (${preparedChainId}) does not match the active chain ` +\n `(${activeChainId}). Register the permit while the SDK is configured for the chain it was prepared for.`,\n options,\n );\n this.name = \"PreparedPermitChainMismatchError\";\n this.preparedChainId = preparedChainId;\n this.activeChainId = activeChainId;\n }\n}\n\n/** A prepared permit's validity window elapsed before its signature was registered. */\nexport class PreparedPermitExpiredError extends ZamaError {\n constructor(message: string, options?: ErrorOptions) {\n super(ZamaErrorCode.PreparedPermitExpired, message, options);\n this.name = \"PreparedPermitExpiredError\";\n }\n}\n","import {\n extractRpcErrorCode,\n extractWalletErrorName,\n isInvalidTransportKeyPairMessage,\n} from \"../utils/error\";\nimport { ZamaError, ZamaErrorCode } from \"./base\";\nimport { InvalidTransportKeyPairError } from \"./credential\";\n\n/**\n * Diagnostic metadata attached to a signing-failure error, on top of the\n * inherited `cause`. All optional and best-effort: `operation` comes from the\n * caller, `rpcCode`/`walletErrorName` are extracted from the wallet's raw\n * error by {@link wrapSigningError}.\n */\nexport interface SigningErrorMetadata {\n /** Name of the SDK operation that was signing when the wallet/provider failed (e.g. \"grantPermit\"). */\n operation?: string;\n /** JSON-RPC / EIP-1193 numeric error code found in the failure's cause chain, if any. */\n rpcCode?: number;\n /** `name` of the error class the wallet/provider library threw (e.g. viem's `InvalidParamsRpcError`). */\n walletErrorName?: string;\n}\n\n/** User rejected the wallet signature prompt. */\nexport class SigningRejectedError extends ZamaError {\n /** Name of the SDK operation that was signing when the user rejected. */\n readonly operation: string | undefined;\n /** JSON-RPC / EIP-1193 numeric error code found in the failure's cause chain, if any. */\n readonly rpcCode: number | undefined;\n /** `name` of the error class the wallet/provider library threw. */\n readonly walletErrorName: string | undefined;\n\n constructor(message: string, options?: ErrorOptions & SigningErrorMetadata) {\n const { operation, rpcCode, walletErrorName, ...errorOptions } = options ?? {};\n super(ZamaErrorCode.SigningRejected, message, errorOptions);\n this.name = \"SigningRejectedError\";\n this.operation = operation;\n this.rpcCode = rpcCode;\n this.walletErrorName = walletErrorName;\n }\n}\n\n/** Wallet signature failed for a reason other than rejection. */\nexport class SigningFailedError extends ZamaError {\n /** Name of the SDK operation that was signing when the wallet/provider failed. */\n readonly operation: string | undefined;\n /** JSON-RPC / EIP-1193 numeric error code found in the failure's cause chain, if any. */\n readonly rpcCode: number | undefined;\n /** `name` of the error class the wallet/provider library threw. */\n readonly walletErrorName: string | undefined;\n\n constructor(message: string, options?: ErrorOptions & SigningErrorMetadata) {\n const { operation, rpcCode, walletErrorName, ...errorOptions } = options ?? {};\n super(ZamaErrorCode.SigningFailed, message, errorOptions);\n this.name = \"SigningFailedError\";\n this.operation = operation;\n this.rpcCode = rpcCode;\n this.walletErrorName = walletErrorName;\n }\n}\n\n/**\n * Classify a caught signing error into {@link SigningRejectedError},\n * {@link SigningFailedError}, or {@link InvalidTransportKeyPairError} and\n * return it rather than throw (mirroring {@link wrapDecryptError}/\n * {@link wrapEncryptError}), so a caller can emit an observability event\n * carrying the classified error before throwing it themselves. Enriches the\n * result with `rpcCode`/`walletErrorName` extracted from `error`'s cause\n * chain, and passes an already-typed `ZamaError` through unchanged.\n */\nexport function wrapSigningError(error: unknown, context: { operation: string }): ZamaError {\n if (error instanceof ZamaError) {\n return error;\n }\n const { operation } = context;\n const hasCode4001 =\n typeof error === \"object\" && error !== null && \"code\" in error && error.code === 4001;\n const originalMsg = error instanceof Error ? error.message : String(error);\n const lowerMsg = originalMsg.toLowerCase();\n const hasRejectionMessage =\n lowerMsg.includes(\"user rejected\") || lowerMsg.includes(\"user denied\");\n const fullMessage = `${operation}: ${originalMsg}`;\n if (hasCode4001 || hasRejectionMessage) {\n return new SigningRejectedError(fullMessage, {\n cause: error,\n operation,\n rpcCode: extractRpcErrorCode(error),\n walletErrorName: extractWalletErrorName(error),\n });\n }\n // A stale transport key pair the relayer can't re-derive (post-rotation) is\n // not a signing failure per se — surface it as the typed, self-heal signal so\n // the caller can evict the vault entry and regenerate.\n if (isInvalidTransportKeyPairMessage(originalMsg)) {\n return new InvalidTransportKeyPairError(fullMessage, { cause: error });\n }\n return new SigningFailedError(fullMessage, {\n cause: error,\n operation,\n rpcCode: extractRpcErrorCode(error),\n walletErrorName: extractWalletErrorName(error),\n });\n}\n","import { ZamaError, ZamaErrorCode } from \"./base\";\n\n/** On-chain transaction reverted. */\nexport class TransactionRevertedError extends ZamaError {\n constructor(message: string, options?: ErrorOptions) {\n super(ZamaErrorCode.TransactionReverted, message, options);\n this.name = \"TransactionRevertedError\";\n }\n}\n","import { ZamaError, ZamaErrorCode } from \"./base\";\n\n/**\n * Base class for signer/account readiness failures.\n */\nexport class SignerRequiredError extends ZamaError {\n /** Name of the operation that required a signer. */\n readonly operation: string;\n\n constructor(code: ZamaErrorCode, operation: string, message: string, options?: ErrorOptions) {\n super(code, message, options);\n this.name = \"SignerRequiredError\";\n this.operation = operation;\n }\n}\n\n/**\n * Thrown when an operation requires a signer but none is configured.\n *\n * The SDK can be constructed without a signer. Operations that need wallet\n * authority throw this before probing wallet state.\n *\n * @example\n * ```ts\n * try {\n * await token.confidentialTransfer(\"0xTo\", 100n);\n * } catch (e) {\n * if (e instanceof SignerNotConfiguredError) {\n * // Fix SDK/provider configuration.\n * }\n * }\n * ```\n */\nexport class SignerNotConfiguredError extends SignerRequiredError {\n constructor(operation: string, options?: ErrorOptions) {\n super(\n ZamaErrorCode.SignerNotConfigured,\n operation,\n `Cannot ${operation} without a signer. Configure one via createConfig({ signer: ... }) or <ZamaProvider config={createConfig({ signer: ... })}>.`,\n options,\n );\n this.name = \"SignerNotConfiguredError\";\n }\n}\n\n/** Thrown when a signer exists but no wallet account is currently connected. */\nexport class WalletNotConnectedError extends SignerRequiredError {\n constructor(operation: string, options?: ErrorOptions) {\n super(\n ZamaErrorCode.WalletNotConnected,\n operation,\n `Cannot ${operation} without a connected wallet account.`,\n options,\n );\n this.name = \"WalletNotConnectedError\";\n }\n}\n\n/** Thrown when an async adapter has not resolved its initial wallet account yet. */\nexport class WalletAccountNotReadyError extends SignerRequiredError {\n constructor(operation: string, options?: ErrorOptions) {\n super(\n ZamaErrorCode.WalletAccountNotReady,\n operation,\n `Cannot ${operation} before the wallet account is ready.`,\n options,\n );\n this.name = \"WalletAccountNotReadyError\";\n }\n}\n\n/**\n * Narrow a nullable signer-dependent value or throw {@link SignerNotConfiguredError}.\n */\nexport function requireConfigured<T>(value: T, operation: string): NonNullable<T> {\n if (value === null || value === undefined) {\n throw new SignerNotConfiguredError(operation);\n }\n return value as NonNullable<T>;\n}\n","import type { Address, Hex } from \"viem\";\nimport type { ClearValue, EncryptedValue } from \"../relayer/types\";\nimport type { ShieldPath } from \"../types/token\";\n\n/**\n * All SDK event keys, accessible as `ZamaSDKEvents.EncryptStart` etc.\n */\nexport const ZamaSDKEvents = {\n // FHE operations\n EncryptStart: \"encrypt:start\",\n EncryptEnd: \"encrypt:end\",\n EncryptError: \"encrypt:error\",\n DecryptStart: \"decrypt:start\",\n DecryptEnd: \"decrypt:end\",\n DecryptError: \"decrypt:error\",\n // Credential operations\n PermitError: \"permit:error\",\n // Write operations\n TransactionError: \"transaction:error\",\n ShieldSubmitted: \"shield:submitted\",\n TransferSubmitted: \"transfer:submitted\",\n TransferFromSubmitted: \"transferFrom:submitted\",\n SetOperatorSubmitted: \"setOperator:submitted\",\n ApproveUnderlyingSubmitted: \"approveUnderlying:submitted\",\n WrapSubmitted: \"wrap:submitted\",\n UnwrapSubmitted: \"unwrap:submitted\",\n FinalizeUnwrapSubmitted: \"finalizeUnwrap:submitted\",\n // Delegation operations\n DelegationSubmitted: \"delegation:submitted\",\n RevokeDelegationSubmitted: \"revokeDelegation:submitted\",\n // Unshield orchestration\n UnshieldPhase1Submitted: \"unshield:phase1_submitted\",\n UnshieldPhase2Started: \"unshield:phase2_started\",\n UnshieldPhase2Submitted: \"unshield:phase2_submitted\",\n} as const;\n\n/** Union of all SDK event type strings. */\nexport type ZamaSDKEventType = (typeof ZamaSDKEvents)[keyof typeof ZamaSDKEvents];\n\n// -- Base fields present on every event --\n\n/** Fields present on every SDK event; each concrete event extends this. */\nexport interface BaseEvent {\n /** Confidential token this event relates to, when the operation targets one. */\n tokenAddress?: Address;\n /** Unix epoch time (milliseconds) at which the event was emitted. */\n timestamp: number;\n /** Shared identifier linking related events in multi-phase operations (e.g. unshield). */\n operationId?: string;\n}\n\n// -- Per-event typed payloads --\n\n/** Emitted when an FHE encryption starts. */\nexport interface EncryptStartEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.EncryptStart;\n}\n\n/** Emitted when an FHE encryption completes successfully. */\nexport interface EncryptEndEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.EncryptEnd;\n /** Time the encryption took, in milliseconds. */\n durationMs: number;\n}\n\n/** Emitted when an FHE encryption fails. */\nexport interface EncryptErrorEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.EncryptError;\n /** The error that caused the encryption to fail. */\n error: Error;\n /** Time elapsed before the encryption failed, in milliseconds. */\n durationMs: number;\n}\n\n/** Emitted when an FHE decryption starts. */\nexport interface DecryptStartEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.DecryptStart;\n /** Encrypted values being decrypted — correlate with matching DecryptEnd/DecryptError. */\n encryptedValues: EncryptedValue[];\n}\n\n/** Emitted when an FHE decryption completes successfully. */\nexport interface DecryptEndEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.DecryptEnd;\n /** Time the decryption took, in milliseconds. */\n durationMs: number;\n /** Encrypted values that were decrypted. */\n encryptedValues: EncryptedValue[];\n /** Decrypted values keyed by encrypted value — use this to correlate events to specific entries. */\n result: Record<EncryptedValue, ClearValue>;\n}\n\n/** Emitted when an FHE decryption fails. */\nexport interface DecryptErrorEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.DecryptError;\n /** The error that caused the decryption to fail. */\n error: Error;\n /** Time elapsed before the decryption failed, in milliseconds. */\n durationMs: number;\n /** Encrypted values that were being decrypted when the error occurred. */\n encryptedValues: EncryptedValue[];\n}\n\n/**\n * SDK credential/permit operations that emit a {@link PermitErrorEvent} on failure.\n * `grantPermit` and `grantDelegationPermit` are distinguished so an integrator\n * can tell a direct-decrypt permit failure from a delegation-permit failure\n * without parsing the error message.\n */\nexport type PermitOperation = \"grantPermit\" | \"grantDelegationPermit\" | \"registerPermit\";\n\n/**\n * Emitted when signing or registering a decryption permit fails — including\n * wallet/provider signing failures (`SigningFailedError`/`SigningRejectedError`)\n * that would otherwise only be visible by catching the thrown error at the call\n * site. Mirrors {@link TransactionErrorEvent} for the credential/permit path.\n */\nexport interface PermitErrorEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.PermitError;\n /** Which permit operation failed. */\n operation: PermitOperation;\n /** The error that caused the operation to fail. */\n error: Error;\n}\n\n/** Emitted when a write operation's transaction fails (before or after submission). */\nexport interface TransactionErrorEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.TransactionError;\n /** Which SDK operation failed. */\n operation: TransactionOperation;\n /** The error that caused the transaction to fail. */\n error: Error;\n}\n\n/** Emitted when a shield transaction has been submitted to the network. */\nexport interface ShieldSubmittedEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.ShieldSubmitted;\n /** Hash of the submitted shield transaction. */\n txHash: Hex;\n /** Which execution path was used: single-tx `transferAndCall` or two-tx `approveAndWrap`. */\n shieldPath: ShieldPath;\n}\n\n/** Emitted when a confidential transfer transaction has been submitted to the network. */\nexport interface TransferSubmittedEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.TransferSubmitted;\n /** Hash of the submitted transfer transaction. */\n txHash: Hex;\n}\n\n/** Emitted when a confidential `transferFrom` transaction has been submitted to the network. */\nexport interface TransferFromSubmittedEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.TransferFromSubmitted;\n /** Hash of the submitted transferFrom transaction. */\n txHash: Hex;\n}\n\n/** Emitted when a set-operator transaction has been submitted to the network. */\nexport interface SetOperatorSubmittedEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.SetOperatorSubmitted;\n /** Hash of the submitted setOperator transaction. */\n txHash: Hex;\n}\n\n/** Emitted when an underlying-ERC-20 approval transaction has been submitted to the network. */\nexport interface ApproveUnderlyingSubmittedEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.ApproveUnderlyingSubmitted;\n /** Hash of the submitted approval transaction. */\n txHash: Hex;\n /** Which approval transaction was submitted. */\n step: \"reset\" | \"approve\";\n}\n\n/**\n * Emitted by the standalone `wrap()` escape hatch (not by `shield()`, which\n * emits {@link ShieldSubmittedEvent}). Distinct so a caller-initiated `wrap`\n * isn't conflated with `shield()`'s internal `approveAndWrap` leg — mirroring\n * how `unwrap` emits its own event rather than reusing the unshield phases.\n */\nexport interface WrapSubmittedEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.WrapSubmitted;\n /** Hash of the submitted wrap transaction. */\n txHash: Hex;\n}\n\n/** Emitted when an unwrap transaction has been submitted to the network. */\nexport interface UnwrapSubmittedEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.UnwrapSubmitted;\n /** Hash of the submitted unwrap transaction. */\n txHash: Hex;\n}\n\n/** Emitted when a finalize-unwrap transaction has been submitted to the network. */\nexport interface FinalizeUnwrapSubmittedEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.FinalizeUnwrapSubmitted;\n /** Hash of the submitted finalizeUnwrap transaction. */\n txHash: Hex;\n}\n\n/** Emitted when a decryption-delegation transaction has been submitted to the network. */\nexport interface DelegationSubmittedEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.DelegationSubmitted;\n /** Hash of the submitted delegation transaction. */\n txHash: Hex;\n}\n\n/** Emitted when a revoke-delegation transaction has been submitted to the network. */\nexport interface RevokeDelegationSubmittedEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.RevokeDelegationSubmitted;\n /** Hash of the submitted revokeDelegation transaction. */\n txHash: Hex;\n}\n\n/** Emitted when the first phase of an unshield (the unwrap request) has been submitted. */\nexport interface UnshieldPhase1SubmittedEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.UnshieldPhase1Submitted;\n /** Hash of the submitted phase-1 transaction. */\n txHash: Hex;\n}\n\n/** Emitted when the second phase of an unshield (finalization) starts. */\nexport interface UnshieldPhase2StartedEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.UnshieldPhase2Started;\n}\n\n/** Emitted when the second phase of an unshield (finalization) has been submitted. */\nexport interface UnshieldPhase2SubmittedEvent extends BaseEvent {\n /** Event type discriminant. */\n type: typeof ZamaSDKEvents.UnshieldPhase2Submitted;\n /** Hash of the submitted phase-2 transaction. */\n txHash: Hex;\n}\n\n/**\n * Discriminated union of all SDK events.\n *\n * Decrypt events carry encrypted values and decrypted clear-text values so event\n * subscribers can correlate and bind them in UI layers. Events never carry\n * private keys, permit signatures, or ZK proofs.\n */\nexport type ZamaSDKEvent =\n | EncryptStartEvent\n | EncryptEndEvent\n | EncryptErrorEvent\n | DecryptStartEvent\n | DecryptEndEvent\n | DecryptErrorEvent\n | PermitErrorEvent\n | TransactionErrorEvent\n | ShieldSubmittedEvent\n | TransferSubmittedEvent\n | TransferFromSubmittedEvent\n | SetOperatorSubmittedEvent\n | ApproveUnderlyingSubmittedEvent\n | WrapSubmittedEvent\n | UnwrapSubmittedEvent\n | FinalizeUnwrapSubmittedEvent\n | DelegationSubmittedEvent\n | RevokeDelegationSubmittedEvent\n | UnshieldPhase1SubmittedEvent\n | UnshieldPhase2StartedEvent\n | UnshieldPhase2SubmittedEvent;\n\n/** Callback invoked with each emitted {@link ZamaSDKEvent}. */\nexport type ZamaSDKEventListener = (event: ZamaSDKEvent) => void;\n\n/**\n * Distributive Omit that preserves the discriminated union. Internal emit-side\n * shape — consumers only ever receive fully-populated {@link ZamaSDKEvent}.\n * @internal\n */\nexport type ZamaSDKEventInput = ZamaSDKEvent extends infer E\n ? E extends ZamaSDKEvent\n ? Omit<E, \"timestamp\" | \"tokenAddress\">\n : never\n : never;\n\n/**\n * SDK transaction operations that emit submitted/error lifecycle events.\n *\n * Operation strings encode the execution-path discriminator for flows that have\n * one (`shield:transferAndCall` vs. `shield:approveAndWrap`), routing both error\n * and success events on a single field — see {@link transactionOperationMetadata}.\n */\nexport type TransactionOperation =\n | \"approveUnderlying\"\n | \"approveUnderlying:reset\"\n | \"delegateDecryption\"\n | \"finalizeUnwrap\"\n | \"revokeDelegation\"\n | \"setOperator\"\n | \"shield:transferAndCall\"\n | \"shield:approveAndWrap\"\n | \"wrap\"\n | \"transfer\"\n | \"transferAndCall\"\n | \"transferFrom\"\n | \"transferFromAndCall\"\n | \"unwrap\"\n | \"unwrapAll\";\n\n/**\n * Single source of truth for each transaction operation's submitted-event payload.\n *\n * Adding a write op = adding one entry here plus its {@link TransactionOperation}\n * member; the `satisfies Record<TransactionOperation, …>` check enforces that the\n * table and the union stay in lockstep (missing or extra keys fail the build) and\n * that every entry produces a valid {@link ZamaSDKEventInput}.\n *\n * @internal\n */\nexport const transactionOperationMetadata = {\n approveUnderlying: {\n submittedEvent: (txHash: Hex) => ({\n type: ZamaSDKEvents.ApproveUnderlyingSubmitted,\n txHash,\n step: \"approve\" as const,\n }),\n },\n \"approveUnderlying:reset\": {\n submittedEvent: (txHash: Hex) => ({\n type: ZamaSDKEvents.ApproveUnderlyingSubmitted,\n txHash,\n step: \"reset\" as const,\n }),\n },\n delegateDecryption: {\n submittedEvent: (txHash: Hex) => ({ type: ZamaSDKEvents.DelegationSubmitted, txHash }),\n },\n finalizeUnwrap: {\n submittedEvent: (txHash: Hex) => ({ type: ZamaSDKEvents.FinalizeUnwrapSubmitted, txHash }),\n },\n revokeDelegation: {\n submittedEvent: (txHash: Hex) => ({ type: ZamaSDKEvents.RevokeDelegationSubmitted, txHash }),\n },\n setOperator: {\n submittedEvent: (txHash: Hex) => ({ type: ZamaSDKEvents.SetOperatorSubmitted, txHash }),\n },\n \"shield:transferAndCall\": {\n submittedEvent: (txHash: Hex) => ({\n type: ZamaSDKEvents.ShieldSubmitted,\n txHash,\n shieldPath: \"transferAndCall\" as const,\n }),\n },\n \"shield:approveAndWrap\": {\n submittedEvent: (txHash: Hex) => ({\n type: ZamaSDKEvents.ShieldSubmitted,\n txHash,\n shieldPath: \"approveAndWrap\" as const,\n }),\n },\n wrap: { submittedEvent: (txHash: Hex) => ({ type: ZamaSDKEvents.WrapSubmitted, txHash }) },\n transfer: {\n submittedEvent: (txHash: Hex) => ({ type: ZamaSDKEvents.TransferSubmitted, txHash }),\n },\n transferAndCall: {\n submittedEvent: (txHash: Hex) => ({ type: ZamaSDKEvents.TransferSubmitted, txHash }),\n },\n transferFrom: {\n submittedEvent: (txHash: Hex) => ({ type: ZamaSDKEvents.TransferFromSubmitted, txHash }),\n },\n transferFromAndCall: {\n submittedEvent: (txHash: Hex) => ({ type: ZamaSDKEvents.TransferFromSubmitted, txHash }),\n },\n unwrap: { submittedEvent: (txHash: Hex) => ({ type: ZamaSDKEvents.UnwrapSubmitted, txHash }) },\n unwrapAll: { submittedEvent: (txHash: Hex) => ({ type: ZamaSDKEvents.UnwrapSubmitted, txHash }) },\n} satisfies Record<TransactionOperation, { submittedEvent: (txHash: Hex) => ZamaSDKEventInput }>;\n","import type { GenericLogger } from \"../types\";\n\n/**\n * Runs a function and swallows any errors.\n *\n * The swallowed error is a handled, best-effort failure — when a logger is\n * supplied it is routed to the {@link GenericLogger} at `warn`, never to the\n * console. Most SDK call sites pass the SDK-wide logger; a few (e.g. a signer\n * constructed before `createConfig` exists) genuinely have none, so the logger\n * is optional and the failure is then silent.\n */\nexport async function swallow(\n label: string,\n fn: () => Promise<void> | void,\n logger?: GenericLogger,\n): Promise<void> {\n try {\n await fn();\n } catch (error) {\n logger?.warn(`${label} failed`, { error });\n }\n}\n","// DO NOT EDIT: generated by `pnpm abi:build` from\n// contracts/out/ConfidentialWrapperV3.sol/ConfidentialWrapperV3.json.\n// Regenerate after `pnpm contracts:build`; `pnpm abi:check` enforces this in CI.\nexport const confidentialWrapperAbi = [\n {\n type: \"function\",\n name: \"UPGRADE_INTERFACE_VERSION\",\n inputs: [],\n outputs: [{ name: \"\", type: \"string\", internalType: \"string\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"blockUser\",\n inputs: [{ name: \"user\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"confidentialBalanceOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"euint64\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"confidentialProtocolId\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"confidentialTotalSupply\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"euint64\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"confidentialTransfer\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address\" },\n { name: \"encryptedAmount\", type: \"bytes32\", internalType: \"externalEuint64\" },\n { name: \"inputProof\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"euint64\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"confidentialTransfer\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"bytes32\", internalType: \"euint64\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"euint64\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"confidentialTransferAndCall\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"bytes32\", internalType: \"euint64\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"transferred\", type: \"bytes32\", internalType: \"euint64\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"confidentialTransferAndCall\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address\" },\n { name: \"encryptedAmount\", type: \"bytes32\", internalType: \"externalEuint64\" },\n { name: \"inputProof\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"transferred\", type: \"bytes32\", internalType: \"euint64\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"confidentialTransferFrom\",\n inputs: [\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"to\", type: \"address\", internalType: \"address\" },\n { name: \"encryptedAmount\", type: \"bytes32\", internalType: \"externalEuint64\" },\n { name: \"inputProof\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"transferred\", type: \"bytes32\", internalType: \"euint64\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"confidentialTransferFrom\",\n inputs: [\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"to\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"bytes32\", internalType: \"euint64\" },\n ],\n outputs: [{ name: \"transferred\", type: \"bytes32\", internalType: \"euint64\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"confidentialTransferFromAndCall\",\n inputs: [\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"to\", type: \"address\", internalType: \"address\" },\n { name: \"encryptedAmount\", type: \"bytes32\", internalType: \"externalEuint64\" },\n { name: \"inputProof\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"transferred\", type: \"bytes32\", internalType: \"euint64\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"confidentialTransferFromAndCall\",\n inputs: [\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"to\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"bytes32\", internalType: \"euint64\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"transferred\", type: \"bytes32\", internalType: \"euint64\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"contractURI\",\n inputs: [],\n outputs: [{ name: \"\", type: \"string\", internalType: \"string\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"decimals\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint8\", internalType: \"uint8\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"discloseEncryptedAmount\",\n inputs: [\n { name: \"encryptedAmount\", type: \"bytes32\", internalType: \"euint64\" },\n { name: \"cleartextAmount\", type: \"uint64\", internalType: \"uint64\" },\n { name: \"decryptionProof\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"finalizeUnwrap\",\n inputs: [\n { name: \"unwrapRequestId\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"unwrapAmountCleartext\", type: \"uint64\", internalType: \"uint64\" },\n { name: \"decryptionProof\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"getUnderlyingDenyListSelector\",\n inputs: [],\n outputs: [\n { name: \"isSet\", type: \"bool\", internalType: \"bool\" },\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"inferredTotalSupply\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [\n { name: \"name_\", type: \"string\", internalType: \"string\" },\n { name: \"symbol_\", type: \"string\", internalType: \"string\" },\n { name: \"contractURI_\", type: \"string\", internalType: \"string\" },\n { name: \"underlying_\", type: \"address\", internalType: \"contract IERC20\" },\n { name: \"owner_\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"isBlocked\",\n inputs: [{ name: \"user\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"isOperator\",\n inputs: [\n { name: \"holder\", type: \"address\", internalType: \"address\" },\n { name: \"spender\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"maxTotalSupply\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"name\",\n inputs: [],\n outputs: [{ name: \"\", type: \"string\", internalType: \"string\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"onTransferReceived\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"rate\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"reinitializeV2\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"reinitializeV3\",\n inputs: [\n { name: \"blockedUsers\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"underlyingDenyListSelector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"hasUnderlyingDenyListSelector_\", type: \"bool\", internalType: \"bool\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"requestDiscloseEncryptedAmount\",\n inputs: [{ name: \"encryptedAmount\", type: \"bytes32\", internalType: \"euint64\" }],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"setOperator\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"until\", type: \"uint48\", internalType: \"uint48\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"symbol\",\n inputs: [],\n outputs: [{ name: \"\", type: \"string\", internalType: \"string\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"unblockUser\",\n inputs: [{ name: \"user\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"underlying\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"unwrap\",\n inputs: [\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"to\", type: \"address\", internalType: \"address\" },\n { name: \"encryptedAmount\", type: \"bytes32\", internalType: \"externalEuint64\" },\n { name: \"inputProof\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"unwrap\",\n inputs: [\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"to\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"bytes32\", internalType: \"euint64\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"unwrapAmount\",\n inputs: [{ name: \"unwrapRequestId\", type: \"bytes32\", internalType: \"bytes32\" }],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"euint64\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"unwrapRequester\",\n inputs: [{ name: \"unwrapRequestId\", type: \"bytes32\", internalType: \"bytes32\" }],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n { name: \"newImplementation\", type: \"address\", internalType: \"address\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"wrap\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"euint64\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"event\",\n name: \"AmountDiscloseRequested\",\n inputs: [\n { name: \"encryptedAmount\", type: \"bytes32\", indexed: true, internalType: \"euint64\" },\n { name: \"requester\", type: \"address\", indexed: true, internalType: \"address\" },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"AmountDisclosed\",\n inputs: [\n { name: \"encryptedAmount\", type: \"bytes32\", indexed: true, internalType: \"euint64\" },\n { name: \"amount\", type: \"uint64\", indexed: false, internalType: \"uint64\" },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"ConfidentialTransfer\",\n inputs: [\n { name: \"from\", type: \"address\", indexed: true, internalType: \"address\" },\n { name: \"to\", type: \"address\", indexed: true, internalType: \"address\" },\n { name: \"amount\", type: \"bytes32\", indexed: true, internalType: \"euint64\" },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [{ name: \"version\", type: \"uint64\", indexed: false, internalType: \"uint64\" }],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"OperatorSet\",\n inputs: [\n { name: \"holder\", type: \"address\", indexed: true, internalType: \"address\" },\n { name: \"operator\", type: \"address\", indexed: true, internalType: \"address\" },\n { name: \"until\", type: \"uint48\", indexed: false, internalType: \"uint48\" },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n { name: \"previousOwner\", type: \"address\", indexed: true, internalType: \"address\" },\n { name: \"newOwner\", type: \"address\", indexed: true, internalType: \"address\" },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n { name: \"previousOwner\", type: \"address\", indexed: true, internalType: \"address\" },\n { name: \"newOwner\", type: \"address\", indexed: true, internalType: \"address\" },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"PublicDecryptionVerified\",\n inputs: [\n { name: \"handlesList\", type: \"bytes32[]\", indexed: false, internalType: \"bytes32[]\" },\n { name: \"abiEncodedCleartexts\", type: \"bytes\", indexed: false, internalType: \"bytes\" },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"UnwrapFinalized\",\n inputs: [\n { name: \"receiver\", type: \"address\", indexed: true, internalType: \"address\" },\n { name: \"unwrapRequestId\", type: \"bytes32\", indexed: true, internalType: \"bytes32\" },\n { name: \"encryptedAmount\", type: \"bytes32\", indexed: false, internalType: \"euint64\" },\n { name: \"cleartextAmount\", type: \"uint64\", indexed: false, internalType: \"uint64\" },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"UnwrapRequested\",\n inputs: [\n { name: \"receiver\", type: \"address\", indexed: true, internalType: \"address\" },\n { name: \"unwrapRequestId\", type: \"bytes32\", indexed: true, internalType: \"bytes32\" },\n { name: \"amount\", type: \"bytes32\", indexed: false, internalType: \"euint64\" },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [{ name: \"implementation\", type: \"address\", indexed: true, internalType: \"address\" }],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"UserBlocked\",\n inputs: [{ name: \"user\", type: \"address\", indexed: true, internalType: \"address\" }],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"UserUnblocked\",\n inputs: [{ name: \"user\", type: \"address\", indexed: true, internalType: \"address\" }],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"Wrap\",\n inputs: [\n { name: \"to\", type: \"address\", indexed: true, internalType: \"address\" },\n { name: \"roundedAmount\", type: \"uint256\", indexed: false, internalType: \"uint256\" },\n { name: \"encryptedWrappedAmount\", type: \"bytes32\", indexed: false, internalType: \"euint64\" },\n ],\n anonymous: false,\n },\n {\n type: \"error\",\n name: \"AddressEmptyCode\",\n inputs: [{ name: \"target\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"BlockedUser\",\n inputs: [{ name: \"user\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"ERC1967InvalidImplementation\",\n inputs: [{ name: \"implementation\", type: \"address\", internalType: \"address\" }],\n },\n { type: \"error\", name: \"ERC1967NonPayable\", inputs: [] },\n {\n type: \"error\",\n name: \"ERC7984InvalidReceiver\",\n inputs: [{ name: \"receiver\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"ERC7984InvalidReceiver\",\n inputs: [{ name: \"receiver\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"ERC7984InvalidSender\",\n inputs: [{ name: \"sender\", type: \"address\", internalType: \"address\" }],\n },\n { type: \"error\", name: \"ERC7984TotalSupplyOverflow\", inputs: [] },\n {\n type: \"error\",\n name: \"ERC7984UnauthorizedCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"ERC7984UnauthorizedSpender\",\n inputs: [\n { name: \"holder\", type: \"address\", internalType: \"address\" },\n { name: \"spender\", type: \"address\", internalType: \"address\" },\n ],\n },\n {\n type: \"error\",\n name: \"ERC7984UnauthorizedUseOfEncryptedAmount\",\n inputs: [\n { name: \"amount\", type: \"bytes32\", internalType: \"euint64\" },\n { name: \"user\", type: \"address\", internalType: \"address\" },\n ],\n },\n {\n type: \"error\",\n name: \"ERC7984ZeroBalance\",\n inputs: [{ name: \"holder\", type: \"address\", internalType: \"address\" }],\n },\n { type: \"error\", name: \"FailedCall\", inputs: [] },\n { type: \"error\", name: \"InvalidInitialization\", inputs: [] },\n { type: \"error\", name: \"InvalidKMSSignatures\", inputs: [] },\n { type: \"error\", name: \"InvalidUnderlyingDenyListResponse\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidUnwrapRequest\",\n inputs: [{ name: \"unwrapRequestId\", type: \"bytes32\", internalType: \"bytes32\" }],\n },\n { type: \"error\", name: \"NotInitializing\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnableInvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"OwnableUnauthorizedAccount\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"SafeCastOverflowedUintDowncast\",\n inputs: [\n { name: \"bits\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"SafeERC20FailedOperation\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"SenderNotAllowedToUseHandle\",\n inputs: [\n { name: \"handle\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n ],\n },\n { type: \"error\", name: \"UUPSUnauthorizedCallContext\", inputs: [] },\n {\n type: \"error\",\n name: \"UUPSUnsupportedProxiableUUID\",\n inputs: [{ name: \"slot\", type: \"bytes32\", internalType: \"bytes32\" }],\n },\n { type: \"error\", name: \"UnderlyingDenyListCallFailed\", inputs: [] },\n {\n type: \"error\",\n name: \"UnderlyingDenyListedAddress\",\n inputs: [{ name: \"user\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"UserAlreadyBlocked\",\n inputs: [{ name: \"user\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"UserAlreadyUnblocked\",\n inputs: [{ name: \"user\", type: \"address\", internalType: \"address\" }],\n },\n { type: \"error\", name: \"ZamaProtocolUnsupported\", inputs: [] },\n] as const;\n","import type { Address, Hex } from \"viem\";\nimport { confidentialWrapperAbi } from \"../abi/confidential-wrapper.abi\";\nimport type { EncryptedValue } from \"../relayer/types\";\n\n/**\n * Returns the contract config to read an encrypted balance.\n *\n * @example\n * ```ts\n * const handle = await provider.readContract(\n * confidentialBalanceOfContract(tokenAddress, userAddress),\n * );\n * ```\n */\nexport function confidentialBalanceOfContract(tokenAddress: Address, userAddress: Address) {\n return {\n address: tokenAddress,\n abi: confidentialWrapperAbi,\n functionName: \"confidentialBalanceOf\",\n args: [userAddress],\n } as const;\n}\n\n/**\n * Returns the contract config for a confidential transfer.\n *\n * @example\n * ```ts\n * const txHash = await signer.writeContract(\n * confidentialTransferContract(tokenAddress, to, encryptedValues[0], inputProof),\n * );\n * ```\n */\nexport function confidentialTransferContract(\n encryptedErc20: Address,\n to: Address,\n encryptedAmount: EncryptedValue,\n inputProof: Hex,\n) {\n return {\n address: encryptedErc20,\n abi: confidentialWrapperAbi,\n functionName: \"confidentialTransfer\",\n args: [to, encryptedAmount, inputProof],\n } as const;\n}\n\n/**\n * Returns the contract config for a confidential transferFrom.\n *\n * @example\n * ```ts\n * const txHash = await signer.writeContract(\n * confidentialTransferFromContract(tokenAddress, from, to, encryptedValues[0], inputProof),\n * );\n * ```\n */\nexport function confidentialTransferFromContract(\n encryptedErc20: Address,\n from: Address,\n to: Address,\n encryptedAmount: EncryptedValue,\n inputProof: Hex,\n) {\n return {\n address: encryptedErc20,\n abi: confidentialWrapperAbi,\n functionName: \"confidentialTransferFrom\",\n args: [from, to, encryptedAmount, inputProof],\n } as const;\n}\n\n/**\n * Returns the contract config for a confidential transferAndCall. The caller\n * supplies an opaque `data` payload that is forwarded to the recipient's\n * ERC-7984 receiver hook (`onConfidentialTransferReceived`). The SDK does not\n * craft, validate, or inspect `data` — encoding the call site's domain message\n * is the caller's responsibility.\n *\n * @example\n * ```ts\n * const txHash = await signer.writeContract(\n * confidentialTransferAndCallContract(\n * tokenAddress,\n * to,\n * encryptedValues[0],\n * inputProof,\n * data,\n * ),\n * );\n * ```\n */\nexport function confidentialTransferAndCallContract(\n encryptedErc20: Address,\n to: Address,\n encryptedAmount: EncryptedValue,\n inputProof: Hex,\n data: Hex,\n) {\n return {\n address: encryptedErc20,\n abi: confidentialWrapperAbi,\n functionName: \"confidentialTransferAndCall\",\n args: [to, encryptedAmount, inputProof, data],\n } as const;\n}\n\n/**\n * Returns the contract config for a confidential transferFromAndCall. The\n * caller supplies an opaque `data` payload forwarded to the recipient's\n * ERC-7984 receiver hook; the SDK does not craft or inspect it.\n *\n * @example\n * ```ts\n * const txHash = await signer.writeContract(\n * confidentialTransferFromAndCallContract(\n * tokenAddress,\n * from,\n * to,\n * encryptedValues[0],\n * inputProof,\n * data,\n * ),\n * );\n * ```\n */\nexport function confidentialTransferFromAndCallContract(\n encryptedErc20: Address,\n from: Address,\n to: Address,\n encryptedAmount: EncryptedValue,\n inputProof: Hex,\n data: Hex,\n) {\n return {\n address: encryptedErc20,\n abi: confidentialWrapperAbi,\n functionName: \"confidentialTransferFromAndCall\",\n args: [from, to, encryptedAmount, inputProof, data],\n } as const;\n}\n\n/**\n * Returns the contract config for checking operator status.\n *\n * @example\n * ```ts\n * const isOperator = await provider.readContract(\n * isOperatorContract(tokenAddress, holder, spender),\n * );\n * ```\n */\nexport function isOperatorContract(tokenAddress: Address, holder: Address, spender: Address) {\n return {\n address: tokenAddress,\n abi: confidentialWrapperAbi,\n functionName: \"isOperator\",\n args: [holder, spender],\n } as const;\n}\n\n/**\n * Returns the contract config for setting an operator.\n * Defaults until to 1 hour from now.\n *\n * @example\n * ```ts\n * const txHash = await signer.writeContract(\n * setOperatorContract(tokenAddress, operator),\n * );\n * ```\n */\nexport function setOperatorContract(tokenAddress: Address, operator: Address, until?: number) {\n const effectiveUntil = until ?? Math.floor(Date.now() / 1000) + 3600;\n return {\n address: tokenAddress,\n abi: confidentialWrapperAbi,\n functionName: \"setOperator\",\n args: [operator, effectiveUntil],\n } as const;\n}\n\n/**\n * Returns the contract config for an unwrap with newly encrypted amount.\n *\n * @example\n * ```ts\n * const txHash = await signer.writeContract(\n * unwrapContract(encryptedErc20, from, to, encryptedValues[0], inputProof),\n * );\n * ```\n */\nexport function unwrapContract(\n encryptedErc20: Address,\n from: Address,\n to: Address,\n encryptedAmount: EncryptedValue,\n inputProof: Hex,\n) {\n return {\n address: encryptedErc20,\n abi: confidentialWrapperAbi,\n functionName: \"unwrap\",\n args: [from, to, encryptedAmount, inputProof],\n } as const;\n}\n\n/**\n * Returns the contract config for an unwrap with an existing balance handle.\n *\n * @example\n * ```ts\n * const txHash = await signer.writeContract(\n * unwrapFromBalanceContract(encryptedErc20, from, to, encryptedBalance),\n * );\n * ```\n */\nexport function unwrapFromBalanceContract(\n encryptedErc20: Address,\n from: Address,\n to: Address,\n encryptedBalance: EncryptedValue,\n) {\n return {\n address: encryptedErc20,\n abi: confidentialWrapperAbi,\n functionName: \"unwrap\",\n args: [from, to, encryptedBalance],\n } as const;\n}\n\n/**\n * Returns the contract config to read the confidential (encrypted) total supply.\n *\n * @example\n * ```ts\n * const handle = await provider.readContract(\n * confidentialTotalSupplyContract(tokenAddress),\n * );\n * ```\n */\nexport function confidentialTotalSupplyContract(tokenAddress: Address) {\n return {\n address: tokenAddress,\n abi: confidentialWrapperAbi,\n functionName: \"confidentialTotalSupply\",\n args: [],\n } as const;\n}\n\n/**\n * Returns the contract config to read the wrap/unwrap conversion rate.\n *\n * @example\n * ```ts\n * const rate = await provider.readContract(rateContract(tokenAddress));\n * ```\n */\nexport function rateContract(tokenAddress: Address) {\n return {\n address: tokenAddress,\n abi: confidentialWrapperAbi,\n functionName: \"rate\",\n args: [],\n } as const;\n}\n\n/**\n * Returns the contract config for finalizing an unwrap.\n *\n * @example\n * ```ts\n * const txHash = await signer.writeContract(\n * finalizeUnwrapContract(wrapper, unwrapRequestId, cleartext, proof),\n * );\n * ```\n */\nexport function finalizeUnwrapContract(\n wrapper: Address,\n unwrapRequestId: EncryptedValue,\n unwrapAmountCleartext: bigint,\n decryptionProof: Hex,\n) {\n return {\n address: wrapper,\n abi: confidentialWrapperAbi,\n functionName: \"finalizeUnwrap\",\n args: [unwrapRequestId, unwrapAmountCleartext, decryptionProof],\n } as const;\n}\n\n/**\n * Returns the contract config to read the requester of an open unwrap request.\n * The wrapper deletes the request on finalize, so the zero address means the\n * request no longer exists.\n *\n * @example\n * ```ts\n * const requester = await provider.readContract(\n * unwrapRequesterContract(wrapperAddress, unwrapRequestId),\n * );\n * ```\n */\nexport function unwrapRequesterContract(wrapperAddress: Address, unwrapRequestId: EncryptedValue) {\n return {\n address: wrapperAddress,\n abi: confidentialWrapperAbi,\n functionName: \"unwrapRequester\",\n args: [unwrapRequestId],\n } as const;\n}\n\n/**\n * Returns the contract config to read the underlying ERC-20 token of a wrapper.\n *\n * @example\n * ```ts\n * const token = await provider.readContract(underlyingContract(wrapperAddress));\n * ```\n */\nexport function underlyingContract(wrapperAddress: Address) {\n return {\n address: wrapperAddress,\n abi: confidentialWrapperAbi,\n functionName: \"underlying\",\n args: [],\n } as const;\n}\n\n/**\n * Returns the contract config to read the inferred plaintext total supply.\n *\n * @example\n * ```ts\n * const supply = await provider.readContract(\n * inferredTotalSupplyContract(wrapperAddress),\n * );\n * ```\n */\nexport function inferredTotalSupplyContract(wrapperAddress: Address) {\n return {\n address: wrapperAddress,\n abi: confidentialWrapperAbi,\n functionName: \"inferredTotalSupply\",\n args: [],\n } as const;\n}\n\n/**\n * Returns the contract config for a wrap (shield) operation.\n *\n * @example\n * ```ts\n * const txHash = await signer.writeContract(\n * wrapContract(wrapperAddress, to, amount),\n * );\n * ```\n */\nexport function wrapContract(wrapperAddress: Address, to: Address, amount: bigint) {\n return {\n address: wrapperAddress,\n abi: confidentialWrapperAbi,\n functionName: \"wrap\",\n args: [to, amount],\n } as const;\n}\n","import { erc20Abi, type Address } from \"viem\";\n\n/**\n * Returns the contract config to read a token's name.\n *\n * @example\n * ```ts\n * const name = await provider.readContract(nameContract(tokenAddress));\n * ```\n */\nexport function nameContract(tokenAddress: Address) {\n return { address: tokenAddress, abi: erc20Abi, functionName: \"name\", args: [] } as const;\n}\n\n/**\n * Returns the contract config to read a token's symbol.\n *\n * @example\n * ```ts\n * const symbol = await provider.readContract(symbolContract(tokenAddress));\n * ```\n */\nexport function symbolContract(tokenAddress: Address) {\n return { address: tokenAddress, abi: erc20Abi, functionName: \"symbol\", args: [] } as const;\n}\n\n/**\n * Returns the contract config to read a token's decimals.\n *\n * @example\n * ```ts\n * const decimals = await provider.readContract(decimalsContract(tokenAddress));\n * ```\n */\nexport function decimalsContract(tokenAddress: Address) {\n return { address: tokenAddress, abi: erc20Abi, functionName: \"decimals\", args: [] } as const;\n}\n\n/**\n * Returns the contract config to read an ERC-20 token's total supply.\n *\n * @example\n * ```ts\n * const supply = await provider.readContract(erc20TotalSupplyContract(tokenAddress));\n * ```\n */\nexport function erc20TotalSupplyContract(tokenAddress: Address) {\n return { address: tokenAddress, abi: erc20Abi, functionName: \"totalSupply\", args: [] } as const;\n}\n\n/**\n * Returns the contract config to read an ERC-20 balance.\n *\n * @example\n * ```ts\n * const balance = await provider.readContract(\n * balanceOfContract(tokenAddress, account),\n * );\n * ```\n */\nexport function balanceOfContract(tokenAddress: Address, account: Address) {\n return {\n address: tokenAddress,\n abi: erc20Abi,\n functionName: \"balanceOf\",\n args: [account],\n } as const;\n}\n\n/**\n * Returns the contract config to read an ERC-20 allowance.\n *\n * @example\n * ```ts\n * const allowance = await provider.readContract(\n * allowanceContract(tokenAddress, owner, spender),\n * );\n * ```\n */\nexport function allowanceContract(tokenAddress: Address, owner: Address, spender: Address) {\n return {\n address: tokenAddress,\n abi: erc20Abi,\n functionName: \"allowance\",\n args: [owner, spender],\n } as const;\n}\n\n/**\n * Returns the contract config for an ERC-20 approve.\n *\n * @example\n * ```ts\n * const txHash = await signer.writeContract(\n * approveContract(tokenAddress, spender, amount),\n * );\n * ```\n */\nexport function approveContract(tokenAddress: Address, spender: Address, value: bigint) {\n return {\n address: tokenAddress,\n abi: erc20Abi,\n functionName: \"approve\",\n args: [spender, value],\n } as const;\n}\n","// DO NOT EDIT: generated by `pnpm abi:build` from\n// contracts/out/IERC165.sol/IERC165.json.\n// Regenerate after `pnpm contracts:build`; `pnpm abi:check` enforces this in CI.\nexport const erc165Abi = [\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n] as const;\n","import type { Address } from \"viem\";\nimport { erc165Abi } from \"../abi/erc165.abi\";\n\n/** ERC-165 interface ID for IERC7984 (confidential fungible token). */\nexport const ERC7984_INTERFACE_ID = \"0x4958f2a4\" as const;\n\n/** ERC-165 interface ID for IERC7984ERC20Wrapper (confidential wrapper). */\nexport const ERC7984_WRAPPER_INTERFACE_ID = \"0x1f1c62b2\" as const;\n\n/** ERC-165 interface ID for ERC-1363 (payable token — `transferAndCall`). */\nexport const ERC1363_INTERFACE_ID = \"0xb0202a11\" as const;\n\n/**\n * Returns the contract config for an ERC-165 `supportsInterface` check.\n *\n * Use with {@link ERC7984_INTERFACE_ID} to detect confidential tokens,\n * or {@link ERC7984_WRAPPER_INTERFACE_ID} to detect wrappers.\n *\n * @example\n * ```ts\n * const isConfidential = await provider.readContract(\n * supportsInterfaceContract(tokenAddress, ERC7984_INTERFACE_ID),\n * );\n * ```\n */\nexport function supportsInterfaceContract(tokenAddress: Address, interfaceId: Address) {\n return {\n address: tokenAddress,\n abi: erc165Abi,\n functionName: \"supportsInterface\",\n args: [interfaceId],\n } as const;\n}\n\n/**\n * Returns contract config to check if a token implements IERC7984 (confidential fungible token).\n *\n * @example\n * ```ts\n * const isConfidential = await provider.readContract(\n * isConfidentialTokenContract(\"0xTokenAddress\"),\n * );\n * ```\n */\nexport function isConfidentialTokenContract(tokenAddress: Address) {\n return supportsInterfaceContract(tokenAddress, ERC7984_INTERFACE_ID);\n}\n\n/**\n * Returns contract config to check if a token implements IERC7984ERC20Wrapper (confidential wrapper).\n *\n * @example\n * ```ts\n * const isWrapper = await provider.readContract(\n * isConfidentialWrapperContract(\"0xWrapperAddress\"),\n * );\n * ```\n */\nexport function isConfidentialWrapperContract(tokenAddress: Address) {\n return supportsInterfaceContract(tokenAddress, ERC7984_WRAPPER_INTERFACE_ID);\n}\n\n/**\n * Returns contract config to check if a token implements ERC-1363 (payable token).\n *\n * @example\n * ```ts\n * const isPayable = await provider.readContract(\n * isPayableTokenContract(\"0xTokenAddress\"),\n * );\n * ```\n */\nexport function isPayableTokenContract(tokenAddress: Address) {\n return supportsInterfaceContract(tokenAddress, ERC1363_INTERFACE_ID);\n}\n","import type { Address } from \"viem\";\n\nexport const wrappersRegistryAbi = [\n {\n inputs: [],\n name: \"getTokenConfidentialTokenPairs\",\n outputs: [\n {\n components: [\n { internalType: \"address\", name: \"tokenAddress\", type: \"address\" },\n { internalType: \"address\", name: \"confidentialTokenAddress\", type: \"address\" },\n { internalType: \"bool\", name: \"isValid\", type: \"bool\" },\n ],\n internalType: \"struct ConfidentialTokenWrappersRegistry.TokenWrapperPair[]\",\n name: \"\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTokenConfidentialTokenPairsLength\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n { internalType: \"uint256\", name: \"fromIndex\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"toIndex\", type: \"uint256\" },\n ],\n name: \"getTokenConfidentialTokenPairsSlice\",\n outputs: [\n {\n components: [\n { internalType: \"address\", name: \"tokenAddress\", type: \"address\" },\n { internalType: \"address\", name: \"confidentialTokenAddress\", type: \"address\" },\n { internalType: \"bool\", name: \"isValid\", type: \"bool\" },\n ],\n internalType: \"struct ConfidentialTokenWrappersRegistry.TokenWrapperPair[]\",\n name: \"\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [{ internalType: \"uint256\", name: \"index\", type: \"uint256\" }],\n name: \"getTokenConfidentialTokenPair\",\n outputs: [\n {\n components: [\n { internalType: \"address\", name: \"tokenAddress\", type: \"address\" },\n { internalType: \"address\", name: \"confidentialTokenAddress\", type: \"address\" },\n { internalType: \"bool\", name: \"isValid\", type: \"bool\" },\n ],\n internalType: \"struct ConfidentialTokenWrappersRegistry.TokenWrapperPair\",\n name: \"\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [{ internalType: \"address\", name: \"tokenAddress\", type: \"address\" }],\n name: \"getConfidentialTokenAddress\",\n outputs: [\n { internalType: \"bool\", name: \"\", type: \"bool\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [{ internalType: \"address\", name: \"confidentialTokenAddress\", type: \"address\" }],\n name: \"getTokenAddress\",\n outputs: [\n { internalType: \"bool\", name: \"\", type: \"bool\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [{ internalType: \"address\", name: \"confidentialTokenAddress\", type: \"address\" }],\n name: \"isConfidentialTokenValid\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [{ internalType: \"address\", name: \"initialOwner\", type: \"address\" }],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n { internalType: \"address\", name: \"tokenAddress\", type: \"address\" },\n { internalType: \"address\", name: \"confidentialTokenAddress\", type: \"address\" },\n ],\n name: \"registerConfidentialToken\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [{ internalType: \"address\", name: \"confidentialTokenAddress\", type: \"address\" }],\n name: \"revokeConfidentialToken\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\n/** A registered plain-token / confidential-token pairing from the wrappers registry. */\nexport interface TokenWrapperPair {\n /** Address of the underlying public ERC-20 token. */\n readonly tokenAddress: Address;\n /** Address of the paired confidential (ERC-7984) token. */\n readonly confidentialTokenAddress: Address;\n /** Whether the pairing is currently valid (registered and not revoked). */\n readonly isValid: boolean;\n}\n\n/** Extended pair with on-chain metadata for both tokens. */\nexport interface TokenWrapperPairWithMetadata extends TokenWrapperPair {\n /** On-chain metadata of the underlying public ERC-20 token. */\n readonly underlying: {\n readonly name: string;\n readonly symbol: string;\n readonly decimals: number;\n readonly totalSupply: bigint;\n };\n /** On-chain metadata of the confidential token. */\n readonly confidential: {\n readonly name: string;\n readonly symbol: string;\n readonly decimals: number;\n };\n}\n\n/** Paginated result set modeled after standard API pagination. */\nexport interface PaginatedResult<T> {\n /** Items on the current page. */\n readonly items: readonly T[];\n /** Total number of items across all pages. */\n readonly total: number;\n /** One-based index of the current page. */\n readonly page: number;\n /** Maximum number of items per page. */\n readonly pageSize: number;\n}\n\n/**\n * Returns the contract config to fetch all token wrapper pairs.\n *\n * @example\n * ```ts\n * const pairs = await client.readContract(\n * getTokenPairsContract(registryAddress),\n * );\n * ```\n */\nexport function getTokenPairsContract(registry: Address) {\n return {\n address: registry,\n abi: wrappersRegistryAbi,\n functionName: \"getTokenConfidentialTokenPairs\",\n args: [],\n } as const;\n}\n\n/**\n * Returns the contract config to get the number of token wrapper pairs.\n *\n * @example\n * ```ts\n * const length = await client.readContract(\n * getTokenPairsLengthContract(registryAddress),\n * );\n * ```\n */\nexport function getTokenPairsLengthContract(registry: Address) {\n return {\n address: registry,\n abi: wrappersRegistryAbi,\n functionName: \"getTokenConfidentialTokenPairsLength\",\n args: [],\n } as const;\n}\n\n/**\n * Returns the contract config to fetch a slice of token wrapper pairs.\n *\n * @example\n * ```ts\n * const pairs = await client.readContract(\n * getTokenPairsSliceContract(registryAddress, 0n, 10n),\n * );\n * ```\n */\nexport function getTokenPairsSliceContract(registry: Address, fromIndex: bigint, toIndex: bigint) {\n return {\n address: registry,\n abi: wrappersRegistryAbi,\n functionName: \"getTokenConfidentialTokenPairsSlice\",\n args: [fromIndex, toIndex],\n } as const;\n}\n\n/**\n * Returns the contract config to fetch a single token wrapper pair by index.\n *\n * @example\n * ```ts\n * const pair = await client.readContract(\n * getTokenPairContract(registryAddress, 0n),\n * );\n * ```\n */\nexport function getTokenPairContract(registry: Address, index: bigint) {\n return {\n address: registry,\n abi: wrappersRegistryAbi,\n functionName: \"getTokenConfidentialTokenPair\",\n args: [index],\n } as const;\n}\n\n/**\n * Returns the contract config to look up the confidential token for a given plain token.\n *\n * @example\n * ```ts\n * const [isValid, confidentialToken] = await client.readContract(\n * getConfidentialTokenAddressContract(registryAddress, tokenAddress),\n * );\n * // isValid=false + confidentialToken=zeroAddress → not registered\n * // isValid=false + confidentialToken=nonZeroAddress → registered but revoked\n * // isValid=true + confidentialToken=nonZeroAddress → registered and valid\n * ```\n */\nexport function getConfidentialTokenAddressContract(registry: Address, tokenAddress: Address) {\n return {\n address: registry,\n abi: wrappersRegistryAbi,\n functionName: \"getConfidentialTokenAddress\",\n args: [tokenAddress],\n } as const;\n}\n\n/**\n * Returns the contract config to look up the plain token for a given confidential token.\n *\n * @example\n * ```ts\n * const [isValid, token] = await client.readContract(\n * getTokenAddressContract(registryAddress, confidentialTokenAddress),\n * );\n * // isValid=false + token=zeroAddress → not registered\n * // isValid=false + token=nonZeroAddress → registered but revoked\n * // isValid=true + token=nonZeroAddress → registered and valid\n * ```\n */\nexport function getTokenAddressContract(registry: Address, confidentialTokenAddress: Address) {\n return {\n address: registry,\n abi: wrappersRegistryAbi,\n functionName: \"getTokenAddress\",\n args: [confidentialTokenAddress],\n } as const;\n}\n\n/**\n * Returns the contract config to check if a confidential token is valid.\n *\n * @example\n * ```ts\n * const isValid = await client.readContract(\n * isConfidentialTokenValidContract(registryAddress, confidentialTokenAddress),\n * );\n * ```\n */\nexport function isConfidentialTokenValidContract(\n registry: Address,\n confidentialTokenAddress: Address,\n) {\n return {\n address: registry,\n abi: wrappersRegistryAbi,\n functionName: \"isConfidentialTokenValid\",\n args: [confidentialTokenAddress],\n } as const;\n}\n"],"mappings":"iGAGA,IAAa,EAAb,cAAkD,CAAU,CAC1D,YAAY,EAAiB,EAAwB,CACnD,MAAM,EAAc,wBAAyB,EAAS,CAAO,EAC7D,KAAK,KAAO,8BACd,CACF,EAGa,EAAb,cAAkD,CAAU,CAC1D,YAAY,EAAiB,EAAwB,CACnD,MAAM,EAAc,wBAAyB,EAAS,CAAO,EAC7D,KAAK,KAAO,8BACd,CACF,EAYa,EAAb,cAA4C,CAAU,CACpD,YAAY,EAAiB,EAAwB,CACnD,MAAM,EAAc,kBAAmB,EAAS,CAAO,EACvD,KAAK,KAAO,wBACd,CACF,EAGa,EAAb,cAAuC,CAAU,CAC/C,YAAY,EAAiB,EAAwB,CACnD,MAAM,EAAc,aAAc,EAAS,CAAO,EAClD,KAAK,KAAO,mBACd,CACF,EAQa,EAAb,cAAsC,CAAU,CAC9C,YAAY,EAAiB,EAAwB,CACnD,MAAM,EAAc,kBAAmB,EAAS,CAAO,EACvD,KAAK,KAAO,kBACd,CACF,EASa,EAAb,cAAkD,CAAU,CAC1D,YAAY,EAAiB,EAAwB,CACnD,MAAM,EAAc,wBAAyB,EAAS,CAAO,EAC7D,KAAK,KAAO,8BACd,CACF,EAQa,EAAb,cAAsD,CAAU,CAE9D,gBAEA,cAEA,YACE,CAAE,kBAAiB,iBACnB,EACA,CACA,MACE,EAAc,4BACd,qCAAqC,EAAgB,qCAC/C,EAAc,uFACpB,CACF,EACA,KAAK,KAAO,mCACZ,KAAK,gBAAkB,EACvB,KAAK,cAAgB,CACvB,CACF,EAGa,EAAb,cAAgD,CAAU,CACxD,YAAY,EAAiB,EAAwB,CACnD,MAAM,EAAc,sBAAuB,EAAS,CAAO,EAC3D,KAAK,KAAO,4BACd,CACF,EChFa,EAAb,cAA0C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