@fhevm/sdk 1.1.0-alpha.4 → 1.1.0-alpha.6

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 (881) hide show
  1. package/_cjs/core/_version.js +1 -1
  2. package/_cjs/core/actions/base/canDecryptPublicValue.js +1 -1
  3. package/_cjs/core/actions/base/canDecryptPublicValue.js.map +1 -1
  4. package/_cjs/core/actions/base/canDecryptPublicValues.js +1 -1
  5. package/_cjs/core/actions/base/canDecryptPublicValues.js.map +1 -1
  6. package/_cjs/core/actions/base/{fetchKmsSignedcryptedShares.js → fetchKmsSigncryptedShares.js} +5 -5
  7. package/_cjs/core/actions/base/fetchKmsSigncryptedShares.js.map +1 -0
  8. package/_cjs/core/actions/base/index.js +3 -3
  9. package/_cjs/core/actions/base/index.js.map +1 -1
  10. package/_cjs/core/actions/base/readKmsSignersContext.js +2 -1
  11. package/_cjs/core/actions/base/readKmsSignersContext.js.map +1 -1
  12. package/_cjs/core/actions/chain/parseTransportKeyPair.js.map +1 -1
  13. package/_cjs/core/actions/decrypt/decryptKmsSigncryptedShares.js +13 -0
  14. package/_cjs/core/actions/decrypt/decryptKmsSigncryptedShares.js.map +1 -0
  15. package/_cjs/core/actions/decrypt/decryptValue.js +3 -1
  16. package/_cjs/core/actions/decrypt/decryptValue.js.map +1 -1
  17. package/_cjs/core/actions/decrypt/decryptValues.js +3 -1
  18. package/_cjs/core/actions/decrypt/decryptValues.js.map +1 -1
  19. package/_cjs/core/actions/decrypt/decryptValuesFromPairs.js +3 -1
  20. package/_cjs/core/actions/decrypt/decryptValuesFromPairs.js.map +1 -1
  21. package/_cjs/core/actions/decrypt/generateTransportKeyPair.js +3 -1
  22. package/_cjs/core/actions/decrypt/generateTransportKeyPair.js.map +1 -1
  23. package/_cjs/core/actions/decrypt/index.js +3 -3
  24. package/_cjs/core/actions/decrypt/index.js.map +1 -1
  25. package/_cjs/core/actions/encrypt/encryptValue.js +3 -1
  26. package/_cjs/core/actions/encrypt/encryptValue.js.map +1 -1
  27. package/_cjs/core/actions/encrypt/encryptValues.js +3 -1
  28. package/_cjs/core/actions/encrypt/encryptValues.js.map +1 -1
  29. package/_cjs/core/actions/encrypt/generateZkProof.js +5 -1
  30. package/_cjs/core/actions/encrypt/generateZkProof.js.map +1 -1
  31. package/_cjs/core/actions/host/readFhevmExecutorContractData.js +7 -7
  32. package/_cjs/core/actions/host/readFhevmExecutorContractData.js.map +1 -1
  33. package/_cjs/core/actions/host/readInputVerifierContractData.js +1 -1
  34. package/_cjs/core/actions/host/readInputVerifierContractData.js.map +1 -1
  35. package/_cjs/core/actions/host/readKmsVerifierContractData.js +6 -5
  36. package/_cjs/core/actions/host/readKmsVerifierContractData.js.map +1 -1
  37. package/_cjs/core/actions/host/resolveFhevmConfig.js +7 -1
  38. package/_cjs/core/actions/host/resolveFhevmConfig.js.map +1 -1
  39. package/_cjs/core/base/bytes.js +2 -1
  40. package/_cjs/core/base/bytes.js.map +1 -1
  41. package/_cjs/core/base/environment.js +122 -0
  42. package/_cjs/core/base/environment.js.map +1 -0
  43. package/_cjs/core/base/errors/Sha256VerificationError.js +15 -0
  44. package/_cjs/core/base/errors/Sha256VerificationError.js.map +1 -0
  45. package/_cjs/core/base/inflate.js +282 -0
  46. package/_cjs/core/base/inflate.js.map +1 -0
  47. package/_cjs/core/base/isomorphicFs.js +24 -0
  48. package/_cjs/core/base/isomorphicFs.js.map +1 -0
  49. package/_cjs/core/base/isomorphicWorker.js +42 -111
  50. package/_cjs/core/base/isomorphicWorker.js.map +1 -1
  51. package/_cjs/core/base/object.js +23 -0
  52. package/_cjs/core/base/object.js.map +1 -1
  53. package/_cjs/core/base/semver.js +166 -0
  54. package/_cjs/core/base/semver.js.map +1 -0
  55. package/_cjs/core/base/uint.js +20 -3
  56. package/_cjs/core/base/uint.js.map +1 -1
  57. package/_cjs/core/base/wasm.js +15 -55
  58. package/_cjs/core/base/wasm.js.map +1 -1
  59. package/_cjs/core/chains/definitions/localTestnet.js +3 -0
  60. package/_cjs/core/chains/definitions/localTestnet.js.map +1 -1
  61. package/_cjs/core/chains/definitions/mainnet.js +1 -0
  62. package/_cjs/core/chains/definitions/mainnet.js.map +1 -1
  63. package/_cjs/core/chains/definitions/sepolia.js +1 -0
  64. package/_cjs/core/chains/definitions/sepolia.js.map +1 -1
  65. package/_cjs/core/clients/decorators/base.js +5 -0
  66. package/_cjs/core/clients/decorators/base.js.map +1 -1
  67. package/_cjs/core/clients/decorators/decrypt-p.js +13 -0
  68. package/_cjs/core/clients/decorators/decrypt-p.js.map +1 -0
  69. package/_cjs/core/clients/decorators/decrypt.js +4 -7
  70. package/_cjs/core/clients/decorators/decrypt.js.map +1 -1
  71. package/_cjs/core/clients/decorators/encrypt-p.js +5 -1
  72. package/_cjs/core/clients/decorators/encrypt-p.js.map +1 -1
  73. package/_cjs/core/clients/decorators/encrypt.js.map +1 -1
  74. package/_cjs/core/coprocessor/ZkProof-p.js +4 -2
  75. package/_cjs/core/coprocessor/ZkProof-p.js.map +1 -1
  76. package/_cjs/core/coprocessor/ZkProofBuilder-p.js +2 -1
  77. package/_cjs/core/coprocessor/ZkProofBuilder-p.js.map +1 -1
  78. package/_cjs/core/coprocessor/encrypt.js +1 -1
  79. package/_cjs/core/coprocessor/encrypt.js.map +1 -1
  80. package/_cjs/core/errors/RelayerResponseStatusError.js +3 -2
  81. package/_cjs/core/errors/RelayerResponseStatusError.js.map +1 -1
  82. package/_cjs/core/host-contracts/HostContractVersion-p.js +26 -4
  83. package/_cjs/core/host-contracts/HostContractVersion-p.js.map +1 -1
  84. package/_cjs/core/host-contracts/KmsSignersContext-p.js +23 -5
  85. package/_cjs/core/host-contracts/KmsSignersContext-p.js.map +1 -1
  86. package/_cjs/core/host-contracts/abi-fragments/fragments.js +21 -1
  87. package/_cjs/core/host-contracts/abi-fragments/fragments.js.map +1 -1
  88. package/_cjs/core/host-contracts/canDecryptValuesFromPairs.js +1 -1
  89. package/_cjs/core/host-contracts/canDecryptValuesFromPairs.js.map +1 -1
  90. package/_cjs/core/host-contracts/checkAllowedForDecryption.js +2 -2
  91. package/_cjs/core/host-contracts/checkAllowedForDecryption.js.map +1 -1
  92. package/_cjs/core/host-contracts/checkDelegation.js +8 -8
  93. package/_cjs/core/host-contracts/checkDelegation.js.map +1 -1
  94. package/_cjs/core/host-contracts/checkPersistAllowed.js +9 -9
  95. package/_cjs/core/host-contracts/checkPersistAllowed.js.map +1 -1
  96. package/_cjs/core/host-contracts/getAclAddress-p.js +1 -2
  97. package/_cjs/core/host-contracts/getAclAddress-p.js.map +1 -1
  98. package/_cjs/core/host-contracts/getCurrentKmsContextAndEpoch-p.js +51 -0
  99. package/_cjs/core/host-contracts/getCurrentKmsContextAndEpoch-p.js.map +1 -0
  100. package/_cjs/core/host-contracts/getCurrentKmsContextId-p.js +4 -5
  101. package/_cjs/core/host-contracts/getCurrentKmsContextId-p.js.map +1 -1
  102. package/_cjs/core/host-contracts/getFhevmExecutorAddress-p.js +1 -1
  103. package/_cjs/core/host-contracts/getFhevmExecutorAddress-p.js.map +1 -1
  104. package/_cjs/core/host-contracts/getHandleVersion-p.js +1 -2
  105. package/_cjs/core/host-contracts/getHandleVersion-p.js.map +1 -1
  106. package/_cjs/core/host-contracts/getHcuLimitAddress-p.js +1 -2
  107. package/_cjs/core/host-contracts/getHcuLimitAddress-p.js.map +1 -1
  108. package/_cjs/core/host-contracts/getInputVerifierAddress-p.js +1 -2
  109. package/_cjs/core/host-contracts/getInputVerifierAddress-p.js.map +1 -1
  110. package/_cjs/core/host-contracts/getKmsContextSignersAndThreshold-p.js +5 -7
  111. package/_cjs/core/host-contracts/getKmsContextSignersAndThreshold-p.js.map +1 -1
  112. package/_cjs/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.js +4 -5
  113. package/_cjs/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.js.map +1 -1
  114. package/_cjs/core/host-contracts/getSignersForKmsContext-p.js +3 -5
  115. package/_cjs/core/host-contracts/getSignersForKmsContext-p.js.map +1 -1
  116. package/_cjs/core/host-contracts/isAllowedForDecryption.js +4 -4
  117. package/_cjs/core/host-contracts/isAllowedForDecryption.js.map +1 -1
  118. package/_cjs/core/host-contracts/isHandleDelegatedForUserDecryption-p.js +5 -5
  119. package/_cjs/core/host-contracts/isHandleDelegatedForUserDecryption-p.js.map +1 -1
  120. package/_cjs/core/host-contracts/isUserDecryptable.js +2 -2
  121. package/_cjs/core/host-contracts/isUserDecryptable.js.map +1 -1
  122. package/_cjs/core/host-contracts/persistAllowed.js +4 -4
  123. package/_cjs/core/host-contracts/persistAllowed.js.map +1 -1
  124. package/_cjs/core/host-contracts/readKmsSignersContext-p.js +74 -25
  125. package/_cjs/core/host-contracts/readKmsSignersContext-p.js.map +1 -1
  126. package/_cjs/core/key/FheEncryptionKeyWasm-p.js +12 -4
  127. package/_cjs/core/key/FheEncryptionKeyWasm-p.js.map +1 -1
  128. package/_cjs/core/key/deserializeFheEncryptionKey.js +3 -0
  129. package/_cjs/core/key/deserializeFheEncryptionKey.js.map +1 -1
  130. package/_cjs/core/key/fetchFheEncryptionKey.js +1 -1
  131. package/_cjs/core/key/fetchFheEncryptionKey.js.map +1 -1
  132. package/_cjs/core/key/fetchFheEncryptionKeyBytes.js.map +1 -1
  133. package/_cjs/core/key/serializeFheEncryptionKey.js +4 -1
  134. package/_cjs/core/key/serializeFheEncryptionKey.js.map +1 -1
  135. package/_cjs/core/kms/KmsSigncryptedShares-p.js +9 -1
  136. package/_cjs/core/kms/KmsSigncryptedShares-p.js.map +1 -1
  137. package/_cjs/core/kms/SignedDecryptionPermit-p.js +5 -1
  138. package/_cjs/core/kms/SignedDecryptionPermit-p.js.map +1 -1
  139. package/_cjs/core/kms/TransportKeyPair-p.js +27 -7
  140. package/_cjs/core/kms/TransportKeyPair-p.js.map +1 -1
  141. package/_cjs/core/kms/createKmsUserDecryptEip712.js +8 -0
  142. package/_cjs/core/kms/createKmsUserDecryptEip712.js.map +1 -1
  143. package/_cjs/core/kms/createKmsUserDecryptEip712V2.js +97 -0
  144. package/_cjs/core/kms/createKmsUserDecryptEip712V2.js.map +1 -0
  145. package/_cjs/core/kms/{decryptKmsSignedcryptedShares-p.js → decryptKmsSigncryptedShares-p.js} +10 -3
  146. package/_cjs/core/kms/decryptKmsSigncryptedShares-p.js.map +1 -0
  147. package/_cjs/core/kms/decryptValuesFromPairs.js +4 -4
  148. package/_cjs/core/kms/decryptValuesFromPairs.js.map +1 -1
  149. package/_cjs/core/kms/{fetchKmsSignedcryptedShares-p.js → fetchKmsSigncryptedShares-p.js} +10 -6
  150. package/_cjs/core/kms/fetchKmsSigncryptedShares-p.js.map +1 -0
  151. package/_cjs/core/kms/kmsExtraData.js +53 -10
  152. package/_cjs/core/kms/kmsExtraData.js.map +1 -1
  153. package/_cjs/core/kms/kmsUserDecryptEip712V2Types.js +25 -0
  154. package/_cjs/core/kms/kmsUserDecryptEip712V2Types.js.map +1 -0
  155. package/_cjs/core/kms/publicDecrypt.js +5 -3
  156. package/_cjs/core/kms/publicDecrypt.js.map +1 -1
  157. package/_cjs/core/modules/decrypt/mock.js +1 -23
  158. package/_cjs/core/modules/decrypt/mock.js.map +1 -1
  159. package/_cjs/core/modules/decrypt/module/api-p.js +51 -23
  160. package/_cjs/core/modules/decrypt/module/api-p.js.map +1 -1
  161. package/_cjs/core/modules/decrypt/module/index.js +5 -27
  162. package/_cjs/core/modules/decrypt/module/index.js.map +1 -1
  163. package/_cjs/core/modules/decrypt/module/init-p.js +155 -49
  164. package/_cjs/core/modules/decrypt/module/init-p.js.map +1 -1
  165. package/_cjs/core/modules/encrypt/mock.js +26 -8
  166. package/_cjs/core/modules/encrypt/mock.js.map +1 -1
  167. package/_cjs/core/modules/encrypt/module/api-p.js +50 -21
  168. package/_cjs/core/modules/encrypt/module/api-p.js.map +1 -1
  169. package/_cjs/core/modules/encrypt/module/index.js +3 -3
  170. package/_cjs/core/modules/encrypt/module/index.js.map +1 -1
  171. package/_cjs/core/modules/encrypt/module/init-p.js +211 -69
  172. package/_cjs/core/modules/encrypt/module/init-p.js.map +1 -1
  173. package/_cjs/core/modules/relayer/cleartext/fetchDelegatedUserDecrypt.js +1 -1
  174. package/_cjs/core/modules/relayer/cleartext/fetchDelegatedUserDecrypt.js.map +1 -1
  175. package/_cjs/core/modules/relayer/cleartext/fetchUserDecrypt.js +1 -1
  176. package/_cjs/core/modules/relayer/cleartext/fetchUserDecrypt.js.map +1 -1
  177. package/_cjs/core/modules/relayer/module/RelayerAsyncRequest.js +28 -4
  178. package/_cjs/core/modules/relayer/module/RelayerAsyncRequest.js.map +1 -1
  179. package/_cjs/core/modules/relayer/module/fetchFheEncryptionKeySource.js +5 -1
  180. package/_cjs/core/modules/relayer/module/fetchFheEncryptionKeySource.js.map +1 -1
  181. package/_cjs/core/modules/relayer/module/readErrorMessage.js +29 -0
  182. package/_cjs/core/modules/relayer/module/readErrorMessage.js.map +1 -0
  183. package/_cjs/core/runtime/CoreFhevm-p.js +171 -5
  184. package/_cjs/core/runtime/CoreFhevm-p.js.map +1 -1
  185. package/_cjs/core/runtime/HyperWasmSolver-p.js +187 -0
  186. package/_cjs/core/runtime/HyperWasmSolver-p.js.map +1 -0
  187. package/_cjs/core/runtime/ProtocolVersionResolver-p.js +270 -0
  188. package/_cjs/core/runtime/ProtocolVersionResolver-p.js.map +1 -0
  189. package/_cjs/core/runtime/initFhevmDecryptRuntime-p.js +1 -1
  190. package/_cjs/core/runtime/initFhevmDecryptRuntime-p.js.map +1 -1
  191. package/_cjs/core/runtime/initFhevmEncryptRuntime-p.js +1 -1
  192. package/_cjs/core/runtime/initFhevmEncryptRuntime-p.js.map +1 -1
  193. package/_cjs/core/runtime/initFhevmRuntime-p.js +4 -1
  194. package/_cjs/core/runtime/initFhevmRuntime-p.js.map +1 -1
  195. package/_cjs/core/runtime/resolveFhevmVersions-p.js +48 -0
  196. package/_cjs/core/runtime/resolveFhevmVersions-p.js.map +1 -0
  197. package/_cjs/core/runtimeConfig-p.js +10 -0
  198. package/_cjs/core/runtimeConfig-p.js.map +1 -1
  199. package/_cjs/core/types/{zkProofBuilder.js → moduleVersions.js} +1 -1
  200. package/_cjs/core/types/moduleVersions.js.map +1 -0
  201. package/_cjs/core/types/{fhevmUser.js → wasmAssets.js} +1 -1
  202. package/_cjs/core/types/wasmAssets.js.map +1 -0
  203. package/_cjs/core/types/{fhevmDecryptionKey.js → zkProofBuilder-p.js} +1 -1
  204. package/_cjs/core/types/zkProofBuilder-p.js.map +1 -0
  205. package/_cjs/core/utils-p/decrypt/verifyTkmsPublicKey.js +1 -0
  206. package/_cjs/core/utils-p/decrypt/verifyTkmsPublicKey.js.map +1 -1
  207. package/_cjs/ethers/internal/config.js +1 -18
  208. package/_cjs/ethers/internal/config.js.map +1 -1
  209. package/_cjs/viem/internal/config.js +1 -18
  210. package/_cjs/viem/internal/config.js.map +1 -1
  211. package/_cjs/wasm/tfhe/TfheApi.d.ts +12 -12
  212. package/_cjs/wasm/tfhe/loadTfheLib.js +11 -11
  213. package/_cjs/wasm/tfhe/loadTfheLib.js.map +2 -2
  214. package/_cjs/wasm/tfhe/v1.5.3/startWorkers.js +26 -9
  215. package/_cjs/wasm/tfhe/v1.5.3/startWorkers.js.map +2 -2
  216. package/_cjs/wasm/tfhe/v1.5.3/tfhe.d.ts +7 -0
  217. package/_cjs/wasm/tfhe/v1.5.3/tfhe.js +6 -1
  218. package/_cjs/wasm/tfhe/v1.5.3/tfhe.js.map +2 -2
  219. package/_cjs/wasm/tfhe/{v1.6.1 → v1.6.2}/startWorkers.js +28 -11
  220. package/_cjs/wasm/tfhe/v1.6.2/startWorkers.js.map +7 -0
  221. package/_cjs/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe-worker.mjs +40 -40
  222. package/_cjs/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe.d.ts +92 -85
  223. package/_cjs/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe.js +251 -443
  224. package/_cjs/wasm/tfhe/v1.6.2/tfhe.js.map +7 -0
  225. package/_cjs/wasm/tfhe/v1.6.2/tfhe_bg.wasm +0 -0
  226. package/_cjs/wasm/tfhe/v1.6.2/tfhe_bg.wasm.base64.js +35 -0
  227. package/_cjs/wasm/tfhe/v1.6.2/tfhe_bg.wasm.base64.js.map +7 -0
  228. package/_cjs/wasm/tkms/loadKmsLib.js.map +1 -1
  229. package/_cjs/wasm/tkms/v0.13.10/kms_lib.d.ts +4 -0
  230. package/_cjs/wasm/tkms/v0.13.10/kms_lib.js +6 -1
  231. package/_cjs/wasm/tkms/v0.13.10/kms_lib.js.map +2 -2
  232. package/_cjs/wasm/tkms/v0.13.20-0/kms_lib.d.ts +4 -0
  233. package/_cjs/wasm/tkms/v0.13.20-0/kms_lib.js +6 -1
  234. package/_cjs/wasm/tkms/v0.13.20-0/kms_lib.js.map +2 -2
  235. package/_cjs/wasm/wasmBaseUrl.js +12 -7
  236. package/_cjs/wasm/wasmBaseUrl.js.map +2 -2
  237. package/_esm/core/_version.js +1 -1
  238. package/_esm/core/actions/base/canDecryptPublicValue.js +1 -1
  239. package/_esm/core/actions/base/canDecryptPublicValue.js.map +1 -1
  240. package/_esm/core/actions/base/canDecryptPublicValues.js +1 -1
  241. package/_esm/core/actions/base/canDecryptPublicValues.js.map +1 -1
  242. package/_esm/core/actions/base/{fetchKmsSignedcryptedShares.js → fetchKmsSigncryptedShares.js} +4 -4
  243. package/_esm/core/actions/base/fetchKmsSigncryptedShares.js.map +1 -0
  244. package/_esm/core/actions/base/index.js +1 -1
  245. package/_esm/core/actions/base/index.js.map +1 -1
  246. package/_esm/core/actions/base/readKmsSignersContext.js +2 -1
  247. package/_esm/core/actions/base/readKmsSignersContext.js.map +1 -1
  248. package/_esm/core/actions/chain/parseTransportKeyPair.js.map +1 -1
  249. package/_esm/core/actions/decrypt/decryptKmsSigncryptedShares.js +11 -0
  250. package/_esm/core/actions/decrypt/decryptKmsSigncryptedShares.js.map +1 -0
  251. package/_esm/core/actions/decrypt/decryptValue.js +3 -1
  252. package/_esm/core/actions/decrypt/decryptValue.js.map +1 -1
  253. package/_esm/core/actions/decrypt/decryptValues.js +3 -1
  254. package/_esm/core/actions/decrypt/decryptValues.js.map +1 -1
  255. package/_esm/core/actions/decrypt/decryptValuesFromPairs.js +3 -1
  256. package/_esm/core/actions/decrypt/decryptValuesFromPairs.js.map +1 -1
  257. package/_esm/core/actions/decrypt/generateTransportKeyPair.js +3 -1
  258. package/_esm/core/actions/decrypt/generateTransportKeyPair.js.map +1 -1
  259. package/_esm/core/actions/decrypt/index.js +1 -1
  260. package/_esm/core/actions/decrypt/index.js.map +1 -1
  261. package/_esm/core/actions/encrypt/encryptValue.js +3 -1
  262. package/_esm/core/actions/encrypt/encryptValue.js.map +1 -1
  263. package/_esm/core/actions/encrypt/encryptValues.js +3 -1
  264. package/_esm/core/actions/encrypt/encryptValues.js.map +1 -1
  265. package/_esm/core/actions/encrypt/generateZkProof.js +5 -1
  266. package/_esm/core/actions/encrypt/generateZkProof.js.map +1 -1
  267. package/_esm/core/actions/host/readFhevmExecutorContractData.js +8 -8
  268. package/_esm/core/actions/host/readFhevmExecutorContractData.js.map +1 -1
  269. package/_esm/core/actions/host/readInputVerifierContractData.js +2 -2
  270. package/_esm/core/actions/host/readInputVerifierContractData.js.map +1 -1
  271. package/_esm/core/actions/host/readKmsVerifierContractData.js +7 -6
  272. package/_esm/core/actions/host/readKmsVerifierContractData.js.map +1 -1
  273. package/_esm/core/actions/host/resolveFhevmConfig.js +7 -1
  274. package/_esm/core/actions/host/resolveFhevmConfig.js.map +1 -1
  275. package/_esm/core/base/bytes.js +2 -1
  276. package/_esm/core/base/bytes.js.map +1 -1
  277. package/_esm/core/base/environment.js +164 -0
  278. package/_esm/core/base/environment.js.map +1 -0
  279. package/_esm/core/base/errors/Sha256VerificationError.js +11 -0
  280. package/_esm/core/base/errors/Sha256VerificationError.js.map +1 -0
  281. package/_esm/core/base/inflate.js +337 -0
  282. package/_esm/core/base/inflate.js.map +1 -0
  283. package/_esm/core/base/isomorphicFs.js +21 -0
  284. package/_esm/core/base/isomorphicFs.js.map +1 -0
  285. package/_esm/core/base/isomorphicWorker.js +92 -85
  286. package/_esm/core/base/isomorphicWorker.js.map +1 -1
  287. package/_esm/core/base/object.js +28 -0
  288. package/_esm/core/base/object.js.map +1 -1
  289. package/_esm/core/base/semver.js +164 -0
  290. package/_esm/core/base/semver.js.map +1 -0
  291. package/_esm/core/base/uint.js +23 -2
  292. package/_esm/core/base/uint.js.map +1 -1
  293. package/_esm/core/base/wasm.js +25 -31
  294. package/_esm/core/base/wasm.js.map +1 -1
  295. package/_esm/core/chains/definitions/localTestnet.js +3 -0
  296. package/_esm/core/chains/definitions/localTestnet.js.map +1 -1
  297. package/_esm/core/chains/definitions/mainnet.js +1 -0
  298. package/_esm/core/chains/definitions/mainnet.js.map +1 -1
  299. package/_esm/core/chains/definitions/sepolia.js +1 -0
  300. package/_esm/core/chains/definitions/sepolia.js.map +1 -1
  301. package/_esm/core/clients/decorators/base.js +6 -1
  302. package/_esm/core/clients/decorators/base.js.map +1 -1
  303. package/_esm/core/clients/decorators/decrypt-p.js +11 -0
  304. package/_esm/core/clients/decorators/decrypt-p.js.map +1 -0
  305. package/_esm/core/clients/decorators/decrypt.js +3 -7
  306. package/_esm/core/clients/decorators/decrypt.js.map +1 -1
  307. package/_esm/core/clients/decorators/encrypt-p.js +6 -2
  308. package/_esm/core/clients/decorators/encrypt-p.js.map +1 -1
  309. package/_esm/core/clients/decorators/encrypt.js.map +1 -1
  310. package/_esm/core/coprocessor/ZkProof-p.js +4 -2
  311. package/_esm/core/coprocessor/ZkProof-p.js.map +1 -1
  312. package/_esm/core/coprocessor/ZkProofBuilder-p.js +2 -1
  313. package/_esm/core/coprocessor/ZkProofBuilder-p.js.map +1 -1
  314. package/_esm/core/coprocessor/encrypt.js +1 -1
  315. package/_esm/core/coprocessor/encrypt.js.map +1 -1
  316. package/_esm/core/errors/RelayerResponseStatusError.js +7 -2
  317. package/_esm/core/errors/RelayerResponseStatusError.js.map +1 -1
  318. package/_esm/core/host-contracts/HostContractVersion-p.js +34 -3
  319. package/_esm/core/host-contracts/HostContractVersion-p.js.map +1 -1
  320. package/_esm/core/host-contracts/KmsSignersContext-p.js +24 -6
  321. package/_esm/core/host-contracts/KmsSignersContext-p.js.map +1 -1
  322. package/_esm/core/host-contracts/abi-fragments/fragments.js +24 -0
  323. package/_esm/core/host-contracts/abi-fragments/fragments.js.map +1 -1
  324. package/_esm/core/host-contracts/canDecryptValuesFromPairs.js +1 -1
  325. package/_esm/core/host-contracts/canDecryptValuesFromPairs.js.map +1 -1
  326. package/_esm/core/host-contracts/checkAllowedForDecryption.js +2 -2
  327. package/_esm/core/host-contracts/checkAllowedForDecryption.js.map +1 -1
  328. package/_esm/core/host-contracts/checkDelegation.js +8 -8
  329. package/_esm/core/host-contracts/checkDelegation.js.map +1 -1
  330. package/_esm/core/host-contracts/checkPersistAllowed.js +9 -9
  331. package/_esm/core/host-contracts/checkPersistAllowed.js.map +1 -1
  332. package/_esm/core/host-contracts/getAclAddress-p.js +1 -2
  333. package/_esm/core/host-contracts/getAclAddress-p.js.map +1 -1
  334. package/_esm/core/host-contracts/getCurrentKmsContextAndEpoch-p.js +63 -0
  335. package/_esm/core/host-contracts/getCurrentKmsContextAndEpoch-p.js.map +1 -0
  336. package/_esm/core/host-contracts/getCurrentKmsContextId-p.js +6 -7
  337. package/_esm/core/host-contracts/getCurrentKmsContextId-p.js.map +1 -1
  338. package/_esm/core/host-contracts/getFhevmExecutorAddress-p.js +1 -1
  339. package/_esm/core/host-contracts/getFhevmExecutorAddress-p.js.map +1 -1
  340. package/_esm/core/host-contracts/getHandleVersion-p.js +1 -2
  341. package/_esm/core/host-contracts/getHandleVersion-p.js.map +1 -1
  342. package/_esm/core/host-contracts/getHcuLimitAddress-p.js +1 -2
  343. package/_esm/core/host-contracts/getHcuLimitAddress-p.js.map +1 -1
  344. package/_esm/core/host-contracts/getInputVerifierAddress-p.js +1 -2
  345. package/_esm/core/host-contracts/getInputVerifierAddress-p.js.map +1 -1
  346. package/_esm/core/host-contracts/getKmsContextSignersAndThreshold-p.js +6 -8
  347. package/_esm/core/host-contracts/getKmsContextSignersAndThreshold-p.js.map +1 -1
  348. package/_esm/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.js +5 -6
  349. package/_esm/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.js.map +1 -1
  350. package/_esm/core/host-contracts/getSignersForKmsContext-p.js +5 -7
  351. package/_esm/core/host-contracts/getSignersForKmsContext-p.js.map +1 -1
  352. package/_esm/core/host-contracts/isAllowedForDecryption.js +4 -4
  353. package/_esm/core/host-contracts/isAllowedForDecryption.js.map +1 -1
  354. package/_esm/core/host-contracts/isHandleDelegatedForUserDecryption-p.js +5 -5
  355. package/_esm/core/host-contracts/isHandleDelegatedForUserDecryption-p.js.map +1 -1
  356. package/_esm/core/host-contracts/isUserDecryptable.js +2 -2
  357. package/_esm/core/host-contracts/isUserDecryptable.js.map +1 -1
  358. package/_esm/core/host-contracts/persistAllowed.js +4 -4
  359. package/_esm/core/host-contracts/persistAllowed.js.map +1 -1
  360. package/_esm/core/host-contracts/readKmsSignersContext-p.js +89 -29
  361. package/_esm/core/host-contracts/readKmsSignersContext-p.js.map +1 -1
  362. package/_esm/core/key/FheEncryptionKeyWasm-p.js +12 -4
  363. package/_esm/core/key/FheEncryptionKeyWasm-p.js.map +1 -1
  364. package/_esm/core/key/deserializeFheEncryptionKey.js +3 -0
  365. package/_esm/core/key/deserializeFheEncryptionKey.js.map +1 -1
  366. package/_esm/core/key/fetchFheEncryptionKey.js +1 -1
  367. package/_esm/core/key/fetchFheEncryptionKey.js.map +1 -1
  368. package/_esm/core/key/fetchFheEncryptionKeyBytes.js.map +1 -1
  369. package/_esm/core/key/serializeFheEncryptionKey.js +4 -1
  370. package/_esm/core/key/serializeFheEncryptionKey.js.map +1 -1
  371. package/_esm/core/kms/KmsSigncryptedShares-p.js +9 -1
  372. package/_esm/core/kms/KmsSigncryptedShares-p.js.map +1 -1
  373. package/_esm/core/kms/SignedDecryptionPermit-p.js +5 -1
  374. package/_esm/core/kms/SignedDecryptionPermit-p.js.map +1 -1
  375. package/_esm/core/kms/TransportKeyPair-p.js +28 -7
  376. package/_esm/core/kms/TransportKeyPair-p.js.map +1 -1
  377. package/_esm/core/kms/createKmsUserDecryptEip712.js +8 -0
  378. package/_esm/core/kms/createKmsUserDecryptEip712.js.map +1 -1
  379. package/_esm/core/kms/createKmsUserDecryptEip712V2.js +98 -0
  380. package/_esm/core/kms/createKmsUserDecryptEip712V2.js.map +1 -0
  381. package/_esm/core/kms/{decryptKmsSignedcryptedShares-p.js → decryptKmsSigncryptedShares-p.js} +9 -2
  382. package/_esm/core/kms/decryptKmsSigncryptedShares-p.js.map +1 -0
  383. package/_esm/core/kms/decryptValuesFromPairs.js +4 -4
  384. package/_esm/core/kms/decryptValuesFromPairs.js.map +1 -1
  385. package/_esm/core/kms/{fetchKmsSignedcryptedShares-p.js → fetchKmsSigncryptedShares-p.js} +12 -6
  386. package/_esm/core/kms/fetchKmsSigncryptedShares-p.js.map +1 -0
  387. package/_esm/core/kms/kmsExtraData.js +70 -12
  388. package/_esm/core/kms/kmsExtraData.js.map +1 -1
  389. package/_esm/core/kms/kmsUserDecryptEip712V2Types.js +28 -0
  390. package/_esm/core/kms/kmsUserDecryptEip712V2Types.js.map +1 -0
  391. package/_esm/core/kms/publicDecrypt.js +5 -3
  392. package/_esm/core/kms/publicDecrypt.js.map +1 -1
  393. package/_esm/core/modules/decrypt/mock.js +0 -24
  394. package/_esm/core/modules/decrypt/mock.js.map +1 -1
  395. package/_esm/core/modules/decrypt/module/api-p.js +51 -23
  396. package/_esm/core/modules/decrypt/module/api-p.js.map +1 -1
  397. package/_esm/core/modules/decrypt/module/index.js +31 -25
  398. package/_esm/core/modules/decrypt/module/index.js.map +1 -1
  399. package/_esm/core/modules/decrypt/module/init-p.js +141 -64
  400. package/_esm/core/modules/decrypt/module/init-p.js.map +1 -1
  401. package/_esm/core/modules/encrypt/mock.js +26 -9
  402. package/_esm/core/modules/encrypt/mock.js.map +1 -1
  403. package/_esm/core/modules/encrypt/module/api-p.js +50 -21
  404. package/_esm/core/modules/encrypt/module/api-p.js.map +1 -1
  405. package/_esm/core/modules/encrypt/module/index.js +3 -3
  406. package/_esm/core/modules/encrypt/module/index.js.map +1 -1
  407. package/_esm/core/modules/encrypt/module/init-p.js +369 -82
  408. package/_esm/core/modules/encrypt/module/init-p.js.map +1 -1
  409. package/_esm/core/modules/relayer/cleartext/fetchDelegatedUserDecrypt.js +2 -2
  410. package/_esm/core/modules/relayer/cleartext/fetchDelegatedUserDecrypt.js.map +1 -1
  411. package/_esm/core/modules/relayer/cleartext/fetchUserDecrypt.js +2 -2
  412. package/_esm/core/modules/relayer/cleartext/fetchUserDecrypt.js.map +1 -1
  413. package/_esm/core/modules/relayer/module/RelayerAsyncRequest.js +57 -4
  414. package/_esm/core/modules/relayer/module/RelayerAsyncRequest.js.map +1 -1
  415. package/_esm/core/modules/relayer/module/fetchFheEncryptionKeySource.js +8 -1
  416. package/_esm/core/modules/relayer/module/fetchFheEncryptionKeySource.js.map +1 -1
  417. package/_esm/core/modules/relayer/module/readErrorMessage.js +52 -0
  418. package/_esm/core/modules/relayer/module/readErrorMessage.js.map +1 -0
  419. package/_esm/core/runtime/CoreFhevm-p.js +167 -5
  420. package/_esm/core/runtime/CoreFhevm-p.js.map +1 -1
  421. package/_esm/core/runtime/HyperWasmSolver-p.js +268 -0
  422. package/_esm/core/runtime/HyperWasmSolver-p.js.map +1 -0
  423. package/_esm/core/runtime/ProtocolVersionResolver-p.js +326 -0
  424. package/_esm/core/runtime/ProtocolVersionResolver-p.js.map +1 -0
  425. package/_esm/core/runtime/initFhevmDecryptRuntime-p.js +1 -1
  426. package/_esm/core/runtime/initFhevmDecryptRuntime-p.js.map +1 -1
  427. package/_esm/core/runtime/initFhevmEncryptRuntime-p.js +1 -1
  428. package/_esm/core/runtime/initFhevmEncryptRuntime-p.js.map +1 -1
  429. package/_esm/core/runtime/initFhevmRuntime-p.js +4 -1
  430. package/_esm/core/runtime/initFhevmRuntime-p.js.map +1 -1
  431. package/_esm/core/runtime/resolveFhevmVersions-p.js +62 -0
  432. package/_esm/core/runtime/resolveFhevmVersions-p.js.map +1 -0
  433. package/_esm/core/runtimeConfig-p.js +9 -0
  434. package/_esm/core/runtimeConfig-p.js.map +1 -1
  435. package/_esm/core/types/moduleVersions.js +2 -0
  436. package/_esm/core/types/moduleVersions.js.map +1 -0
  437. package/_esm/core/types/wasmAssets.js +2 -0
  438. package/_esm/core/types/wasmAssets.js.map +1 -0
  439. package/_esm/core/types/zkProofBuilder-p.js +2 -0
  440. package/_esm/core/types/zkProofBuilder-p.js.map +1 -0
  441. package/_esm/core/utils-p/decrypt/verifyTkmsPublicKey.js +1 -0
  442. package/_esm/core/utils-p/decrypt/verifyTkmsPublicKey.js.map +1 -1
  443. package/_esm/ethers/internal/config.js +1 -18
  444. package/_esm/ethers/internal/config.js.map +1 -1
  445. package/_esm/viem/internal/config.js +1 -18
  446. package/_esm/viem/internal/config.js.map +1 -1
  447. package/_esm/wasm/tfhe/TfheApi.d.ts +12 -12
  448. package/_esm/wasm/tfhe/loadTfheLib.js +11 -11
  449. package/_esm/wasm/tfhe/v1.5.3/startWorkers.js +41 -20
  450. package/_esm/wasm/tfhe/v1.5.3/tfhe.d.ts +7 -0
  451. package/_esm/wasm/tfhe/v1.5.3/tfhe.js +8 -0
  452. package/_esm/wasm/tfhe/{v1.6.1 → v1.6.2}/startWorkers.js +46 -25
  453. package/_esm/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe-worker.mjs +40 -40
  454. package/_esm/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe.d.ts +92 -85
  455. package/_esm/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe.js +253 -442
  456. package/_esm/wasm/tfhe/v1.6.2/tfhe_bg.wasm +0 -0
  457. package/_esm/wasm/tfhe/v1.6.2/tfhe_bg.wasm.base64.js +7 -0
  458. package/_esm/wasm/tkms/v0.13.10/kms_lib.d.ts +4 -0
  459. package/_esm/wasm/tkms/v0.13.10/kms_lib.js +8 -0
  460. package/_esm/wasm/tkms/v0.13.20-0/kms_lib.d.ts +4 -0
  461. package/_esm/wasm/tkms/v0.13.20-0/kms_lib.js +8 -0
  462. package/_esm/wasm/wasmBaseUrl.js +32 -4
  463. package/_types/core/actions/base/{fetchKmsSignedcryptedShares.d.ts → fetchKmsSigncryptedShares.d.ts} +7 -7
  464. package/_types/core/actions/base/fetchKmsSigncryptedShares.d.ts.map +1 -0
  465. package/_types/core/actions/base/index.d.ts +1 -1
  466. package/_types/core/actions/base/index.d.ts.map +1 -1
  467. package/_types/core/actions/base/readKmsSignersContext.d.ts.map +1 -1
  468. package/_types/core/actions/chain/parseSignedDecryptionPermit.d.ts +2 -2
  469. package/_types/core/actions/chain/parseSignedDecryptionPermit.d.ts.map +1 -1
  470. package/_types/core/actions/chain/parseTransportKeyPair.d.ts +1 -1
  471. package/_types/core/actions/chain/parseTransportKeyPair.d.ts.map +1 -1
  472. package/_types/core/actions/decrypt/{decryptKmsSignedcryptedShares.d.ts → decryptKmsSigncryptedShares.d.ts} +4 -4
  473. package/_types/core/actions/decrypt/decryptKmsSigncryptedShares.d.ts.map +1 -0
  474. package/_types/core/actions/decrypt/decryptValue.d.ts.map +1 -1
  475. package/_types/core/actions/decrypt/decryptValues.d.ts.map +1 -1
  476. package/_types/core/actions/decrypt/decryptValuesFromPairs.d.ts.map +1 -1
  477. package/_types/core/actions/decrypt/generateTransportKeyPair.d.ts +2 -2
  478. package/_types/core/actions/decrypt/generateTransportKeyPair.d.ts.map +1 -1
  479. package/_types/core/actions/decrypt/index.d.ts +1 -1
  480. package/_types/core/actions/decrypt/index.d.ts.map +1 -1
  481. package/_types/core/actions/encrypt/encryptValue.d.ts.map +1 -1
  482. package/_types/core/actions/encrypt/encryptValues.d.ts.map +1 -1
  483. package/_types/core/actions/encrypt/generateZkProof.d.ts.map +1 -1
  484. package/_types/core/actions/host/readKmsVerifierContractData.d.ts +1 -0
  485. package/_types/core/actions/host/readKmsVerifierContractData.d.ts.map +1 -1
  486. package/_types/core/actions/host/resolveFhevmConfig.d.ts +2 -0
  487. package/_types/core/actions/host/resolveFhevmConfig.d.ts.map +1 -1
  488. package/_types/core/base/bytes.d.ts.map +1 -1
  489. package/_types/core/base/environment.d.ts +92 -0
  490. package/_types/core/base/environment.d.ts.map +1 -0
  491. package/_types/core/base/errors/Sha256VerificationError.d.ts +14 -0
  492. package/_types/core/base/errors/Sha256VerificationError.d.ts.map +1 -0
  493. package/_types/core/base/inflate.d.ts +25 -0
  494. package/_types/core/base/inflate.d.ts.map +1 -0
  495. package/_types/core/base/isomorphicFs.d.ts +2 -0
  496. package/_types/core/base/isomorphicFs.d.ts.map +1 -0
  497. package/_types/core/base/isomorphicWorker.d.ts +27 -43
  498. package/_types/core/base/isomorphicWorker.d.ts.map +1 -1
  499. package/_types/core/base/object.d.ts +7 -0
  500. package/_types/core/base/object.d.ts.map +1 -1
  501. package/_types/core/base/semver.d.ts +39 -0
  502. package/_types/core/base/semver.d.ts.map +1 -0
  503. package/_types/core/base/uint.d.ts +13 -2
  504. package/_types/core/base/uint.d.ts.map +1 -1
  505. package/_types/core/base/wasm.d.ts +0 -8
  506. package/_types/core/base/wasm.d.ts.map +1 -1
  507. package/_types/core/chains/definitions/localTestnet.d.ts +3 -0
  508. package/_types/core/chains/definitions/localTestnet.d.ts.map +1 -1
  509. package/_types/core/chains/definitions/mainnet.d.ts +1 -0
  510. package/_types/core/chains/definitions/mainnet.d.ts.map +1 -1
  511. package/_types/core/chains/definitions/sepolia.d.ts.map +1 -1
  512. package/_types/core/clients/decorators/base.d.ts.map +1 -1
  513. package/_types/core/clients/decorators/decrypt-p.d.ts +4 -0
  514. package/_types/core/clients/decorators/decrypt-p.d.ts.map +1 -0
  515. package/_types/core/clients/decorators/decrypt.d.ts +4 -2
  516. package/_types/core/clients/decorators/decrypt.d.ts.map +1 -1
  517. package/_types/core/clients/decorators/encrypt-p.d.ts +2 -3
  518. package/_types/core/clients/decorators/encrypt-p.d.ts.map +1 -1
  519. package/_types/core/clients/decorators/encrypt.d.ts +4 -2
  520. package/_types/core/clients/decorators/encrypt.d.ts.map +1 -1
  521. package/_types/core/coprocessor/ZkProof-p.d.ts +9 -2
  522. package/_types/core/coprocessor/ZkProof-p.d.ts.map +1 -1
  523. package/_types/core/coprocessor/ZkProofBuilder-p.d.ts +3 -1
  524. package/_types/core/coprocessor/ZkProofBuilder-p.d.ts.map +1 -1
  525. package/_types/core/coprocessor/encrypt.d.ts +2 -0
  526. package/_types/core/coprocessor/encrypt.d.ts.map +1 -1
  527. package/_types/core/errors/RelayerResponseStatusError.d.ts +7 -1
  528. package/_types/core/errors/RelayerResponseStatusError.d.ts.map +1 -1
  529. package/_types/core/host-contracts/HostContractVersion-p.d.ts +18 -1
  530. package/_types/core/host-contracts/HostContractVersion-p.d.ts.map +1 -1
  531. package/_types/core/host-contracts/KmsSignersContext-p.d.ts +2 -1
  532. package/_types/core/host-contracts/KmsSignersContext-p.d.ts.map +1 -1
  533. package/_types/core/host-contracts/abi-fragments/fragments.d.ts +5 -0
  534. package/_types/core/host-contracts/abi-fragments/fragments.d.ts.map +1 -1
  535. package/_types/core/host-contracts/checkAllowedForDecryption.d.ts +1 -1
  536. package/_types/core/host-contracts/checkAllowedForDecryption.d.ts.map +1 -1
  537. package/_types/core/host-contracts/checkDelegation.d.ts +1 -1
  538. package/_types/core/host-contracts/checkDelegation.d.ts.map +1 -1
  539. package/_types/core/host-contracts/checkPersistAllowed.d.ts +1 -1
  540. package/_types/core/host-contracts/checkPersistAllowed.d.ts.map +1 -1
  541. package/_types/core/host-contracts/getAclAddress-p.d.ts +1 -1
  542. package/_types/core/host-contracts/getAclAddress-p.d.ts.map +1 -1
  543. package/_types/core/host-contracts/getCurrentKmsContextAndEpoch-p.d.ts +30 -0
  544. package/_types/core/host-contracts/getCurrentKmsContextAndEpoch-p.d.ts.map +1 -0
  545. package/_types/core/host-contracts/getCurrentKmsContextId-p.d.ts +1 -1
  546. package/_types/core/host-contracts/getCurrentKmsContextId-p.d.ts.map +1 -1
  547. package/_types/core/host-contracts/getFhevmExecutorAddress-p.d.ts +1 -1
  548. package/_types/core/host-contracts/getFhevmExecutorAddress-p.d.ts.map +1 -1
  549. package/_types/core/host-contracts/getHandleVersion-p.d.ts +1 -1
  550. package/_types/core/host-contracts/getHandleVersion-p.d.ts.map +1 -1
  551. package/_types/core/host-contracts/getHcuLimitAddress-p.d.ts +1 -1
  552. package/_types/core/host-contracts/getHcuLimitAddress-p.d.ts.map +1 -1
  553. package/_types/core/host-contracts/getInputVerifierAddress-p.d.ts +1 -1
  554. package/_types/core/host-contracts/getInputVerifierAddress-p.d.ts.map +1 -1
  555. package/_types/core/host-contracts/getKmsContextSignersAndThreshold-p.d.ts +1 -1
  556. package/_types/core/host-contracts/getKmsContextSignersAndThreshold-p.d.ts.map +1 -1
  557. package/_types/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.d.ts +1 -1
  558. package/_types/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.d.ts.map +1 -1
  559. package/_types/core/host-contracts/getSignersForKmsContext-p.d.ts +2 -2
  560. package/_types/core/host-contracts/getSignersForKmsContext-p.d.ts.map +1 -1
  561. package/_types/core/host-contracts/isAllowedForDecryption.d.ts +1 -1
  562. package/_types/core/host-contracts/isAllowedForDecryption.d.ts.map +1 -1
  563. package/_types/core/host-contracts/isHandleDelegatedForUserDecryption-p.d.ts +1 -1
  564. package/_types/core/host-contracts/isHandleDelegatedForUserDecryption-p.d.ts.map +1 -1
  565. package/_types/core/host-contracts/isUserDecryptable.d.ts +1 -1
  566. package/_types/core/host-contracts/isUserDecryptable.d.ts.map +1 -1
  567. package/_types/core/host-contracts/persistAllowed.d.ts +1 -1
  568. package/_types/core/host-contracts/persistAllowed.d.ts.map +1 -1
  569. package/_types/core/host-contracts/readKmsSignersContext-p.d.ts +25 -7
  570. package/_types/core/host-contracts/readKmsSignersContext-p.d.ts.map +1 -1
  571. package/_types/core/key/FheEncryptionKeyWasm-p.d.ts +3 -1
  572. package/_types/core/key/FheEncryptionKeyWasm-p.d.ts.map +1 -1
  573. package/_types/core/key/deserializeFheEncryptionKey.d.ts +2 -0
  574. package/_types/core/key/deserializeFheEncryptionKey.d.ts.map +1 -1
  575. package/_types/core/key/fetchFheEncryptionKey.d.ts +3 -1
  576. package/_types/core/key/fetchFheEncryptionKey.d.ts.map +1 -1
  577. package/_types/core/key/fetchFheEncryptionKeyBytes.d.ts.map +1 -1
  578. package/_types/core/key/serializeFheEncryptionKey.d.ts.map +1 -1
  579. package/_types/core/kms/KmsSigncryptedShares-p.d.ts.map +1 -1
  580. package/_types/core/kms/SignedDecryptionPermit-p.d.ts.map +1 -1
  581. package/_types/core/kms/TransportKeyPair-p.d.ts +9 -0
  582. package/_types/core/kms/TransportKeyPair-p.d.ts.map +1 -1
  583. package/_types/core/kms/createKmsUserDecryptEip712.d.ts.map +1 -1
  584. package/_types/core/kms/createKmsUserDecryptEip712V2.d.ts +15 -0
  585. package/_types/core/kms/createKmsUserDecryptEip712V2.d.ts.map +1 -0
  586. package/_types/core/kms/{decryptKmsSignedcryptedShares-p.d.ts → decryptKmsSigncryptedShares-p.d.ts} +4 -2
  587. package/_types/core/kms/decryptKmsSigncryptedShares-p.d.ts.map +1 -0
  588. package/_types/core/kms/decryptValuesFromPairs.d.ts +2 -0
  589. package/_types/core/kms/decryptValuesFromPairs.d.ts.map +1 -1
  590. package/_types/core/kms/{fetchKmsSignedcryptedShares-p.d.ts → fetchKmsSigncryptedShares-p.d.ts} +2 -2
  591. package/_types/core/kms/fetchKmsSigncryptedShares-p.d.ts.map +1 -0
  592. package/_types/core/kms/kmsExtraData.d.ts +9 -2
  593. package/_types/core/kms/kmsExtraData.d.ts.map +1 -1
  594. package/_types/core/kms/kmsUserDecryptEip712V2Types.d.ts +3 -0
  595. package/_types/core/kms/kmsUserDecryptEip712V2Types.d.ts.map +1 -0
  596. package/_types/core/kms/publicDecrypt.d.ts.map +1 -1
  597. package/_types/core/modules/decrypt/mock.d.ts +1 -2
  598. package/_types/core/modules/decrypt/mock.d.ts.map +1 -1
  599. package/_types/core/modules/decrypt/module/api-p.d.ts +2 -2
  600. package/_types/core/modules/decrypt/module/api-p.d.ts.map +1 -1
  601. package/_types/core/modules/decrypt/module/index.d.ts +1 -2
  602. package/_types/core/modules/decrypt/module/index.d.ts.map +1 -1
  603. package/_types/core/modules/decrypt/module/init-p.d.ts +3 -3
  604. package/_types/core/modules/decrypt/module/init-p.d.ts.map +1 -1
  605. package/_types/core/modules/decrypt/types.d.ts +33 -34
  606. package/_types/core/modules/decrypt/types.d.ts.map +1 -1
  607. package/_types/core/modules/encrypt/mock.d.ts.map +1 -1
  608. package/_types/core/modules/encrypt/module/api-p.d.ts.map +1 -1
  609. package/_types/core/modules/encrypt/module/index.d.ts.map +1 -1
  610. package/_types/core/modules/encrypt/module/init-p.d.ts +11 -4
  611. package/_types/core/modules/encrypt/module/init-p.d.ts.map +1 -1
  612. package/_types/core/modules/encrypt/types.d.ts +31 -2
  613. package/_types/core/modules/encrypt/types.d.ts.map +1 -1
  614. package/_types/core/modules/relayer/module/RelayerAsyncRequest.d.ts +18 -0
  615. package/_types/core/modules/relayer/module/RelayerAsyncRequest.d.ts.map +1 -1
  616. package/_types/core/modules/relayer/module/fetchFheEncryptionKeySource.d.ts.map +1 -1
  617. package/_types/core/modules/relayer/module/readErrorMessage.d.ts +26 -0
  618. package/_types/core/modules/relayer/module/readErrorMessage.d.ts.map +1 -0
  619. package/_types/core/runtime/CoreFhevm-p.d.ts +15 -4
  620. package/_types/core/runtime/CoreFhevm-p.d.ts.map +1 -1
  621. package/_types/core/runtime/HyperWasmSolver-p.d.ts +71 -0
  622. package/_types/core/runtime/HyperWasmSolver-p.d.ts.map +1 -0
  623. package/_types/core/runtime/ProtocolVersionResolver-p.d.ts +29 -0
  624. package/_types/core/runtime/ProtocolVersionResolver-p.d.ts.map +1 -0
  625. package/_types/core/runtime/initFhevmRuntime-p.d.ts.map +1 -1
  626. package/_types/core/runtime/resolveFhevmVersions-p.d.ts +21 -0
  627. package/_types/core/runtime/resolveFhevmVersions-p.d.ts.map +1 -0
  628. package/_types/core/runtimeConfig-p.d.ts +3 -2
  629. package/_types/core/runtimeConfig-p.d.ts.map +1 -1
  630. package/_types/core/types/auth.d.ts +12 -1
  631. package/_types/core/types/auth.d.ts.map +1 -1
  632. package/_types/core/types/coreFhevmClient.d.ts +72 -2
  633. package/_types/core/types/coreFhevmClient.d.ts.map +1 -1
  634. package/_types/core/types/coreFhevmRuntime.d.ts +3 -9
  635. package/_types/core/types/coreFhevmRuntime.d.ts.map +1 -1
  636. package/_types/core/types/fheEncryptionKey.d.ts +2 -0
  637. package/_types/core/types/fheEncryptionKey.d.ts.map +1 -1
  638. package/_types/core/types/fhevmChain.d.ts +3 -0
  639. package/_types/core/types/fhevmChain.d.ts.map +1 -1
  640. package/_types/core/types/hostContract.d.ts +1 -0
  641. package/_types/core/types/hostContract.d.ts.map +1 -1
  642. package/_types/core/types/index.d.ts +1 -1
  643. package/_types/core/types/index.d.ts.map +1 -1
  644. package/_types/core/types/kms-p.d.ts +2 -0
  645. package/_types/core/types/kms-p.d.ts.map +1 -1
  646. package/_types/core/types/kms.d.ts +71 -21
  647. package/_types/core/types/kms.d.ts.map +1 -1
  648. package/_types/core/types/kmsSignersContext.d.ts +8 -0
  649. package/_types/core/types/kmsSignersContext.d.ts.map +1 -1
  650. package/_types/core/types/logger.d.ts +1 -0
  651. package/_types/core/types/logger.d.ts.map +1 -1
  652. package/_types/core/types/moduleVersions.d.ts +25 -0
  653. package/_types/core/types/moduleVersions.d.ts.map +1 -0
  654. package/_types/core/types/tkms-p.d.ts +2 -0
  655. package/_types/core/types/tkms-p.d.ts.map +1 -1
  656. package/_types/core/types/wasmAssets.d.ts +2 -0
  657. package/_types/core/types/wasmAssets.d.ts.map +1 -0
  658. package/_types/core/types/{zkProofBuilder.d.ts → zkProofBuilder-p.d.ts} +8 -3
  659. package/_types/core/types/zkProofBuilder-p.d.ts.map +1 -0
  660. package/_types/core/utils-p/decrypt/verifyTkmsPublicKey.d.ts +2 -0
  661. package/_types/core/utils-p/decrypt/verifyTkmsPublicKey.d.ts.map +1 -1
  662. package/_types/ethers/cleartext/createFhevmCleartextDecryptClient.d.ts +2 -2
  663. package/_types/ethers/cleartext/createFhevmCleartextDecryptClient.d.ts.map +1 -1
  664. package/_types/ethers/cleartext/createFhevmCleartextEncryptClient.d.ts +2 -2
  665. package/_types/ethers/cleartext/createFhevmCleartextEncryptClient.d.ts.map +1 -1
  666. package/_types/ethers/clients/createFhevmDecryptClient.d.ts +2 -2
  667. package/_types/ethers/clients/createFhevmDecryptClient.d.ts.map +1 -1
  668. package/_types/ethers/clients/createFhevmEncryptClient.d.ts +2 -2
  669. package/_types/ethers/clients/createFhevmEncryptClient.d.ts.map +1 -1
  670. package/_types/viem/cleartext/createFhevmCleartextDecryptClient.d.ts +2 -2
  671. package/_types/viem/cleartext/createFhevmCleartextDecryptClient.d.ts.map +1 -1
  672. package/_types/viem/cleartext/createFhevmCleartextEncryptClient.d.ts +2 -2
  673. package/_types/viem/cleartext/createFhevmCleartextEncryptClient.d.ts.map +1 -1
  674. package/_types/viem/clients/createFhevmDecryptClient.d.ts +2 -2
  675. package/_types/viem/clients/createFhevmDecryptClient.d.ts.map +1 -1
  676. package/_types/viem/clients/createFhevmEncryptClient.d.ts +2 -2
  677. package/_types/viem/clients/createFhevmEncryptClient.d.ts.map +1 -1
  678. package/_types/wasm/tfhe/TfheApi.d.ts +12 -12
  679. package/_types/wasm/tfhe/v1.5.3/tfhe.d.ts +7 -0
  680. package/_types/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe.d.ts +92 -85
  681. package/_types/wasm/tfheModuleVersion-p.d.ts +1 -1
  682. package/_types/wasm/tfheModuleVersion-p.d.ts.map +1 -1
  683. package/_types/wasm/tkms/v0.13.10/kms_lib.d.ts +4 -0
  684. package/_types/wasm/tkms/v0.13.20-0/kms_lib.d.ts +4 -0
  685. package/_types/wasm/tkmsModuleVersion-p.d.ts +1 -1
  686. package/_types/wasm/tkmsModuleVersion-p.d.ts.map +1 -1
  687. package/core/_version.ts +1 -1
  688. package/core/actions/base/canDecryptPublicValue.ts +1 -1
  689. package/core/actions/base/canDecryptPublicValues.ts +1 -1
  690. package/core/actions/base/{fetchKmsSignedcryptedShares.ts → fetchKmsSigncryptedShares.ts} +16 -16
  691. package/core/actions/base/index.ts +5 -5
  692. package/core/actions/base/readKmsSignersContext.ts +2 -1
  693. package/core/actions/chain/parseSignedDecryptionPermit.ts +2 -2
  694. package/core/actions/chain/parseTransportKeyPair.ts +2 -1
  695. package/core/actions/decrypt/{decryptKmsSignedcryptedShares.ts → decryptKmsSigncryptedShares.ts} +12 -9
  696. package/core/actions/decrypt/decryptValue.ts +4 -1
  697. package/core/actions/decrypt/decryptValues.ts +4 -1
  698. package/core/actions/decrypt/decryptValuesFromPairs.ts +4 -1
  699. package/core/actions/decrypt/generateTransportKeyPair.ts +5 -3
  700. package/core/actions/decrypt/index.ts +4 -4
  701. package/core/actions/encrypt/encryptValue.ts +4 -1
  702. package/core/actions/encrypt/encryptValues.ts +4 -1
  703. package/core/actions/encrypt/generateZkProof.ts +9 -1
  704. package/core/actions/host/readFhevmExecutorContractData.ts +8 -8
  705. package/core/actions/host/readInputVerifierContractData.ts +2 -2
  706. package/core/actions/host/readKmsVerifierContractData.ts +8 -6
  707. package/core/actions/host/resolveFhevmConfig.ts +10 -1
  708. package/core/base/bytes.ts +2 -1
  709. package/core/base/environment.ts +210 -0
  710. package/core/base/errors/Sha256VerificationError.ts +22 -0
  711. package/core/base/inflate.ts +373 -0
  712. package/core/base/isomorphicFs.ts +23 -0
  713. package/core/base/isomorphicWorker.ts +96 -123
  714. package/core/base/object.ts +38 -0
  715. package/core/base/semver.ts +231 -0
  716. package/core/base/uint.ts +33 -4
  717. package/core/base/wasm.ts +28 -35
  718. package/core/chains/definitions/localTestnet.ts +3 -0
  719. package/core/chains/definitions/mainnet.ts +1 -0
  720. package/core/chains/definitions/sepolia.ts +6 -6
  721. package/core/clients/decorators/base.ts +8 -1
  722. package/core/clients/decorators/decrypt-p.ts +18 -0
  723. package/core/clients/decorators/decrypt.ts +10 -15
  724. package/core/clients/decorators/encrypt-p.ts +12 -7
  725. package/core/clients/decorators/encrypt.ts +6 -4
  726. package/core/coprocessor/ZkProof-p.ts +17 -5
  727. package/core/coprocessor/ZkProofBuilder-p.ts +5 -2
  728. package/core/coprocessor/encrypt.ts +6 -1
  729. package/core/errors/RelayerResponseStatusError.ts +14 -2
  730. package/core/host-contracts/HostContractVersion-p.ts +60 -3
  731. package/core/host-contracts/KmsSignersContext-p.ts +36 -5
  732. package/core/host-contracts/abi-fragments/fragments.ts +28 -0
  733. package/core/host-contracts/canDecryptValuesFromPairs.ts +1 -1
  734. package/core/host-contracts/checkAllowedForDecryption.ts +3 -3
  735. package/core/host-contracts/checkDelegation.ts +9 -9
  736. package/core/host-contracts/checkPersistAllowed.ts +10 -10
  737. package/core/host-contracts/getAclAddress-p.ts +2 -3
  738. package/core/host-contracts/getCurrentKmsContextAndEpoch-p.ts +92 -0
  739. package/core/host-contracts/getCurrentKmsContextId-p.ts +8 -8
  740. package/core/host-contracts/getFhevmExecutorAddress-p.ts +2 -2
  741. package/core/host-contracts/getHandleVersion-p.ts +2 -3
  742. package/core/host-contracts/getHcuLimitAddress-p.ts +2 -3
  743. package/core/host-contracts/getInputVerifierAddress-p.ts +2 -3
  744. package/core/host-contracts/getKmsContextSignersAndThreshold-p.ts +7 -9
  745. package/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.ts +6 -7
  746. package/core/host-contracts/getSignersForKmsContext-p.ts +6 -8
  747. package/core/host-contracts/isAllowedForDecryption.ts +6 -6
  748. package/core/host-contracts/isHandleDelegatedForUserDecryption-p.ts +7 -7
  749. package/core/host-contracts/isUserDecryptable.ts +3 -3
  750. package/core/host-contracts/persistAllowed.ts +6 -6
  751. package/core/host-contracts/readKmsSignersContext-p.ts +131 -41
  752. package/core/key/FheEncryptionKeyWasm-p.ts +24 -3
  753. package/core/key/deserializeFheEncryptionKey.ts +8 -1
  754. package/core/key/fetchFheEncryptionKey.ts +8 -4
  755. package/core/key/fetchFheEncryptionKeyBytes.ts +4 -2
  756. package/core/key/serializeFheEncryptionKey.ts +8 -2
  757. package/core/kms/KmsSigncryptedShares-p.ts +11 -1
  758. package/core/kms/SignedDecryptionPermit-p.ts +6 -1
  759. package/core/kms/TransportKeyPair-p.ts +52 -11
  760. package/core/kms/createKmsUserDecryptEip712.ts +11 -0
  761. package/core/kms/createKmsUserDecryptEip712V2.ts +159 -0
  762. package/core/kms/{decryptKmsSignedcryptedShares-p.ts → decryptKmsSigncryptedShares-p.ts} +12 -2
  763. package/core/kms/decryptValuesFromPairs.ts +6 -4
  764. package/core/kms/{fetchKmsSignedcryptedShares-p.ts → fetchKmsSigncryptedShares-p.ts} +12 -5
  765. package/core/kms/kmsExtraData.ts +82 -13
  766. package/core/kms/kmsUserDecryptEip712V2Types.ts +31 -0
  767. package/core/kms/publicDecrypt.ts +5 -3
  768. package/core/modules/decrypt/mock.ts +0 -35
  769. package/core/modules/decrypt/module/api-p.ts +88 -17
  770. package/core/modules/decrypt/module/index.ts +37 -34
  771. package/core/modules/decrypt/module/init-p.ts +194 -73
  772. package/core/modules/decrypt/types.ts +37 -65
  773. package/core/modules/encrypt/mock.ts +34 -4
  774. package/core/modules/encrypt/module/api-p.ts +66 -15
  775. package/core/modules/encrypt/module/index.ts +5 -3
  776. package/core/modules/encrypt/module/init-p.ts +465 -101
  777. package/core/modules/encrypt/types.ts +34 -2
  778. package/core/modules/relayer/cleartext/fetchDelegatedUserDecrypt.ts +2 -2
  779. package/core/modules/relayer/cleartext/fetchUserDecrypt.ts +2 -2
  780. package/core/modules/relayer/module/RelayerAsyncRequest.ts +60 -4
  781. package/core/modules/relayer/module/fetchFheEncryptionKeySource.ts +9 -1
  782. package/core/modules/relayer/module/readErrorMessage.ts +56 -0
  783. package/core/runtime/CoreFhevm-p.ts +247 -22
  784. package/core/runtime/HyperWasmSolver-p.ts +417 -0
  785. package/core/runtime/ProtocolVersionResolver-p.ts +463 -0
  786. package/core/runtime/initFhevmDecryptRuntime-p.ts +1 -1
  787. package/core/runtime/initFhevmEncryptRuntime-p.ts +1 -1
  788. package/core/runtime/initFhevmRuntime-p.ts +4 -1
  789. package/core/runtime/resolveFhevmVersions-p.ts +85 -0
  790. package/core/runtimeConfig-p.ts +17 -2
  791. package/core/types/auth.ts +12 -1
  792. package/core/types/coreFhevmClient.ts +89 -4
  793. package/core/types/coreFhevmRuntime.ts +3 -18
  794. package/core/types/fheEncryptionKey.ts +2 -0
  795. package/core/types/fhevmChain.ts +3 -0
  796. package/core/types/hostContract.ts +1 -0
  797. package/core/types/index.ts +1 -1
  798. package/core/types/kms-p.ts +2 -0
  799. package/core/types/kms.ts +48 -18
  800. package/core/types/kmsSignersContext.ts +8 -0
  801. package/core/types/logger.ts +1 -0
  802. package/core/types/moduleVersions.ts +35 -0
  803. package/core/types/tkms-p.ts +3 -0
  804. package/core/types/wasmAssets.ts +64 -0
  805. package/core/types/{zkProofBuilder.ts → zkProofBuilder-p.ts} +3 -2
  806. package/core/utils-p/decrypt/verifyTkmsPublicKey.ts +3 -1
  807. package/ethers/cleartext/createFhevmCleartextDecryptClient.ts +2 -2
  808. package/ethers/cleartext/createFhevmCleartextEncryptClient.ts +2 -2
  809. package/ethers/clients/createFhevmDecryptClient.ts +2 -2
  810. package/ethers/clients/createFhevmEncryptClient.ts +2 -2
  811. package/ethers/internal/config.ts +2 -30
  812. package/package.json +1 -1
  813. package/viem/cleartext/createFhevmCleartextDecryptClient.ts +2 -2
  814. package/viem/cleartext/createFhevmCleartextEncryptClient.ts +2 -2
  815. package/viem/clients/createFhevmDecryptClient.ts +2 -2
  816. package/viem/clients/createFhevmEncryptClient.ts +2 -2
  817. package/viem/internal/config.ts +2 -30
  818. package/wasm/tfhe/TfheApi.d.ts +12 -12
  819. package/wasm/tfhe/loadTfheLib.js +11 -11
  820. package/wasm/tfhe/v1.5.3/startWorkers.js +41 -20
  821. package/wasm/tfhe/v1.5.3/tfhe.d.ts +7 -0
  822. package/wasm/tfhe/v1.5.3/tfhe.js +8 -0
  823. package/wasm/tfhe/v1.6.0-dev/startWorkers.js +41 -20
  824. package/wasm/tfhe/v1.6.0-dev/tfhe.d.ts +7 -0
  825. package/wasm/tfhe/v1.6.0-dev/tfhe.js +8 -0
  826. package/wasm/tfhe/{v1.6.1 → v1.6.2}/startWorkers.js +46 -25
  827. package/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe-worker.mjs +40 -40
  828. package/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe.d.ts +92 -85
  829. package/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe.js +253 -442
  830. package/wasm/tfhe/v1.6.2/tfhe_bg.wasm +0 -0
  831. package/wasm/tfhe/v1.6.2/tfhe_bg.wasm.base64.js +7 -0
  832. package/wasm/tfheModuleVersion-p.ts +1 -1
  833. package/wasm/tkms/v0.13.10/kms_lib.d.ts +4 -0
  834. package/wasm/tkms/v0.13.10/kms_lib.js +8 -0
  835. package/wasm/tkms/v0.13.20-0/kms_lib.d.ts +4 -0
  836. package/wasm/tkms/v0.13.20-0/kms_lib.js +8 -0
  837. package/wasm/tkmsModuleVersion-p.ts +1 -1
  838. package/wasm/wasmBaseUrl.js +32 -4
  839. package/_cjs/core/actions/base/fetchKmsSignedcryptedShares.js.map +0 -1
  840. package/_cjs/core/actions/decrypt/decryptKmsSignedcryptedShares.js +0 -11
  841. package/_cjs/core/actions/decrypt/decryptKmsSignedcryptedShares.js.map +0 -1
  842. package/_cjs/core/kms/decryptKmsSignedcryptedShares-p.js.map +0 -1
  843. package/_cjs/core/kms/fetchKmsSignedcryptedShares-p.js.map +0 -1
  844. package/_cjs/core/types/fhevmDecryptionKey.js.map +0 -1
  845. package/_cjs/core/types/fhevmUser.js.map +0 -1
  846. package/_cjs/core/types/zkProofBuilder.js.map +0 -1
  847. package/_cjs/wasm/tfhe/v1.6.1/startWorkers.js.map +0 -7
  848. package/_cjs/wasm/tfhe/v1.6.1/tfhe.js.map +0 -7
  849. package/_cjs/wasm/tfhe/v1.6.1/tfhe_bg.wasm +0 -0
  850. package/_cjs/wasm/tfhe/v1.6.1/tfhe_bg.wasm.base64.js +0 -35
  851. package/_cjs/wasm/tfhe/v1.6.1/tfhe_bg.wasm.base64.js.map +0 -7
  852. package/_esm/core/actions/base/fetchKmsSignedcryptedShares.js.map +0 -1
  853. package/_esm/core/actions/decrypt/decryptKmsSignedcryptedShares.js +0 -9
  854. package/_esm/core/actions/decrypt/decryptKmsSignedcryptedShares.js.map +0 -1
  855. package/_esm/core/kms/decryptKmsSignedcryptedShares-p.js.map +0 -1
  856. package/_esm/core/kms/fetchKmsSignedcryptedShares-p.js.map +0 -1
  857. package/_esm/core/types/fhevmDecryptionKey.js +0 -2
  858. package/_esm/core/types/fhevmDecryptionKey.js.map +0 -1
  859. package/_esm/core/types/fhevmUser.js +0 -2
  860. package/_esm/core/types/fhevmUser.js.map +0 -1
  861. package/_esm/core/types/zkProofBuilder.js +0 -2
  862. package/_esm/core/types/zkProofBuilder.js.map +0 -1
  863. package/_esm/wasm/tfhe/v1.6.1/tfhe_bg.wasm +0 -0
  864. package/_esm/wasm/tfhe/v1.6.1/tfhe_bg.wasm.base64.js +0 -7
  865. package/_types/core/actions/base/fetchKmsSignedcryptedShares.d.ts.map +0 -1
  866. package/_types/core/actions/decrypt/decryptKmsSignedcryptedShares.d.ts.map +0 -1
  867. package/_types/core/kms/decryptKmsSignedcryptedShares-p.d.ts.map +0 -1
  868. package/_types/core/kms/fetchKmsSignedcryptedShares-p.d.ts.map +0 -1
  869. package/_types/core/types/fhevmDecryptionKey.d.ts +0 -4
  870. package/_types/core/types/fhevmDecryptionKey.d.ts.map +0 -1
  871. package/_types/core/types/fhevmUser.d.ts +0 -7
  872. package/_types/core/types/fhevmUser.d.ts.map +0 -1
  873. package/_types/core/types/zkProofBuilder.d.ts.map +0 -1
  874. package/core/types/fhevmDecryptionKey.ts +0 -8
  875. package/core/types/fhevmUser.ts +0 -7
  876. package/wasm/tfhe/v1.6.1/tfhe_bg.wasm +0 -0
  877. package/wasm/tfhe/v1.6.1/tfhe_bg.wasm.base64.js +0 -7
  878. /package/_cjs/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe_bg.wasm.base64.d.ts +0 -0
  879. /package/_esm/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe_bg.wasm.base64.d.ts +0 -0
  880. /package/_types/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe_bg.wasm.base64.d.ts +0 -0
  881. /package/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe_bg.wasm.base64.d.ts +0 -0
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=fhevmDecryptionKey.js.map
3
+ //# sourceMappingURL=zkProofBuilder-p.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zkProofBuilder-p.js","sourceRoot":"","sources":["../../../core/types/zkProofBuilder-p.ts"],"names":[],"mappings":""}
@@ -5,6 +5,7 @@ async function verifyTkmsPublicKey(context, parameters) {
5
5
  const { tkmsPrivateKey, tkmsPublicKeyBytesHex } = parameters;
6
6
  const expectedTkmsPublicKeyBytesHex = await context.runtime.decrypt.getTkmsPublicKeyHex({
7
7
  tkmsPrivateKey,
8
+ tkmsVersion: context.tkmsVersion,
8
9
  });
9
10
  if (expectedTkmsPublicKeyBytesHex !== tkmsPublicKeyBytesHex) {
10
11
  throw new Error('invalid TransportKeyPairKeyPair');
@@ -1 +1 @@
1
- {"version":3,"file":"verifyTkmsPublicKey.js","sourceRoot":"","sources":["../../../../core/utils-p/decrypt/verifyTkmsPublicKey.ts"],"names":[],"mappings":";;AAUA,kDAgBC;AAhBM,KAAK,UAAU,mBAAmB,CACvC,OAAwD,EACxD,UAGC;IAED,MAAM,EAAE,cAAc,EAAE,qBAAqB,EAAE,GAAG,UAAU,CAAC;IAE7D,MAAM,6BAA6B,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC;QACtF,cAAc;KACf,CAAC,CAAC;IAEH,IAAI,6BAA6B,KAAK,qBAAqB,EAAE,CAAC;QAC5D,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"verifyTkmsPublicKey.js","sourceRoot":"","sources":["../../../../core/utils-p/decrypt/verifyTkmsPublicKey.ts"],"names":[],"mappings":";;AAWA,kDAiBC;AAjBM,KAAK,UAAU,mBAAmB,CACvC,OAA2F,EAC3F,UAGC;IAED,MAAM,EAAE,cAAc,EAAE,qBAAqB,EAAE,GAAG,UAAU,CAAC;IAE7D,MAAM,6BAA6B,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC;QACtF,cAAc;QACd,WAAW,EAAE,OAAO,CAAC,WAAW;KACjC,CAAC,CAAC;IAEH,IAAI,6BAA6B,KAAK,qBAAqB,EAAE,CAAC;QAC5D,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;AACH,CAAC"}
@@ -17,7 +17,7 @@ function setFhevmRuntimeConfig(config) {
17
17
  if (ethersFhevmRuntimeConfig.logger !== config.logger ||
18
18
  ethersFhevmRuntimeConfig.locateFile !== config.locateFile ||
19
19
  ethersFhevmRuntimeConfig.wasmAssetLoadMode !== config.wasmAssetLoadMode ||
20
- !moduleVersionsAreEqual(ethersFhevmRuntimeConfig.moduleVersions, config.moduleVersions) ||
20
+ !(0, runtimeConfig_p_js_1.moduleVersionsAreEqual)(ethersFhevmRuntimeConfig.moduleVersions, config.moduleVersions) ||
21
21
  ethersFhevmRuntimeConfig.singleThread !== config.singleThread ||
22
22
  ethersFhevmRuntimeConfig.numberOfThreads !== config.numberOfThreads) {
23
23
  throw new Error('FhevmRuntime config has already been set and cannot be changed. ' +
@@ -33,21 +33,4 @@ function getFhevmRuntimeConfig() {
33
33
  }
34
34
  return ethersFhevmRuntimeConfig;
35
35
  }
36
- function moduleVersionsAreEqual(a, b) {
37
- const normalizedA = normalizeModuleVersions(a);
38
- const normalizedB = normalizeModuleVersions(b);
39
- return (normalizedA.tfhe === normalizedB.tfhe &&
40
- normalizedA.kms === normalizedB.kms &&
41
- normalizedA.checkCompatibility === normalizedB.checkCompatibility);
42
- }
43
- function normalizeModuleVersions(moduleVersions) {
44
- if (moduleVersions === undefined || moduleVersions === 'auto') {
45
- return { tfhe: 'auto', kms: 'auto', checkCompatibility: undefined };
46
- }
47
- return {
48
- tfhe: moduleVersions.tfhe ?? 'auto',
49
- kms: moduleVersions.kms ?? 'auto',
50
- checkCompatibility: moduleVersions.checkCompatibility,
51
- };
52
- }
53
36
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../ethers/internal/config.ts"],"names":[],"mappings":";;AAiBA,sDAuBC;AAED,sDAEC;AAED,sDAOC;AApDD,sEAAoE;AAEpE,IAAI,wBAAwD,CAAC;AAc7D,SAAgB,qBAAqB,CAAC,MAA0B;IAC9D,IAAI,wBAAwB,KAAK,SAAS,EAAE,CAAC;QAC3C,wBAAwB,GAAG,MAAM,CAAC,MAAM,CAAC;YACvC,GAAG,MAAM;YACT,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS;YACvE,cAAc,EAAE,IAAA,wCAAmB,EAAC,MAAM,CAAC,cAAc,CAAC;SAC3D,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IAED,IACE,wBAAwB,CAA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,SAAgB,qBAAqB;IACnC,IAAI,wBAAwB,KAAK,SAAS,EAAE,CAAC;QAC3C,MAAM,IAAI,KAAK,CACb,wCAAwC,GAAG,mEAAmE,CAC/G,CAAC;IACJ,CAAC;IACD,OAAO,wBAAwB,CAAC;AAClC,CAAC"}
@@ -17,7 +17,7 @@ function setFhevmRuntimeConfig(config) {
17
17
  if (viemFhevmRuntimeConfig.logger !== config.logger ||
18
18
  viemFhevmRuntimeConfig.locateFile !== config.locateFile ||
19
19
  viemFhevmRuntimeConfig.wasmAssetLoadMode !== config.wasmAssetLoadMode ||
20
- !moduleVersionsAreEqual(viemFhevmRuntimeConfig.moduleVersions, config.moduleVersions) ||
20
+ !(0, runtimeConfig_p_js_1.moduleVersionsAreEqual)(viemFhevmRuntimeConfig.moduleVersions, config.moduleVersions) ||
21
21
  viemFhevmRuntimeConfig.singleThread !== config.singleThread ||
22
22
  viemFhevmRuntimeConfig.numberOfThreads !== config.numberOfThreads) {
23
23
  throw new Error('FhevmRuntime config has already been set and cannot be changed. ' +
@@ -33,21 +33,4 @@ function getFhevmRuntimeConfig() {
33
33
  }
34
34
  return viemFhevmRuntimeConfig;
35
35
  }
36
- function moduleVersionsAreEqual(a, b) {
37
- const normalizedA = normalizeModuleVersions(a);
38
- const normalizedB = normalizeModuleVersions(b);
39
- return (normalizedA.tfhe === normalizedB.tfhe &&
40
- normalizedA.kms === normalizedB.kms &&
41
- normalizedA.checkCompatibility === normalizedB.checkCompatibility);
42
- }
43
- function normalizeModuleVersions(moduleVersions) {
44
- if (moduleVersions === undefined || moduleVersions === 'auto') {
45
- return { tfhe: 'auto', kms: 'auto', checkCompatibility: undefined };
46
- }
47
- return {
48
- tfhe: moduleVersions.tfhe ?? 'auto',
49
- kms: moduleVersions.kms ?? 'auto',
50
- checkCompatibility: moduleVersions.checkCompatibility,
51
- };
52
- }
53
36
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../viem/intern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AED,IACE,sBAAsB,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM;QAC/C,sBAAsB,CAAC,UAAU,KAAK,MAAM,CAAC,UAAU;QACvD,sBAAsB,CAAC,iBAAiB,KAAK,MAAM,CAAC,iBAAiB;QACrE,CAAC,IAAA,2CAAsB,EAAC,sBAAsB,CAAC,cAAc,EAAE,MAAM,CAAC,cAAc,CAAC;QACrF,sBAAsB,CAAC,YAAY,KAAK,MAAM,CAAC,YAAY;QAC3D,sBAAsB,CAAC,eAAe,KAAK,MAAM,CAAC,eAAe,EACjE,CAAC;QACD,MAAM,IAAI,KAAK,CACb,kEAAkE;YAChE,iFAAiF,CACpF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAgB,qBAAqB;IACnC,OAAO,sBAAsB,KAAK,SAAS,CAAC;AAC9C,CAAC;AAED,SAAgB,qBAAqB;IACnC,IAAI,sBAAsB,KAAK,SAAS,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CACb,wCAAwC,GAAG,mEAAmE,CAC/G,CAAC;IACJ,CAAC;IACD,OAAO,sBAAsB,CAAC;AAChC,CAAC"}
@@ -15,32 +15,32 @@ export type {
15
15
  ProvenCompactCiphertextList,
16
16
  TfheCompactPublicKey,
17
17
  ZkComputeLoad,
18
- } from './v1.6.1/tfhe.js';
18
+ } from './v1.6.2/tfhe.js';
19
19
 
20
20
  /** The subset you actually use - the runtime contract callers depend on. */
21
21
  export interface TfheLibApi {
22
- initAsync: typeof import('./v1.6.1/tfhe.js').initAsync;
22
+ initAsync: typeof import('./v1.6.2/tfhe.js').initAsync;
23
23
 
24
24
  // --- Free functions used by encrypt/init-p.ts -----------------------------
25
- init_panic_hook: typeof import('./v1.6.1/tfhe.js').init_panic_hook;
26
- initThreadPool: typeof import('./v1.6.1/tfhe.js').initThreadPool;
27
- setWorkerUrlConfig: typeof import('./v1.6.1/tfhe.js').setWorkerUrlConfig;
28
- getWasmInfo: typeof import('./v1.6.1/tfhe.js').getWasmInfo;
25
+ init_panic_hook: typeof import('./v1.6.2/tfhe.js').init_panic_hook;
26
+ initThreadPool: typeof import('./v1.6.2/tfhe.js').initThreadPool;
27
+ setWorkerUrlConfig: typeof import('./v1.6.2/tfhe.js').setWorkerUrlConfig;
28
+ getWasmInfo: typeof import('./v1.6.2/tfhe.js').getWasmInfo;
29
29
 
30
30
  // --- Class constructors used as values in encrypt/api-p.ts ----------------
31
31
  // These are imported as runtime values: instanceof checks, static methods
32
32
  // (safe_deserialize), factory calls (CompactCiphertextList.builder()).
33
- CompactCiphertextList: typeof import('./v1.6.1/tfhe.js').CompactCiphertextList;
34
- CompactPkeCrs: typeof import('./v1.6.1/tfhe.js').CompactPkeCrs;
35
- ProvenCompactCiphertextList: typeof import('./v1.6.1/tfhe.js').ProvenCompactCiphertextList;
36
- TfheCompactPublicKey: typeof import('./v1.6.1/tfhe.js').TfheCompactPublicKey;
33
+ CompactCiphertextList: typeof import('./v1.6.2/tfhe.js').CompactCiphertextList;
34
+ CompactPkeCrs: typeof import('./v1.6.2/tfhe.js').CompactPkeCrs;
35
+ ProvenCompactCiphertextList: typeof import('./v1.6.2/tfhe.js').ProvenCompactCiphertextList;
36
+ TfheCompactPublicKey: typeof import('./v1.6.2/tfhe.js').TfheCompactPublicKey;
37
37
 
38
38
  // --- Enum used as a value (e.g. ZkComputeLoad.Verify) ---------------------
39
- ZkComputeLoad: typeof import('./v1.6.1/tfhe.js').ZkComputeLoad;
39
+ ZkComputeLoad: typeof import('./v1.6.2/tfhe.js').ZkComputeLoad;
40
40
  }
41
41
 
42
42
  // Default version
43
- export type TfheVersion = '1.5.3' | '1.6.1';
43
+ export type TfheVersion = '1.5.3' | '1.6.2';
44
44
 
45
45
  export type TfheWasmBase64 = {
46
46
  readonly tfheWasmBase64: string;
@@ -34,15 +34,15 @@ __export(loadTfheLib_exports, {
34
34
  tfheAssetsWithVersion: () => tfheAssetsWithVersion
35
35
  });
36
36
  module.exports = __toCommonJS(loadTfheLib_exports);
37
- const TFHE_VERSIONS = Object.freeze(["1.5.3", "1.6.1"]);
38
- const DEFAULT_TFHE_VERSION = "1.6.1";
37
+ const TFHE_VERSIONS = Object.freeze(["1.5.3", "1.6.2"]);
38
+ const DEFAULT_TFHE_VERSION = "1.6.2";
39
39
  const _loaders = {
40
40
  "1.5.3": () => import("./v1.5.3/tfhe.js"),
41
- "1.6.1": () => import("./v1.6.1/tfhe.js")
41
+ "1.6.2": () => import("./v1.6.2/tfhe.js")
42
42
  };
43
43
  const _wasmBase64Loaders = {
44
44
  "1.5.3": () => import("./v1.5.3/tfhe_bg.wasm.base64.js"),
45
- "1.6.1": () => import("./v1.6.1/tfhe_bg.wasm.base64.js")
45
+ "1.6.2": () => import("./v1.6.2/tfhe_bg.wasm.base64.js")
46
46
  };
47
47
  const _assets = Object.freeze({
48
48
  "1.5.3": Object.freeze({
@@ -57,16 +57,16 @@ const _assets = Object.freeze({
57
57
  sha256: "3f93fe86a8dfa6e25ae5fcfe28d19833219cba8f45f81c6dd05c2f3cc5323c52"
58
58
  })
59
59
  }),
60
- "1.6.1": Object.freeze({
60
+ "1.6.2": Object.freeze({
61
61
  wasm: Object.freeze({
62
- filename: "tfhe_bg.v1.6.1.wasm",
63
- localRelativePath: "./v1.6.1/tfhe_bg.wasm",
64
- sha256: "d470dc00347cdc83135e29700abe54c6a7ee9ba4ad58449bfc2494dfa4423f38"
62
+ filename: "tfhe_bg.v1.6.2.wasm",
63
+ localRelativePath: "./v1.6.2/tfhe_bg.wasm",
64
+ sha256: "ecd1841ad42226629c1a665ba784e073f2e780137f7986b00088c9227acb9760"
65
65
  }),
66
66
  worker: Object.freeze({
67
- filename: "tfhe-worker.v1.6.1.mjs",
68
- localRelativePath: "./v1.6.1/tfhe-worker.mjs",
69
- sha256: "348fe6c2e77bafe0cbfb9c0a512af99b5f97de1119ceadf07cc34620dbc5690e"
67
+ filename: "tfhe-worker.v1.6.2.mjs",
68
+ localRelativePath: "./v1.6.2/tfhe-worker.mjs",
69
+ sha256: "2c648dd89132bb63d37e8b47c6fe1f53b06abb1389faeb9b3f671eea9a0db5dd"
70
70
  })
71
71
  })
72
72
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../../../../../../../tmp/fhevm-loaders-4315-1780075834001/tfhe/loadTfheLib.js"],
4
- "sourcesContent": ["// AUTO-GENERATED FROM versionsManifest.js - DO NOT EDIT.\n// Generator: scripts/build/codegen-loaders.mjs\n// Profile: prod\n//\n// Version-selective TFHE loader. Authored as plain ESM .js (not .ts) so the\n// published artifact is byte-identical to source. Types live in the sibling\n// loadTfheLib.d.ts.\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport const TFHE_VERSIONS = Object.freeze(['1.5.3', '1.6.1']);\nexport const DEFAULT_TFHE_VERSION = '1.6.1';\n\nconst _loaders = {\n '1.5.3': () => import('./v1.5.3/tfhe.js'),\n '1.6.1': () => import('./v1.6.1/tfhe.js'),\n};\n\n////////////////////////////////////////////////////////////////////////////////\n\nconst _wasmBase64Loaders = {\n '1.5.3': () => import('./v1.5.3/tfhe_bg.wasm.base64.js'),\n '1.6.1': () => import('./v1.6.1/tfhe_bg.wasm.base64.js'),\n};\n\n////////////////////////////////////////////////////////////////////////////////\n\nconst _assets = Object.freeze({\n '1.5.3': Object.freeze({\n wasm: Object.freeze({\n filename: 'tfhe_bg.v1.5.3.wasm',\n localRelativePath: './v1.5.3/tfhe_bg.wasm',\n sha256: 'dd349c2e34834527890a80e1b70bf5ee57a02aabb7f65e32a1bca654db9201ec',\n }),\n worker: Object.freeze({\n filename: 'tfhe-worker.v1.5.3.mjs',\n localRelativePath: './v1.5.3/tfhe-worker.mjs',\n sha256: '3f93fe86a8dfa6e25ae5fcfe28d19833219cba8f45f81c6dd05c2f3cc5323c52',\n }),\n }),\n '1.6.1': Object.freeze({\n wasm: Object.freeze({\n filename: 'tfhe_bg.v1.6.1.wasm',\n localRelativePath: './v1.6.1/tfhe_bg.wasm',\n sha256: 'd470dc00347cdc83135e29700abe54c6a7ee9ba4ad58449bfc2494dfa4423f38',\n }),\n worker: Object.freeze({\n filename: 'tfhe-worker.v1.6.1.mjs',\n localRelativePath: './v1.6.1/tfhe-worker.mjs',\n sha256: '348fe6c2e77bafe0cbfb9c0a512af99b5f97de1119ceadf07cc34620dbc5690e',\n }),\n }),\n});\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport function tfheAssetsWithVersion(version) {\n const assets = _assets[version];\n if (!assets) throw new Error(`unsupported tfhe version: ${version}`);\n return assets;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport async function loadTfheLib(version) {\n const loader = _loaders[version];\n if (!loader) throw new Error(`unsupported tfhe version: ${version}`);\n return loader();\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport async function loadTfheWasmBase64(version) {\n const loader = _wasmBase64Loaders[version];\n if (!loader) throw new Error(`unsupported tfhe version: ${version}`);\n return loader();\n}\n"],
3
+ "sources": ["../../../../../../../../../../../tmp/fhevm-loaders-4189-1782749083564/tfhe/loadTfheLib.js"],
4
+ "sourcesContent": ["// AUTO-GENERATED FROM versionsManifest.js - DO NOT EDIT.\n// Generator: scripts/build/codegen-loaders.mjs\n// Profile: prod\n//\n// Version-selective TFHE loader. Authored as plain ESM .js (not .ts) so the\n// published artifact is byte-identical to source. Types live in the sibling\n// loadTfheLib.d.ts.\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport const TFHE_VERSIONS = Object.freeze(['1.5.3', '1.6.2']);\nexport const DEFAULT_TFHE_VERSION = '1.6.2';\n\nconst _loaders = {\n '1.5.3': () => import('./v1.5.3/tfhe.js'),\n '1.6.2': () => import('./v1.6.2/tfhe.js'),\n};\n\n////////////////////////////////////////////////////////////////////////////////\n\nconst _wasmBase64Loaders = {\n '1.5.3': () => import('./v1.5.3/tfhe_bg.wasm.base64.js'),\n '1.6.2': () => import('./v1.6.2/tfhe_bg.wasm.base64.js'),\n};\n\n////////////////////////////////////////////////////////////////////////////////\n\nconst _assets = Object.freeze({\n '1.5.3': Object.freeze({\n wasm: Object.freeze({\n filename: 'tfhe_bg.v1.5.3.wasm',\n localRelativePath: './v1.5.3/tfhe_bg.wasm',\n sha256: 'dd349c2e34834527890a80e1b70bf5ee57a02aabb7f65e32a1bca654db9201ec',\n }),\n worker: Object.freeze({\n filename: 'tfhe-worker.v1.5.3.mjs',\n localRelativePath: './v1.5.3/tfhe-worker.mjs',\n sha256: '3f93fe86a8dfa6e25ae5fcfe28d19833219cba8f45f81c6dd05c2f3cc5323c52',\n }),\n }),\n '1.6.2': Object.freeze({\n wasm: Object.freeze({\n filename: 'tfhe_bg.v1.6.2.wasm',\n localRelativePath: './v1.6.2/tfhe_bg.wasm',\n sha256: 'ecd1841ad42226629c1a665ba784e073f2e780137f7986b00088c9227acb9760',\n }),\n worker: Object.freeze({\n filename: 'tfhe-worker.v1.6.2.mjs',\n localRelativePath: './v1.6.2/tfhe-worker.mjs',\n sha256: '2c648dd89132bb63d37e8b47c6fe1f53b06abb1389faeb9b3f671eea9a0db5dd',\n }),\n }),\n});\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport function tfheAssetsWithVersion(version) {\n const assets = _assets[version];\n if (!assets) throw new Error(`unsupported tfhe version: ${version}`);\n return assets;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport async function loadTfheLib(version) {\n const loader = _loaders[version];\n if (!loader) throw new Error(`unsupported tfhe version: ${version}`);\n return loader();\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport async function loadTfheWasmBase64(version) {\n const loader = _wasmBase64Loaders[version];\n if (!loader) throw new Error(`unsupported tfhe version: ${version}`);\n return loader();\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,MAAM,gBAAgB,OAAO,OAAO,CAAC,SAAS,OAAO,CAAC;AACtD,MAAM,uBAAuB;AAEpC,MAAM,WAAW;AAAA,EACf,SAAS,MAAM,OAAO,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});
26
26
  module.exports = __toCommonJS(startWorkers_exports);
27
- function __isBrowserLike() {
28
- return typeof Bun === "undefined" && typeof process === "undefined" && typeof addEventListener === "function" && typeof removeEventListener === "function";
29
- }
30
27
  const __wasmAssetLoadModes = ["embedded-base64", "verified-blob", "precheck-direct-url", "trusted-direct-url", "auto"];
31
28
  function __isWasmAssetLoadMode(value) {
32
29
  return __wasmAssetLoadModes.includes(value);
@@ -35,7 +32,7 @@ function __bytesToHex(bytes) {
35
32
  return [...bytes].map((b) => b.toString(16).padStart(2, "0")).join("");
36
33
  }
37
34
  async function __sha256(bytes) {
38
- if (__isBrowserLike()) {
35
+ if (_isBrowserLike) {
39
36
  if (typeof crypto === "undefined" || !crypto.subtle || typeof crypto.subtle.digest !== "function") {
40
37
  throw new Error("Web Crypto SHA-256 digest is not available");
41
38
  }
@@ -46,6 +43,8 @@ async function __sha256(bytes) {
46
43
  const nodeModuleId = `node:${nodeModuleName}`;
47
44
  const { createHash } = await import(
48
45
  /* @vite-ignore */
46
+ /* webpackIgnore: true */
47
+ /* turbopackIgnore: true */
49
48
  nodeModuleId
50
49
  );
51
50
  return createHash("sha256").update(new Uint8Array(bytes)).digest("hex");
@@ -67,17 +66,21 @@ async function __fetchAndVerifyWorkerUrlBytes(url, expectedSha256) {
67
66
  return bytes;
68
67
  }
69
68
  async function __readWorkerUrlBytes(url) {
70
- if (!__isBrowserLike() && url.protocol === "file:") {
69
+ if (!_isBrowserLike && url.protocol === "file:") {
71
70
  const fsModuleName = "fs/promises";
72
71
  const fsModuleId = `node:${fsModuleName}`;
73
72
  const urlModuleName = "url";
74
73
  const urlModuleId = `node:${urlModuleName}`;
75
74
  const { readFile } = await import(
76
75
  /* @vite-ignore */
76
+ /* webpackIgnore: true */
77
+ /* turbopackIgnore: true */
77
78
  fsModuleId
78
79
  );
79
80
  const { fileURLToPath } = await import(
80
81
  /* @vite-ignore */
82
+ /* webpackIgnore: true */
83
+ /* turbopackIgnore: true */
81
84
  urlModuleId
82
85
  );
83
86
  return await readFile(fileURLToPath(url));
@@ -102,7 +105,7 @@ async function __newBrowserWorkerFromBlob(blob) {
102
105
  }
103
106
  }
104
107
  async function __newIsomorphicWorkerFromUrl(url) {
105
- if (__isBrowserLike()) {
108
+ if (_isBrowserLike) {
106
109
  return new Worker(url, {
107
110
  type: "module",
108
111
  name: "wasm_bindgen_worker"
@@ -112,6 +115,8 @@ async function __newIsomorphicWorkerFromUrl(url) {
112
115
  const nodeModuleId = `node:${nodeModuleName}`;
113
116
  const { Worker: NodeWorker } = await import(
114
117
  /* @vite-ignore */
118
+ /* webpackIgnore: true */
119
+ /* turbopackIgnore: true */
115
120
  nodeModuleId
116
121
  );
117
122
  return new NodeWorker(url);
@@ -121,12 +126,14 @@ async function __newNodeWorkerFromJsCode(jsCode) {
121
126
  const nodeModuleId = `node:${nodeModuleName}`;
122
127
  const { Worker: NodeWorker } = await import(
123
128
  /* @vite-ignore */
129
+ /* webpackIgnore: true */
130
+ /* turbopackIgnore: true */
124
131
  nodeModuleId
125
132
  );
126
133
  return { worker: new NodeWorker(jsCode, { eval: true }), blobUrl: void 0 };
127
134
  }
128
135
  async function __newIsomorphicWorkerFromVerifiedJsCodeBytes(verifiedJsCodeBytes) {
129
- if (__isBrowserLike()) {
136
+ if (_isBrowserLike) {
130
137
  return await __newBrowserWorkerFromBlob(
131
138
  new Blob([verifiedJsCodeBytes], {
132
139
  type: "application/javascript"
@@ -136,7 +143,7 @@ async function __newIsomorphicWorkerFromVerifiedJsCodeBytes(verifiedJsCodeBytes)
136
143
  return await __newNodeWorkerFromJsCode(Buffer.from(verifiedJsCodeBytes).toString("utf-8"));
137
144
  }
138
145
  async function __newWorkerFromJsCodeBase64(jsCodeBase64) {
139
- if (__isBrowserLike()) {
146
+ if (_isBrowserLike) {
140
147
  const blob = new Blob([atob(jsCodeBase64)], {
141
148
  type: "application/javascript"
142
149
  });
@@ -203,6 +210,7 @@ let _terminating;
203
210
  let _configSet = false;
204
211
  let _workerUrl = void 0;
205
212
  let _wasmAssetLoadMode = "auto";
213
+ let _isBrowserLike = void 0;
206
214
  const _workerUrlSha256 = "3f93fe86a8dfa6e25ae5fcfe28d19833219cba8f45f81c6dd05c2f3cc5323c52";
207
215
  let _verifiedWorkerUrlBytesPromise = void 0;
208
216
  let _logger = void 0;
@@ -230,7 +238,15 @@ function setWorkerUrlConfig(parameters = {}) {
230
238
  if (parameters === null || typeof parameters !== "object") {
231
239
  throw new TypeError("setWorkerUrlConfig parameters must be an object");
232
240
  }
233
- const { workerUrl = void 0, wasmAssetLoadMode = "auto", logger = void 0 } = parameters;
241
+ const {
242
+ workerUrl = void 0,
243
+ wasmAssetLoadMode = "auto",
244
+ logger = void 0,
245
+ isBrowserLike = void 0
246
+ } = parameters;
247
+ if (typeof isBrowserLike !== "boolean") {
248
+ throw new TypeError("setWorkerUrlConfig: isBrowserLike (boolean) is required");
249
+ }
234
250
  if (!__isWasmAssetLoadMode(wasmAssetLoadMode)) {
235
251
  throw new TypeError(`wasmAssetLoadMode must be one of: ${__wasmAssetLoadModes.join(", ")}`);
236
252
  }
@@ -247,6 +263,7 @@ function setWorkerUrlConfig(parameters = {}) {
247
263
  __assertLogger(logger);
248
264
  _wasmAssetLoadMode = wasmAssetLoadMode;
249
265
  _logger = logger;
266
+ _isBrowserLike = isBrowserLike;
250
267
  _configSet = true;
251
268
  }
252
269
  function __getVerifiedWorkerUrlBytesPromise() {