@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.
- package/_cjs/core/_version.js +1 -1
- package/_cjs/core/actions/base/canDecryptPublicValue.js +1 -1
- package/_cjs/core/actions/base/canDecryptPublicValue.js.map +1 -1
- package/_cjs/core/actions/base/canDecryptPublicValues.js +1 -1
- package/_cjs/core/actions/base/canDecryptPublicValues.js.map +1 -1
- package/_cjs/core/actions/base/{fetchKmsSignedcryptedShares.js → fetchKmsSigncryptedShares.js} +5 -5
- package/_cjs/core/actions/base/fetchKmsSigncryptedShares.js.map +1 -0
- package/_cjs/core/actions/base/index.js +3 -3
- package/_cjs/core/actions/base/index.js.map +1 -1
- package/_cjs/core/actions/base/readKmsSignersContext.js +2 -1
- package/_cjs/core/actions/base/readKmsSignersContext.js.map +1 -1
- package/_cjs/core/actions/chain/parseTransportKeyPair.js.map +1 -1
- package/_cjs/core/actions/decrypt/decryptKmsSigncryptedShares.js +13 -0
- package/_cjs/core/actions/decrypt/decryptKmsSigncryptedShares.js.map +1 -0
- package/_cjs/core/actions/decrypt/decryptValue.js +3 -1
- package/_cjs/core/actions/decrypt/decryptValue.js.map +1 -1
- package/_cjs/core/actions/decrypt/decryptValues.js +3 -1
- package/_cjs/core/actions/decrypt/decryptValues.js.map +1 -1
- package/_cjs/core/actions/decrypt/decryptValuesFromPairs.js +3 -1
- package/_cjs/core/actions/decrypt/decryptValuesFromPairs.js.map +1 -1
- package/_cjs/core/actions/decrypt/generateTransportKeyPair.js +3 -1
- package/_cjs/core/actions/decrypt/generateTransportKeyPair.js.map +1 -1
- package/_cjs/core/actions/decrypt/index.js +3 -3
- package/_cjs/core/actions/decrypt/index.js.map +1 -1
- package/_cjs/core/actions/encrypt/encryptValue.js +3 -1
- package/_cjs/core/actions/encrypt/encryptValue.js.map +1 -1
- package/_cjs/core/actions/encrypt/encryptValues.js +3 -1
- package/_cjs/core/actions/encrypt/encryptValues.js.map +1 -1
- package/_cjs/core/actions/encrypt/generateZkProof.js +5 -1
- package/_cjs/core/actions/encrypt/generateZkProof.js.map +1 -1
- package/_cjs/core/actions/host/readFhevmExecutorContractData.js +7 -7
- package/_cjs/core/actions/host/readFhevmExecutorContractData.js.map +1 -1
- package/_cjs/core/actions/host/readInputVerifierContractData.js +1 -1
- package/_cjs/core/actions/host/readInputVerifierContractData.js.map +1 -1
- package/_cjs/core/actions/host/readKmsVerifierContractData.js +6 -5
- package/_cjs/core/actions/host/readKmsVerifierContractData.js.map +1 -1
- package/_cjs/core/actions/host/resolveFhevmConfig.js +7 -1
- package/_cjs/core/actions/host/resolveFhevmConfig.js.map +1 -1
- package/_cjs/core/base/bytes.js +2 -1
- package/_cjs/core/base/bytes.js.map +1 -1
- package/_cjs/core/base/environment.js +122 -0
- package/_cjs/core/base/environment.js.map +1 -0
- package/_cjs/core/base/errors/Sha256VerificationError.js +15 -0
- package/_cjs/core/base/errors/Sha256VerificationError.js.map +1 -0
- package/_cjs/core/base/inflate.js +282 -0
- package/_cjs/core/base/inflate.js.map +1 -0
- package/_cjs/core/base/isomorphicFs.js +24 -0
- package/_cjs/core/base/isomorphicFs.js.map +1 -0
- package/_cjs/core/base/isomorphicWorker.js +42 -111
- package/_cjs/core/base/isomorphicWorker.js.map +1 -1
- package/_cjs/core/base/object.js +23 -0
- package/_cjs/core/base/object.js.map +1 -1
- package/_cjs/core/base/semver.js +166 -0
- package/_cjs/core/base/semver.js.map +1 -0
- package/_cjs/core/base/uint.js +20 -3
- package/_cjs/core/base/uint.js.map +1 -1
- package/_cjs/core/base/wasm.js +15 -55
- package/_cjs/core/base/wasm.js.map +1 -1
- package/_cjs/core/chains/definitions/localTestnet.js +3 -0
- package/_cjs/core/chains/definitions/localTestnet.js.map +1 -1
- package/_cjs/core/chains/definitions/mainnet.js +1 -0
- package/_cjs/core/chains/definitions/mainnet.js.map +1 -1
- package/_cjs/core/chains/definitions/sepolia.js +1 -0
- package/_cjs/core/chains/definitions/sepolia.js.map +1 -1
- package/_cjs/core/clients/decorators/base.js +5 -0
- package/_cjs/core/clients/decorators/base.js.map +1 -1
- package/_cjs/core/clients/decorators/decrypt-p.js +13 -0
- package/_cjs/core/clients/decorators/decrypt-p.js.map +1 -0
- package/_cjs/core/clients/decorators/decrypt.js +4 -7
- package/_cjs/core/clients/decorators/decrypt.js.map +1 -1
- package/_cjs/core/clients/decorators/encrypt-p.js +5 -1
- package/_cjs/core/clients/decorators/encrypt-p.js.map +1 -1
- package/_cjs/core/clients/decorators/encrypt.js.map +1 -1
- package/_cjs/core/coprocessor/ZkProof-p.js +4 -2
- package/_cjs/core/coprocessor/ZkProof-p.js.map +1 -1
- package/_cjs/core/coprocessor/ZkProofBuilder-p.js +2 -1
- package/_cjs/core/coprocessor/ZkProofBuilder-p.js.map +1 -1
- package/_cjs/core/coprocessor/encrypt.js +1 -1
- package/_cjs/core/coprocessor/encrypt.js.map +1 -1
- package/_cjs/core/errors/RelayerResponseStatusError.js +3 -2
- package/_cjs/core/errors/RelayerResponseStatusError.js.map +1 -1
- package/_cjs/core/host-contracts/HostContractVersion-p.js +26 -4
- package/_cjs/core/host-contracts/HostContractVersion-p.js.map +1 -1
- package/_cjs/core/host-contracts/KmsSignersContext-p.js +23 -5
- package/_cjs/core/host-contracts/KmsSignersContext-p.js.map +1 -1
- package/_cjs/core/host-contracts/abi-fragments/fragments.js +21 -1
- package/_cjs/core/host-contracts/abi-fragments/fragments.js.map +1 -1
- package/_cjs/core/host-contracts/canDecryptValuesFromPairs.js +1 -1
- package/_cjs/core/host-contracts/canDecryptValuesFromPairs.js.map +1 -1
- package/_cjs/core/host-contracts/checkAllowedForDecryption.js +2 -2
- package/_cjs/core/host-contracts/checkAllowedForDecryption.js.map +1 -1
- package/_cjs/core/host-contracts/checkDelegation.js +8 -8
- package/_cjs/core/host-contracts/checkDelegation.js.map +1 -1
- package/_cjs/core/host-contracts/checkPersistAllowed.js +9 -9
- package/_cjs/core/host-contracts/checkPersistAllowed.js.map +1 -1
- package/_cjs/core/host-contracts/getAclAddress-p.js +1 -2
- package/_cjs/core/host-contracts/getAclAddress-p.js.map +1 -1
- package/_cjs/core/host-contracts/getCurrentKmsContextAndEpoch-p.js +51 -0
- package/_cjs/core/host-contracts/getCurrentKmsContextAndEpoch-p.js.map +1 -0
- package/_cjs/core/host-contracts/getCurrentKmsContextId-p.js +4 -5
- package/_cjs/core/host-contracts/getCurrentKmsContextId-p.js.map +1 -1
- package/_cjs/core/host-contracts/getFhevmExecutorAddress-p.js +1 -1
- package/_cjs/core/host-contracts/getFhevmExecutorAddress-p.js.map +1 -1
- package/_cjs/core/host-contracts/getHandleVersion-p.js +1 -2
- package/_cjs/core/host-contracts/getHandleVersion-p.js.map +1 -1
- package/_cjs/core/host-contracts/getHcuLimitAddress-p.js +1 -2
- package/_cjs/core/host-contracts/getHcuLimitAddress-p.js.map +1 -1
- package/_cjs/core/host-contracts/getInputVerifierAddress-p.js +1 -2
- package/_cjs/core/host-contracts/getInputVerifierAddress-p.js.map +1 -1
- package/_cjs/core/host-contracts/getKmsContextSignersAndThreshold-p.js +5 -7
- package/_cjs/core/host-contracts/getKmsContextSignersAndThreshold-p.js.map +1 -1
- package/_cjs/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.js +4 -5
- package/_cjs/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.js.map +1 -1
- package/_cjs/core/host-contracts/getSignersForKmsContext-p.js +3 -5
- package/_cjs/core/host-contracts/getSignersForKmsContext-p.js.map +1 -1
- package/_cjs/core/host-contracts/isAllowedForDecryption.js +4 -4
- package/_cjs/core/host-contracts/isAllowedForDecryption.js.map +1 -1
- package/_cjs/core/host-contracts/isHandleDelegatedForUserDecryption-p.js +5 -5
- package/_cjs/core/host-contracts/isHandleDelegatedForUserDecryption-p.js.map +1 -1
- package/_cjs/core/host-contracts/isUserDecryptable.js +2 -2
- package/_cjs/core/host-contracts/isUserDecryptable.js.map +1 -1
- package/_cjs/core/host-contracts/persistAllowed.js +4 -4
- package/_cjs/core/host-contracts/persistAllowed.js.map +1 -1
- package/_cjs/core/host-contracts/readKmsSignersContext-p.js +74 -25
- package/_cjs/core/host-contracts/readKmsSignersContext-p.js.map +1 -1
- package/_cjs/core/key/FheEncryptionKeyWasm-p.js +12 -4
- package/_cjs/core/key/FheEncryptionKeyWasm-p.js.map +1 -1
- package/_cjs/core/key/deserializeFheEncryptionKey.js +3 -0
- package/_cjs/core/key/deserializeFheEncryptionKey.js.map +1 -1
- package/_cjs/core/key/fetchFheEncryptionKey.js +1 -1
- package/_cjs/core/key/fetchFheEncryptionKey.js.map +1 -1
- package/_cjs/core/key/fetchFheEncryptionKeyBytes.js.map +1 -1
- package/_cjs/core/key/serializeFheEncryptionKey.js +4 -1
- package/_cjs/core/key/serializeFheEncryptionKey.js.map +1 -1
- package/_cjs/core/kms/KmsSigncryptedShares-p.js +9 -1
- package/_cjs/core/kms/KmsSigncryptedShares-p.js.map +1 -1
- package/_cjs/core/kms/SignedDecryptionPermit-p.js +5 -1
- package/_cjs/core/kms/SignedDecryptionPermit-p.js.map +1 -1
- package/_cjs/core/kms/TransportKeyPair-p.js +27 -7
- package/_cjs/core/kms/TransportKeyPair-p.js.map +1 -1
- package/_cjs/core/kms/createKmsUserDecryptEip712.js +8 -0
- package/_cjs/core/kms/createKmsUserDecryptEip712.js.map +1 -1
- package/_cjs/core/kms/createKmsUserDecryptEip712V2.js +97 -0
- package/_cjs/core/kms/createKmsUserDecryptEip712V2.js.map +1 -0
- package/_cjs/core/kms/{decryptKmsSignedcryptedShares-p.js → decryptKmsSigncryptedShares-p.js} +10 -3
- package/_cjs/core/kms/decryptKmsSigncryptedShares-p.js.map +1 -0
- package/_cjs/core/kms/decryptValuesFromPairs.js +4 -4
- package/_cjs/core/kms/decryptValuesFromPairs.js.map +1 -1
- package/_cjs/core/kms/{fetchKmsSignedcryptedShares-p.js → fetchKmsSigncryptedShares-p.js} +10 -6
- package/_cjs/core/kms/fetchKmsSigncryptedShares-p.js.map +1 -0
- package/_cjs/core/kms/kmsExtraData.js +53 -10
- package/_cjs/core/kms/kmsExtraData.js.map +1 -1
- package/_cjs/core/kms/kmsUserDecryptEip712V2Types.js +25 -0
- package/_cjs/core/kms/kmsUserDecryptEip712V2Types.js.map +1 -0
- package/_cjs/core/kms/publicDecrypt.js +5 -3
- package/_cjs/core/kms/publicDecrypt.js.map +1 -1
- package/_cjs/core/modules/decrypt/mock.js +1 -23
- package/_cjs/core/modules/decrypt/mock.js.map +1 -1
- package/_cjs/core/modules/decrypt/module/api-p.js +51 -23
- package/_cjs/core/modules/decrypt/module/api-p.js.map +1 -1
- package/_cjs/core/modules/decrypt/module/index.js +5 -27
- package/_cjs/core/modules/decrypt/module/index.js.map +1 -1
- package/_cjs/core/modules/decrypt/module/init-p.js +155 -49
- package/_cjs/core/modules/decrypt/module/init-p.js.map +1 -1
- package/_cjs/core/modules/encrypt/mock.js +26 -8
- package/_cjs/core/modules/encrypt/mock.js.map +1 -1
- package/_cjs/core/modules/encrypt/module/api-p.js +50 -21
- package/_cjs/core/modules/encrypt/module/api-p.js.map +1 -1
- package/_cjs/core/modules/encrypt/module/index.js +3 -3
- package/_cjs/core/modules/encrypt/module/index.js.map +1 -1
- package/_cjs/core/modules/encrypt/module/init-p.js +211 -69
- package/_cjs/core/modules/encrypt/module/init-p.js.map +1 -1
- package/_cjs/core/modules/relayer/cleartext/fetchDelegatedUserDecrypt.js +1 -1
- package/_cjs/core/modules/relayer/cleartext/fetchDelegatedUserDecrypt.js.map +1 -1
- package/_cjs/core/modules/relayer/cleartext/fetchUserDecrypt.js +1 -1
- package/_cjs/core/modules/relayer/cleartext/fetchUserDecrypt.js.map +1 -1
- package/_cjs/core/modules/relayer/module/RelayerAsyncRequest.js +28 -4
- package/_cjs/core/modules/relayer/module/RelayerAsyncRequest.js.map +1 -1
- package/_cjs/core/modules/relayer/module/fetchFheEncryptionKeySource.js +5 -1
- package/_cjs/core/modules/relayer/module/fetchFheEncryptionKeySource.js.map +1 -1
- package/_cjs/core/modules/relayer/module/readErrorMessage.js +29 -0
- package/_cjs/core/modules/relayer/module/readErrorMessage.js.map +1 -0
- package/_cjs/core/runtime/CoreFhevm-p.js +171 -5
- package/_cjs/core/runtime/CoreFhevm-p.js.map +1 -1
- package/_cjs/core/runtime/HyperWasmSolver-p.js +187 -0
- package/_cjs/core/runtime/HyperWasmSolver-p.js.map +1 -0
- package/_cjs/core/runtime/ProtocolVersionResolver-p.js +270 -0
- package/_cjs/core/runtime/ProtocolVersionResolver-p.js.map +1 -0
- package/_cjs/core/runtime/initFhevmDecryptRuntime-p.js +1 -1
- package/_cjs/core/runtime/initFhevmDecryptRuntime-p.js.map +1 -1
- package/_cjs/core/runtime/initFhevmEncryptRuntime-p.js +1 -1
- package/_cjs/core/runtime/initFhevmEncryptRuntime-p.js.map +1 -1
- package/_cjs/core/runtime/initFhevmRuntime-p.js +4 -1
- package/_cjs/core/runtime/initFhevmRuntime-p.js.map +1 -1
- package/_cjs/core/runtime/resolveFhevmVersions-p.js +48 -0
- package/_cjs/core/runtime/resolveFhevmVersions-p.js.map +1 -0
- package/_cjs/core/runtimeConfig-p.js +10 -0
- package/_cjs/core/runtimeConfig-p.js.map +1 -1
- package/_cjs/core/types/{zkProofBuilder.js → moduleVersions.js} +1 -1
- package/_cjs/core/types/moduleVersions.js.map +1 -0
- package/_cjs/core/types/{fhevmUser.js → wasmAssets.js} +1 -1
- package/_cjs/core/types/wasmAssets.js.map +1 -0
- package/_cjs/core/types/{fhevmDecryptionKey.js → zkProofBuilder-p.js} +1 -1
- package/_cjs/core/types/zkProofBuilder-p.js.map +1 -0
- package/_cjs/core/utils-p/decrypt/verifyTkmsPublicKey.js +1 -0
- package/_cjs/core/utils-p/decrypt/verifyTkmsPublicKey.js.map +1 -1
- package/_cjs/ethers/internal/config.js +1 -18
- package/_cjs/ethers/internal/config.js.map +1 -1
- package/_cjs/viem/internal/config.js +1 -18
- package/_cjs/viem/internal/config.js.map +1 -1
- package/_cjs/wasm/tfhe/TfheApi.d.ts +12 -12
- package/_cjs/wasm/tfhe/loadTfheLib.js +11 -11
- package/_cjs/wasm/tfhe/loadTfheLib.js.map +2 -2
- package/_cjs/wasm/tfhe/v1.5.3/startWorkers.js +26 -9
- package/_cjs/wasm/tfhe/v1.5.3/startWorkers.js.map +2 -2
- package/_cjs/wasm/tfhe/v1.5.3/tfhe.d.ts +7 -0
- package/_cjs/wasm/tfhe/v1.5.3/tfhe.js +6 -1
- package/_cjs/wasm/tfhe/v1.5.3/tfhe.js.map +2 -2
- package/_cjs/wasm/tfhe/{v1.6.1 → v1.6.2}/startWorkers.js +28 -11
- package/_cjs/wasm/tfhe/v1.6.2/startWorkers.js.map +7 -0
- package/_cjs/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe-worker.mjs +40 -40
- package/_cjs/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe.d.ts +92 -85
- package/_cjs/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe.js +251 -443
- package/_cjs/wasm/tfhe/v1.6.2/tfhe.js.map +7 -0
- package/_cjs/wasm/tfhe/v1.6.2/tfhe_bg.wasm +0 -0
- package/_cjs/wasm/tfhe/v1.6.2/tfhe_bg.wasm.base64.js +35 -0
- package/_cjs/wasm/tfhe/v1.6.2/tfhe_bg.wasm.base64.js.map +7 -0
- package/_cjs/wasm/tkms/loadKmsLib.js.map +1 -1
- package/_cjs/wasm/tkms/v0.13.10/kms_lib.d.ts +4 -0
- package/_cjs/wasm/tkms/v0.13.10/kms_lib.js +6 -1
- package/_cjs/wasm/tkms/v0.13.10/kms_lib.js.map +2 -2
- package/_cjs/wasm/tkms/v0.13.20-0/kms_lib.d.ts +4 -0
- package/_cjs/wasm/tkms/v0.13.20-0/kms_lib.js +6 -1
- package/_cjs/wasm/tkms/v0.13.20-0/kms_lib.js.map +2 -2
- package/_cjs/wasm/wasmBaseUrl.js +12 -7
- package/_cjs/wasm/wasmBaseUrl.js.map +2 -2
- package/_esm/core/_version.js +1 -1
- package/_esm/core/actions/base/canDecryptPublicValue.js +1 -1
- package/_esm/core/actions/base/canDecryptPublicValue.js.map +1 -1
- package/_esm/core/actions/base/canDecryptPublicValues.js +1 -1
- package/_esm/core/actions/base/canDecryptPublicValues.js.map +1 -1
- package/_esm/core/actions/base/{fetchKmsSignedcryptedShares.js → fetchKmsSigncryptedShares.js} +4 -4
- package/_esm/core/actions/base/fetchKmsSigncryptedShares.js.map +1 -0
- package/_esm/core/actions/base/index.js +1 -1
- package/_esm/core/actions/base/index.js.map +1 -1
- package/_esm/core/actions/base/readKmsSignersContext.js +2 -1
- package/_esm/core/actions/base/readKmsSignersContext.js.map +1 -1
- package/_esm/core/actions/chain/parseTransportKeyPair.js.map +1 -1
- package/_esm/core/actions/decrypt/decryptKmsSigncryptedShares.js +11 -0
- package/_esm/core/actions/decrypt/decryptKmsSigncryptedShares.js.map +1 -0
- package/_esm/core/actions/decrypt/decryptValue.js +3 -1
- package/_esm/core/actions/decrypt/decryptValue.js.map +1 -1
- package/_esm/core/actions/decrypt/decryptValues.js +3 -1
- package/_esm/core/actions/decrypt/decryptValues.js.map +1 -1
- package/_esm/core/actions/decrypt/decryptValuesFromPairs.js +3 -1
- package/_esm/core/actions/decrypt/decryptValuesFromPairs.js.map +1 -1
- package/_esm/core/actions/decrypt/generateTransportKeyPair.js +3 -1
- package/_esm/core/actions/decrypt/generateTransportKeyPair.js.map +1 -1
- package/_esm/core/actions/decrypt/index.js +1 -1
- package/_esm/core/actions/decrypt/index.js.map +1 -1
- package/_esm/core/actions/encrypt/encryptValue.js +3 -1
- package/_esm/core/actions/encrypt/encryptValue.js.map +1 -1
- package/_esm/core/actions/encrypt/encryptValues.js +3 -1
- package/_esm/core/actions/encrypt/encryptValues.js.map +1 -1
- package/_esm/core/actions/encrypt/generateZkProof.js +5 -1
- package/_esm/core/actions/encrypt/generateZkProof.js.map +1 -1
- package/_esm/core/actions/host/readFhevmExecutorContractData.js +8 -8
- package/_esm/core/actions/host/readFhevmExecutorContractData.js.map +1 -1
- package/_esm/core/actions/host/readInputVerifierContractData.js +2 -2
- package/_esm/core/actions/host/readInputVerifierContractData.js.map +1 -1
- package/_esm/core/actions/host/readKmsVerifierContractData.js +7 -6
- package/_esm/core/actions/host/readKmsVerifierContractData.js.map +1 -1
- package/_esm/core/actions/host/resolveFhevmConfig.js +7 -1
- package/_esm/core/actions/host/resolveFhevmConfig.js.map +1 -1
- package/_esm/core/base/bytes.js +2 -1
- package/_esm/core/base/bytes.js.map +1 -1
- package/_esm/core/base/environment.js +164 -0
- package/_esm/core/base/environment.js.map +1 -0
- package/_esm/core/base/errors/Sha256VerificationError.js +11 -0
- package/_esm/core/base/errors/Sha256VerificationError.js.map +1 -0
- package/_esm/core/base/inflate.js +337 -0
- package/_esm/core/base/inflate.js.map +1 -0
- package/_esm/core/base/isomorphicFs.js +21 -0
- package/_esm/core/base/isomorphicFs.js.map +1 -0
- package/_esm/core/base/isomorphicWorker.js +92 -85
- package/_esm/core/base/isomorphicWorker.js.map +1 -1
- package/_esm/core/base/object.js +28 -0
- package/_esm/core/base/object.js.map +1 -1
- package/_esm/core/base/semver.js +164 -0
- package/_esm/core/base/semver.js.map +1 -0
- package/_esm/core/base/uint.js +23 -2
- package/_esm/core/base/uint.js.map +1 -1
- package/_esm/core/base/wasm.js +25 -31
- package/_esm/core/base/wasm.js.map +1 -1
- package/_esm/core/chains/definitions/localTestnet.js +3 -0
- package/_esm/core/chains/definitions/localTestnet.js.map +1 -1
- package/_esm/core/chains/definitions/mainnet.js +1 -0
- package/_esm/core/chains/definitions/mainnet.js.map +1 -1
- package/_esm/core/chains/definitions/sepolia.js +1 -0
- package/_esm/core/chains/definitions/sepolia.js.map +1 -1
- package/_esm/core/clients/decorators/base.js +6 -1
- package/_esm/core/clients/decorators/base.js.map +1 -1
- package/_esm/core/clients/decorators/decrypt-p.js +11 -0
- package/_esm/core/clients/decorators/decrypt-p.js.map +1 -0
- package/_esm/core/clients/decorators/decrypt.js +3 -7
- package/_esm/core/clients/decorators/decrypt.js.map +1 -1
- package/_esm/core/clients/decorators/encrypt-p.js +6 -2
- package/_esm/core/clients/decorators/encrypt-p.js.map +1 -1
- package/_esm/core/clients/decorators/encrypt.js.map +1 -1
- package/_esm/core/coprocessor/ZkProof-p.js +4 -2
- package/_esm/core/coprocessor/ZkProof-p.js.map +1 -1
- package/_esm/core/coprocessor/ZkProofBuilder-p.js +2 -1
- package/_esm/core/coprocessor/ZkProofBuilder-p.js.map +1 -1
- package/_esm/core/coprocessor/encrypt.js +1 -1
- package/_esm/core/coprocessor/encrypt.js.map +1 -1
- package/_esm/core/errors/RelayerResponseStatusError.js +7 -2
- package/_esm/core/errors/RelayerResponseStatusError.js.map +1 -1
- package/_esm/core/host-contracts/HostContractVersion-p.js +34 -3
- package/_esm/core/host-contracts/HostContractVersion-p.js.map +1 -1
- package/_esm/core/host-contracts/KmsSignersContext-p.js +24 -6
- package/_esm/core/host-contracts/KmsSignersContext-p.js.map +1 -1
- package/_esm/core/host-contracts/abi-fragments/fragments.js +24 -0
- package/_esm/core/host-contracts/abi-fragments/fragments.js.map +1 -1
- package/_esm/core/host-contracts/canDecryptValuesFromPairs.js +1 -1
- package/_esm/core/host-contracts/canDecryptValuesFromPairs.js.map +1 -1
- package/_esm/core/host-contracts/checkAllowedForDecryption.js +2 -2
- package/_esm/core/host-contracts/checkAllowedForDecryption.js.map +1 -1
- package/_esm/core/host-contracts/checkDelegation.js +8 -8
- package/_esm/core/host-contracts/checkDelegation.js.map +1 -1
- package/_esm/core/host-contracts/checkPersistAllowed.js +9 -9
- package/_esm/core/host-contracts/checkPersistAllowed.js.map +1 -1
- package/_esm/core/host-contracts/getAclAddress-p.js +1 -2
- package/_esm/core/host-contracts/getAclAddress-p.js.map +1 -1
- package/_esm/core/host-contracts/getCurrentKmsContextAndEpoch-p.js +63 -0
- package/_esm/core/host-contracts/getCurrentKmsContextAndEpoch-p.js.map +1 -0
- package/_esm/core/host-contracts/getCurrentKmsContextId-p.js +6 -7
- package/_esm/core/host-contracts/getCurrentKmsContextId-p.js.map +1 -1
- package/_esm/core/host-contracts/getFhevmExecutorAddress-p.js +1 -1
- package/_esm/core/host-contracts/getFhevmExecutorAddress-p.js.map +1 -1
- package/_esm/core/host-contracts/getHandleVersion-p.js +1 -2
- package/_esm/core/host-contracts/getHandleVersion-p.js.map +1 -1
- package/_esm/core/host-contracts/getHcuLimitAddress-p.js +1 -2
- package/_esm/core/host-contracts/getHcuLimitAddress-p.js.map +1 -1
- package/_esm/core/host-contracts/getInputVerifierAddress-p.js +1 -2
- package/_esm/core/host-contracts/getInputVerifierAddress-p.js.map +1 -1
- package/_esm/core/host-contracts/getKmsContextSignersAndThreshold-p.js +6 -8
- package/_esm/core/host-contracts/getKmsContextSignersAndThreshold-p.js.map +1 -1
- package/_esm/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.js +5 -6
- package/_esm/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.js.map +1 -1
- package/_esm/core/host-contracts/getSignersForKmsContext-p.js +5 -7
- package/_esm/core/host-contracts/getSignersForKmsContext-p.js.map +1 -1
- package/_esm/core/host-contracts/isAllowedForDecryption.js +4 -4
- package/_esm/core/host-contracts/isAllowedForDecryption.js.map +1 -1
- package/_esm/core/host-contracts/isHandleDelegatedForUserDecryption-p.js +5 -5
- package/_esm/core/host-contracts/isHandleDelegatedForUserDecryption-p.js.map +1 -1
- package/_esm/core/host-contracts/isUserDecryptable.js +2 -2
- package/_esm/core/host-contracts/isUserDecryptable.js.map +1 -1
- package/_esm/core/host-contracts/persistAllowed.js +4 -4
- package/_esm/core/host-contracts/persistAllowed.js.map +1 -1
- package/_esm/core/host-contracts/readKmsSignersContext-p.js +89 -29
- package/_esm/core/host-contracts/readKmsSignersContext-p.js.map +1 -1
- package/_esm/core/key/FheEncryptionKeyWasm-p.js +12 -4
- package/_esm/core/key/FheEncryptionKeyWasm-p.js.map +1 -1
- package/_esm/core/key/deserializeFheEncryptionKey.js +3 -0
- package/_esm/core/key/deserializeFheEncryptionKey.js.map +1 -1
- package/_esm/core/key/fetchFheEncryptionKey.js +1 -1
- package/_esm/core/key/fetchFheEncryptionKey.js.map +1 -1
- package/_esm/core/key/fetchFheEncryptionKeyBytes.js.map +1 -1
- package/_esm/core/key/serializeFheEncryptionKey.js +4 -1
- package/_esm/core/key/serializeFheEncryptionKey.js.map +1 -1
- package/_esm/core/kms/KmsSigncryptedShares-p.js +9 -1
- package/_esm/core/kms/KmsSigncryptedShares-p.js.map +1 -1
- package/_esm/core/kms/SignedDecryptionPermit-p.js +5 -1
- package/_esm/core/kms/SignedDecryptionPermit-p.js.map +1 -1
- package/_esm/core/kms/TransportKeyPair-p.js +28 -7
- package/_esm/core/kms/TransportKeyPair-p.js.map +1 -1
- package/_esm/core/kms/createKmsUserDecryptEip712.js +8 -0
- package/_esm/core/kms/createKmsUserDecryptEip712.js.map +1 -1
- package/_esm/core/kms/createKmsUserDecryptEip712V2.js +98 -0
- package/_esm/core/kms/createKmsUserDecryptEip712V2.js.map +1 -0
- package/_esm/core/kms/{decryptKmsSignedcryptedShares-p.js → decryptKmsSigncryptedShares-p.js} +9 -2
- package/_esm/core/kms/decryptKmsSigncryptedShares-p.js.map +1 -0
- package/_esm/core/kms/decryptValuesFromPairs.js +4 -4
- package/_esm/core/kms/decryptValuesFromPairs.js.map +1 -1
- package/_esm/core/kms/{fetchKmsSignedcryptedShares-p.js → fetchKmsSigncryptedShares-p.js} +12 -6
- package/_esm/core/kms/fetchKmsSigncryptedShares-p.js.map +1 -0
- package/_esm/core/kms/kmsExtraData.js +70 -12
- package/_esm/core/kms/kmsExtraData.js.map +1 -1
- package/_esm/core/kms/kmsUserDecryptEip712V2Types.js +28 -0
- package/_esm/core/kms/kmsUserDecryptEip712V2Types.js.map +1 -0
- package/_esm/core/kms/publicDecrypt.js +5 -3
- package/_esm/core/kms/publicDecrypt.js.map +1 -1
- package/_esm/core/modules/decrypt/mock.js +0 -24
- package/_esm/core/modules/decrypt/mock.js.map +1 -1
- package/_esm/core/modules/decrypt/module/api-p.js +51 -23
- package/_esm/core/modules/decrypt/module/api-p.js.map +1 -1
- package/_esm/core/modules/decrypt/module/index.js +31 -25
- package/_esm/core/modules/decrypt/module/index.js.map +1 -1
- package/_esm/core/modules/decrypt/module/init-p.js +141 -64
- package/_esm/core/modules/decrypt/module/init-p.js.map +1 -1
- package/_esm/core/modules/encrypt/mock.js +26 -9
- package/_esm/core/modules/encrypt/mock.js.map +1 -1
- package/_esm/core/modules/encrypt/module/api-p.js +50 -21
- package/_esm/core/modules/encrypt/module/api-p.js.map +1 -1
- package/_esm/core/modules/encrypt/module/index.js +3 -3
- package/_esm/core/modules/encrypt/module/index.js.map +1 -1
- package/_esm/core/modules/encrypt/module/init-p.js +369 -82
- package/_esm/core/modules/encrypt/module/init-p.js.map +1 -1
- package/_esm/core/modules/relayer/cleartext/fetchDelegatedUserDecrypt.js +2 -2
- package/_esm/core/modules/relayer/cleartext/fetchDelegatedUserDecrypt.js.map +1 -1
- package/_esm/core/modules/relayer/cleartext/fetchUserDecrypt.js +2 -2
- package/_esm/core/modules/relayer/cleartext/fetchUserDecrypt.js.map +1 -1
- package/_esm/core/modules/relayer/module/RelayerAsyncRequest.js +57 -4
- package/_esm/core/modules/relayer/module/RelayerAsyncRequest.js.map +1 -1
- package/_esm/core/modules/relayer/module/fetchFheEncryptionKeySource.js +8 -1
- package/_esm/core/modules/relayer/module/fetchFheEncryptionKeySource.js.map +1 -1
- package/_esm/core/modules/relayer/module/readErrorMessage.js +52 -0
- package/_esm/core/modules/relayer/module/readErrorMessage.js.map +1 -0
- package/_esm/core/runtime/CoreFhevm-p.js +167 -5
- package/_esm/core/runtime/CoreFhevm-p.js.map +1 -1
- package/_esm/core/runtime/HyperWasmSolver-p.js +268 -0
- package/_esm/core/runtime/HyperWasmSolver-p.js.map +1 -0
- package/_esm/core/runtime/ProtocolVersionResolver-p.js +326 -0
- package/_esm/core/runtime/ProtocolVersionResolver-p.js.map +1 -0
- package/_esm/core/runtime/initFhevmDecryptRuntime-p.js +1 -1
- package/_esm/core/runtime/initFhevmDecryptRuntime-p.js.map +1 -1
- package/_esm/core/runtime/initFhevmEncryptRuntime-p.js +1 -1
- package/_esm/core/runtime/initFhevmEncryptRuntime-p.js.map +1 -1
- package/_esm/core/runtime/initFhevmRuntime-p.js +4 -1
- package/_esm/core/runtime/initFhevmRuntime-p.js.map +1 -1
- package/_esm/core/runtime/resolveFhevmVersions-p.js +62 -0
- package/_esm/core/runtime/resolveFhevmVersions-p.js.map +1 -0
- package/_esm/core/runtimeConfig-p.js +9 -0
- package/_esm/core/runtimeConfig-p.js.map +1 -1
- package/_esm/core/types/moduleVersions.js +2 -0
- package/_esm/core/types/moduleVersions.js.map +1 -0
- package/_esm/core/types/wasmAssets.js +2 -0
- package/_esm/core/types/wasmAssets.js.map +1 -0
- package/_esm/core/types/zkProofBuilder-p.js +2 -0
- package/_esm/core/types/zkProofBuilder-p.js.map +1 -0
- package/_esm/core/utils-p/decrypt/verifyTkmsPublicKey.js +1 -0
- package/_esm/core/utils-p/decrypt/verifyTkmsPublicKey.js.map +1 -1
- package/_esm/ethers/internal/config.js +1 -18
- package/_esm/ethers/internal/config.js.map +1 -1
- package/_esm/viem/internal/config.js +1 -18
- package/_esm/viem/internal/config.js.map +1 -1
- package/_esm/wasm/tfhe/TfheApi.d.ts +12 -12
- package/_esm/wasm/tfhe/loadTfheLib.js +11 -11
- package/_esm/wasm/tfhe/v1.5.3/startWorkers.js +41 -20
- package/_esm/wasm/tfhe/v1.5.3/tfhe.d.ts +7 -0
- package/_esm/wasm/tfhe/v1.5.3/tfhe.js +8 -0
- package/_esm/wasm/tfhe/{v1.6.1 → v1.6.2}/startWorkers.js +46 -25
- package/_esm/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe-worker.mjs +40 -40
- package/_esm/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe.d.ts +92 -85
- package/_esm/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe.js +253 -442
- package/_esm/wasm/tfhe/v1.6.2/tfhe_bg.wasm +0 -0
- package/_esm/wasm/tfhe/v1.6.2/tfhe_bg.wasm.base64.js +7 -0
- package/_esm/wasm/tkms/v0.13.10/kms_lib.d.ts +4 -0
- package/_esm/wasm/tkms/v0.13.10/kms_lib.js +8 -0
- package/_esm/wasm/tkms/v0.13.20-0/kms_lib.d.ts +4 -0
- package/_esm/wasm/tkms/v0.13.20-0/kms_lib.js +8 -0
- package/_esm/wasm/wasmBaseUrl.js +32 -4
- package/_types/core/actions/base/{fetchKmsSignedcryptedShares.d.ts → fetchKmsSigncryptedShares.d.ts} +7 -7
- package/_types/core/actions/base/fetchKmsSigncryptedShares.d.ts.map +1 -0
- package/_types/core/actions/base/index.d.ts +1 -1
- package/_types/core/actions/base/index.d.ts.map +1 -1
- package/_types/core/actions/base/readKmsSignersContext.d.ts.map +1 -1
- package/_types/core/actions/chain/parseSignedDecryptionPermit.d.ts +2 -2
- package/_types/core/actions/chain/parseSignedDecryptionPermit.d.ts.map +1 -1
- package/_types/core/actions/chain/parseTransportKeyPair.d.ts +1 -1
- package/_types/core/actions/chain/parseTransportKeyPair.d.ts.map +1 -1
- package/_types/core/actions/decrypt/{decryptKmsSignedcryptedShares.d.ts → decryptKmsSigncryptedShares.d.ts} +4 -4
- package/_types/core/actions/decrypt/decryptKmsSigncryptedShares.d.ts.map +1 -0
- package/_types/core/actions/decrypt/decryptValue.d.ts.map +1 -1
- package/_types/core/actions/decrypt/decryptValues.d.ts.map +1 -1
- package/_types/core/actions/decrypt/decryptValuesFromPairs.d.ts.map +1 -1
- package/_types/core/actions/decrypt/generateTransportKeyPair.d.ts +2 -2
- package/_types/core/actions/decrypt/generateTransportKeyPair.d.ts.map +1 -1
- package/_types/core/actions/decrypt/index.d.ts +1 -1
- package/_types/core/actions/decrypt/index.d.ts.map +1 -1
- package/_types/core/actions/encrypt/encryptValue.d.ts.map +1 -1
- package/_types/core/actions/encrypt/encryptValues.d.ts.map +1 -1
- package/_types/core/actions/encrypt/generateZkProof.d.ts.map +1 -1
- package/_types/core/actions/host/readKmsVerifierContractData.d.ts +1 -0
- package/_types/core/actions/host/readKmsVerifierContractData.d.ts.map +1 -1
- package/_types/core/actions/host/resolveFhevmConfig.d.ts +2 -0
- package/_types/core/actions/host/resolveFhevmConfig.d.ts.map +1 -1
- package/_types/core/base/bytes.d.ts.map +1 -1
- package/_types/core/base/environment.d.ts +92 -0
- package/_types/core/base/environment.d.ts.map +1 -0
- package/_types/core/base/errors/Sha256VerificationError.d.ts +14 -0
- package/_types/core/base/errors/Sha256VerificationError.d.ts.map +1 -0
- package/_types/core/base/inflate.d.ts +25 -0
- package/_types/core/base/inflate.d.ts.map +1 -0
- package/_types/core/base/isomorphicFs.d.ts +2 -0
- package/_types/core/base/isomorphicFs.d.ts.map +1 -0
- package/_types/core/base/isomorphicWorker.d.ts +27 -43
- package/_types/core/base/isomorphicWorker.d.ts.map +1 -1
- package/_types/core/base/object.d.ts +7 -0
- package/_types/core/base/object.d.ts.map +1 -1
- package/_types/core/base/semver.d.ts +39 -0
- package/_types/core/base/semver.d.ts.map +1 -0
- package/_types/core/base/uint.d.ts +13 -2
- package/_types/core/base/uint.d.ts.map +1 -1
- package/_types/core/base/wasm.d.ts +0 -8
- package/_types/core/base/wasm.d.ts.map +1 -1
- package/_types/core/chains/definitions/localTestnet.d.ts +3 -0
- package/_types/core/chains/definitions/localTestnet.d.ts.map +1 -1
- package/_types/core/chains/definitions/mainnet.d.ts +1 -0
- package/_types/core/chains/definitions/mainnet.d.ts.map +1 -1
- package/_types/core/chains/definitions/sepolia.d.ts.map +1 -1
- package/_types/core/clients/decorators/base.d.ts.map +1 -1
- package/_types/core/clients/decorators/decrypt-p.d.ts +4 -0
- package/_types/core/clients/decorators/decrypt-p.d.ts.map +1 -0
- package/_types/core/clients/decorators/decrypt.d.ts +4 -2
- package/_types/core/clients/decorators/decrypt.d.ts.map +1 -1
- package/_types/core/clients/decorators/encrypt-p.d.ts +2 -3
- package/_types/core/clients/decorators/encrypt-p.d.ts.map +1 -1
- package/_types/core/clients/decorators/encrypt.d.ts +4 -2
- package/_types/core/clients/decorators/encrypt.d.ts.map +1 -1
- package/_types/core/coprocessor/ZkProof-p.d.ts +9 -2
- package/_types/core/coprocessor/ZkProof-p.d.ts.map +1 -1
- package/_types/core/coprocessor/ZkProofBuilder-p.d.ts +3 -1
- package/_types/core/coprocessor/ZkProofBuilder-p.d.ts.map +1 -1
- package/_types/core/coprocessor/encrypt.d.ts +2 -0
- package/_types/core/coprocessor/encrypt.d.ts.map +1 -1
- package/_types/core/errors/RelayerResponseStatusError.d.ts +7 -1
- package/_types/core/errors/RelayerResponseStatusError.d.ts.map +1 -1
- package/_types/core/host-contracts/HostContractVersion-p.d.ts +18 -1
- package/_types/core/host-contracts/HostContractVersion-p.d.ts.map +1 -1
- package/_types/core/host-contracts/KmsSignersContext-p.d.ts +2 -1
- package/_types/core/host-contracts/KmsSignersContext-p.d.ts.map +1 -1
- package/_types/core/host-contracts/abi-fragments/fragments.d.ts +5 -0
- package/_types/core/host-contracts/abi-fragments/fragments.d.ts.map +1 -1
- package/_types/core/host-contracts/checkAllowedForDecryption.d.ts +1 -1
- package/_types/core/host-contracts/checkAllowedForDecryption.d.ts.map +1 -1
- package/_types/core/host-contracts/checkDelegation.d.ts +1 -1
- package/_types/core/host-contracts/checkDelegation.d.ts.map +1 -1
- package/_types/core/host-contracts/checkPersistAllowed.d.ts +1 -1
- package/_types/core/host-contracts/checkPersistAllowed.d.ts.map +1 -1
- package/_types/core/host-contracts/getAclAddress-p.d.ts +1 -1
- package/_types/core/host-contracts/getAclAddress-p.d.ts.map +1 -1
- package/_types/core/host-contracts/getCurrentKmsContextAndEpoch-p.d.ts +30 -0
- package/_types/core/host-contracts/getCurrentKmsContextAndEpoch-p.d.ts.map +1 -0
- package/_types/core/host-contracts/getCurrentKmsContextId-p.d.ts +1 -1
- package/_types/core/host-contracts/getCurrentKmsContextId-p.d.ts.map +1 -1
- package/_types/core/host-contracts/getFhevmExecutorAddress-p.d.ts +1 -1
- package/_types/core/host-contracts/getFhevmExecutorAddress-p.d.ts.map +1 -1
- package/_types/core/host-contracts/getHandleVersion-p.d.ts +1 -1
- package/_types/core/host-contracts/getHandleVersion-p.d.ts.map +1 -1
- package/_types/core/host-contracts/getHcuLimitAddress-p.d.ts +1 -1
- package/_types/core/host-contracts/getHcuLimitAddress-p.d.ts.map +1 -1
- package/_types/core/host-contracts/getInputVerifierAddress-p.d.ts +1 -1
- package/_types/core/host-contracts/getInputVerifierAddress-p.d.ts.map +1 -1
- package/_types/core/host-contracts/getKmsContextSignersAndThreshold-p.d.ts +1 -1
- package/_types/core/host-contracts/getKmsContextSignersAndThreshold-p.d.ts.map +1 -1
- package/_types/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.d.ts +1 -1
- package/_types/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.d.ts.map +1 -1
- package/_types/core/host-contracts/getSignersForKmsContext-p.d.ts +2 -2
- package/_types/core/host-contracts/getSignersForKmsContext-p.d.ts.map +1 -1
- package/_types/core/host-contracts/isAllowedForDecryption.d.ts +1 -1
- package/_types/core/host-contracts/isAllowedForDecryption.d.ts.map +1 -1
- package/_types/core/host-contracts/isHandleDelegatedForUserDecryption-p.d.ts +1 -1
- package/_types/core/host-contracts/isHandleDelegatedForUserDecryption-p.d.ts.map +1 -1
- package/_types/core/host-contracts/isUserDecryptable.d.ts +1 -1
- package/_types/core/host-contracts/isUserDecryptable.d.ts.map +1 -1
- package/_types/core/host-contracts/persistAllowed.d.ts +1 -1
- package/_types/core/host-contracts/persistAllowed.d.ts.map +1 -1
- package/_types/core/host-contracts/readKmsSignersContext-p.d.ts +25 -7
- package/_types/core/host-contracts/readKmsSignersContext-p.d.ts.map +1 -1
- package/_types/core/key/FheEncryptionKeyWasm-p.d.ts +3 -1
- package/_types/core/key/FheEncryptionKeyWasm-p.d.ts.map +1 -1
- package/_types/core/key/deserializeFheEncryptionKey.d.ts +2 -0
- package/_types/core/key/deserializeFheEncryptionKey.d.ts.map +1 -1
- package/_types/core/key/fetchFheEncryptionKey.d.ts +3 -1
- package/_types/core/key/fetchFheEncryptionKey.d.ts.map +1 -1
- package/_types/core/key/fetchFheEncryptionKeyBytes.d.ts.map +1 -1
- package/_types/core/key/serializeFheEncryptionKey.d.ts.map +1 -1
- package/_types/core/kms/KmsSigncryptedShares-p.d.ts.map +1 -1
- package/_types/core/kms/SignedDecryptionPermit-p.d.ts.map +1 -1
- package/_types/core/kms/TransportKeyPair-p.d.ts +9 -0
- package/_types/core/kms/TransportKeyPair-p.d.ts.map +1 -1
- package/_types/core/kms/createKmsUserDecryptEip712.d.ts.map +1 -1
- package/_types/core/kms/createKmsUserDecryptEip712V2.d.ts +15 -0
- package/_types/core/kms/createKmsUserDecryptEip712V2.d.ts.map +1 -0
- package/_types/core/kms/{decryptKmsSignedcryptedShares-p.d.ts → decryptKmsSigncryptedShares-p.d.ts} +4 -2
- package/_types/core/kms/decryptKmsSigncryptedShares-p.d.ts.map +1 -0
- package/_types/core/kms/decryptValuesFromPairs.d.ts +2 -0
- package/_types/core/kms/decryptValuesFromPairs.d.ts.map +1 -1
- package/_types/core/kms/{fetchKmsSignedcryptedShares-p.d.ts → fetchKmsSigncryptedShares-p.d.ts} +2 -2
- package/_types/core/kms/fetchKmsSigncryptedShares-p.d.ts.map +1 -0
- package/_types/core/kms/kmsExtraData.d.ts +9 -2
- package/_types/core/kms/kmsExtraData.d.ts.map +1 -1
- package/_types/core/kms/kmsUserDecryptEip712V2Types.d.ts +3 -0
- package/_types/core/kms/kmsUserDecryptEip712V2Types.d.ts.map +1 -0
- package/_types/core/kms/publicDecrypt.d.ts.map +1 -1
- package/_types/core/modules/decrypt/mock.d.ts +1 -2
- package/_types/core/modules/decrypt/mock.d.ts.map +1 -1
- package/_types/core/modules/decrypt/module/api-p.d.ts +2 -2
- package/_types/core/modules/decrypt/module/api-p.d.ts.map +1 -1
- package/_types/core/modules/decrypt/module/index.d.ts +1 -2
- package/_types/core/modules/decrypt/module/index.d.ts.map +1 -1
- package/_types/core/modules/decrypt/module/init-p.d.ts +3 -3
- package/_types/core/modules/decrypt/module/init-p.d.ts.map +1 -1
- package/_types/core/modules/decrypt/types.d.ts +33 -34
- package/_types/core/modules/decrypt/types.d.ts.map +1 -1
- package/_types/core/modules/encrypt/mock.d.ts.map +1 -1
- package/_types/core/modules/encrypt/module/api-p.d.ts.map +1 -1
- package/_types/core/modules/encrypt/module/index.d.ts.map +1 -1
- package/_types/core/modules/encrypt/module/init-p.d.ts +11 -4
- package/_types/core/modules/encrypt/module/init-p.d.ts.map +1 -1
- package/_types/core/modules/encrypt/types.d.ts +31 -2
- package/_types/core/modules/encrypt/types.d.ts.map +1 -1
- package/_types/core/modules/relayer/module/RelayerAsyncRequest.d.ts +18 -0
- package/_types/core/modules/relayer/module/RelayerAsyncRequest.d.ts.map +1 -1
- package/_types/core/modules/relayer/module/fetchFheEncryptionKeySource.d.ts.map +1 -1
- package/_types/core/modules/relayer/module/readErrorMessage.d.ts +26 -0
- package/_types/core/modules/relayer/module/readErrorMessage.d.ts.map +1 -0
- package/_types/core/runtime/CoreFhevm-p.d.ts +15 -4
- package/_types/core/runtime/CoreFhevm-p.d.ts.map +1 -1
- package/_types/core/runtime/HyperWasmSolver-p.d.ts +71 -0
- package/_types/core/runtime/HyperWasmSolver-p.d.ts.map +1 -0
- package/_types/core/runtime/ProtocolVersionResolver-p.d.ts +29 -0
- package/_types/core/runtime/ProtocolVersionResolver-p.d.ts.map +1 -0
- package/_types/core/runtime/initFhevmRuntime-p.d.ts.map +1 -1
- package/_types/core/runtime/resolveFhevmVersions-p.d.ts +21 -0
- package/_types/core/runtime/resolveFhevmVersions-p.d.ts.map +1 -0
- package/_types/core/runtimeConfig-p.d.ts +3 -2
- package/_types/core/runtimeConfig-p.d.ts.map +1 -1
- package/_types/core/types/auth.d.ts +12 -1
- package/_types/core/types/auth.d.ts.map +1 -1
- package/_types/core/types/coreFhevmClient.d.ts +72 -2
- package/_types/core/types/coreFhevmClient.d.ts.map +1 -1
- package/_types/core/types/coreFhevmRuntime.d.ts +3 -9
- package/_types/core/types/coreFhevmRuntime.d.ts.map +1 -1
- package/_types/core/types/fheEncryptionKey.d.ts +2 -0
- package/_types/core/types/fheEncryptionKey.d.ts.map +1 -1
- package/_types/core/types/fhevmChain.d.ts +3 -0
- package/_types/core/types/fhevmChain.d.ts.map +1 -1
- package/_types/core/types/hostContract.d.ts +1 -0
- package/_types/core/types/hostContract.d.ts.map +1 -1
- package/_types/core/types/index.d.ts +1 -1
- package/_types/core/types/index.d.ts.map +1 -1
- package/_types/core/types/kms-p.d.ts +2 -0
- package/_types/core/types/kms-p.d.ts.map +1 -1
- package/_types/core/types/kms.d.ts +71 -21
- package/_types/core/types/kms.d.ts.map +1 -1
- package/_types/core/types/kmsSignersContext.d.ts +8 -0
- package/_types/core/types/kmsSignersContext.d.ts.map +1 -1
- package/_types/core/types/logger.d.ts +1 -0
- package/_types/core/types/logger.d.ts.map +1 -1
- package/_types/core/types/moduleVersions.d.ts +25 -0
- package/_types/core/types/moduleVersions.d.ts.map +1 -0
- package/_types/core/types/tkms-p.d.ts +2 -0
- package/_types/core/types/tkms-p.d.ts.map +1 -1
- package/_types/core/types/wasmAssets.d.ts +2 -0
- package/_types/core/types/wasmAssets.d.ts.map +1 -0
- package/_types/core/types/{zkProofBuilder.d.ts → zkProofBuilder-p.d.ts} +8 -3
- package/_types/core/types/zkProofBuilder-p.d.ts.map +1 -0
- package/_types/core/utils-p/decrypt/verifyTkmsPublicKey.d.ts +2 -0
- package/_types/core/utils-p/decrypt/verifyTkmsPublicKey.d.ts.map +1 -1
- package/_types/ethers/cleartext/createFhevmCleartextDecryptClient.d.ts +2 -2
- package/_types/ethers/cleartext/createFhevmCleartextDecryptClient.d.ts.map +1 -1
- package/_types/ethers/cleartext/createFhevmCleartextEncryptClient.d.ts +2 -2
- package/_types/ethers/cleartext/createFhevmCleartextEncryptClient.d.ts.map +1 -1
- package/_types/ethers/clients/createFhevmDecryptClient.d.ts +2 -2
- package/_types/ethers/clients/createFhevmDecryptClient.d.ts.map +1 -1
- package/_types/ethers/clients/createFhevmEncryptClient.d.ts +2 -2
- package/_types/ethers/clients/createFhevmEncryptClient.d.ts.map +1 -1
- package/_types/viem/cleartext/createFhevmCleartextDecryptClient.d.ts +2 -2
- package/_types/viem/cleartext/createFhevmCleartextDecryptClient.d.ts.map +1 -1
- package/_types/viem/cleartext/createFhevmCleartextEncryptClient.d.ts +2 -2
- package/_types/viem/cleartext/createFhevmCleartextEncryptClient.d.ts.map +1 -1
- package/_types/viem/clients/createFhevmDecryptClient.d.ts +2 -2
- package/_types/viem/clients/createFhevmDecryptClient.d.ts.map +1 -1
- package/_types/viem/clients/createFhevmEncryptClient.d.ts +2 -2
- package/_types/viem/clients/createFhevmEncryptClient.d.ts.map +1 -1
- package/_types/wasm/tfhe/TfheApi.d.ts +12 -12
- package/_types/wasm/tfhe/v1.5.3/tfhe.d.ts +7 -0
- package/_types/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe.d.ts +92 -85
- package/_types/wasm/tfheModuleVersion-p.d.ts +1 -1
- package/_types/wasm/tfheModuleVersion-p.d.ts.map +1 -1
- package/_types/wasm/tkms/v0.13.10/kms_lib.d.ts +4 -0
- package/_types/wasm/tkms/v0.13.20-0/kms_lib.d.ts +4 -0
- package/_types/wasm/tkmsModuleVersion-p.d.ts +1 -1
- package/_types/wasm/tkmsModuleVersion-p.d.ts.map +1 -1
- package/core/_version.ts +1 -1
- package/core/actions/base/canDecryptPublicValue.ts +1 -1
- package/core/actions/base/canDecryptPublicValues.ts +1 -1
- package/core/actions/base/{fetchKmsSignedcryptedShares.ts → fetchKmsSigncryptedShares.ts} +16 -16
- package/core/actions/base/index.ts +5 -5
- package/core/actions/base/readKmsSignersContext.ts +2 -1
- package/core/actions/chain/parseSignedDecryptionPermit.ts +2 -2
- package/core/actions/chain/parseTransportKeyPair.ts +2 -1
- package/core/actions/decrypt/{decryptKmsSignedcryptedShares.ts → decryptKmsSigncryptedShares.ts} +12 -9
- package/core/actions/decrypt/decryptValue.ts +4 -1
- package/core/actions/decrypt/decryptValues.ts +4 -1
- package/core/actions/decrypt/decryptValuesFromPairs.ts +4 -1
- package/core/actions/decrypt/generateTransportKeyPair.ts +5 -3
- package/core/actions/decrypt/index.ts +4 -4
- package/core/actions/encrypt/encryptValue.ts +4 -1
- package/core/actions/encrypt/encryptValues.ts +4 -1
- package/core/actions/encrypt/generateZkProof.ts +9 -1
- package/core/actions/host/readFhevmExecutorContractData.ts +8 -8
- package/core/actions/host/readInputVerifierContractData.ts +2 -2
- package/core/actions/host/readKmsVerifierContractData.ts +8 -6
- package/core/actions/host/resolveFhevmConfig.ts +10 -1
- package/core/base/bytes.ts +2 -1
- package/core/base/environment.ts +210 -0
- package/core/base/errors/Sha256VerificationError.ts +22 -0
- package/core/base/inflate.ts +373 -0
- package/core/base/isomorphicFs.ts +23 -0
- package/core/base/isomorphicWorker.ts +96 -123
- package/core/base/object.ts +38 -0
- package/core/base/semver.ts +231 -0
- package/core/base/uint.ts +33 -4
- package/core/base/wasm.ts +28 -35
- package/core/chains/definitions/localTestnet.ts +3 -0
- package/core/chains/definitions/mainnet.ts +1 -0
- package/core/chains/definitions/sepolia.ts +6 -6
- package/core/clients/decorators/base.ts +8 -1
- package/core/clients/decorators/decrypt-p.ts +18 -0
- package/core/clients/decorators/decrypt.ts +10 -15
- package/core/clients/decorators/encrypt-p.ts +12 -7
- package/core/clients/decorators/encrypt.ts +6 -4
- package/core/coprocessor/ZkProof-p.ts +17 -5
- package/core/coprocessor/ZkProofBuilder-p.ts +5 -2
- package/core/coprocessor/encrypt.ts +6 -1
- package/core/errors/RelayerResponseStatusError.ts +14 -2
- package/core/host-contracts/HostContractVersion-p.ts +60 -3
- package/core/host-contracts/KmsSignersContext-p.ts +36 -5
- package/core/host-contracts/abi-fragments/fragments.ts +28 -0
- package/core/host-contracts/canDecryptValuesFromPairs.ts +1 -1
- package/core/host-contracts/checkAllowedForDecryption.ts +3 -3
- package/core/host-contracts/checkDelegation.ts +9 -9
- package/core/host-contracts/checkPersistAllowed.ts +10 -10
- package/core/host-contracts/getAclAddress-p.ts +2 -3
- package/core/host-contracts/getCurrentKmsContextAndEpoch-p.ts +92 -0
- package/core/host-contracts/getCurrentKmsContextId-p.ts +8 -8
- package/core/host-contracts/getFhevmExecutorAddress-p.ts +2 -2
- package/core/host-contracts/getHandleVersion-p.ts +2 -3
- package/core/host-contracts/getHcuLimitAddress-p.ts +2 -3
- package/core/host-contracts/getInputVerifierAddress-p.ts +2 -3
- package/core/host-contracts/getKmsContextSignersAndThreshold-p.ts +7 -9
- package/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.ts +6 -7
- package/core/host-contracts/getSignersForKmsContext-p.ts +6 -8
- package/core/host-contracts/isAllowedForDecryption.ts +6 -6
- package/core/host-contracts/isHandleDelegatedForUserDecryption-p.ts +7 -7
- package/core/host-contracts/isUserDecryptable.ts +3 -3
- package/core/host-contracts/persistAllowed.ts +6 -6
- package/core/host-contracts/readKmsSignersContext-p.ts +131 -41
- package/core/key/FheEncryptionKeyWasm-p.ts +24 -3
- package/core/key/deserializeFheEncryptionKey.ts +8 -1
- package/core/key/fetchFheEncryptionKey.ts +8 -4
- package/core/key/fetchFheEncryptionKeyBytes.ts +4 -2
- package/core/key/serializeFheEncryptionKey.ts +8 -2
- package/core/kms/KmsSigncryptedShares-p.ts +11 -1
- package/core/kms/SignedDecryptionPermit-p.ts +6 -1
- package/core/kms/TransportKeyPair-p.ts +52 -11
- package/core/kms/createKmsUserDecryptEip712.ts +11 -0
- package/core/kms/createKmsUserDecryptEip712V2.ts +159 -0
- package/core/kms/{decryptKmsSignedcryptedShares-p.ts → decryptKmsSigncryptedShares-p.ts} +12 -2
- package/core/kms/decryptValuesFromPairs.ts +6 -4
- package/core/kms/{fetchKmsSignedcryptedShares-p.ts → fetchKmsSigncryptedShares-p.ts} +12 -5
- package/core/kms/kmsExtraData.ts +82 -13
- package/core/kms/kmsUserDecryptEip712V2Types.ts +31 -0
- package/core/kms/publicDecrypt.ts +5 -3
- package/core/modules/decrypt/mock.ts +0 -35
- package/core/modules/decrypt/module/api-p.ts +88 -17
- package/core/modules/decrypt/module/index.ts +37 -34
- package/core/modules/decrypt/module/init-p.ts +194 -73
- package/core/modules/decrypt/types.ts +37 -65
- package/core/modules/encrypt/mock.ts +34 -4
- package/core/modules/encrypt/module/api-p.ts +66 -15
- package/core/modules/encrypt/module/index.ts +5 -3
- package/core/modules/encrypt/module/init-p.ts +465 -101
- package/core/modules/encrypt/types.ts +34 -2
- package/core/modules/relayer/cleartext/fetchDelegatedUserDecrypt.ts +2 -2
- package/core/modules/relayer/cleartext/fetchUserDecrypt.ts +2 -2
- package/core/modules/relayer/module/RelayerAsyncRequest.ts +60 -4
- package/core/modules/relayer/module/fetchFheEncryptionKeySource.ts +9 -1
- package/core/modules/relayer/module/readErrorMessage.ts +56 -0
- package/core/runtime/CoreFhevm-p.ts +247 -22
- package/core/runtime/HyperWasmSolver-p.ts +417 -0
- package/core/runtime/ProtocolVersionResolver-p.ts +463 -0
- package/core/runtime/initFhevmDecryptRuntime-p.ts +1 -1
- package/core/runtime/initFhevmEncryptRuntime-p.ts +1 -1
- package/core/runtime/initFhevmRuntime-p.ts +4 -1
- package/core/runtime/resolveFhevmVersions-p.ts +85 -0
- package/core/runtimeConfig-p.ts +17 -2
- package/core/types/auth.ts +12 -1
- package/core/types/coreFhevmClient.ts +89 -4
- package/core/types/coreFhevmRuntime.ts +3 -18
- package/core/types/fheEncryptionKey.ts +2 -0
- package/core/types/fhevmChain.ts +3 -0
- package/core/types/hostContract.ts +1 -0
- package/core/types/index.ts +1 -1
- package/core/types/kms-p.ts +2 -0
- package/core/types/kms.ts +48 -18
- package/core/types/kmsSignersContext.ts +8 -0
- package/core/types/logger.ts +1 -0
- package/core/types/moduleVersions.ts +35 -0
- package/core/types/tkms-p.ts +3 -0
- package/core/types/wasmAssets.ts +64 -0
- package/core/types/{zkProofBuilder.ts → zkProofBuilder-p.ts} +3 -2
- package/core/utils-p/decrypt/verifyTkmsPublicKey.ts +3 -1
- package/ethers/cleartext/createFhevmCleartextDecryptClient.ts +2 -2
- package/ethers/cleartext/createFhevmCleartextEncryptClient.ts +2 -2
- package/ethers/clients/createFhevmDecryptClient.ts +2 -2
- package/ethers/clients/createFhevmEncryptClient.ts +2 -2
- package/ethers/internal/config.ts +2 -30
- package/package.json +1 -1
- package/viem/cleartext/createFhevmCleartextDecryptClient.ts +2 -2
- package/viem/cleartext/createFhevmCleartextEncryptClient.ts +2 -2
- package/viem/clients/createFhevmDecryptClient.ts +2 -2
- package/viem/clients/createFhevmEncryptClient.ts +2 -2
- package/viem/internal/config.ts +2 -30
- package/wasm/tfhe/TfheApi.d.ts +12 -12
- package/wasm/tfhe/loadTfheLib.js +11 -11
- package/wasm/tfhe/v1.5.3/startWorkers.js +41 -20
- package/wasm/tfhe/v1.5.3/tfhe.d.ts +7 -0
- package/wasm/tfhe/v1.5.3/tfhe.js +8 -0
- package/wasm/tfhe/v1.6.0-dev/startWorkers.js +41 -20
- package/wasm/tfhe/v1.6.0-dev/tfhe.d.ts +7 -0
- package/wasm/tfhe/v1.6.0-dev/tfhe.js +8 -0
- package/wasm/tfhe/{v1.6.1 → v1.6.2}/startWorkers.js +46 -25
- package/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe-worker.mjs +40 -40
- package/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe.d.ts +92 -85
- package/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe.js +253 -442
- package/wasm/tfhe/v1.6.2/tfhe_bg.wasm +0 -0
- package/wasm/tfhe/v1.6.2/tfhe_bg.wasm.base64.js +7 -0
- package/wasm/tfheModuleVersion-p.ts +1 -1
- package/wasm/tkms/v0.13.10/kms_lib.d.ts +4 -0
- package/wasm/tkms/v0.13.10/kms_lib.js +8 -0
- package/wasm/tkms/v0.13.20-0/kms_lib.d.ts +4 -0
- package/wasm/tkms/v0.13.20-0/kms_lib.js +8 -0
- package/wasm/tkmsModuleVersion-p.ts +1 -1
- package/wasm/wasmBaseUrl.js +32 -4
- package/_cjs/core/actions/base/fetchKmsSignedcryptedShares.js.map +0 -1
- package/_cjs/core/actions/decrypt/decryptKmsSignedcryptedShares.js +0 -11
- package/_cjs/core/actions/decrypt/decryptKmsSignedcryptedShares.js.map +0 -1
- package/_cjs/core/kms/decryptKmsSignedcryptedShares-p.js.map +0 -1
- package/_cjs/core/kms/fetchKmsSignedcryptedShares-p.js.map +0 -1
- package/_cjs/core/types/fhevmDecryptionKey.js.map +0 -1
- package/_cjs/core/types/fhevmUser.js.map +0 -1
- package/_cjs/core/types/zkProofBuilder.js.map +0 -1
- package/_cjs/wasm/tfhe/v1.6.1/startWorkers.js.map +0 -7
- package/_cjs/wasm/tfhe/v1.6.1/tfhe.js.map +0 -7
- package/_cjs/wasm/tfhe/v1.6.1/tfhe_bg.wasm +0 -0
- package/_cjs/wasm/tfhe/v1.6.1/tfhe_bg.wasm.base64.js +0 -35
- package/_cjs/wasm/tfhe/v1.6.1/tfhe_bg.wasm.base64.js.map +0 -7
- package/_esm/core/actions/base/fetchKmsSignedcryptedShares.js.map +0 -1
- package/_esm/core/actions/decrypt/decryptKmsSignedcryptedShares.js +0 -9
- package/_esm/core/actions/decrypt/decryptKmsSignedcryptedShares.js.map +0 -1
- package/_esm/core/kms/decryptKmsSignedcryptedShares-p.js.map +0 -1
- package/_esm/core/kms/fetchKmsSignedcryptedShares-p.js.map +0 -1
- package/_esm/core/types/fhevmDecryptionKey.js +0 -2
- package/_esm/core/types/fhevmDecryptionKey.js.map +0 -1
- package/_esm/core/types/fhevmUser.js +0 -2
- package/_esm/core/types/fhevmUser.js.map +0 -1
- package/_esm/core/types/zkProofBuilder.js +0 -2
- package/_esm/core/types/zkProofBuilder.js.map +0 -1
- package/_esm/wasm/tfhe/v1.6.1/tfhe_bg.wasm +0 -0
- package/_esm/wasm/tfhe/v1.6.1/tfhe_bg.wasm.base64.js +0 -7
- package/_types/core/actions/base/fetchKmsSignedcryptedShares.d.ts.map +0 -1
- package/_types/core/actions/decrypt/decryptKmsSignedcryptedShares.d.ts.map +0 -1
- package/_types/core/kms/decryptKmsSignedcryptedShares-p.d.ts.map +0 -1
- package/_types/core/kms/fetchKmsSignedcryptedShares-p.d.ts.map +0 -1
- package/_types/core/types/fhevmDecryptionKey.d.ts +0 -4
- package/_types/core/types/fhevmDecryptionKey.d.ts.map +0 -1
- package/_types/core/types/fhevmUser.d.ts +0 -7
- package/_types/core/types/fhevmUser.d.ts.map +0 -1
- package/_types/core/types/zkProofBuilder.d.ts.map +0 -1
- package/core/types/fhevmDecryptionKey.ts +0 -8
- package/core/types/fhevmUser.ts +0 -7
- package/wasm/tfhe/v1.6.1/tfhe_bg.wasm +0 -0
- package/wasm/tfhe/v1.6.1/tfhe_bg.wasm.base64.js +0 -7
- /package/_cjs/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe_bg.wasm.base64.d.ts +0 -0
- /package/_esm/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe_bg.wasm.base64.d.ts +0 -0
- /package/_types/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe_bg.wasm.base64.d.ts +0 -0
- /package/wasm/tfhe/{v1.6.1 → v1.6.2}/tfhe_bg.wasm.base64.d.ts +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ErrorMetadataParams } from '../base/errors/ErrorBase.js';
|
|
2
|
+
import type { KmsUserDecryptEip712V2 } from '../types/kms.js';
|
|
3
|
+
export type CreateKmsUserDecryptEip712V2Parameters = {
|
|
4
|
+
readonly verifyingContractAddressDecryption: string;
|
|
5
|
+
readonly chainId: number | bigint;
|
|
6
|
+
readonly userAddress: string;
|
|
7
|
+
readonly publicKey: string | Uint8Array;
|
|
8
|
+
readonly allowedContracts: readonly string[];
|
|
9
|
+
readonly startTimestamp: number | bigint;
|
|
10
|
+
readonly durationSeconds: number | bigint;
|
|
11
|
+
readonly extraData: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function createKmsUserDecryptEip712V2(parameters: CreateKmsUserDecryptEip712V2Parameters): KmsUserDecryptEip712V2;
|
|
14
|
+
export declare function assertIsKmsUserDecryptEip712V2(value: unknown, name: string, options: ErrorMetadataParams): asserts value is KmsUserDecryptEip712V2;
|
|
15
|
+
//# sourceMappingURL=createKmsUserDecryptEip712V2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createKmsUserDecryptEip712V2.d.ts","sourceRoot":"","sources":["../../../core/kms/createKmsUserDecryptEip712V2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAqB9D,MAAM,MAAM,sCAAsC,GAAG;IACnD,QAAQ,CAAC,kCAAkC,EAAE,MAAM,CAAC;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC;IACxC,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC;IACzC,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,CAAC;AAMF,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,sCAAsC,GACjD,sBAAsB,CAuDxB;AAID,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,KAAK,IAAI,sBAAsB,CAiBzC"}
|
package/_types/core/kms/{decryptKmsSignedcryptedShares-p.d.ts → decryptKmsSigncryptedShares-p.d.ts}
RENAMED
|
@@ -2,14 +2,16 @@ import type { WithDecrypt } from '../types/coreFhevmRuntime.js';
|
|
|
2
2
|
import type { KmsSigncryptedShares } from '../types/kms.js';
|
|
3
3
|
import type { ClearValue } from '../types/encryptedTypes-p.js';
|
|
4
4
|
import type { TransportKeyPair } from './TransportKeyPair-p.js';
|
|
5
|
+
import type { TkmsVersion } from '../../wasm/tkms/KmsLibApi.js';
|
|
5
6
|
type Context = {
|
|
6
7
|
readonly runtime: WithDecrypt;
|
|
8
|
+
readonly tkmsVersion: TkmsVersion;
|
|
7
9
|
};
|
|
8
10
|
type Parameters = {
|
|
9
11
|
readonly kmsSigncryptedShares: KmsSigncryptedShares;
|
|
10
12
|
readonly transportKeyPair: TransportKeyPair;
|
|
11
13
|
};
|
|
12
14
|
type ReturnType = readonly ClearValue[];
|
|
13
|
-
export declare function
|
|
15
|
+
export declare function decryptKmsSigncryptedShares(context: Context, parameters: Parameters): Promise<ReturnType>;
|
|
14
16
|
export {};
|
|
15
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=decryptKmsSigncryptedShares-p.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decryptKmsSigncryptedShares-p.d.ts","sourceRoot":"","sources":["../../../core/kms/decryptKmsSigncryptedShares-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAOhE,KAAK,OAAO,GAAG;IACb,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;CACnC,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IACpD,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;CAC7C,CAAC;AAEF,KAAK,UAAU,GAAG,SAAS,UAAU,EAAE,CAAC;AAIxC,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAqB/G"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TkmsVersion } from '../../wasm/tkms/KmsLibApi.js';
|
|
1
2
|
import type { WithDecrypt } from '../types/coreFhevmRuntime.js';
|
|
2
3
|
import type { Handle } from '../types/encryptedTypes-p.js';
|
|
3
4
|
import type { FhevmChain } from '../types/fhevmChain.js';
|
|
@@ -9,6 +10,7 @@ type Context = {
|
|
|
9
10
|
readonly chain: FhevmChain;
|
|
10
11
|
readonly runtime: WithDecrypt;
|
|
11
12
|
readonly client: NonNullable<object>;
|
|
13
|
+
readonly tkmsVersion: TkmsVersion;
|
|
12
14
|
readonly options: {
|
|
13
15
|
readonly batchRpcCalls: boolean;
|
|
14
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decryptValuesFromPairs.d.ts","sourceRoot":"","sources":["../../../core/kms/decryptValuesFromPairs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,KAA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B,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,OAAO,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CAC1D,GACD;IACE,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;QAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,eAAe,EAAE,kBAAkB,CAAC;KAC9C,CAAC,CAAC;IACH,QAAQ,CAAC,YAAY,EAAE,+BAA+B,CAAC;IACvD,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,OAAO,CAAC,EAAE,kCAAkC,GAAG,SAAS,CAAC;CACnE,CAAC;AAEN,MAAM,MAAM,UAAU,GAAG,SAAS,UAAU,EAAE,CAAC;AAI/C,wBAAsB,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAUxG"}
|
package/_types/core/kms/{fetchKmsSignedcryptedShares-p.d.ts → fetchKmsSigncryptedShares-p.d.ts}
RENAMED
|
@@ -29,6 +29,6 @@ type Parameters = {
|
|
|
29
29
|
readonly options?: RelayerDelegatedUserDecryptOptions | undefined;
|
|
30
30
|
};
|
|
31
31
|
type ReturnType = KmsSigncryptedShares;
|
|
32
|
-
export declare function
|
|
32
|
+
export declare function fetchKmsSigncryptedShares(context: Context, parameters: Parameters): Promise<ReturnType>;
|
|
33
33
|
export {};
|
|
34
|
-
//# sourceMappingURL=
|
|
34
|
+
//# sourceMappingURL=fetchKmsSigncryptedShares-p.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchKmsSigncryptedShares-p.d.ts","sourceRoot":"","sources":["../../../core/kms/fetchKmsSigncryptedShares-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAA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C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAqJ7G"}
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import type { BytesHex, Uint256BigInt, Uint8Number } from '../types/primitives.js';
|
|
2
2
|
import type { ErrorMetadataParams } from '../base/errors/ErrorBase.js';
|
|
3
|
+
export declare const EXTRA_DATA_V0: Uint8Number;
|
|
4
|
+
export declare const EXTRA_DATA_V1: Uint8Number;
|
|
5
|
+
export declare const EXTRA_DATA_V2: Uint8Number;
|
|
3
6
|
export declare function fromKmsExtraData(extraData: BytesHex): {
|
|
4
7
|
version: Uint8Number;
|
|
5
8
|
kmsContextId: Uint256BigInt;
|
|
9
|
+
kmsEpochId: Uint256BigInt;
|
|
6
10
|
};
|
|
7
11
|
/**
|
|
8
|
-
* Encodes a KMS context
|
|
9
|
-
*
|
|
12
|
+
* Encodes a KMS context into an extraData format.
|
|
13
|
+
* v0: `0x00`
|
|
14
|
+
* v1: `0x01` + 32-byte big-endian context ID.
|
|
15
|
+
* v2: `0x02` + 32-byte big-endian context ID + 32-byte big-endian epoch ID.
|
|
10
16
|
*/
|
|
11
17
|
export declare function toKmsExtraData(args: {
|
|
12
18
|
readonly version: Uint8Number;
|
|
13
19
|
readonly kmsContextId: Uint256BigInt;
|
|
20
|
+
readonly kmsEpochId: Uint256BigInt;
|
|
14
21
|
}): BytesHex;
|
|
15
22
|
export declare function assertIsKmsExtraData(value: unknown, options: {
|
|
16
23
|
subject?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kmsExtraData.d.ts","sourceRoot":"","sources":["../../../core/kms/kmsExtraData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"kmsExtraData.d.ts","sourceRoot":"","sources":["../../../core/kms/kmsExtraData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAIvE,eAAO,MAAM,aAAa,EAAE,WAAiC,CAAC;AAC9D,eAAO,MAAM,aAAa,EAAE,WAAiC,CAAC;AAC9D,eAAO,MAAM,aAAa,EAAE,WAAiC,CAAC;AAE9D,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,QAAQ,GAAG;IACrD,OAAO,EAAE,WAAW,CAAC;IACrB,YAAY,EAAE,aAAa,CAAC;IAC5B,UAAU,EAAE,aAAa,CAAC;CAC3B,CAwDA;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACnC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;CACpC,GAAG,QAAQ,CA+BX;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,mBAAmB,GAClD,OAAO,CAAC,KAAK,IAAI,QAAQ,CAS3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kmsUserDecryptEip712V2Types.d.ts","sourceRoot":"","sources":["../../../core/kms/kmsUserDecryptEip712V2Types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAMnE,eAAO,MAAM,2BAA2B,EAAE,2BAkBhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publicDecrypt.d.ts","sourceRoot":"","sources":["../../../core/kms/publicDecrypt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AA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AC;IAC3B,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;CACvD,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;CAC5D,CAAC;AAEF,KAAK,UAAU,GAAG,qBAAqB,CAAC;AAIxC,wBAAsB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAuEjG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FhevmRuntime } from '../../types/coreFhevmRuntime.js';
|
|
2
|
-
import type { DecryptAndReconstructParameters, DecryptAndReconstructReturnType, DeserializeTkmsPrivateKeyParameters, DeserializeTkmsPrivateKeyReturnType, GenerateTkmsPrivateKeyReturnType, GetTkmsPublicKeyHexParameters, GetTkmsPublicKeyHexReturnType, SerializeTkmsPrivateKeyParameters, SerializeTkmsPrivateKeyReturnType, VerifyTkmsPrivateKeyParameters, DecryptModuleFactory
|
|
2
|
+
import type { DecryptAndReconstructParameters, DecryptAndReconstructReturnType, DeserializeTkmsPrivateKeyParameters, DeserializeTkmsPrivateKeyReturnType, GenerateTkmsPrivateKeyReturnType, GetTkmsPublicKeyHexParameters, GetTkmsPublicKeyHexReturnType, SerializeTkmsPrivateKeyParameters, SerializeTkmsPrivateKeyReturnType, VerifyTkmsPrivateKeyParameters, DecryptModuleFactory } from './types.js';
|
|
3
3
|
export declare function decryptAndReconstruct(runtime: FhevmRuntime, parameters: DecryptAndReconstructParameters): Promise<DecryptAndReconstructReturnType>;
|
|
4
4
|
export declare function generateTkmsPrivateKey(runtime: FhevmRuntime): Promise<GenerateTkmsPrivateKeyReturnType>;
|
|
5
5
|
export declare function getTkmsPublicKeyHex(runtime: FhevmRuntime, parameters: GetTkmsPublicKeyHexParameters): Promise<GetTkmsPublicKeyHexReturnType>;
|
|
@@ -7,5 +7,4 @@ export declare function serializeTkmsPrivateKey(_runtime: FhevmRuntime, paramete
|
|
|
7
7
|
export declare function deserializeTkmsPrivateKey(_runtime: FhevmRuntime, parameters: DeserializeTkmsPrivateKeyParameters): Promise<DeserializeTkmsPrivateKeyReturnType>;
|
|
8
8
|
export declare function verifyTkmsPrivateKey(_runtime: FhevmRuntime, _parameters: VerifyTkmsPrivateKeyParameters): void;
|
|
9
9
|
export declare const decryptModule: DecryptModuleFactory;
|
|
10
|
-
export declare const userDecryptModule: UserDecryptModuleFactory;
|
|
11
10
|
//# sourceMappingURL=mock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../../core/modules/decrypt/mock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EACV,+BAA+B,EAC/B,+BAA+B,
|
|
1
|
+
{"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../../core/modules/decrypt/mock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EACV,+BAA+B,EAC/B,+BAA+B,EAC/B,mCAAmC,EACnC,mCAAmC,EACnC,gCAAgC,EAChC,6BAA6B,EAC7B,6BAA6B,EAC7B,iCAAiC,EACjC,iCAAiC,EACjC,8BAA8B,EAC9B,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAgCpB,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,+BAA+B,GAC1C,OAAO,CAAC,+BAA+B,CAAC,CA+E1C;AAMD,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAI7G;AAMD,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,6BAA6B,GACxC,OAAO,CAAC,6BAA6B,CAAC,CAMxC;AAMD,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE,iCAAiC,GAC5C,OAAO,CAAC,iCAAiC,CAAC,CAK5C;AAMD,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE,mCAAmC,GAC9C,OAAO,CAAC,mCAAmC,CAAC,CAI9C;AAMD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,8BAA8B,GAAG,IAAI,CAE9G;AAMD,eAAO,MAAM,aAAa,EAAE,oBAkB3B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FhevmRuntime } from '../../../types/coreFhevmRuntime.js';
|
|
2
|
-
import type { DecryptAndReconstructParameters, DecryptAndReconstructReturnType, DeserializeTkmsPrivateKeyParameters, DeserializeTkmsPrivateKeyReturnType, GenerateTkmsPrivateKeyReturnType, GetTkmsPublicKeyHexParameters, GetTkmsPublicKeyHexReturnType, SerializeTkmsPrivateKeyParameters, SerializeTkmsPrivateKeyReturnType, VerifyTkmsPrivateKeyParameters } from '../types.js';
|
|
3
|
-
export declare function generateTkmsPrivateKey(runtime: FhevmRuntime): Promise<GenerateTkmsPrivateKeyReturnType>;
|
|
2
|
+
import type { DecryptAndReconstructParameters, DecryptAndReconstructReturnType, DeserializeTkmsPrivateKeyParameters, DeserializeTkmsPrivateKeyReturnType, GenerateTkmsPrivateKeyParameters, GenerateTkmsPrivateKeyReturnType, GetTkmsPublicKeyHexParameters, GetTkmsPublicKeyHexReturnType, SerializeTkmsPrivateKeyParameters, SerializeTkmsPrivateKeyReturnType, VerifyTkmsPrivateKeyParameters } from '../types.js';
|
|
3
|
+
export declare function generateTkmsPrivateKey(runtime: FhevmRuntime, parameters: GenerateTkmsPrivateKeyParameters): Promise<GenerateTkmsPrivateKeyReturnType>;
|
|
4
4
|
export declare function decryptAndReconstruct(runtime: FhevmRuntime, parameters: DecryptAndReconstructParameters): Promise<DecryptAndReconstructReturnType>;
|
|
5
5
|
export declare function getTkmsPublicKeyHex(runtime: FhevmRuntime, parameters: GetTkmsPublicKeyHexParameters): Promise<GetTkmsPublicKeyHexReturnType>;
|
|
6
6
|
export declare function serializeTkmsPrivateKey(runtime: FhevmRuntime, parameters: SerializeTkmsPrivateKeyParameters): Promise<SerializeTkmsPrivateKeyReturnType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-p.d.ts","sourceRoot":"","sources":["../../../../../core/modules/decrypt/module/api-p.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api-p.d.ts","sourceRoot":"","sources":["../../../../../core/modules/decrypt/module/api-p.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAIvE,OAAO,KAAK,EACV,+BAA+B,EAC/B,+BAA+B,EAC/B,mCAAmC,EACnC,mCAAmC,EACnC,gCAAgC,EAChC,gCAAgC,EAChC,6BAA6B,EAC7B,6BAA6B,EAC7B,iCAAiC,EACjC,iCAAiC,EACjC,8BAA8B,EAC/B,MAAM,aAAa,CAAC;AA2LrB,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,gCAAgC,GAC3C,OAAO,CAAC,gCAAgC,CAAC,CAO3C;AAMD,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,+BAA+B,GAC1C,OAAO,CAAC,+BAA+B,CAAC,CA6J1C;AAMD,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,6BAA6B,GACxC,OAAO,CAAC,6BAA6B,CAAC,CAsBxC;AAMD,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,iCAAiC,GAC5C,OAAO,CAAC,iCAAiC,CAAC,CAgB5C;AAMD,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,mCAAmC,GAC9C,OAAO,CAAC,mCAAmC,CAAC,CAU9C;AAMD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,8BAA8B,GAAG,IAAI,CAO7G"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { DecryptModuleFactory
|
|
1
|
+
import type { DecryptModuleFactory } from '../types.js';
|
|
2
2
|
export declare const decryptModule: DecryptModuleFactory;
|
|
3
|
-
export declare const userDecryptModule: UserDecryptModuleFactory;
|
|
4
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../core/modules/decrypt/module/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../core/modules/decrypt/module/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,oBAAoB,EAUrB,MAAM,aAAa,CAAC;AAerB,eAAO,MAAM,aAAa,EAAE,oBAkB3B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FhevmRuntime } from '../../../types/coreFhevmRuntime.js';
|
|
2
|
-
import type { GetTkmsModuleInfoReturnType } from '../types.js';
|
|
2
|
+
import type { GetTkmsModuleInfoParameters, GetTkmsModuleInfoReturnType, InitTkmsModuleParameters } from '../types.js';
|
|
3
3
|
import type { KmsLibApi } from '../../../../wasm/tkms/KmsLibApi.js';
|
|
4
|
-
export declare function initTkmsModule(runtime: FhevmRuntime): Promise<KmsLibApi>;
|
|
5
|
-
export declare function getTkmsModuleInfo(): GetTkmsModuleInfoReturnType
|
|
4
|
+
export declare function initTkmsModule(runtime: FhevmRuntime, parameters: InitTkmsModuleParameters): Promise<KmsLibApi>;
|
|
5
|
+
export declare function getTkmsModuleInfo(parameters: GetTkmsModuleInfoParameters): Promise<GetTkmsModuleInfoReturnType>;
|
|
6
6
|
//# sourceMappingURL=init-p.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-p.d.ts","sourceRoot":"","sources":["../../../../../core/modules/decrypt/module/init-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,oCAAoC,CAAC;AAC3F,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"init-p.d.ts","sourceRoot":"","sources":["../../../../../core/modules/decrypt/module/init-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,oCAAoC,CAAC;AAC3F,OAAO,KAAK,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,wBAAwB,EAEzB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,oCAAoC,CAAC;AA0LjF,wBAAsB,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,wBAAwB,GAAG,OAAO,CAAC,SAAS,CAAC,CA6BpH;AAsDD,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,2BAA2B,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAgBrH"}
|
|
@@ -4,28 +4,50 @@ import type { Bytes, BytesHex } from '../../types/primitives.js';
|
|
|
4
4
|
import type { Prettify } from '../../types/utils.js';
|
|
5
5
|
import type { FhevmRuntime } from '../../types/coreFhevmRuntime.js';
|
|
6
6
|
import type { ClearValue } from '../../types/encryptedTypes-p.js';
|
|
7
|
+
import type { TkmsVersion } from '../../../wasm/tkms/KmsLibApi.js';
|
|
8
|
+
type WithTkmsVersion = {
|
|
9
|
+
readonly tkmsVersion: TkmsVersion;
|
|
10
|
+
};
|
|
11
|
+
export type InitTkmsModuleParameters = {
|
|
12
|
+
readonly tkmsVersion: TkmsVersion;
|
|
13
|
+
};
|
|
7
14
|
export type InitTkmsModuleFunction = {
|
|
8
|
-
initTkmsModule(): Promise<void>;
|
|
15
|
+
initTkmsModule(parameters: InitTkmsModuleParameters): Promise<void>;
|
|
9
16
|
};
|
|
10
17
|
/**
|
|
11
18
|
* Information about the running TKMS module configuration.
|
|
12
19
|
*/
|
|
13
20
|
export type TkmsModuleInfo = {
|
|
14
21
|
/**
|
|
15
|
-
* URL used to fetch the
|
|
22
|
+
* URL used to fetch the TKMS WASM binary.
|
|
16
23
|
* `undefined` means the base64-embedded fallback is used.
|
|
17
24
|
*/
|
|
18
25
|
readonly wasmUrl: URL | undefined;
|
|
19
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Current size of the TKMS WASM linear memory.
|
|
28
|
+
* This is the size of the underlying `WebAssembly.Memory` buffer, not live heap usage.
|
|
29
|
+
*/
|
|
30
|
+
readonly memory: {
|
|
31
|
+
/**
|
|
32
|
+
* Current memory buffer size in bytes.
|
|
33
|
+
*/
|
|
34
|
+
readonly byteLength: number;
|
|
35
|
+
/**
|
|
36
|
+
* Current memory buffer size in 64 KiB WASM pages.
|
|
37
|
+
*/
|
|
38
|
+
readonly pages: number;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export type GetTkmsModuleInfoParameters = WithTkmsVersion;
|
|
20
42
|
export type GetTkmsModuleInfoReturnType = TkmsModuleInfo | undefined;
|
|
21
43
|
export type GetTkmsModuleInfoFunction = {
|
|
22
44
|
/**
|
|
23
45
|
* Returns {@link TkmsModuleInfo} when the module is initialized,
|
|
24
46
|
* or `undefined` if the module has not completed initialization.
|
|
25
47
|
*/
|
|
26
|
-
getTkmsModuleInfo(): GetTkmsModuleInfoReturnType
|
|
48
|
+
getTkmsModuleInfo(parameters: GetTkmsModuleInfoParameters): Promise<GetTkmsModuleInfoReturnType>;
|
|
27
49
|
};
|
|
28
|
-
type WithTkmsPrivateKey = {
|
|
50
|
+
type WithTkmsPrivateKey = WithTkmsVersion & {
|
|
29
51
|
readonly tkmsPrivateKey: TkmsPrivateKey;
|
|
30
52
|
};
|
|
31
53
|
type DecryptAndReconstructBaseParameters = {
|
|
@@ -36,42 +58,29 @@ export type DecryptAndReconstructReturnType = readonly ClearValue[];
|
|
|
36
58
|
export type DecryptAndReconstructModuleFunction = {
|
|
37
59
|
decryptAndReconstruct(parameters: DecryptAndReconstructParameters): Promise<DecryptAndReconstructReturnType>;
|
|
38
60
|
};
|
|
39
|
-
export type
|
|
40
|
-
export type DecryptAndReconstructUserModuleFunction = {
|
|
41
|
-
decryptAndReconstruct(parameters: DecryptAndReconstructUserParameters): Promise<DecryptAndReconstructReturnType>;
|
|
42
|
-
};
|
|
61
|
+
export type GenerateTkmsPrivateKeyParameters = WithTkmsVersion;
|
|
43
62
|
export type GenerateTkmsPrivateKeyReturnType = TkmsPrivateKey;
|
|
44
63
|
export type GenerateTkmsPrivateKeyModuleFunction = {
|
|
45
|
-
generateTkmsPrivateKey(): Promise<GenerateTkmsPrivateKeyReturnType>;
|
|
64
|
+
generateTkmsPrivateKey(parameters: GenerateTkmsPrivateKeyParameters): Promise<GenerateTkmsPrivateKeyReturnType>;
|
|
46
65
|
};
|
|
47
|
-
export type GetTkmsPublicKeyHexParameters = WithTkmsPrivateKey;
|
|
66
|
+
export type GetTkmsPublicKeyHexParameters = WithTkmsPrivateKey & WithTkmsVersion;
|
|
48
67
|
export type GetTkmsPublicKeyHexReturnType = BytesHex;
|
|
49
68
|
export type GetTkmsPublicKeyHexModuleFunction = {
|
|
50
69
|
getTkmsPublicKeyHex(parameters: GetTkmsPublicKeyHexParameters): Promise<GetTkmsPublicKeyHexReturnType>;
|
|
51
70
|
};
|
|
52
|
-
export type
|
|
53
|
-
getTkmsPublicKeyHex(): Promise<GetTkmsPublicKeyHexReturnType>;
|
|
54
|
-
};
|
|
55
|
-
export type SerializeTkmsPrivateKeyParameters = {
|
|
56
|
-
readonly tkmsPrivateKey: TkmsPrivateKey;
|
|
57
|
-
};
|
|
71
|
+
export type SerializeTkmsPrivateKeyParameters = WithTkmsPrivateKey;
|
|
58
72
|
export type SerializeTkmsPrivateKeyReturnType = Bytes;
|
|
59
73
|
export type SerializeTkmsPrivateKeyModuleFunction = {
|
|
60
74
|
serializeTkmsPrivateKey(parameters: SerializeTkmsPrivateKeyParameters): Promise<SerializeTkmsPrivateKeyReturnType>;
|
|
61
75
|
};
|
|
62
|
-
export type
|
|
63
|
-
serializeTkmsPrivateKey(): Promise<SerializeTkmsPrivateKeyReturnType>;
|
|
64
|
-
};
|
|
65
|
-
export type DeserializeTkmsPrivateKeyParameters = {
|
|
76
|
+
export type DeserializeTkmsPrivateKeyParameters = WithTkmsVersion & {
|
|
66
77
|
readonly tkmsPrivateKeyBytes: Bytes;
|
|
67
78
|
};
|
|
68
79
|
export type DeserializeTkmsPrivateKeyReturnType = TkmsPrivateKey;
|
|
69
80
|
export type DeserializeTkmsPrivateKeyModuleFunction = {
|
|
70
81
|
deserializeTkmsPrivateKey(parameters: DeserializeTkmsPrivateKeyParameters): Promise<DeserializeTkmsPrivateKeyReturnType>;
|
|
71
82
|
};
|
|
72
|
-
export type VerifyTkmsPrivateKeyParameters =
|
|
73
|
-
readonly tkmsPrivateKey: TkmsPrivateKey;
|
|
74
|
-
};
|
|
83
|
+
export type VerifyTkmsPrivateKeyParameters = WithTkmsVersion & WithTkmsPrivateKey;
|
|
75
84
|
export type VerifyTkmsPrivateKeyModuleFunction = {
|
|
76
85
|
verifyTkmsPrivateKey(parameters: VerifyTkmsPrivateKeyParameters): void;
|
|
77
86
|
};
|
|
@@ -82,15 +91,5 @@ export type DecryptModule = Prettify<InitTkmsModuleFunction & GetTkmsModuleInfoF
|
|
|
82
91
|
export type DecryptModuleFactory = (runtime: FhevmRuntime) => {
|
|
83
92
|
readonly decrypt: DecryptModule;
|
|
84
93
|
};
|
|
85
|
-
export type WithUserDecryptModule = {
|
|
86
|
-
readonly userDecrypt: UserDecryptModule;
|
|
87
|
-
};
|
|
88
|
-
export type UserDecryptModuleParameters = {
|
|
89
|
-
readonly privateKey: TkmsPrivateKey;
|
|
90
|
-
};
|
|
91
|
-
export type UserDecryptModule = Prettify<InitTkmsModuleFunction & DecryptAndReconstructUserModuleFunction & GetTkmsPublicKeyHexUserModuleFunction & SerializeTkmsPrivateKeyUserModuleFunction>;
|
|
92
|
-
export type UserDecryptModuleFactory = (runtime: FhevmRuntime, parameters: UserDecryptModuleParameters) => {
|
|
93
|
-
readonly userDecrypt: UserDecryptModule;
|
|
94
|
-
};
|
|
95
94
|
export {};
|
|
96
95
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../core/modules/decrypt/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../core/modules/decrypt/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACjE,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MAAM,MAAM,kCAAkC,GAAG;IAC/C,oBAAoB,CAAC,UAAU,EAAE,8BAA8B,GAAG,IAAI,CAAC;CACxE,CAAC;AAMF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,QAAQ,CAClC,sBAAsB,GACpB,yBAAyB,GACzB,mCAAmC,GACnC,iCAAiC,GACjC,oCAAoC,GACpC,qCAAqC,GACrC,uCAAuC,GACvC,kCAAkC,CACrC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,YAAY,KAAK;IAC5D,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;CACjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../../core/modules/encrypt/mock.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../../core/modules/encrypt/mock.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,8BAA8B,EAC9B,8BAA8B,EAC9B,8CAA8C,EAC9C,8CAA8C,EAC9C,mCAAmC,EACnC,mCAAmC,EACnC,mCAAmC,EACnC,mCAAmC,EACnC,yCAAyC,EACzC,yCAAyC,EACzC,oBAAoB,EACpB,2CAA2C,IAAI,2CAA2C,EAC1F,2CAA2C,IAAI,2CAA2C,EAC1F,qCAAqC,EACrC,qCAAqC,EACtC,MAAM,YAAY,CAAC;AAqGpB,wBAAsB,oCAAoC,CACxD,WAAW,EAAE,8CAA8C,GAC1D,OAAO,CAAC,8CAA8C,CAAC,CAEzD;AAMD,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,8BAA8B,GACzC,OAAO,CAAC,8BAA8B,CAAC,CA8BzC;AAMD,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,mCAAmC,GAC9C,OAAO,CAAC,mCAAmC,CAAC,CAuC9C;AAMD,wBAAsB,+BAA+B,CACnD,UAAU,EAAE,yCAAyC,GACpD,OAAO,CAAC,yCAAyC,CAAC,CAmBpD;AAMD,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,mCAAmC,GAC9C,OAAO,CAAC,mCAAmC,CAAC,CAoB9C;AAMD,wBAAsB,2BAA2B,CAC/C,UAAU,EAAE,qCAAqC,GAChD,OAAO,CAAC,qCAAqC,CAAC,CAUhD;AAMD,wBAAsB,iCAAiC,CACrD,UAAU,EAAE,2CAA2C,GACtD,OAAO,CAAC,2CAA2C,CAAC,CAStD;AAMD,eAAO,MAAM,aAAa,EAAE,oBAgB3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-p.d.ts","sourceRoot":"","sources":["../../../../../core/modules/encrypt/module/api-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8BAA8B,EAC9B,8BAA8B,EAC9B,8CAA8C,EAC9C,8CAA8C,EAC9C,mCAAmC,IAAI,mCAAmC,EAC1E,mCAAmC,IAAI,mCAAmC,EAC1E,mCAAmC,IAAI,mCAAmC,EAC1E,mCAAmC,IAAI,mCAAmC,EAC1E,yCAAyC,IAAI,yCAAyC,EACtF,yCAAyC,IAAI,yCAAyC,EACtF,qCAAqC,IAAI,qCAAqC,EAC9E,qCAAqC,IAAI,qCAAqC,EAC9E,2CAA2C,EAC3C,2CAA2C,EAC5C,MAAM,aAAa,CAAC;AAUrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"api-p.d.ts","sourceRoot":"","sources":["../../../../../core/modules/encrypt/module/api-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8BAA8B,EAC9B,8BAA8B,EAC9B,8CAA8C,EAC9C,8CAA8C,EAC9C,mCAAmC,IAAI,mCAAmC,EAC1E,mCAAmC,IAAI,mCAAmC,EAC1E,mCAAmC,IAAI,mCAAmC,EAC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,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../core/modules/encrypt/module/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAIV,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../core/modules/encrypt/module/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAIV,oBAAoB,EAOrB,MAAM,aAAa,CAAC;AAgBrB,eAAO,MAAM,aAAa,EAAE,oBAsB3B,CAAC"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import type { FhevmRuntime } from '../../../types/coreFhevmRuntime.js';
|
|
2
|
-
import type { GetTfheModuleInfoReturnType } from '../types.js';
|
|
2
|
+
import type { GetTfheModuleInfoParameters, GetTfheModuleInfoReturnType, InitTfheModuleParameters } from '../types.js';
|
|
3
3
|
import type { TfheLibApi } from '../../../../wasm/tfhe/TfheApi.js';
|
|
4
|
+
import type { TfheVersion } from '../../../../wasm/tfhe/loadTfheLib.js';
|
|
5
|
+
export declare const TFHE_VERSION_TAG: unique symbol;
|
|
6
|
+
export type VersionTaggedTfheNative = {
|
|
7
|
+
readonly [TFHE_VERSION_TAG]: TfheVersion;
|
|
8
|
+
};
|
|
9
|
+
export declare function getTaggedTfheVersion(value: VersionTaggedTfheNative): TfheVersion;
|
|
10
|
+
export declare function assertTaggedTfheVersion(value: VersionTaggedTfheNative, expectedVersion: TfheVersion): void;
|
|
4
11
|
/**
|
|
5
12
|
* Initializes the TFHE module and returns the loaded lib bindings.
|
|
6
|
-
* Idempotent: subsequent calls return the same cached lib instance.
|
|
13
|
+
* Idempotent per TFHE version: subsequent calls return the same cached lib instance.
|
|
7
14
|
*/
|
|
8
|
-
export declare function initTfheModule(runtime: FhevmRuntime): Promise<TfheLibApi>;
|
|
9
|
-
export declare function getTfheModuleInfo(): GetTfheModuleInfoReturnType
|
|
15
|
+
export declare function initTfheModule(runtime: FhevmRuntime, parameters: InitTfheModuleParameters): Promise<TfheLibApi>;
|
|
16
|
+
export declare function getTfheModuleInfo(parameters: GetTfheModuleInfoParameters): Promise<GetTfheModuleInfoReturnType>;
|
|
10
17
|
//# sourceMappingURL=init-p.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-p.d.ts","sourceRoot":"","sources":["../../../../../core/modules/encrypt/module/init-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,oCAAoC,CAAC;AAC3F,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"init-p.d.ts","sourceRoot":"","sources":["../../../../../core/modules/encrypt/module/init-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,oCAAoC,CAAC;AAC3F,OAAO,KAAK,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,wBAAwB,EAEzB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAiC,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAmfvG,eAAO,MAAM,gBAAgB,EAAE,OAAO,MAA+B,CAAC;AAEtE,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC;CAC1C,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,uBAAuB,GAAG,WAAW,CAEhF;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,uBAAuB,EAAE,eAAe,EAAE,WAAW,GAAG,IAAI,CAK1G;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,wBAAwB,GAAG,OAAO,CAAC,UAAU,CAAC,CAwCrH;AAgED,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,2BAA2B,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAgBrH"}
|
|
@@ -3,8 +3,12 @@ import type { EncryptionBits, FheTypeId } from '../../types/fheType.js';
|
|
|
3
3
|
import type { FheEncryptionCrs, FheEncryptionCrsBytes, FheEncryptionKeyWasm, FheEncryptionKeyBytes, FheEncryptionPublicKey, FheEncryptionPublicKeyBytes } from '../../types/fheEncryptionKey.js';
|
|
4
4
|
import type { Prettify } from '../../types/utils.js';
|
|
5
5
|
import type { FhevmRuntime } from '../../types/coreFhevmRuntime.js';
|
|
6
|
+
import type { TfheVersion } from '../../../wasm/tfhe/TfheApi.js';
|
|
7
|
+
export type InitTfheModuleParameters = {
|
|
8
|
+
readonly tfheVersion: TfheVersion;
|
|
9
|
+
};
|
|
6
10
|
export type InitTfheModuleFunction = {
|
|
7
|
-
initTfheModule(): Promise<void>;
|
|
11
|
+
initTfheModule(parameters: InitTfheModuleParameters): Promise<void>;
|
|
8
12
|
};
|
|
9
13
|
/**
|
|
10
14
|
* Information about the running TFHE module configuration.
|
|
@@ -32,6 +36,23 @@ export type TfheModuleInfo = {
|
|
|
32
36
|
* - `false` — multi-threading was requested but unavailable; fell back to single-threaded.
|
|
33
37
|
*/
|
|
34
38
|
readonly threadsAvailable: boolean | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Current size of the TFHE WASM linear memory.
|
|
41
|
+
* This is the size of the underlying `WebAssembly.Memory` buffer, not live heap usage.
|
|
42
|
+
*/
|
|
43
|
+
readonly memory: {
|
|
44
|
+
/**
|
|
45
|
+
* Current memory buffer size in bytes.
|
|
46
|
+
*/
|
|
47
|
+
readonly byteLength: number;
|
|
48
|
+
/**
|
|
49
|
+
* Current memory buffer size in 64 KiB WASM pages.
|
|
50
|
+
*/
|
|
51
|
+
readonly pages: number;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export type GetTfheModuleInfoParameters = {
|
|
55
|
+
readonly tfheVersion: TfheVersion;
|
|
35
56
|
};
|
|
36
57
|
export type GetTfheModuleInfoReturnType = TfheModuleInfo | undefined;
|
|
37
58
|
export type GetTfheModuleInfoFunction = {
|
|
@@ -39,10 +60,11 @@ export type GetTfheModuleInfoFunction = {
|
|
|
39
60
|
* Returns {@link TfheModuleInfo} when the module is initialized,
|
|
40
61
|
* or `undefined` if the module has not completed initialization.
|
|
41
62
|
*/
|
|
42
|
-
getTfheModuleInfo(): GetTfheModuleInfoReturnType
|
|
63
|
+
getTfheModuleInfo(parameters: GetTfheModuleInfoParameters): Promise<GetTfheModuleInfoReturnType>;
|
|
43
64
|
};
|
|
44
65
|
export type ParseTFHEProvenCompactCiphertextListParameters = {
|
|
45
66
|
readonly ciphertextWithZkProof: Uint8Array | string;
|
|
67
|
+
readonly tfheVersion: TfheVersion;
|
|
46
68
|
};
|
|
47
69
|
export type ParseTFHEProvenCompactCiphertextListReturnType = {
|
|
48
70
|
fheTypeIds: FheTypeId[];
|
|
@@ -56,16 +78,19 @@ export type BuildWithProofPackedParameters = {
|
|
|
56
78
|
readonly typedValues: TypedValue[];
|
|
57
79
|
readonly metaData: Uint8Array;
|
|
58
80
|
readonly extraData: BytesHex;
|
|
81
|
+
readonly tfheVersion: TfheVersion;
|
|
59
82
|
};
|
|
60
83
|
export type BuildWithProofPackedReturnType = {
|
|
61
84
|
readonly ciphertextWithZKProofBytes: Uint8Array;
|
|
62
85
|
readonly extraData: BytesHex;
|
|
86
|
+
readonly tfheVersion: TfheVersion;
|
|
63
87
|
};
|
|
64
88
|
export type BuildWithProofPackedModuleFunction = {
|
|
65
89
|
buildWithProofPacked(parameters: BuildWithProofPackedParameters): Promise<BuildWithProofPackedReturnType>;
|
|
66
90
|
};
|
|
67
91
|
export type SerializeFheEncryptionKeyParameters = {
|
|
68
92
|
readonly fheEncryptionKey: FheEncryptionKeyWasm;
|
|
93
|
+
readonly tfheVersion: TfheVersion;
|
|
69
94
|
};
|
|
70
95
|
export type SerializeFheEncryptionKeyReturnType = FheEncryptionKeyBytes;
|
|
71
96
|
export type SerializeFheEncryptionKeyModuleFunction = {
|
|
@@ -73,6 +98,7 @@ export type SerializeFheEncryptionKeyModuleFunction = {
|
|
|
73
98
|
};
|
|
74
99
|
export type SerializeFheEncryptionPublicKeyParameters = {
|
|
75
100
|
readonly publicKey: FheEncryptionPublicKey;
|
|
101
|
+
readonly tfheVersion: TfheVersion;
|
|
76
102
|
};
|
|
77
103
|
export type SerializeFheEncryptionPublicKeyReturnType = FheEncryptionPublicKeyBytes;
|
|
78
104
|
export type SerializeFheEncryptionPublicKeyModuleFunction = {
|
|
@@ -80,6 +106,7 @@ export type SerializeFheEncryptionPublicKeyModuleFunction = {
|
|
|
80
106
|
};
|
|
81
107
|
export type SerializeFheEncryptionCrsParameters = {
|
|
82
108
|
readonly crs: FheEncryptionCrs;
|
|
109
|
+
readonly tfheVersion: TfheVersion;
|
|
83
110
|
};
|
|
84
111
|
export type SerializeFheEncryptionCrsReturnType = FheEncryptionCrsBytes;
|
|
85
112
|
export type SerializeFheEncryptionCrsModuleFunction = {
|
|
@@ -87,6 +114,7 @@ export type SerializeFheEncryptionCrsModuleFunction = {
|
|
|
87
114
|
};
|
|
88
115
|
export type DeserializeFheEncryptionPublicKeyParameters = {
|
|
89
116
|
readonly publicKeyBytes: FheEncryptionPublicKeyBytes;
|
|
117
|
+
readonly tfheVersion: TfheVersion;
|
|
90
118
|
};
|
|
91
119
|
export type DeserializeFheEncryptionPublicKeyReturnType = FheEncryptionPublicKey;
|
|
92
120
|
export type DeserializeFheEncryptionPublicKeyModuleFunction = {
|
|
@@ -94,6 +122,7 @@ export type DeserializeFheEncryptionPublicKeyModuleFunction = {
|
|
|
94
122
|
};
|
|
95
123
|
export type DeserializeFheEncryptionCrsParameters = {
|
|
96
124
|
readonly crsBytes: FheEncryptionCrsBytes;
|
|
125
|
+
readonly tfheVersion: TfheVersion;
|
|
97
126
|
};
|
|
98
127
|
export type DeserializeFheEncryptionCrsReturnType = FheEncryptionCrs;
|
|
99
128
|
export type DeserializeFheEncryptionCrsModuleFunction = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../core/modules/encrypt/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,KAAK,EACV,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC5B,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../core/modules/encrypt/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,KAAK,EACV,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC5B,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AA8BjE,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,cAAc,CAAC,UAAU,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrE,CAAC;AAMF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;;OAGG;IACH,QAAQ,CAAC,eAAe,EAA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
|
* Throws an unauthorized error for 401 responses.
|
|
140
|
+
*
|
|
141
|
+
* The `message` surfaced from the response body (the relayer/edge JSON error)
|
|
142
|
+
* is used when present; otherwise the canned string is kept. The
|
|
143
|
+
* `'unauthorized'` label and error shape are preserved so downstream
|
|
144
|
+
* consumers reading `relayerApiError.message`/`.label` keep working.
|
|
145
|
+
*
|
|
146
|
+
* @param status - The 401 status.
|
|
147
|
+
* @param surfacedMessage - The message read from the response body, if any.
|
|
140
148
|
* @throws {RelayerResponseApiError} Always throws with 'unauthorized' label.
|
|
141
149
|
*/
|
|
142
150
|
private _throwUnauthorizedError;
|
|
151
|
+
/**
|
|
152
|
+
* Throws for an HTTP status that is not part of the typed relayer contract —
|
|
153
|
+
* e.g. a 403 emitted by an edge proxy (Cloudflare/Kong). The `message`
|
|
154
|
+
* surfaced from the JSON body is appended to the error when present.
|
|
155
|
+
*
|
|
156
|
+
* @param status - The unexpected HTTP status.
|
|
157
|
+
* @param surfacedMessage - The message read from the response body, if any.
|
|
158
|
+
* @throws {RelayerResponseStatusError} Always throws.
|
|
159
|
+
*/
|
|
160
|
+
private _throwUnexpectedStatusError;
|
|
143
161
|
/**
|
|
144
162
|
* Throws a relayer API error with the given status and error details.
|
|
145
163
|
* @throws {RelayerResponseApiError} Always throws with the provided error details.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelayerAsyncRequest.d.ts","sourceRoot":"","sources":["../../../../../core/modules/relayer/module/RelayerAsyncRequest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,wBAAwB,EAQxB,sBAAsB,EACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAEV,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,kCAAkC,EAGlC,wBAAwB,EAExB,oBAAoB,EAOpB,2BAA2B,EAE3B,yBAAyB,EAE1B,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"RelayerAsyncRequest.d.ts","sourceRoot":"","s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AC,mBAAmB;IAU3B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAa3B;;;OAGG;IACH,OAAO,CAAC,8BAA8B;IAiBtC;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAaxB;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAC,4BAA4B;IAUpC,OAAO,CAAC,MAAM;CAKf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchFheEncryptionKeySource.d.ts","sourceRoot":"","sources":["../../../../../core/modules/relayer/module/fetchFheEncryptionKeySource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qCAAqC,EACrC,qCAAqC,EACrC,aAAa,EACd,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"fetchFheEncryptionKeySource.d.ts","sourceRoot":"","sources":["../../../../../core/modules/relayer/module/fetchFheEncryptionKeySource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qCAAqC,EACrC,qCAAqC,EACrC,aAAa,EACd,MAAM,aAAa,CAAC;AAgBrB,wBAAsB,2BAA2B,CAC/C,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,qCAAqC,GAChD,OAAO,CAAC,qCAAqC,CAAC,CAmFhD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Best-effort reader that surfaces the message a relayer or an intermediary
|
|
3
|
+
* edge proxy (Cloudflare/Kong) actually sent in a non-2xx JSON error body.
|
|
4
|
+
*
|
|
5
|
+
* Two body shapes are recognized:
|
|
6
|
+
* - relayer: `{ "error": { "message": "...", "label": "..." } }`
|
|
7
|
+
* - Cloudflare / Kong: `{ "message": "...", "label": "..." }` (flat)
|
|
8
|
+
*
|
|
9
|
+
* The body is read at most once and only surfaced when it parses as JSON. A
|
|
10
|
+
* non-JSON body (a bare `"Forbidden"`/`"Rate Limit"` string, an HTML error
|
|
11
|
+
* page, ...) intentionally surfaces nothing, so the previous behavior for those
|
|
12
|
+
* responses is preserved and no noise leaks into error messages.
|
|
13
|
+
*
|
|
14
|
+
* This function never throws.
|
|
15
|
+
*
|
|
16
|
+
* Empty-string `message`/`label` values are treated as absent.
|
|
17
|
+
*
|
|
18
|
+
* @param response - The non-2xx fetch {@link Response} to inspect.
|
|
19
|
+
* @returns The surfaced non-empty `message` and/or `label`, or an empty object
|
|
20
|
+
* when the body is missing, unreadable, not JSON, or carries neither.
|
|
21
|
+
*/
|
|
22
|
+
export declare function readErrorMessage(response: Response): Promise<{
|
|
23
|
+
message?: string | undefined;
|
|
24
|
+
label?: string | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
//# sourceMappingURL=readErrorMessage.d.ts.map
|