@zama-fhe/sdk 3.3.0 → 3.3.1-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.
Files changed (119) hide show
  1. package/README.md +0 -2
  2. package/dist/cjs/base-signer.cjs +1 -1
  3. package/dist/cjs/base-signer.cjs.map +1 -1
  4. package/dist/cjs/chains.cjs +1 -1
  5. package/dist/cjs/chains.cjs.map +1 -1
  6. package/dist/cjs/cleartext/index.cjs +1 -1
  7. package/dist/cjs/cleartext.cjs +2 -0
  8. package/dist/cjs/cleartext.cjs.map +1 -0
  9. package/dist/cjs/ethers/index.cjs.map +1 -1
  10. package/dist/cjs/fhevm-relayer.cjs +2 -0
  11. package/dist/cjs/fhevm-relayer.cjs.map +1 -0
  12. package/dist/cjs/index.cjs +1 -1
  13. package/dist/cjs/index.cjs.map +1 -1
  14. package/dist/cjs/node/index.cjs +2 -0
  15. package/dist/cjs/node/index.cjs.map +1 -0
  16. package/dist/cjs/query/index.cjs +1 -1
  17. package/dist/cjs/query/index.cjs.map +1 -1
  18. package/dist/cjs/relayer.cjs +1 -1
  19. package/dist/cjs/relayer.cjs.map +1 -1
  20. package/dist/cjs/token.cjs +1 -1
  21. package/dist/cjs/token.cjs.map +1 -1
  22. package/dist/cjs/viem/index.cjs +1 -1
  23. package/dist/cjs/viem/index.cjs.map +1 -1
  24. package/dist/cjs/web/index.cjs +1 -590
  25. package/dist/cjs/web/index.cjs.map +1 -1
  26. package/dist/cjs/wrappers-registry.cjs.map +1 -1
  27. package/dist/esm/base-signer-CI-FYai2.js +2 -0
  28. package/dist/esm/base-signer-CI-FYai2.js.map +1 -0
  29. package/dist/esm/{base-signer-C3Wc5oi9.d.ts → base-signer-Q2EJECrc.d.ts} +2 -2
  30. package/dist/esm/chains/index.d.ts +2 -3
  31. package/dist/esm/chains/index.js +1 -1
  32. package/dist/esm/chains-CLv9HEJ_.js +2 -0
  33. package/dist/esm/chains-CLv9HEJ_.js.map +1 -0
  34. package/dist/esm/cleartext/index.d.ts +3 -2
  35. package/dist/esm/cleartext/index.js +1 -1
  36. package/dist/esm/cleartext-BfXTVQu-.js +2 -0
  37. package/dist/esm/cleartext-BfXTVQu-.js.map +1 -0
  38. package/dist/esm/cleartext-U6sPs_Kd.d.ts +19 -0
  39. package/dist/esm/ethers/index.d.ts +4 -5
  40. package/dist/esm/ethers/index.js +1 -1
  41. package/dist/esm/ethers/index.js.map +1 -1
  42. package/dist/esm/fhevm-relayer-B-lEKfPQ.js +2 -0
  43. package/dist/esm/fhevm-relayer-B-lEKfPQ.js.map +1 -0
  44. package/dist/esm/index-BnIp_-Ak.d.ts +328 -0
  45. package/dist/esm/{index-CYBH0nyo.d.ts → index-D66eC3G7.d.ts} +60 -13
  46. package/dist/esm/index.d.ts +8 -11
  47. package/dist/esm/index.js +1 -1
  48. package/dist/esm/index.js.map +1 -1
  49. package/dist/esm/node/index.d.ts +5 -194
  50. package/dist/esm/node/index.js +1 -1
  51. package/dist/esm/node/index.js.map +1 -1
  52. package/dist/esm/query/index.d.ts +3 -380
  53. package/dist/esm/query/index.js +1 -1
  54. package/dist/esm/query/index.js.map +1 -1
  55. package/dist/esm/relayer-BYq9bLh8.js +2 -0
  56. package/dist/esm/relayer-BYq9bLh8.js.map +1 -0
  57. package/dist/esm/token-CmHTAAWW.js +2 -0
  58. package/dist/esm/token-CmHTAAWW.js.map +1 -0
  59. package/dist/esm/{types-piBsdTIP.d.ts → types-Bov8XY36.d.ts} +3 -3
  60. package/dist/esm/{types-OHIaPwCy.d.ts → types-BpvL50qX.d.ts} +3 -3
  61. package/dist/esm/types-C-WTLcHZ.d.ts +988 -0
  62. package/dist/esm/viem/index.d.ts +4 -5
  63. package/dist/esm/viem/index.js +1 -1
  64. package/dist/esm/viem/index.js.map +1 -1
  65. package/dist/esm/web/index.d.ts +6 -9
  66. package/dist/esm/web/index.js +1 -590
  67. package/dist/esm/web/index.js.map +1 -1
  68. package/dist/esm/{wrappers-registry-C1oK8Bi6.js → wrappers-registry-xZWzyAi4.js} +2 -2
  69. package/dist/esm/wrappers-registry-xZWzyAi4.js.map +1 -0
  70. package/dist/esm/{index-C1Mtc8Rw.d.ts → zama-sdk-q4_qt64Q.d.ts} +1471 -1102
  71. package/package.json +6 -2
  72. package/dist/cjs/assertions.cjs +0 -2
  73. package/dist/cjs/assertions.cjs.map +0 -1
  74. package/dist/cjs/encryption.cjs +0 -2
  75. package/dist/cjs/encryption.cjs.map +0 -1
  76. package/dist/cjs/relayer-cleartext.cjs +0 -2
  77. package/dist/cjs/relayer-cleartext.cjs.map +0 -1
  78. package/dist/cjs/relayer-sdk.worker.js +0 -589
  79. package/dist/cjs/timeout.cjs +0 -2
  80. package/dist/cjs/timeout.cjs.map +0 -1
  81. package/dist/cjs/validation.cjs +0 -2
  82. package/dist/cjs/validation.cjs.map +0 -1
  83. package/dist/esm/assertions-zYseN5Xz.js +0 -2
  84. package/dist/esm/assertions-zYseN5Xz.js.map +0 -1
  85. package/dist/esm/base-signer-DjytqPkd.js +0 -2
  86. package/dist/esm/base-signer-DjytqPkd.js.map +0 -1
  87. package/dist/esm/chains-CXcO1DBP.js +0 -2
  88. package/dist/esm/chains-CXcO1DBP.js.map +0 -1
  89. package/dist/esm/cleartext-DAkOTlrE.d.ts +0 -19
  90. package/dist/esm/cleartext-rTWFctyd.js +0 -2
  91. package/dist/esm/cleartext-rTWFctyd.js.map +0 -1
  92. package/dist/esm/encryption-x4Z_Icqk.js +0 -2
  93. package/dist/esm/encryption-x4Z_Icqk.js.map +0 -1
  94. package/dist/esm/hex-A72GrTf9.js +0 -2
  95. package/dist/esm/hex-A72GrTf9.js.map +0 -1
  96. package/dist/esm/indexeddb-storage-Mi-fCWN3.js +0 -2
  97. package/dist/esm/indexeddb-storage-Mi-fCWN3.js.map +0 -1
  98. package/dist/esm/memory-storage-fp9RY5BQ.js +0 -2
  99. package/dist/esm/memory-storage-fp9RY5BQ.js.map +0 -1
  100. package/dist/esm/node/relayer-sdk.node-worker.d.ts +0 -1
  101. package/dist/esm/node/relayer-sdk.node-worker.js +0 -2
  102. package/dist/esm/node/relayer-sdk.node-worker.js.map +0 -1
  103. package/dist/esm/relayer-cleartext-Bp6jtxDd.js +0 -2
  104. package/dist/esm/relayer-cleartext-Bp6jtxDd.js.map +0 -1
  105. package/dist/esm/relayer-cleartext-CSeMlmGO.d.ts +0 -844
  106. package/dist/esm/relayer-eavK5bfZ.js +0 -2
  107. package/dist/esm/relayer-eavK5bfZ.js.map +0 -1
  108. package/dist/esm/relayer-sdk.worker.js +0 -589
  109. package/dist/esm/timeout-CNVfiaJD.js +0 -2
  110. package/dist/esm/timeout-CNVfiaJD.js.map +0 -1
  111. package/dist/esm/token-Bt33g0zQ.js +0 -2
  112. package/dist/esm/token-Bt33g0zQ.js.map +0 -1
  113. package/dist/esm/types-BgczXqW2.d.ts +0 -49
  114. package/dist/esm/types-Gn5MeDsr.d.ts +0 -669
  115. package/dist/esm/validation-DLszOweh.js +0 -2
  116. package/dist/esm/validation-DLszOweh.js.map +0 -1
  117. package/dist/esm/worker.base-client-BVnT4yJa.js +0 -2
  118. package/dist/esm/worker.base-client-BVnT4yJa.js.map +0 -1
  119. package/dist/esm/wrappers-registry-C1oK8Bi6.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fhevm-relayer-B-lEKfPQ.js","names":["#chain","#base","#decrypt","#encrypt","#defaultOptions","#encryptInitPromise","#initEncrypt"],"sources":["../../src/chains/to-fhevm-chain.ts","../../src/relayer/fhevm-relayer.ts"],"sourcesContent":["import type { FhevmChain } from \"@fhevm/sdk/chains\";\nimport type { FheChain } from \"./types\";\n\n/**\n * Derive an `@fhevm/sdk` {@link FhevmChain} from zama-sdk's richer\n * {@link FheChain}.\n *\n * `FheChain` carries fields `@fhevm/sdk` does not model (RPC `network`,\n * `registryAddress`, `executorAddress`, cleartext signer keys); those stay on\n * `FheChain` for the token layer. This adapter projects only the subset the\n * FHE runtime needs: contract addresses, relayer URL, and gateway.\n */\nexport function toFhevmChain(chain: FheChain): FhevmChain {\n return {\n id: chain.id,\n fhevm: {\n contracts: {\n acl: { address: chain.aclContractAddress },\n inputVerifier: { address: chain.inputVerifierContractAddress },\n kmsVerifier: { address: chain.kmsContractAddress },\n protocolConfig: undefined,\n },\n relayerUrl: chain.relayerUrl,\n gateway: {\n id: chain.gatewayChainId,\n contracts: {\n decryption: { address: chain.verifyingContractAddressDecryption },\n inputVerification: { address: chain.verifyingContractAddressInputVerification },\n },\n },\n },\n } satisfies FhevmChain;\n}\n","import {\n createFhevmBaseClient,\n createFhevmDecryptClient,\n createFhevmEncryptClient,\n} from \"@fhevm/sdk/viem\";\nimport {\n createFhevmCleartextBaseClient,\n createFhevmCleartextDecryptClient,\n createFhevmCleartextEncryptClient,\n} from \"@fhevm/sdk/viem/cleartext\";\nimport { createPublicClient, custom, http } from \"viem\";\nimport { toFhevmChain } from \"../chains/to-fhevm-chain\";\nimport type { FheChain } from \"../chains/types\";\nimport type {\n FhevmBaseClient,\n FhevmClient,\n FhevmDecryptClient,\n FhevmEncryptClient,\n FhevmRelayerOptions,\n FhevmRelayerSDK,\n RelayerOptions,\n} from \"./types\";\nimport { ConfigurationError } from \"../errors\";\n\n/** Construction config for {@link FhevmRelayer}. */\nexport interface FhevmRelayerConfig {\n /** FHE chain configuration. */\n chain: FheChain;\n /**\n * Cleartext mode for local dev/test chains without FHE infrastructure — reads\n * mock cleartexts from the on-chain executor (discovered automatically)\n * instead of calling the relayer.\n */\n cleartext?: boolean;\n /**\n * Per-transport {@link RelayerOptions}: `@fhevm/sdk` client options plus a\n * default request `timeout` applied to every relayer round-trip on the chain.\n */\n options?: RelayerOptions;\n}\n\n/**\n * Single-chain FHE backend that drives `@fhevm/sdk` on the calling thread with\n * capability-scoped lazy initialization.\n * EIP-712 signing is done by the signer layer; this backend builds the typed\n * data and, on decrypt, reassembles the new SDK's signed permit from the\n * interface's params + the previously returned signature.\n *\n * @remarks\n * Each method delegates to the narrowest base, decrypt, or encrypt client,\n * adding two cross-cutting behaviors that the delegated signatures don't\n * express:\n *\n * - **Lazy init.** Each operation initializes only the capability it requires.\n * Public decrypt avoids WASM, private decrypt loads TKMS only, and encryption\n * alone loads TFHE and the FHE encryption key.\n * - **Option merging.** The chain's default options (`auth`, `timeout`, `debug`)\n * are spread in first, then the per-call `options`, so a per-call value always\n * wins over the chain default. Serialization helpers make no relayer\n * round-trip, so they inject no options.\n */\nexport class FhevmRelayer implements FhevmRelayerSDK {\n readonly #chain: FheChain;\n readonly #base: FhevmBaseClient;\n readonly #decrypt: FhevmDecryptClient;\n readonly #encrypt: FhevmEncryptClient;\n readonly #defaultOptions: Partial<FhevmRelayerOptions>;\n #encryptInitPromise: Promise<void> | undefined;\n\n /**\n * Builds capability-scoped `@fhevm/sdk` clients for the chain and captures\n * the chain's `auth`/`timeout`/`debug` as request defaults. Construction is\n * cheap; each client's one-time init is deferred to its first operation.\n */\n constructor(config: FhevmRelayerConfig) {\n this.#chain = config.chain;\n const { timeout, debug, batchRpcCalls, moduleVersions, fheEncryptionKey } =\n config.options ?? {};\n const params = {\n publicClient: createPublicClient({\n transport:\n typeof this.#chain.network === \"string\"\n ? http(this.#chain.network)\n : custom(this.#chain.network),\n }),\n chain: toFhevmChain(this.#chain),\n options: { batchRpcCalls, moduleVersions, fheEncryptionKey },\n };\n if (config.cleartext) {\n this.#base = createFhevmCleartextBaseClient(params);\n this.#decrypt = createFhevmCleartextDecryptClient(params);\n this.#encrypt = createFhevmCleartextEncryptClient(params);\n } else {\n this.#base = createFhevmBaseClient(params);\n this.#decrypt = createFhevmDecryptClient(params);\n this.#encrypt = createFhevmEncryptClient(params);\n }\n this.#defaultOptions = {\n ...(this.#chain.auth !== undefined && { auth: toFhevmAuth(this.#chain.auth) }),\n ...(timeout !== undefined && { timeout }),\n ...(debug !== undefined && { debug }),\n };\n }\n\n /** The FHE chain this backend is bound to. */\n get chain() {\n return this.#chain;\n }\n\n #initEncrypt = (): Promise<void> => {\n this.#encryptInitPromise ??= this.#encrypt\n .fetchFheEncryptionKeyBytes({ options: this.#defaultOptions })\n .then(() => this.#encrypt.init());\n return this.#encryptInitPromise;\n };\n\n /**\n * Decrypts a single publicly-decryptable value — one whose contract granted\n * public access, so no permit or key pair is needed — into its typed clear\n * value.\n *\n * @example\n * ```ts\n * const { type, value } = await relayer.decryptPublicValue({\n * encryptedValue: handle, // a bytes32 ciphertext reference\n * });\n * ```\n */\n decryptPublicValue: FhevmClient[\"decryptPublicValue\"] = async (parameters) => {\n await this.#base.init();\n return this.#base.decryptPublicValue({\n ...parameters,\n options: { ...this.#defaultOptions, ...parameters.options },\n });\n };\n\n /**\n * Batch form of {@link decryptPublicValue}: decrypts many publicly-decryptable\n * values in one relayer round-trip, returning their typed clear values in\n * order.\n *\n * @example\n * ```ts\n * const values = await relayer.decryptPublicValues({\n * encryptedValues: [handleA, handleB],\n * });\n * ```\n */\n decryptPublicValues: FhevmClient[\"decryptPublicValues\"] = async (parameters) => {\n await this.#base.init();\n return this.#base.decryptPublicValues({\n ...parameters,\n options: { ...this.#defaultOptions, ...parameters.options },\n });\n };\n\n /**\n * Like {@link decryptPublicValues}, but also returns the KMS signature bundle —\n * the handles list, ABI-encoded cleartexts, and decryption proof — needed to\n * verify or replay the result on-chain.\n *\n * @example\n * ```ts\n * const { clearValues, checkSignaturesArgs } =\n * await relayer.decryptPublicValuesWithSignatures({ encryptedValues: [handle] });\n * // checkSignaturesArgs: { handlesList, abiEncodedCleartexts, decryptionProof }\n * ```\n */\n decryptPublicValuesWithSignatures: FhevmClient[\"decryptPublicValuesWithSignatures\"] = async (\n parameters,\n ) => {\n await this.#base.init();\n return this.#base.decryptPublicValuesWithSignatures({\n ...parameters,\n options: { ...this.#defaultOptions, ...parameters.options },\n });\n };\n\n /**\n * Encrypts one typed input under the chain's FHE key, bound to the contract it\n * targets and the user submitting it, and returns the ciphertext handle plus\n * the input proof the contract verifies on-chain. `type` is the FHE type\n * with the `e` prefix (`\"euint64\"`, `\"ebool\"`, `\"eaddress\"`).\n *\n * @example\n * ```ts\n * const { encryptedValue, inputProof } = await relayer.encryptValue({\n * value: { type: \"euint64\", value: 1000n },\n * contractAddress: \"0xToken…\",\n * userAddress: \"0xUser…\",\n * });\n * ```\n */\n encryptValue: FhevmClient[\"encryptValue\"] = async (parameters) => {\n await this.#initEncrypt();\n return this.#encrypt.encryptValue({\n ...parameters,\n options: { ...this.#defaultOptions, ...parameters.options },\n });\n };\n\n /**\n * Batch form of {@link encryptValue}: encrypts several inputs for the same\n * contract and user in one call, returning all ciphertext handles under a\n * single shared input proof.\n *\n * @example\n * ```ts\n * const { encryptedValues, inputProof } = await relayer.encryptValues({\n * values: [\n * { type: \"euint64\", value: 1000n },\n * { type: \"ebool\", value: true },\n * ],\n * contractAddress: \"0xToken…\",\n * userAddress: \"0xUser…\",\n * });\n * ```\n */\n encryptValues: FhevmClient[\"encryptValues\"] = async (parameters) => {\n await this.#initEncrypt();\n return this.#encrypt.encryptValues({\n ...parameters,\n options: { ...this.#defaultOptions, ...parameters.options },\n });\n };\n\n /**\n * User-decrypts a single access-controlled value: the relayer re-encrypts it\n * to the ephemeral transport key pair, gated by the signed permit, and this\n * returns the typed clear value. Build the key pair with\n * {@link generateTransportKeyPair} and the permit with\n * {@link signDecryptionPermit}.\n *\n * @example\n * ```ts\n * const { type, value } = await relayer.decryptValue({\n * encryptedValue: handle,\n * contractAddress: \"0xToken…\",\n * transportKeyPair,\n * signedPermit,\n * });\n * ```\n */\n decryptValue: FhevmClient[\"decryptValue\"] = async (parameters) => {\n await this.#decrypt.init();\n return this.#decrypt.decryptValue({\n ...parameters,\n options: { ...this.#defaultOptions, ...parameters.options },\n });\n };\n\n /**\n * Batch form of {@link decryptValue} for values that all belong to the same\n * contract; returns the typed clear values positionally. For values spanning\n * multiple contracts, use {@link decryptValuesFromPairs}.\n *\n * @example\n * ```ts\n * const values = await relayer.decryptValues({\n * encryptedValues: [handleA, handleB],\n * contractAddress: \"0xToken…\",\n * transportKeyPair,\n * signedPermit,\n * });\n * ```\n */\n decryptValues: FhevmClient[\"decryptValues\"] = async (parameters) => {\n await this.#decrypt.init();\n return this.#decrypt.decryptValues({\n ...parameters,\n options: { ...this.#defaultOptions, ...parameters.options },\n });\n };\n\n /**\n * User-decrypts values that span multiple contracts: each pair carries its own\n * `contractAddress`, so one permit covering those contracts decrypts them all\n * in a single round-trip. Returns the typed clear values positionally.\n *\n * @example\n * ```ts\n * const values = await relayer.decryptValuesFromPairs({\n * pairs: [\n * { encryptedValue: handleA, contractAddress: \"0xTokenA…\" },\n * { encryptedValue: handleB, contractAddress: \"0xTokenB…\" },\n * ],\n * transportKeyPair,\n * signedPermit,\n * });\n * ```\n */\n decryptValuesFromPairs: FhevmClient[\"decryptValuesFromPairs\"] = async (parameters) => {\n await this.#decrypt.init();\n return this.#decrypt.decryptValuesFromPairs({\n ...parameters,\n options: { ...this.#defaultOptions, ...parameters.options },\n });\n };\n\n /**\n * Fetches the chain's raw FHE public-key bytes — the key encryption uses —\n * served from cache unless `ignoreCache` forces a refetch. Rarely called\n * directly: {@link encryptValue}/{@link encryptValues} fetch the key for you.\n *\n * @example\n * ```ts\n * const keyBytes = await relayer.fetchFheEncryptionKeyBytes();\n * const fresh = await relayer.fetchFheEncryptionKeyBytes({ ignoreCache: true });\n * ```\n */\n fetchFheEncryptionKeyBytes: FhevmClient[\"fetchFheEncryptionKeyBytes\"] = async (parameters) => {\n await this.#initEncrypt();\n return this.#encrypt.fetchFheEncryptionKeyBytes({\n ...parameters,\n options: { ...this.#defaultOptions, ...parameters?.options },\n });\n };\n\n /**\n * Builds the EIP-712 user-decrypt permit and signs it with the given signer,\n * authorizing the transport key pair to decrypt the listed contracts' values\n * for `durationSeconds` starting at `startTimestamp`. Pass `delegatorAddress`\n * to sign a delegated permit — decrypting values owned by that account instead\n * of the signer's own. Persist the result via\n * {@link serializeSignedDecryptionPermit}.\n *\n * @example\n * ```ts\n * const signedPermit = await relayer.signDecryptionPermit({\n * transportKeyPair,\n * contractAddresses: [\"0xToken…\"],\n * startTimestamp: Math.floor(Date.now() / 1000),\n * durationSeconds: 60 * 60 * 24,\n * signerAddress: \"0xUser…\",\n * signer,\n * // delegatorAddress: \"0xOwner…\", // omit for a self permit\n * });\n * ```\n */\n signDecryptionPermit: FhevmClient[\"signDecryptionPermit\"] = async (parameters) => {\n await this.#base.init();\n return this.#base.signDecryptionPermit(parameters);\n };\n\n // Permit/key-pair helpers carry no request options. Parsing initializes the\n // capability needed to validate the restored value; serialization stays local.\n\n /**\n * Serializes a transport key pair to a hex `{ publicKey, privateKey }` pair for\n * storage or transport, so a decryption session can resume without regenerating\n * keys. Reverse of {@link parseTransportKeyPair}. Purely local — no round-trip.\n *\n * @example\n * ```ts\n * const stored = relayer.serializeTransportKeyPair({ transportKeyPair });\n * // { publicKey: \"0x…\", privateKey: \"0x…\" }\n * ```\n */\n serializeTransportKeyPair: FhevmClient[\"serializeTransportKeyPair\"] = (parameters) =>\n this.#decrypt.serializeTransportKeyPair(parameters);\n\n /**\n * Serializes a signed permit to a plain, JSON-stringifiable object (version,\n * EIP-712 payload, signature, signer) for caching or transport. Reverse of\n * {@link parseSignedDecryptionPermit}. Purely local — no round-trip.\n *\n * @example\n * ```ts\n * const serialized = relayer.serializeSignedDecryptionPermit({ signedPermit });\n * localStorage.setItem(\"permit\", JSON.stringify(serialized));\n * ```\n */\n serializeSignedDecryptionPermit: FhevmClient[\"serializeSignedDecryptionPermit\"] = (parameters) =>\n this.#base.serializeSignedDecryptionPermit(parameters);\n\n /**\n * Rebuilds a transport key pair from its serialized hex\n * `{ publicKey, privateKey }` form. Reverse of {@link serializeTransportKeyPair}.\n *\n * @example\n * ```ts\n * const transportKeyPair = await relayer.parseTransportKeyPair({\n * publicKey: stored.publicKey,\n * privateKey: stored.privateKey,\n * });\n * ```\n */\n parseTransportKeyPair: FhevmClient[\"parseTransportKeyPair\"] = async (parameters) => {\n await this.#decrypt.init();\n return this.#decrypt.parseTransportKeyPair(parameters);\n };\n\n /**\n * Rebuilds a signed permit from its serialized form and validates it: checks\n * the EIP-712 structure, verifies the signature against the on-chain verifier,\n * and confirms the permit's public key matches `transportKeyPair`. Reverse of\n * {@link serializeSignedDecryptionPermit}.\n *\n * @throws if the permit is malformed, expired, or its signature is invalid.\n *\n * @example\n * ```ts\n * const signedPermit = await relayer.parseSignedDecryptionPermit({\n * serializedPermit,\n * transportKeyPair,\n * });\n * ```\n */\n parseSignedDecryptionPermit: FhevmClient[\"parseSignedDecryptionPermit\"] = async (parameters) => {\n await this.#base.init();\n return this.#base.parseSignedDecryptionPermit(parameters);\n };\n\n /**\n * Generates a fresh ephemeral transport key pair for a user-decrypt session.\n * The relayer re-encrypts decrypted values to this pair's public key, so only\n * the holder of the private key can read them; bind it to a permit via\n * {@link signDecryptionPermit}.\n *\n * @example\n * ```ts\n * const transportKeyPair = await relayer.generateTransportKeyPair();\n * ```\n */\n generateTransportKeyPair: FhevmClient[\"generateTransportKeyPair\"] = async () => {\n await this.#decrypt.init();\n return this.#decrypt.generateTransportKeyPair();\n };\n}\n\nfunction toFhevmAuth(\n auth: NonNullable<FheChain[\"auth\"]>,\n): NonNullable<FhevmRelayerOptions[\"auth\"]> {\n const type = auth[\"__type\"];\n switch (type) {\n case \"ApiKeyHeader\":\n return { type, value: auth.value, header: auth.header };\n case \"ApiKeyCookie\":\n return { type, value: auth.value, cookie: auth.cookie };\n case \"BearerToken\":\n return { type, token: auth.token };\n default:\n throw new ConfigurationError(`Unknown auth type: ${String(type)}`);\n }\n}\n"],"mappings":"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"}
@@ -0,0 +1,328 @@
1
+ import { u as FheChain } from "./index-D66eC3G7.js";
2
+ import { Ut as FhevmRelayerSDK, Vt as FhevmClient, Wt as RelayerOptions, c as GenericStorage, n as RelayerConfig } from "./types-C-WTLcHZ.js";
3
+ //#region src/relayer/fhevm-relayer.d.ts
4
+ /** Construction config for {@link FhevmRelayer}. */
5
+ interface FhevmRelayerConfig {
6
+ /** FHE chain configuration. */
7
+ chain: FheChain;
8
+ /**
9
+ * Cleartext mode for local dev/test chains without FHE infrastructure — reads
10
+ * mock cleartexts from the on-chain executor (discovered automatically)
11
+ * instead of calling the relayer.
12
+ */
13
+ cleartext?: boolean;
14
+ /**
15
+ * Per-transport {@link RelayerOptions}: `@fhevm/sdk` client options plus a
16
+ * default request `timeout` applied to every relayer round-trip on the chain.
17
+ */
18
+ options?: RelayerOptions;
19
+ }
20
+ /**
21
+ * Single-chain FHE backend that drives `@fhevm/sdk` on the calling thread with
22
+ * capability-scoped lazy initialization.
23
+ * EIP-712 signing is done by the signer layer; this backend builds the typed
24
+ * data and, on decrypt, reassembles the new SDK's signed permit from the
25
+ * interface's params + the previously returned signature.
26
+ *
27
+ * @remarks
28
+ * Each method delegates to the narrowest base, decrypt, or encrypt client,
29
+ * adding two cross-cutting behaviors that the delegated signatures don't
30
+ * express:
31
+ *
32
+ * - **Lazy init.** Each operation initializes only the capability it requires.
33
+ * Public decrypt avoids WASM, private decrypt loads TKMS only, and encryption
34
+ * alone loads TFHE and the FHE encryption key.
35
+ * - **Option merging.** The chain's default options (`auth`, `timeout`, `debug`)
36
+ * are spread in first, then the per-call `options`, so a per-call value always
37
+ * wins over the chain default. Serialization helpers make no relayer
38
+ * round-trip, so they inject no options.
39
+ */
40
+ declare class FhevmRelayer implements FhevmRelayerSDK {
41
+ #private;
42
+ /**
43
+ * Builds capability-scoped `@fhevm/sdk` clients for the chain and captures
44
+ * the chain's `auth`/`timeout`/`debug` as request defaults. Construction is
45
+ * cheap; each client's one-time init is deferred to its first operation.
46
+ */
47
+ constructor(config: FhevmRelayerConfig);
48
+ /** The FHE chain this backend is bound to. */
49
+ get chain(): FheChain<number>;
50
+ /**
51
+ * Decrypts a single publicly-decryptable value — one whose contract granted
52
+ * public access, so no permit or key pair is needed — into its typed clear
53
+ * value.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const { type, value } = await relayer.decryptPublicValue({
58
+ * encryptedValue: handle, // a bytes32 ciphertext reference
59
+ * });
60
+ * ```
61
+ */
62
+ decryptPublicValue: FhevmClient["decryptPublicValue"];
63
+ /**
64
+ * Batch form of {@link decryptPublicValue}: decrypts many publicly-decryptable
65
+ * values in one relayer round-trip, returning their typed clear values in
66
+ * order.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * const values = await relayer.decryptPublicValues({
71
+ * encryptedValues: [handleA, handleB],
72
+ * });
73
+ * ```
74
+ */
75
+ decryptPublicValues: FhevmClient["decryptPublicValues"];
76
+ /**
77
+ * Like {@link decryptPublicValues}, but also returns the KMS signature bundle —
78
+ * the handles list, ABI-encoded cleartexts, and decryption proof — needed to
79
+ * verify or replay the result on-chain.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * const { clearValues, checkSignaturesArgs } =
84
+ * await relayer.decryptPublicValuesWithSignatures({ encryptedValues: [handle] });
85
+ * // checkSignaturesArgs: { handlesList, abiEncodedCleartexts, decryptionProof }
86
+ * ```
87
+ */
88
+ decryptPublicValuesWithSignatures: FhevmClient["decryptPublicValuesWithSignatures"];
89
+ /**
90
+ * Encrypts one typed input under the chain's FHE key, bound to the contract it
91
+ * targets and the user submitting it, and returns the ciphertext handle plus
92
+ * the input proof the contract verifies on-chain. `type` is the FHE type
93
+ * with the `e` prefix (`"euint64"`, `"ebool"`, `"eaddress"`).
94
+ *
95
+ * @example
96
+ * ```ts
97
+ * const { encryptedValue, inputProof } = await relayer.encryptValue({
98
+ * value: { type: "euint64", value: 1000n },
99
+ * contractAddress: "0xToken…",
100
+ * userAddress: "0xUser…",
101
+ * });
102
+ * ```
103
+ */
104
+ encryptValue: FhevmClient["encryptValue"];
105
+ /**
106
+ * Batch form of {@link encryptValue}: encrypts several inputs for the same
107
+ * contract and user in one call, returning all ciphertext handles under a
108
+ * single shared input proof.
109
+ *
110
+ * @example
111
+ * ```ts
112
+ * const { encryptedValues, inputProof } = await relayer.encryptValues({
113
+ * values: [
114
+ * { type: "euint64", value: 1000n },
115
+ * { type: "ebool", value: true },
116
+ * ],
117
+ * contractAddress: "0xToken…",
118
+ * userAddress: "0xUser…",
119
+ * });
120
+ * ```
121
+ */
122
+ encryptValues: FhevmClient["encryptValues"];
123
+ /**
124
+ * User-decrypts a single access-controlled value: the relayer re-encrypts it
125
+ * to the ephemeral transport key pair, gated by the signed permit, and this
126
+ * returns the typed clear value. Build the key pair with
127
+ * {@link generateTransportKeyPair} and the permit with
128
+ * {@link signDecryptionPermit}.
129
+ *
130
+ * @example
131
+ * ```ts
132
+ * const { type, value } = await relayer.decryptValue({
133
+ * encryptedValue: handle,
134
+ * contractAddress: "0xToken…",
135
+ * transportKeyPair,
136
+ * signedPermit,
137
+ * });
138
+ * ```
139
+ */
140
+ decryptValue: FhevmClient["decryptValue"];
141
+ /**
142
+ * Batch form of {@link decryptValue} for values that all belong to the same
143
+ * contract; returns the typed clear values positionally. For values spanning
144
+ * multiple contracts, use {@link decryptValuesFromPairs}.
145
+ *
146
+ * @example
147
+ * ```ts
148
+ * const values = await relayer.decryptValues({
149
+ * encryptedValues: [handleA, handleB],
150
+ * contractAddress: "0xToken…",
151
+ * transportKeyPair,
152
+ * signedPermit,
153
+ * });
154
+ * ```
155
+ */
156
+ decryptValues: FhevmClient["decryptValues"];
157
+ /**
158
+ * User-decrypts values that span multiple contracts: each pair carries its own
159
+ * `contractAddress`, so one permit covering those contracts decrypts them all
160
+ * in a single round-trip. Returns the typed clear values positionally.
161
+ *
162
+ * @example
163
+ * ```ts
164
+ * const values = await relayer.decryptValuesFromPairs({
165
+ * pairs: [
166
+ * { encryptedValue: handleA, contractAddress: "0xTokenA…" },
167
+ * { encryptedValue: handleB, contractAddress: "0xTokenB…" },
168
+ * ],
169
+ * transportKeyPair,
170
+ * signedPermit,
171
+ * });
172
+ * ```
173
+ */
174
+ decryptValuesFromPairs: FhevmClient["decryptValuesFromPairs"];
175
+ /**
176
+ * Fetches the chain's raw FHE public-key bytes — the key encryption uses —
177
+ * served from cache unless `ignoreCache` forces a refetch. Rarely called
178
+ * directly: {@link encryptValue}/{@link encryptValues} fetch the key for you.
179
+ *
180
+ * @example
181
+ * ```ts
182
+ * const keyBytes = await relayer.fetchFheEncryptionKeyBytes();
183
+ * const fresh = await relayer.fetchFheEncryptionKeyBytes({ ignoreCache: true });
184
+ * ```
185
+ */
186
+ fetchFheEncryptionKeyBytes: FhevmClient["fetchFheEncryptionKeyBytes"];
187
+ /**
188
+ * Builds the EIP-712 user-decrypt permit and signs it with the given signer,
189
+ * authorizing the transport key pair to decrypt the listed contracts' values
190
+ * for `durationSeconds` starting at `startTimestamp`. Pass `delegatorAddress`
191
+ * to sign a delegated permit — decrypting values owned by that account instead
192
+ * of the signer's own. Persist the result via
193
+ * {@link serializeSignedDecryptionPermit}.
194
+ *
195
+ * @example
196
+ * ```ts
197
+ * const signedPermit = await relayer.signDecryptionPermit({
198
+ * transportKeyPair,
199
+ * contractAddresses: ["0xToken…"],
200
+ * startTimestamp: Math.floor(Date.now() / 1000),
201
+ * durationSeconds: 60 * 60 * 24,
202
+ * signerAddress: "0xUser…",
203
+ * signer,
204
+ * // delegatorAddress: "0xOwner…", // omit for a self permit
205
+ * });
206
+ * ```
207
+ */
208
+ signDecryptionPermit: FhevmClient["signDecryptionPermit"];
209
+ /**
210
+ * Serializes a transport key pair to a hex `{ publicKey, privateKey }` pair for
211
+ * storage or transport, so a decryption session can resume without regenerating
212
+ * keys. Reverse of {@link parseTransportKeyPair}. Purely local — no round-trip.
213
+ *
214
+ * @example
215
+ * ```ts
216
+ * const stored = relayer.serializeTransportKeyPair({ transportKeyPair });
217
+ * // { publicKey: "0x…", privateKey: "0x…" }
218
+ * ```
219
+ */
220
+ serializeTransportKeyPair: FhevmClient["serializeTransportKeyPair"];
221
+ /**
222
+ * Serializes a signed permit to a plain, JSON-stringifiable object (version,
223
+ * EIP-712 payload, signature, signer) for caching or transport. Reverse of
224
+ * {@link parseSignedDecryptionPermit}. Purely local — no round-trip.
225
+ *
226
+ * @example
227
+ * ```ts
228
+ * const serialized = relayer.serializeSignedDecryptionPermit({ signedPermit });
229
+ * localStorage.setItem("permit", JSON.stringify(serialized));
230
+ * ```
231
+ */
232
+ serializeSignedDecryptionPermit: FhevmClient["serializeSignedDecryptionPermit"];
233
+ /**
234
+ * Rebuilds a transport key pair from its serialized hex
235
+ * `{ publicKey, privateKey }` form. Reverse of {@link serializeTransportKeyPair}.
236
+ *
237
+ * @example
238
+ * ```ts
239
+ * const transportKeyPair = await relayer.parseTransportKeyPair({
240
+ * publicKey: stored.publicKey,
241
+ * privateKey: stored.privateKey,
242
+ * });
243
+ * ```
244
+ */
245
+ parseTransportKeyPair: FhevmClient["parseTransportKeyPair"];
246
+ /**
247
+ * Rebuilds a signed permit from its serialized form and validates it: checks
248
+ * the EIP-712 structure, verifies the signature against the on-chain verifier,
249
+ * and confirms the permit's public key matches `transportKeyPair`. Reverse of
250
+ * {@link serializeSignedDecryptionPermit}.
251
+ *
252
+ * @throws if the permit is malformed, expired, or its signature is invalid.
253
+ *
254
+ * @example
255
+ * ```ts
256
+ * const signedPermit = await relayer.parseSignedDecryptionPermit({
257
+ * serializedPermit,
258
+ * transportKeyPair,
259
+ * });
260
+ * ```
261
+ */
262
+ parseSignedDecryptionPermit: FhevmClient["parseSignedDecryptionPermit"];
263
+ /**
264
+ * Generates a fresh ephemeral transport key pair for a user-decrypt session.
265
+ * The relayer re-encrypts decrypted values to this pair's public key, so only
266
+ * the holder of the private key can read them; bind it to a permit via
267
+ * {@link signDecryptionPermit}.
268
+ *
269
+ * @example
270
+ * ```ts
271
+ * const transportKeyPair = await relayer.generateTransportKeyPair();
272
+ * ```
273
+ */
274
+ generateTransportKeyPair: FhevmClient["generateTransportKeyPair"];
275
+ }
276
+ //#endregion
277
+ //#region src/node/config.d.ts
278
+ /** Node transport — drives the FHE backend directly on the calling thread. */
279
+ interface NodeRelayerConfig extends RelayerConfig {
280
+ readonly type: "node";
281
+ readonly createRelayer: (chain: FheChain) => FhevmRelayer;
282
+ }
283
+ /**
284
+ * Node.js transport — drives `@fhevm/sdk` via {@link FhevmRelayer} on the calling thread.
285
+ *
286
+ * @example
287
+ * ```ts
288
+ * relayers: {
289
+ * [sepolia.id]: node({ timeout: 5 * 60_000 }),
290
+ * [mainnet.id]: node({ batchRpcCalls: true }),
291
+ * }
292
+ * ```
293
+ */
294
+ declare function node(options?: RelayerOptions): NodeRelayerConfig;
295
+ //#endregion
296
+ //#region src/storage/async-local-storage.d.ts
297
+ /**
298
+ * {@link GenericStorage} backed by Node.js {@link AsyncLocalStorage}.
299
+ *
300
+ * Each async context (e.g. HTTP request) gets its own isolated `Map`,
301
+ * so credentials from one request never leak into another.
302
+ *
303
+ * Call {@link run} to establish a context before using the SDK:
304
+ *
305
+ * ```ts
306
+ * import { asyncLocalStorage } from "@zama-fhe/sdk/node";
307
+ *
308
+ * app.post("/api/transfer", (req, res) => {
309
+ * asyncLocalStorage.run(async () => {
310
+ * const sdk = new ZamaSDK({ relayer, signer, storage: asyncLocalStorage });
311
+ * // credentials are scoped to this request
312
+ * });
313
+ * });
314
+ * ```
315
+ */
316
+ declare class AsyncLocalMapStorage implements GenericStorage {
317
+ #private;
318
+ /** Execute `fn` within an isolated storage context. */
319
+ run<R>(fn: () => R | Promise<R>): R | Promise<R>;
320
+ get<T = unknown>(key: string): Promise<T | null>;
321
+ set<T = unknown>(key: string, value: T): Promise<void>;
322
+ delete(key: string): Promise<void>;
323
+ }
324
+ /** Default singleton for application-wide use. */
325
+ declare const asyncLocalStorage: AsyncLocalMapStorage;
326
+ //#endregion
327
+ export { node as i, asyncLocalStorage as n, NodeRelayerConfig as r, AsyncLocalMapStorage as t };
328
+ //# sourceMappingURL=index-BnIp_-Ak.d.ts.map
@@ -1,19 +1,66 @@
1
- import { n as FheChain } from "./types-BgczXqW2.js";
1
+ import { Address, EIP1193Provider } from "viem";
2
2
 
3
+ //#region src/chains/types.d.ts
4
+ /** Authentication forwarded to a chain's relayer endpoint. */
5
+ type FheChainAuth = {
6
+ __type: "BearerToken";
7
+ token: string;
8
+ } | {
9
+ __type: "ApiKeyHeader";
10
+ header?: string;
11
+ value: string;
12
+ } | {
13
+ __type: "ApiKeyCookie";
14
+ cookie?: string;
15
+ value: string;
16
+ };
17
+ /**
18
+ * Complete chain configuration — the single source of truth for
19
+ * per-chain FHE contract addresses and network settings.
20
+ *
21
+ * All built-in presets (`mainnet`, `sepolia`, `hoodi`, `ingenTestnet`,
22
+ * `bscTestnet`, `hardhat`) are `FheChain` objects exported from
23
+ * `@zama-fhe/sdk/chains`.
24
+ */
25
+ interface FheChain<TId extends number = number> {
26
+ readonly id: TId;
27
+ readonly gatewayChainId: number;
28
+ readonly relayerUrl: string;
29
+ readonly network: EIP1193Provider | string;
30
+ readonly aclContractAddress: Address;
31
+ readonly kmsContractAddress: Address;
32
+ readonly inputVerifierContractAddress: Address;
33
+ readonly verifyingContractAddressDecryption: Address;
34
+ readonly verifyingContractAddressInputVerification: Address;
35
+ /**
36
+ * Address of the `ConfidentialTokenWrappersRegistry` contract.
37
+ * `undefined` for chains where no registry is deployed (e.g. Hardhat).
38
+ */
39
+ readonly registryAddress: Address | undefined;
40
+ /**
41
+ * Address of the `TFHEExecutor` contract (cleartext mode only).
42
+ * Required by the `cleartext()` transport to read mock plaintexts.
43
+ * `undefined` for chains that use real FHE infrastructure.
44
+ */
45
+ readonly executorAddress?: Address | undefined;
46
+ /**
47
+ * Authentication for the relayer endpoint.
48
+ * Use `{ __type: "ApiKeyHeader", value: "your-key" }` for API-key auth,
49
+ * or `{ __type: "BearerToken", token: "your-token" }` for bearer auth.
50
+ */
51
+ readonly auth?: FheChainAuth;
52
+ }
53
+ /** At least one chain is required. */
54
+ type AtLeastOneChain = readonly [FheChain, ...FheChain[]];
55
+ //#endregion
3
56
  //#region src/chains/configs.d.ts
4
57
  /**
5
58
  * Mainnet network configuration (chainId 1).
6
- *
7
- * Contract addresses mirror `MainnetConfigV2` from `@zama-fhe/relayer-sdk`.
8
- * They are duplicated here because the `/bundle` export path only exposes
9
- * types at build time (runtime values require `/web` or `/node` which pull
10
- * in WASM). `satisfies FheChain` ensures structural drift is caught at
11
- * compile time.
12
59
  */
13
60
  declare const mainnet: {
14
61
  readonly id: 1;
15
62
  readonly gatewayChainId: 261131;
16
- readonly relayerUrl: "https://relayer.mainnet.zama.org/v2";
63
+ readonly relayerUrl: "https://relayer.mainnet.zama.org";
17
64
  readonly network: "https://ethereum-rpc.publicnode.com";
18
65
  readonly aclContractAddress: "0xcA2E8f1F656CD25C01F05d0b243Ab1ecd4a8ffb6";
19
66
  readonly kmsContractAddress: "0x77627828a55156b04Ac0DC0eb30467f1a552BB03";
@@ -28,7 +75,7 @@ declare const mainnet: {
28
75
  declare const sepolia: {
29
76
  readonly id: 11155111;
30
77
  readonly gatewayChainId: 10901;
31
- readonly relayerUrl: "https://relayer.testnet.zama.org/v2";
78
+ readonly relayerUrl: "https://relayer.testnet.zama.org";
32
79
  readonly network: "https://ethereum-sepolia-rpc.publicnode.com";
33
80
  readonly aclContractAddress: "0xf0Ffdc93b7E186bC2f8CB3dAA75D86d1930A433D";
34
81
  readonly kmsContractAddress: "0xbE0E383937d564D7FF0BC3b46c51f0bF8d5C311A";
@@ -49,8 +96,8 @@ declare const hoodi: {
49
96
  readonly relayerUrl: "";
50
97
  readonly network: "https://rpc.hoodi.ethpandaops.io";
51
98
  readonly aclContractAddress: "0x6D3FAf6f86e1fF9F3B0831Dda920AbA1cBd5bd68";
52
- readonly kmsContractAddress: "0x901F8942346f7AB3a01F6D7613119Bca447Bb030";
53
- readonly inputVerifierContractAddress: "0x36772142b74871f255CbD7A3e89B401d3e45825f";
99
+ readonly kmsContractAddress: "0x822BE20679CfAfdc352F05dEdfe12a07E912212e";
100
+ readonly inputVerifierContractAddress: "0xf3D9A51f32D9bC23E1eECb0fAbF1f1DA4d9Bba26";
54
101
  readonly verifyingContractAddressDecryption: "0x5ffdaAB0373E62E2ea2944776209aEf29E631A64";
55
102
  readonly verifyingContractAddressInputVerification: "0x812b06e1CDCE800494b79fFE4f925A504a9A9810";
56
103
  readonly registryAddress: "0x1807aE2f693F8530DFB126D0eF98F2F2518F292f";
@@ -131,5 +178,5 @@ declare const anvil: {
131
178
  */
132
179
  declare const chains: Record<number, FheChain>;
133
180
  //#endregion
134
- export { hoodi as a, sepolia as c, hardhat as i, bscTestnet as n, ingenTestnet as o, chains as r, mainnet as s, anvil as t };
135
- //# sourceMappingURL=index-CYBH0nyo.d.ts.map
181
+ export { hoodi as a, sepolia as c, FheChainAuth as d, hardhat as i, AtLeastOneChain as l, bscTestnet as n, ingenTestnet as o, chains as r, mainnet as s, anvil as t, FheChain as u };
182
+ //# sourceMappingURL=index-D66eC3G7.d.ts.map
@@ -1,14 +1,11 @@
1
- import { n as FheChain, t as AtLeastOneChain } from "./types-BgczXqW2.js";
2
- import { a as hoodi, c as sepolia, i as hardhat, n as bscTestnet, o as ingenTestnet, r as chains, s as mainnet, t as anvil } from "./index-CYBH0nyo.js";
3
- import { A as ShieldCallbacks, B as RawLog, D as ShieldPath, E as ShieldOptions, F as GenericSigner, G as ReadContractConfig, H as TransactionResult, I as WalletAccount, J as WriteContractArgs, K as ReadContractReturnType, L as WalletAccountChange, M as UnshieldCallbacks, N as GenericStorage, O as TransferOptions, P as GenericProvider, R as WalletAccountListener, T as ApprovalStrategy, U as ContractAbi, V as TransactionReceipt, W as ReadContractArgs, X as WriteFunctionName, Y as WriteContractConfig, _ as PublicParamsData, c as DelegatedUserDecryptParams, d as EncryptParams, f as EncryptResult, g as PublicDecryptResult, h as NetworkType, i as StoredTransportKeyPair, j as TransferCallbacks, k as UnshieldOptions, l as EIP712TypedData, m as FheEncryptionKey, n as RelayerSDK, o as TransportKeyPair, p as EncryptedValue, pt as GenericLogger, q as ReadFunctionName, r as Permission, s as ClearValue, u as EncryptInput, v as RelayerSDKStatus, x as UserDecryptParams, z as WalletAccountStore } from "./relayer-cleartext-CSeMlmGO.js";
4
- import { $ as decodeDelegatedForUserDecryption, A as UnshieldPhase2StartedEvent, B as AclTopics, C as SetOperatorSubmittedEvent, D as TransferFromSubmittedEvent, E as TransactionOperation, F as ZamaSDKEventListener, G as TOKEN_TOPICS, H as DelegatedForUserDecryptionEvent, I as ZamaSDKEventType, J as UnwrapRequestedEvent, K as Topics, L as ZamaSDKEvents, M as UnwrapSubmittedEvent, N as ZamaSDKEvent, O as TransferSubmittedEvent, P as ZamaSDKEventInput, Q as decodeConfidentialTransfer, R as ACL_TOPICS, S as RevokeDelegationSubmittedEvent, T as TransactionErrorEvent, U as OnChainEvent, V as ConfidentialTransferEvent, W as RevokedDelegationForUserDecryptionEvent, X as decodeAclEvent, Y as WrapEvent, Z as decodeAclEvents, _ as DelegationSubmittedEvent, a as ZamaConfig, at as decodeWrap, b as EncryptStartEvent, ct as findUnwrapRequested, d as WorkerLike, et as decodeOnChainEvent, f as ApproveUnderlyingSubmittedEvent, g as DecryptStartEvent, h as DecryptErrorEvent, it as decodeUnwrapRequested, j as UnshieldPhase2SubmittedEvent, k as UnshieldPhase1SubmittedEvent, lt as findWrap, m as DecryptEndEvent, n as RelayerConfig, nt as decodeRevokedDelegationForUserDecryption, o as ZamaConfigBase, ot as findDelegatedForUserDecryption, p as BaseEvent, q as UnwrapFinalizedEvent, rt as decodeUnwrapFinalized, s as ZamaConfigGeneric, st as findRevokedDelegationForUserDecryption, t as CleartextRelayerConfig, tt as decodeOnChainEvents, u as RelayerDispatcher, v as EncryptEndEvent, w as ShieldSubmittedEvent, x as FinalizeUnwrapSubmittedEvent, y as EncryptErrorEvent, z as AclEvent } from "./types-Gn5MeDsr.js";
5
- import { t as ZamaConfigEthers } from "./types-OHIaPwCy.js";
6
- import { n as MutableWalletAccountStore, r as createWalletAccountStore, t as BaseSigner } from "./base-signer-C3Wc5oi9.js";
7
- import { t as cleartext } from "./cleartext-DAkOTlrE.js";
8
- import { $ as DecryptResult, A as BalanceCheckUnavailableError, At as decimalsContract, B as DelegationDelegateEqualsContractError, Bt as rateContract, C as SignerRequiredError, Ct as ERC7984_WRAPPER_INTERFACE_ID, D as NotEntitledError, Dt as allowanceContract, E as RpcRateLimitError, Et as supportsInterfaceContract, F as DecryptionFailedError, Ft as confidentialTransferContract, G as DelegationNotPropagatedError, Gt as wrapContract, H as DelegationExpiredError, Ht as underlyingContract, I as EncryptionFailedError, It as confidentialTransferFromContract, J as NoCiphertextError, Jt as resolveStorage, K as DelegationSelfNotAllowedError, Kt as ResolvedChainRelayer, L as AclPausedError, Lt as finalizeUnwrapContract, M as ERC20ReadFailedError, Mt as symbolContract, N as InsufficientConfidentialBalanceError, Nt as confidentialBalanceOfContract, O as ConfigurationError, Ot as approveContract, P as InsufficientERC20BalanceError, Pt as confidentialTotalSupplyContract, Q as ZamaErrorCode, R as DelegationContractIsSelfError, Rt as inferredTotalSupplyContract, S as SignerNotConfiguredError, St as ERC7984_INTERFACE_ID, T as WalletNotConnectedError, Tt as isConfidentialWrapperContract, U as DelegationExpiryUnchangedError, Ut as unwrapContract, V as DelegationExpirationTooSoonError, Vt as setOperatorContract, W as DelegationNotFoundError, Wt as unwrapFromBalanceContract, X as ChainMismatchError, Y as TransportKeyPairExpiredError, Yt as createConfig, Z as ZamaError, _ as WorkerRecycledError, _t as getDelegationExpiryContract, a as WrappersRegistryConfig, b as SigningFailedError, bt as transferAndCallContract, c as BatchDecryptAsOptions, ct as TokenWrapperPairWithMetadata, d as Delegations, dt as getTokenPairContract, et as EncryptedInput, f as Decryption, ft as getTokenPairsContract, g as matchZamaError, gt as delegateForUserDecryptionContract, h as DelegatedDecryptOptions, ht as isConfidentialTokenValidContract, i as WrappersRegistry, j as BalanceErrorDetails, jt as nameContract, k as RelayerRequestFailedError, kt as balanceOfContract, l as Token, lt as getConfidentialTokenAddressContract, m as BatchDecryptResult, mt as getTokenPairsSliceContract, n as DefaultRegistryAddresses, o as WrappedToken, ot as PaginatedResult, p as BatchDecryptItem, pt as getTokenPairsLengthContract, q as InvalidTransportKeyPairError, qt as resolveChainRelayers, r as ListPairsOptions, s as BatchBalancesResult, st as TokenWrapperPair, t as ZamaSDK, u as Permits, ut as getTokenAddressContract, v as WorkerTimeoutError, vt as isHandleDelegatedContract, w as WalletAccountNotReadyError, wt as isConfidentialTokenContract, x as SigningRejectedError, xt as ERC1363_INTERFACE_ID, y as TransactionRevertedError, yt as revokeDelegationContract, z as DelegationCooldownError, zt as isOperatorContract } from "./index-C1Mtc8Rw.js";
9
- import { t as ZamaConfigViem } from "./types-piBsdTIP.js";
1
+ import { a as hoodi, c as sepolia, d as FheChainAuth, i as hardhat, l as AtLeastOneChain, n as bscTestnet, o as ingenTestnet, r as chains, s as mainnet, t as anvil, u as FheChain } from "./index-D66eC3G7.js";
2
+ import { $ as TransferOptions, A as EncryptEndEvent, At as RawLog, B as TransferSubmittedEvent, Bt as EncryptedValue, C as ChainRouter, Ct as decodeUnwrapFinalized, D as DecryptErrorEvent, Dt as findRevokedDelegationForUserDecryption, E as DecryptEndEvent, Et as findDelegatedForUserDecryption, F as SetOperatorSubmittedEvent, Ft as DecryptValuesParameters, G as ZamaSDKEvent, Gt as TypedValue, H as UnshieldPhase2StartedEvent, I as ShieldSubmittedEvent, It as EIP712TypedData, J as ZamaSDKEventType, K as ZamaSDKEventInput, L as TransactionErrorEvent, Lt as EncryptInput, M as EncryptStartEvent, Mt as TransactionResult, N as FinalizeUnwrapSubmittedEvent, Nt as ClearValue, O as DecryptStartEvent, Ot as findUnwrapRequested, P as RevokeDelegationSubmittedEvent, Pt as DecryptPublicValuesResult, Q as ShieldPath, R as TransactionOperation, Rt as EncryptParams, S as WriteFunctionName, St as decodeRevokedDelegationForUserDecryption, T as BaseEvent, Tt as decodeWrap, U as UnshieldPhase2SubmittedEvent, Ut as FhevmRelayerSDK, V as UnshieldPhase1SubmittedEvent, W as UnwrapSubmittedEvent, X as ApprovalStrategy, Y as ZamaSDKEvents, Z as ShieldOptions, _ as ReadContractConfig, _t as decodeAclEvents, a as ZamaConfigBase, at as AclEvent, b as WriteContractArgs, bt as decodeOnChainEvent, c as GenericStorage, ct as DelegatedForUserDecryptionEvent, d as WalletAccount, dt as TOKEN_TOPICS, et as UnshieldOptions, f as WalletAccountChange, ft as Topics, g as ReadContractArgs, gt as decodeAclEvent, h as ContractAbi, ht as WrapEvent, i as ZamaConfig, it as ACL_TOPICS, j as EncryptErrorEvent, jt as TransactionReceipt, k as DelegationSubmittedEvent, kt as findWrap, l as GenericProvider, lt as OnChainEvent, m as WalletAccountStore, mt as UnwrapRequestedEvent, n as RelayerConfig, nt as TransferCallbacks, o as ZamaConfigGeneric, ot as AclTopics, p as WalletAccountListener, pt as UnwrapFinalizedEvent, q as ZamaSDKEventListener, rt as UnshieldCallbacks, s as GenericLogger, st as ConfidentialTransferEvent, t as CleartextRelayerConfig, tt as ShieldCallbacks, u as GenericSigner, ut as RevokedDelegationForUserDecryptionEvent, v as ReadContractReturnType, vt as decodeConfidentialTransfer, w as ApproveUnderlyingSubmittedEvent, wt as decodeUnwrapRequested, x as WriteContractConfig, xt as decodeOnChainEvents, y as ReadFunctionName, yt as decodeDelegatedForUserDecryption, z as TransferFromSubmittedEvent, zt as EncryptResult } from "./types-C-WTLcHZ.js";
3
+ import { t as cleartext } from "./cleartext-U6sPs_Kd.js";
4
+ import { t as ZamaConfigEthers } from "./types-BpvL50qX.js";
5
+ import { n as MutableWalletAccountStore, r as createWalletAccountStore, t as BaseSigner } from "./base-signer-Q2EJECrc.js";
6
+ import { $n as getTokenAddressContract, $t as DelegationSelfNotAllowedError, Ar as setOperatorContract, At as SignerRequiredError, Bt as InsufficientConfidentialBalanceError, Cr as confidentialTotalSupplyContract, Ct as BatchDecryptAsOptions, D as DecryptResult, Dr as inferredTotalSupplyContract, Dt as SigningFailedError, Er as finalizeUnwrapContract, Et as TransactionRevertedError, Fr as ResolvedChainRelayer, Ft as ConfigurationError, Gt as DelegationContractIsSelfError, Ht as DecryptionFailedError, Ir as resolveChainRelayers, It as RelayerRequestFailedError, Jt as DelegationExpirationTooSoonError, Kt as DelegationCooldownError, Lr as resolveStorage, Lt as BalanceCheckUnavailableError, Mr as unwrapContract, Mt as WalletNotConnectedError, Nr as unwrapFromBalanceContract, Nt as RpcRateLimitError, O as EncryptedInput, Or as isOperatorContract, Ot as SigningRejectedError, Pr as wrapContract, Pt as NotEntitledError, Qn as getConfidentialTokenAddressContract, Qt as DelegationNotPropagatedError, Rr as createConfig, Rt as BalanceErrorDetails, Sr as confidentialBalanceOfContract, St as BatchBalancesResult, Tr as confidentialTransferFromContract, Tt as matchZamaError, Ut as EncryptionFailedError, Vt as InsufficientERC20BalanceError, Wt as AclPausedError, Xn as TokenWrapperPair, Xt as DelegationExpiryUnchangedError, Yn as PaginatedResult, Yt as DelegationExpiredError, Zn as TokenWrapperPairWithMetadata, Zt as DelegationNotFoundError, _n as WrappersRegistryConfig, _r as approveContract, a as BatchDecryptItem, an as ZamaErrorCode, ar as delegateForUserDecryptionContract, bn as StoredTransportKeyPair, br as nameContract, cr as revokeDelegationContract, dr as ERC7984_INTERFACE_ID, en as InvalidTransportKeyPairError, er as getTokenPairContract, fr as ERC7984_WRAPPER_INTERFACE_ID, gn as WrappersRegistry, gr as allowanceContract, hn as ListPairsOptions, hr as supportsInterfaceContract, i as Decryption, in as ZamaError, ir as isConfidentialTokenValidContract, jr as underlyingContract, jt as WalletAccountNotReadyError, kr as rateContract, kt as SignerNotConfiguredError, lr as transferAndCallContract, mn as DefaultRegistryAddresses, mr as isConfidentialWrapperContract, n as Permits, nn as TransportKeyPairExpiredError, nr as getTokenPairsLengthContract, o as BatchDecryptResult, or as getDelegationExpiryContract, pr as isConfidentialTokenContract, qt as DelegationDelegateEqualsContractError, r as Delegations, rn as ChainMismatchError, rr as getTokenPairsSliceContract, s as DelegatedDecryptOptions, sr as isHandleDelegatedContract, t as ZamaSDK, tn as NoCiphertextError, tr as getTokenPairsContract, ur as ERC1363_INTERFACE_ID, vn as Permission, vr as balanceOfContract, wr as confidentialTransferContract, wt as Token, xr as symbolContract, xt as WrappedToken, yn as SerializedTransportKeyPair, yr as decimalsContract, zt as ERC20ReadFailedError } from "./zama-sdk-q4_qt64Q.js";
7
+ import { t as ZamaConfigViem } from "./types-Bov8XY36.js";
10
8
  import { Address, Hex } from "viem";
11
- import { FheTypeName, FhevmInstanceConfig, InputProofBytesType, KmsDelegatedUserDecryptEIP712Type as KmsDelegatedDecryptEIP712Type, ZKProofLike } from "@zama-fhe/relayer-sdk/bundle";
12
9
 
13
10
  //#region src/utils/handles.d.ts
14
11
  declare const ZERO_ENCRYPTED_VALUE: "0x0000000000000000000000000000000000000000000000000000000000000000";
@@ -79,5 +76,5 @@ declare class ChromeSessionStorage implements GenericStorage {
79
76
  /** Default singleton for application-wide use. */
80
77
  declare const chromeSessionStorage: ChromeSessionStorage;
81
78
  //#endregion
82
- export { ACL_TOPICS, type AclEvent, AclPausedError, AclTopics, type Address, type ApprovalStrategy, type ApproveUnderlyingSubmittedEvent, type AtLeastOneChain, BalanceCheckUnavailableError, type BalanceErrorDetails, type BaseEvent, BaseSigner, type BatchBalancesResult, type BatchDecryptAsOptions, type BatchDecryptItem, type BatchDecryptResult, ChainMismatchError, ChromeSessionStorage, type ClearValue, type CleartextRelayerConfig, type ConfidentialTransferEvent, ConfigurationError, type ContractAbi, type DecryptEndEvent, type DecryptErrorEvent, type EncryptedInput as DecryptInput, type PublicDecryptResult as DecryptPublicValuesResult, type DecryptResult, type DecryptStartEvent, type UserDecryptParams as DecryptValuesParams, Decryption, DecryptionFailedError, DefaultRegistryAddresses, type DelegatedDecryptOptions, type DelegatedUserDecryptParams as DelegatedDecryptValuesParams, type DelegatedForUserDecryptionEvent, DelegationContractIsSelfError, DelegationCooldownError, DelegationDelegateEqualsContractError, DelegationExpirationTooSoonError, DelegationExpiredError, DelegationExpiryUnchangedError, DelegationNotFoundError, DelegationNotPropagatedError, DelegationSelfNotAllowedError, type DelegationSubmittedEvent, Delegations, type EIP712TypedData, ERC1363_INTERFACE_ID, ERC20ReadFailedError, ERC7984_INTERFACE_ID, ERC7984_WRAPPER_INTERFACE_ID, type EncryptEndEvent, type EncryptErrorEvent, type EncryptInput, type EncryptParams, type EncryptResult, type EncryptStartEvent, type EncryptedValue, EncryptionFailedError, type FheChain, type FheEncryptionKey, type FheTypeName, type FhevmInstanceConfig, type FinalizeUnwrapSubmittedEvent, type GenericLogger, type GenericProvider, type GenericSigner, type GenericStorage, type Hex, IndexedDBStorage, type InputProofBytesType, InsufficientConfidentialBalanceError, InsufficientERC20BalanceError, InvalidTransportKeyPairError, type KmsDelegatedDecryptEIP712Type, type ListPairsOptions, MemoryStorage, MutableWalletAccountStore, type NetworkType, NoCiphertextError, NotEntitledError, type OnChainEvent, type PaginatedResult, type Permission, Permits, type PublicParamsData, type RawLog, type ReadContractArgs, type ReadContractConfig, type ReadContractReturnType, type ReadFunctionName, type RelayerConfig, type RelayerDispatcher, RelayerRequestFailedError, type RelayerSDK, type RelayerSDKStatus, type ResolvedChainRelayer, type RevokeDelegationSubmittedEvent, type RevokedDelegationForUserDecryptionEvent, RpcRateLimitError, type SetOperatorSubmittedEvent, type ShieldCallbacks, type ShieldOptions, type ShieldPath, type ShieldSubmittedEvent, SignerNotConfiguredError, SignerRequiredError, SigningFailedError, SigningRejectedError, type StoredTransportKeyPair, TOKEN_TOPICS, Token, type TokenWrapperPair, type TokenWrapperPairWithMetadata, Topics, type TransactionErrorEvent, type TransactionOperation, type TransactionReceipt, type TransactionResult, TransactionRevertedError, type TransferCallbacks, type TransferFromSubmittedEvent, type TransferOptions, type TransferSubmittedEvent, type TransportKeyPair, TransportKeyPairExpiredError, type UnshieldCallbacks, type UnshieldOptions, type UnshieldPhase1SubmittedEvent, type UnshieldPhase2StartedEvent, type UnshieldPhase2SubmittedEvent, type UnwrapFinalizedEvent, type UnwrapRequestedEvent, type UnwrapSubmittedEvent, type WalletAccount, type WalletAccountChange, type WalletAccountListener, WalletAccountNotReadyError, type WalletAccountStore, WalletNotConnectedError, type WorkerLike, WorkerRecycledError, WorkerTimeoutError, type WrapEvent, WrappedToken, WrappersRegistry, type WrappersRegistryConfig, type WriteContractArgs, type WriteContractConfig, type WriteFunctionName, ZERO_ENCRYPTED_VALUE, type ZKProofLike, type ZamaConfig, type ZamaConfigBase, type ZamaConfigEthers, type ZamaConfigGeneric, type ZamaConfigViem, ZamaError, ZamaErrorCode, ZamaSDK, type ZamaSDKEvent, type ZamaSDKEventInput, type ZamaSDKEventListener, type ZamaSDKEventType, ZamaSDKEvents, allowanceContract, anvil, approveContract, balanceOfContract, bscTestnet, chains, chromeSessionStorage, cleartext, confidentialBalanceOfContract, confidentialTotalSupplyContract, confidentialTransferContract, confidentialTransferFromContract, createConfig, createWalletAccountStore, decimalsContract, decodeAclEvent, decodeAclEvents, decodeConfidentialTransfer, decodeDelegatedForUserDecryption, decodeOnChainEvent, decodeOnChainEvents, decodeRevokedDelegationForUserDecryption, decodeUnwrapFinalized, decodeUnwrapRequested, decodeWrap, delegateForUserDecryptionContract, finalizeUnwrapContract, findDelegatedForUserDecryption, findRevokedDelegationForUserDecryption, findUnwrapRequested, findWrap, getConfidentialTokenAddressContract, getDelegationExpiryContract, getTokenAddressContract, getTokenPairContract, getTokenPairsContract, getTokenPairsLengthContract, getTokenPairsSliceContract, hardhat, hoodi, indexedDBStorage, inferredTotalSupplyContract, ingenTestnet, isConfidentialTokenContract, isConfidentialTokenValidContract, isConfidentialWrapperContract, isEncryptedValueZero, isHandleDelegatedContract, isOperatorContract, mainnet, matchZamaError, memoryStorage, nameContract, rateContract, resolveChainRelayers, resolveStorage, revokeDelegationContract, sepolia, setOperatorContract, supportsInterfaceContract, symbolContract, transferAndCallContract, underlyingContract, unwrapContract, unwrapFromBalanceContract, wrapContract };
79
+ export { ACL_TOPICS, type AclEvent, AclPausedError, AclTopics, type Address, type ApprovalStrategy, type ApproveUnderlyingSubmittedEvent, type AtLeastOneChain, BalanceCheckUnavailableError, type BalanceErrorDetails, type BaseEvent, BaseSigner, type BatchBalancesResult, type BatchDecryptAsOptions, type BatchDecryptItem, type BatchDecryptResult, ChainMismatchError, type ChainRouter, ChromeSessionStorage, type ClearValue, type CleartextRelayerConfig, type ConfidentialTransferEvent, ConfigurationError, type ContractAbi, type DecryptEndEvent, type DecryptErrorEvent, type EncryptedInput as DecryptInput, type DecryptPublicValuesResult, type DecryptResult, type DecryptStartEvent, type DecryptValuesParameters, Decryption, DecryptionFailedError, DefaultRegistryAddresses, type DelegatedDecryptOptions, type DelegatedForUserDecryptionEvent, DelegationContractIsSelfError, DelegationCooldownError, DelegationDelegateEqualsContractError, DelegationExpirationTooSoonError, DelegationExpiredError, DelegationExpiryUnchangedError, DelegationNotFoundError, DelegationNotPropagatedError, DelegationSelfNotAllowedError, type DelegationSubmittedEvent, Delegations, type EIP712TypedData, ERC1363_INTERFACE_ID, ERC20ReadFailedError, ERC7984_INTERFACE_ID, ERC7984_WRAPPER_INTERFACE_ID, type EncryptEndEvent, type EncryptErrorEvent, type EncryptInput, type EncryptParams, type EncryptResult, type EncryptStartEvent, type EncryptedValue, EncryptionFailedError, type FheChain, type FheChainAuth, type FinalizeUnwrapSubmittedEvent, type GenericLogger, type GenericProvider, type GenericSigner, type GenericStorage, type Hex, IndexedDBStorage, InsufficientConfidentialBalanceError, InsufficientERC20BalanceError, InvalidTransportKeyPairError, type ListPairsOptions, MemoryStorage, MutableWalletAccountStore, NoCiphertextError, NotEntitledError, type OnChainEvent, type PaginatedResult, type Permission, Permits, type RawLog, type ReadContractArgs, type ReadContractConfig, type ReadContractReturnType, type ReadFunctionName, type RelayerConfig, RelayerRequestFailedError, type FhevmRelayerSDK as RelayerSDK, type ResolvedChainRelayer, type RevokeDelegationSubmittedEvent, type RevokedDelegationForUserDecryptionEvent, RpcRateLimitError, type SerializedTransportKeyPair, type SetOperatorSubmittedEvent, type ShieldCallbacks, type ShieldOptions, type ShieldPath, type ShieldSubmittedEvent, SignerNotConfiguredError, SignerRequiredError, SigningFailedError, SigningRejectedError, type StoredTransportKeyPair, TOKEN_TOPICS, Token, type TokenWrapperPair, type TokenWrapperPairWithMetadata, Topics, type TransactionErrorEvent, type TransactionOperation, type TransactionReceipt, type TransactionResult, TransactionRevertedError, type TransferCallbacks, type TransferFromSubmittedEvent, type TransferOptions, type TransferSubmittedEvent, TransportKeyPairExpiredError, type TypedValue, type UnshieldCallbacks, type UnshieldOptions, type UnshieldPhase1SubmittedEvent, type UnshieldPhase2StartedEvent, type UnshieldPhase2SubmittedEvent, type UnwrapFinalizedEvent, type UnwrapRequestedEvent, type UnwrapSubmittedEvent, type WalletAccount, type WalletAccountChange, type WalletAccountListener, WalletAccountNotReadyError, type WalletAccountStore, WalletNotConnectedError, type WrapEvent, WrappedToken, WrappersRegistry, type WrappersRegistryConfig, type WriteContractArgs, type WriteContractConfig, type WriteFunctionName, ZERO_ENCRYPTED_VALUE, type ZamaConfig, type ZamaConfigBase, type ZamaConfigEthers, type ZamaConfigGeneric, type ZamaConfigViem, ZamaError, ZamaErrorCode, ZamaSDK, type ZamaSDKEvent, type ZamaSDKEventInput, type ZamaSDKEventListener, type ZamaSDKEventType, ZamaSDKEvents, allowanceContract, anvil, approveContract, balanceOfContract, bscTestnet, chains, chromeSessionStorage, cleartext, confidentialBalanceOfContract, confidentialTotalSupplyContract, confidentialTransferContract, confidentialTransferFromContract, createConfig, createWalletAccountStore, decimalsContract, decodeAclEvent, decodeAclEvents, decodeConfidentialTransfer, decodeDelegatedForUserDecryption, decodeOnChainEvent, decodeOnChainEvents, decodeRevokedDelegationForUserDecryption, decodeUnwrapFinalized, decodeUnwrapRequested, decodeWrap, delegateForUserDecryptionContract, finalizeUnwrapContract, findDelegatedForUserDecryption, findRevokedDelegationForUserDecryption, findUnwrapRequested, findWrap, getConfidentialTokenAddressContract, getDelegationExpiryContract, getTokenAddressContract, getTokenPairContract, getTokenPairsContract, getTokenPairsLengthContract, getTokenPairsSliceContract, hardhat, hoodi, indexedDBStorage, inferredTotalSupplyContract, ingenTestnet, isConfidentialTokenContract, isConfidentialTokenValidContract, isConfidentialWrapperContract, isEncryptedValueZero, isHandleDelegatedContract, isOperatorContract, mainnet, matchZamaError, memoryStorage, nameContract, rateContract, resolveChainRelayers, resolveStorage, revokeDelegationContract, sepolia, setOperatorContract, supportsInterfaceContract, symbolContract, transferAndCallContract, underlyingContract, unwrapContract, unwrapFromBalanceContract, wrapContract };
83
80
  //# sourceMappingURL=index.d.ts.map