@fhevm/sdk 1.1.0-alpha.4 → 1.1.0-alpha.5
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/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/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 +31 -7
- package/_cjs/core/kms/TransportKeyPair-p.js.map +1 -1
- package/_cjs/core/kms/createKmsUserDecryptEip712.js +4 -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 +40 -19
- 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 +63 -24
- 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/loadTfheLib.js.map +1 -1
- package/_cjs/wasm/tfhe/v1.5.3/tfhe.d.ts +4 -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/tfhe.d.ts +4 -0
- package/_cjs/wasm/tfhe/v1.6.1/tfhe.js +6 -1
- package/_cjs/wasm/tfhe/v1.6.1/tfhe.js.map +2 -2
- 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 +23 -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/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/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 +32 -7
- package/_esm/core/kms/TransportKeyPair-p.js.map +1 -1
- package/_esm/core/kms/createKmsUserDecryptEip712.js +4 -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 +41 -19
- 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 +69 -29
- 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/v1.5.3/tfhe.d.ts +4 -0
- package/_esm/wasm/tfhe/v1.5.3/tfhe.js +8 -0
- package/_esm/wasm/tfhe/v1.6.1/tfhe.d.ts +4 -0
- package/_esm/wasm/tfhe/v1.6.1/tfhe.js +8 -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 +69 -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/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/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/v1.5.3/tfhe.d.ts +4 -0
- package/_types/wasm/tfhe/v1.6.1/tfhe.d.ts +4 -0
- 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/object.ts +38 -0
- package/core/base/semver.ts +231 -0
- package/core/base/uint.ts +33 -4
- 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 +56 -10
- package/core/kms/createKmsUserDecryptEip712.ts +4 -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 +60 -28
- 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 +99 -40
- 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 +6 -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/v1.5.3/tfhe.d.ts +4 -0
- package/wasm/tfhe/v1.5.3/tfhe.js +8 -0
- package/wasm/tfhe/v1.6.0-dev/tfhe.d.ts +4 -0
- package/wasm/tfhe/v1.6.0-dev/tfhe.js +8 -0
- package/wasm/tfhe/v1.6.1/tfhe.d.ts +4 -0
- package/wasm/tfhe/v1.6.1/tfhe.js +8 -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 +69 -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/_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/_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/_cjs/core/_version.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sdkName = exports.version = void 0;
|
|
4
|
-
exports.version = '1.1.0-alpha.
|
|
4
|
+
exports.version = '1.1.0-alpha.5';
|
|
5
5
|
exports.sdkName = '@fhevm/sdk';
|
|
6
6
|
//# sourceMappingURL=_version.js.map
|
|
@@ -5,7 +5,7 @@ const isAllowedForDecryption_js_1 = require("../../host-contracts/isAllowedForDe
|
|
|
5
5
|
const FhevmHandle_js_1 = require("../../handle/FhevmHandle.js");
|
|
6
6
|
async function canDecryptPublicValue(fhevm, parameters) {
|
|
7
7
|
const results = await (0, isAllowedForDecryption_js_1.isAllowedForDecryption)(fhevm, {
|
|
8
|
-
|
|
8
|
+
aclAddress: fhevm.chain.fhevm.contracts.acl.address,
|
|
9
9
|
handles: [(0, FhevmHandle_js_1.toFhevmHandle)(parameters.encryptedValue)],
|
|
10
10
|
});
|
|
11
11
|
return results[0] === true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canDecryptPublicValue.js","sourceRoot":"","sources":["../../../../core/actions/base/canDecryptPublicValue.ts"],"names":[],"mappings":";;AAiBA,sDAUC;AAvBD,8FAAwF;AACxF,gEAA4D;AAYrD,KAAK,UAAU,qBAAqB,CACzC,KAAwB,EACxB,UAA2C;IAE3C,MAAM,OAAO,GAAG,MAAM,IAAA,kDAAsB,EAAC,KAAK,EAAE;QAClD,
|
|
1
|
+
{"version":3,"file":"canDecryptPublicValue.js","sourceRoot":"","sources":["../../../../core/actions/base/canDecryptPublicValue.ts"],"names":[],"mappings":";;AAiBA,sDAUC;AAvBD,8FAAwF;AACxF,gEAA4D;AAYrD,KAAK,UAAU,qBAAqB,CACzC,KAAwB,EACxB,UAA2C;IAE3C,MAAM,OAAO,GAAG,MAAM,IAAA,kDAAsB,EAAC,KAAK,EAAE;QAClD,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,OAA6B;QACzE,OAAO,EAAE,CAAC,IAAA,8BAAa,EAAC,UAAU,CAAC,cAAc,CAAC,CAAC;KACpD,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAC7B,CAAC"}
|
|
@@ -6,7 +6,7 @@ const FhevmHandle_js_1 = require("../../handle/FhevmHandle.js");
|
|
|
6
6
|
async function canDecryptPublicValues(fhevm, parameters) {
|
|
7
7
|
const handles = parameters.encryptedValues.map(FhevmHandle_js_1.toFhevmHandle);
|
|
8
8
|
return (0, isAllowedForDecryption_js_1.isAllowedForDecryption)(fhevm, {
|
|
9
|
-
|
|
9
|
+
aclAddress: fhevm.chain.fhevm.contracts.acl.address,
|
|
10
10
|
handles,
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canDecryptPublicValues.js","sourceRoot":"","sources":["../../../../core/actions/base/canDecryptPublicValues.ts"],"names":[],"mappings":";;AAiBA,wDAUC;AAvBD,8FAAwF;AACxF,gEAA4D;AAYrD,KAAK,UAAU,sBAAsB,CAC1C,KAAwB,EACxB,UAA4C;IAE5C,MAAM,OAAO,GAAG,UAAU,CAAC,eAAe,CAAC,GAAG,CAAC,8BAAa,CAAC,CAAC;IAE9D,OAAO,IAAA,kDAAsB,EAAC,KAAK,EAAE;QACnC,
|
|
1
|
+
{"version":3,"file":"canDecryptPublicValues.js","sourceRoot":"","sources":["../../../../core/actions/base/canDecryptPublicValues.ts"],"names":[],"mappings":";;AAiBA,wDAUC;AAvBD,8FAAwF;AACxF,gEAA4D;AAYrD,KAAK,UAAU,sBAAsB,CAC1C,KAAwB,EACxB,UAA4C;IAE5C,MAAM,OAAO,GAAG,UAAU,CAAC,eAAe,CAAC,GAAG,CAAC,8BAAa,CAAC,CAAC;IAE9D,OAAO,IAAA,kDAAsB,EAAC,KAAK,EAAE;QACnC,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,OAA6B;QACzE,OAAO;KACR,CAAC,CAAC;AACL,CAAC"}
|
package/_cjs/core/actions/base/{fetchKmsSignedcryptedShares.js → fetchKmsSigncryptedShares.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
3
|
+
exports.fetchKmsSigncryptedShares = fetchKmsSigncryptedShares;
|
|
4
|
+
const fetchKmsSigncryptedShares_p_js_1 = require("../../kms/fetchKmsSigncryptedShares-p.js");
|
|
5
5
|
const FhevmHandle_js_1 = require("../../handle/FhevmHandle.js");
|
|
6
6
|
const address_js_1 = require("../../base/address.js");
|
|
7
|
-
async function
|
|
7
|
+
async function fetchKmsSigncryptedShares(fhevm, parameters) {
|
|
8
8
|
const { pairs } = parameters;
|
|
9
9
|
const sanitizedPairs = pairs.map((p, i) => {
|
|
10
10
|
(0, FhevmHandle_js_1.assertIsEncryptedValueLike)(p.encryptedValue, { subject: `encryptedValue[${i}]` });
|
|
@@ -14,6 +14,6 @@ async function fetchKmsSignedcryptedShares(fhevm, parameters) {
|
|
|
14
14
|
contractAddress: (0, address_js_1.addressToChecksummedAddress)(p.contractAddress),
|
|
15
15
|
};
|
|
16
16
|
});
|
|
17
|
-
return (0,
|
|
17
|
+
return (0, fetchKmsSigncryptedShares_p_js_1.fetchKmsSigncryptedShares)(fhevm, { ...parameters, pairs: sanitizedPairs });
|
|
18
18
|
}
|
|
19
|
-
//# sourceMappingURL=
|
|
19
|
+
//# sourceMappingURL=fetchKmsSigncryptedShares.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchKmsSigncryptedShares.js","sourceRoot":"","sources":["../../../../core/actions/base/fetchKmsSigncryptedShares.ts"],"names":[],"mappings":";;AAiEA,8DAiBC;AAxED,6FAAmH;AACnH,gEAAwF;AACxF,sDAAqF;AAqD9E,KAAK,UAAU,yBAAyB,CAC7C,KAAwB,EACxB,UAAkG;IAElG,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC;IAG7B,MAAM,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACxC,IAAA,2CAA0B,EAAC,CAAC,CAAC,cAAc,EAAE,EAAE,OAAO,EAAE,kBAAkB,CAAC,GAAG,EAAE,CAAC,CAAC;QAClF,IAAA,4BAAe,EAAC,CAAC,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;QACvC,OAAO;YACL,MAAM,EAAE,IAAA,8BAAa,EAAC,CAAC,CAAC,cAAc,CAAC;YACvC,eAAe,EAAE,IAAA,wCAA2B,EAAC,CAAC,CAAC,eAAe,CAAC;SAChE,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,IAAA,0DAA0B,EAAC,KAAK,EAAE,EAAE,GAAG,UAAU,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC;AACrF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.verifyHandlesCoprocessorSignatures = exports.
|
|
3
|
+
exports.verifyHandlesCoprocessorSignatures = exports.fetchKmsSigncryptedShares = exports.verifyZkProofCoprocessorSignatures = exports.fetchEncryptedValues = exports.fetchVerifiedInputProof = exports.verifyInputProof = exports.readCoprocessorSignersContext = exports.createVerifiedInputProofFromRawBytes = exports.canDecryptPublicValues = exports.canDecryptPublicValue = exports.decryptPublicValuesWithSignatures = exports.decryptPublicValues = exports.decryptPublicValue = exports.readKmsSignersContext = void 0;
|
|
4
4
|
var readKmsSignersContext_js_1 = require("./readKmsSignersContext.js");
|
|
5
5
|
Object.defineProperty(exports, "readKmsSignersContext", { enumerable: true, get: function () { return readKmsSignersContext_js_1.readKmsSignersContext; } });
|
|
6
6
|
var decryptPublicValue_js_1 = require("./decryptPublicValue.js");
|
|
@@ -25,8 +25,8 @@ var fetchEncryptedValues_js_1 = require("./fetchEncryptedValues.js");
|
|
|
25
25
|
Object.defineProperty(exports, "fetchEncryptedValues", { enumerable: true, get: function () { return fetchEncryptedValues_js_1.fetchEncryptedValues; } });
|
|
26
26
|
var verifyZkProofCoprocessorSignatures_js_1 = require("./verifyZkProofCoprocessorSignatures.js");
|
|
27
27
|
Object.defineProperty(exports, "verifyZkProofCoprocessorSignatures", { enumerable: true, get: function () { return verifyZkProofCoprocessorSignatures_js_1.verifyZkProofCoprocessorSignatures; } });
|
|
28
|
-
var
|
|
29
|
-
Object.defineProperty(exports, "
|
|
28
|
+
var fetchKmsSigncryptedShares_js_1 = require("./fetchKmsSigncryptedShares.js");
|
|
29
|
+
Object.defineProperty(exports, "fetchKmsSigncryptedShares", { enumerable: true, get: function () { return fetchKmsSigncryptedShares_js_1.fetchKmsSigncryptedShares; } });
|
|
30
30
|
var verifyHandlesCoprocessorSignatures_js_1 = require("./verifyHandlesCoprocessorSignatures.js");
|
|
31
31
|
Object.defineProperty(exports, "verifyHandlesCoprocessorSignatures", { enumerable: true, get: function () { return verifyHandlesCoprocessorSignatures_js_1.verifyHandlesCoprocessorSignatures; } });
|
|
32
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../core/actions/base/index.ts"],"names":[],"mappings":";;;AAAA,uEAAyG;AAA1D,iIAAA,qBAAqB,OAAA;AAEpE,iEAIiC;AAD/B,2HAAA,kBAAkB,OAAA;AAKpB,mEAIkC;AADhC,6HAAA,mBAAmB,OAAA;AAGrB,+FAIgD;AAD9C,yJAAA,iCAAiC,OAAA;AAGnC,uEAIoC;AADlC,iIAAA,qBAAqB,OAAA;AAGvB,yEAIqC;AADnC,mIAAA,sBAAsB,OAAA;AAGxB,qGAImD;AADjD,+JAAA,oCAAoC,OAAA;AAGtC,uFAG4C;AAD1C,iJAAA,6BAA6B,OAAA;AAG/B,6DAI+B;AAD7B,uHAAA,gBAAgB,OAAA;AAGlB,2EAIsC;AADpC,qIAAA,uBAAuB,OAAA;AAGzB,qEAImC;AADjC,+HAAA,oBAAoB,OAAA;AAGtB,iGAGiD;AAD/C,2JAAA,kCAAkC,OAAA;AAGpC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../core/actions/base/index.ts"],"names":[],"mappings":";;;AAAA,uEAAyG;AAA1D,iIAAA,qBAAqB,OAAA;AAEpE,iEAIiC;AAD/B,2HAAA,kBAAkB,OAAA;AAKpB,mEAIkC;AADhC,6HAAA,mBAAmB,OAAA;AAGrB,+FAIgD;AAD9C,yJAAA,iCAAiC,OAAA;AAGnC,uEAIoC;AADlC,iIAAA,qBAAqB,OAAA;AAGvB,yEAIqC;AADnC,mIAAA,sBAAsB,OAAA;AAGxB,qGAImD;AADjD,+JAAA,oCAAoC,OAAA;AAGtC,uFAG4C;AAD1C,iJAAA,6BAA6B,OAAA;AAG/B,6DAI+B;AAD7B,uHAAA,gBAAgB,OAAA;AAGlB,2EAIsC;AADpC,qIAAA,uBAAuB,OAAA;AAGzB,qEAImC;AADjC,+HAAA,oBAAoB,OAAA;AAGtB,iGAGiD;AAD/C,2JAAA,kCAAkC,OAAA;AAGpC,+EAKwC;AADtC,yIAAA,yBAAyB,OAAA;AAG3B,iGAGiD;AAD/C,2JAAA,kCAAkC,OAAA"}
|
|
@@ -4,7 +4,8 @@ exports.readKmsSignersContext = readKmsSignersContext;
|
|
|
4
4
|
const readKmsSignersContext_p_js_1 = require("../../host-contracts/readKmsSignersContext-p.js");
|
|
5
5
|
async function readKmsSignersContext(fhevm) {
|
|
6
6
|
return (0, readKmsSignersContext_p_js_1.readKmsSignersContext)(fhevm, {
|
|
7
|
-
|
|
7
|
+
kmsVerifierAddress: fhevm.chain.fhevm.contracts.kmsVerifier.address,
|
|
8
|
+
protocolConfigAddress: fhevm.chain.fhevm.contracts.protocolConfig?.address,
|
|
8
9
|
});
|
|
9
10
|
}
|
|
10
11
|
//# sourceMappingURL=readKmsSignersContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readKmsSignersContext.js","sourceRoot":"","sources":["../../../../core/actions/base/readKmsSignersContext.ts"],"names":[],"mappings":";;AAYA,
|
|
1
|
+
{"version":3,"file":"readKmsSignersContext.js","sourceRoot":"","sources":["../../../../core/actions/base/readKmsSignersContext.ts"],"names":[],"mappings":";;AAYA,sDAKC;AAbD,gGAAkH;AAQ3G,KAAK,UAAU,qBAAqB,CAAC,KAAwB;IAClE,OAAO,IAAA,kDAAsB,EAAC,KAAK,EAAE;QACnC,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,OAA6B;QACzF,qBAAqB,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,cAAc,EAAE,OAAyC;KAC7G,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseTransportKeyPair.js","sourceRoot":"","sources":["../../../../core/actions/chain/parseTransportKeyPair.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"parseTransportKeyPair.js","sourceRoot":"","sources":["../../../../core/actions/chain/parseTransportKeyPair.ts"],"names":[],"mappings":";;AAeA,sDAKC;AAhBD,2EAAqE;AAW9D,KAAK,UAAU,qBAAqB,CACzC,KAA4D,EAC5D,UAA2C;IAE3C,OAAO,IAAA,0CAAkB,EAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decryptKmsSigncryptedShares = decryptKmsSigncryptedShares;
|
|
4
|
+
const decryptKmsSigncryptedShares_p_js_1 = require("../../kms/decryptKmsSigncryptedShares-p.js");
|
|
5
|
+
const ClearValue_js_1 = require("../../handle/ClearValue.js");
|
|
6
|
+
const CoreFhevm_p_js_1 = require("../../runtime/CoreFhevm-p.js");
|
|
7
|
+
async function decryptKmsSigncryptedShares(fhevm, parameters) {
|
|
8
|
+
const f = (0, CoreFhevm_p_js_1.asFhevmWithTkmsVersion)(fhevm);
|
|
9
|
+
const clearValues = await (0, decryptKmsSigncryptedShares_p_js_1.decryptKmsSigncryptedShares)(f, parameters);
|
|
10
|
+
const originToken = Symbol('decryptKmsSigncryptedShares');
|
|
11
|
+
return clearValues.map((cv) => (0, ClearValue_js_1.clearValueToTypedValue)(cv, originToken));
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=decryptKmsSigncryptedShares.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decryptKmsSigncryptedShares.js","sourceRoot":"","sources":["../../../../core/actions/decrypt/decryptKmsSigncryptedShares.ts"],"names":[],"mappings":";;AAuBA,kEAUC;AA3BD,iGAAyH;AACzH,8DAAoE;AACpE,iEAAsE;AAe/D,KAAK,UAAU,2BAA2B,CAC/C,KAAqC,EACrC,UAAiD;IAEjD,MAAM,CAAC,GAAG,IAAA,uCAAsB,EAAC,KAAK,CAAC,CAAC;IAExC,MAAM,WAAW,GAAG,MAAM,IAAA,8DAA4B,EAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IAEtE,MAAM,WAAW,GAAG,MAAM,CAAC,6BAA6B,CAAC,CAAC;IAC1D,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAA,sCAAsB,EAAC,EAAE,EAAE,WAAW,CAAC,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.decryptValue = decryptValue;
|
|
|
4
4
|
const decryptValuesFromPairs_js_1 = require("../../kms/decryptValuesFromPairs.js");
|
|
5
5
|
const address_js_1 = require("../../base/address.js");
|
|
6
6
|
const FhevmHandle_js_1 = require("../../handle/FhevmHandle.js");
|
|
7
|
+
const CoreFhevm_p_js_1 = require("../../runtime/CoreFhevm-p.js");
|
|
7
8
|
async function decryptValue(fhevm, parameters) {
|
|
8
9
|
const { encryptedValue, contractAddress, ...rest } = parameters;
|
|
9
10
|
(0, address_js_1.assertIsAddress)(contractAddress, {});
|
|
@@ -14,7 +15,8 @@ async function decryptValue(fhevm, parameters) {
|
|
|
14
15
|
contractAddress: sanitizedContractAddress,
|
|
15
16
|
},
|
|
16
17
|
];
|
|
17
|
-
const
|
|
18
|
+
const f = (0, CoreFhevm_p_js_1.asFhevmWithTkmsVersion)(fhevm);
|
|
19
|
+
const typedValues = await (0, decryptValuesFromPairs_js_1.decryptValuesFromPairs)(f, {
|
|
18
20
|
...rest,
|
|
19
21
|
pairs: sanitizedPairs,
|
|
20
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decryptValue.js","sourceRoot":"","sources":["../../../../core/actions/decrypt/decryptValue.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"decryptValue.js","sourceRoot":"","sources":["../../../../core/actions/decrypt/decryptValue.ts"],"names":[],"mappings":";;AA2BA,oCAyBC;AA5CD,mFAAwG;AACxG,sDAAqF;AACrF,gEAA4D;AAC5D,iEAAsE;AAgB/D,KAAK,UAAU,YAAY,CAChC,KAAqC,EACrC,UAAkC;IAElC,MAAM,EAAE,cAAc,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,GAAG,UAAU,CAAC;IAEhE,IAAA,4BAAe,EAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IACrC,MAAM,wBAAwB,GAAG,IAAA,wCAA2B,EAAC,eAAe,CAAC,CAAC;IAE9E,MAAM,cAAc,GAAG;QACrB;YACE,MAAM,EAAE,IAAA,8BAAa,EAAC,cAAc,CAAC;YACrC,eAAe,EAAE,wBAAwB;SAC1C;KACF,CAAC;IAEF,MAAM,CAAC,GAAG,IAAA,uCAAsB,EAAC,KAAK,CAAC,CAAC;IAExC,MAAM,WAAW,GAAG,MAAM,IAAA,kDAAuB,EAAC,CAAC,EAAE;QACnD,GAAG,IAAI;QACP,KAAK,EAAE,cAAc;KAC2B,CAAC,CAAC;IAGpD,OAAO,WAAW,CAAC,CAAC,CAAE,CAAC;AACzB,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.decryptValues = decryptValues;
|
|
|
4
4
|
const decryptValuesFromPairs_js_1 = require("../../kms/decryptValuesFromPairs.js");
|
|
5
5
|
const address_js_1 = require("../../base/address.js");
|
|
6
6
|
const FhevmHandle_js_1 = require("../../handle/FhevmHandle.js");
|
|
7
|
+
const CoreFhevm_p_js_1 = require("../../runtime/CoreFhevm-p.js");
|
|
7
8
|
async function decryptValues(fhevm, parameters) {
|
|
8
9
|
const { encryptedValues, contractAddress, ...rest } = parameters;
|
|
9
10
|
(0, address_js_1.assertIsAddress)(contractAddress, {});
|
|
@@ -14,7 +15,8 @@ async function decryptValues(fhevm, parameters) {
|
|
|
14
15
|
contractAddress: sanitizedContractAddress,
|
|
15
16
|
};
|
|
16
17
|
});
|
|
17
|
-
|
|
18
|
+
const f = (0, CoreFhevm_p_js_1.asFhevmWithTkmsVersion)(fhevm);
|
|
19
|
+
return (0, decryptValuesFromPairs_js_1.decryptValuesFromPairs)(f, {
|
|
18
20
|
...rest,
|
|
19
21
|
pairs: sanitizedPairs,
|
|
20
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decryptValues.js","sourceRoot":"","sources":["../../../../core/actions/decrypt/decryptValues.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"decryptValues.js","sourceRoot":"","sources":["../../../../core/actions/decrypt/decryptValues.ts"],"names":[],"mappings":";;AA2BA,sCAsBC;AAzCD,mFAAwG;AACxG,sDAAqF;AACrF,gEAA4D;AAC5D,iEAAsE;AAgB/D,KAAK,UAAU,aAAa,CACjC,KAAqC,EACrC,UAAmC;IAEnC,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,GAAG,UAAU,CAAC;IAEjE,IAAA,4BAAe,EAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IACrC,MAAM,wBAAwB,GAAG,IAAA,wCAA2B,EAAC,eAAe,CAAC,CAAC;IAE9E,MAAM,cAAc,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;QAChD,OAAO;YACL,MAAM,EAAE,IAAA,8BAAa,EAAC,EAAE,CAAC;YACzB,eAAe,EAAE,wBAAwB;SAC1C,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,GAAG,IAAA,uCAAsB,EAAC,KAAK,CAAC,CAAC;IAExC,OAAO,IAAA,kDAAuB,EAAC,CAAC,EAAE;QAChC,GAAG,IAAI;QACP,KAAK,EAAE,cAAc;KAC2B,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.decryptValuesFromPairs = decryptValuesFromPairs;
|
|
|
4
4
|
const decryptValuesFromPairs_js_1 = require("../../kms/decryptValuesFromPairs.js");
|
|
5
5
|
const address_js_1 = require("../../base/address.js");
|
|
6
6
|
const FhevmHandle_js_1 = require("../../handle/FhevmHandle.js");
|
|
7
|
+
const CoreFhevm_p_js_1 = require("../../runtime/CoreFhevm-p.js");
|
|
7
8
|
async function decryptValuesFromPairs(fhevm, parameters) {
|
|
8
9
|
const { pairs, ...rest } = parameters;
|
|
9
10
|
const sanitizedPairs = pairs.map((pair) => {
|
|
@@ -13,7 +14,8 @@ async function decryptValuesFromPairs(fhevm, parameters) {
|
|
|
13
14
|
contractAddress: (0, address_js_1.addressToChecksummedAddress)(pair.contractAddress),
|
|
14
15
|
};
|
|
15
16
|
});
|
|
16
|
-
|
|
17
|
+
const f = (0, CoreFhevm_p_js_1.asFhevmWithTkmsVersion)(fhevm);
|
|
18
|
+
return (0, decryptValuesFromPairs_js_1.decryptValuesFromPairs)(f, {
|
|
17
19
|
...rest,
|
|
18
20
|
pairs: sanitizedPairs,
|
|
19
21
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decryptValuesFromPairs.js","sourceRoot":"","sources":["../../../../core/actions/decrypt/decryptValuesFromPairs.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"decryptValuesFromPairs.js","sourceRoot":"","sources":["../../../../core/actions/decrypt/decryptValuesFromPairs.ts"],"names":[],"mappings":";;AA6BA,wDAoBC;AAzCD,mFAAwG;AACxG,sDAAqF;AACrF,gEAA4D;AAC5D,iEAAsE;AAkB/D,KAAK,UAAU,sBAAsB,CAC1C,KAAqC,EACrC,UAA4C;IAE5C,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,UAAU,CAAC;IAEtC,MAAM,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACxC,IAAA,4BAAe,EAAC,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;QAC1C,OAAO;YACL,MAAM,EAAE,IAAA,8BAAa,EAAC,IAAI,CAAC,cAAc,CAAC;YAC1C,eAAe,EAAE,IAAA,wCAA2B,EAAC,IAAI,CAAC,eAAe,CAAC;SACnE,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,GAAG,IAAA,uCAAsB,EAAC,KAAK,CAAC,CAAC;IAExC,OAAO,IAAA,kDAAuB,EAAC,CAAC,EAAE;QAChC,GAAG,IAAI;QACP,KAAK,EAAE,cAAc;KAC2B,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateTransportKeyPair = generateTransportKeyPair;
|
|
4
4
|
const TransportKeyPair_p_js_1 = require("../../kms/TransportKeyPair-p.js");
|
|
5
|
+
const CoreFhevm_p_js_1 = require("../../runtime/CoreFhevm-p.js");
|
|
5
6
|
async function generateTransportKeyPair(fhevm) {
|
|
6
|
-
|
|
7
|
+
const f = (0, CoreFhevm_p_js_1.asFhevmWithTkmsVersion)(fhevm);
|
|
8
|
+
return await (0, TransportKeyPair_p_js_1.generateTransportKeyPair)(f);
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=generateTransportKeyPair.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateTransportKeyPair.js","sourceRoot":"","sources":["../../../../core/actions/decrypt/generateTransportKeyPair.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"generateTransportKeyPair.js","sourceRoot":"","sources":["../../../../core/actions/decrypt/generateTransportKeyPair.ts"],"names":[],"mappings":";;AAaA,4DAKC;AAfD,2EAGyC;AACzC,iEAAsE;AAM/D,KAAK,UAAU,wBAAwB,CAC5C,KAAqC;IAErC,MAAM,CAAC,GAAG,IAAA,uCAAsB,EAAC,KAAK,CAAC,CAAC;IACxC,OAAO,MAAM,IAAA,gDAAyB,EAAC,CAAC,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.canDecryptValue = exports.canDecryptValues = exports.canDecryptValuesFromPairs = exports.
|
|
3
|
+
exports.canDecryptValue = exports.canDecryptValues = exports.canDecryptValuesFromPairs = exports.decryptKmsSigncryptedShares = exports.decryptValues = exports.decryptValue = exports.decryptValuesFromPairs = exports.generateTransportKeyPair = void 0;
|
|
4
4
|
var generateTransportKeyPair_js_1 = require("./generateTransportKeyPair.js");
|
|
5
5
|
Object.defineProperty(exports, "generateTransportKeyPair", { enumerable: true, get: function () { return generateTransportKeyPair_js_1.generateTransportKeyPair; } });
|
|
6
6
|
var decryptValuesFromPairs_js_1 = require("./decryptValuesFromPairs.js");
|
|
@@ -9,8 +9,8 @@ var decryptValue_js_1 = require("./decryptValue.js");
|
|
|
9
9
|
Object.defineProperty(exports, "decryptValue", { enumerable: true, get: function () { return decryptValue_js_1.decryptValue; } });
|
|
10
10
|
var decryptValues_js_1 = require("./decryptValues.js");
|
|
11
11
|
Object.defineProperty(exports, "decryptValues", { enumerable: true, get: function () { return decryptValues_js_1.decryptValues; } });
|
|
12
|
-
var
|
|
13
|
-
Object.defineProperty(exports, "
|
|
12
|
+
var decryptKmsSigncryptedShares_js_1 = require("./decryptKmsSigncryptedShares.js");
|
|
13
|
+
Object.defineProperty(exports, "decryptKmsSigncryptedShares", { enumerable: true, get: function () { return decryptKmsSigncryptedShares_js_1.decryptKmsSigncryptedShares; } });
|
|
14
14
|
var canDecryptValuesFromPairs_js_1 = require("./canDecryptValuesFromPairs.js");
|
|
15
15
|
Object.defineProperty(exports, "canDecryptValuesFromPairs", { enumerable: true, get: function () { return canDecryptValuesFromPairs_js_1.canDecryptValuesFromPairs; } });
|
|
16
16
|
var canDecryptValues_js_1 = require("./canDecryptValues.js");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../core/actions/decrypt/index.ts"],"names":[],"mappings":";;;AAMA,6EAAkH;AAAhE,uIAAA,wBAAwB,OAAA;AAE1E,yEAIqC;AADnC,mIAAA,sBAAsB,OAAA;AAGxB,qDAA2G;AAAxC,+GAAA,YAAY,OAAA;AAE/E,uDAA+G;AAA1C,iHAAA,aAAa,OAAA;AAElF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../core/actions/decrypt/index.ts"],"names":[],"mappings":";;;AAMA,6EAAkH;AAAhE,uIAAA,wBAAwB,OAAA;AAE1E,yEAIqC;AADnC,mIAAA,sBAAsB,OAAA;AAGxB,qDAA2G;AAAxC,+GAAA,YAAY,OAAA;AAE/E,uDAA+G;AAA1C,iHAAA,aAAa,OAAA;AAElF,mFAI0C;AADxC,6IAAA,2BAA2B,OAAA;AAG7B,+EAKwC;AADtC,yIAAA,yBAAyB,OAAA;AAG3B,6DAK+B;AAD7B,uHAAA,gBAAgB,OAAA;AAGlB,2DAK8B;AAD5B,qHAAA,eAAe,OAAA"}
|
|
@@ -5,12 +5,14 @@ const address_js_1 = require("../../base/address.js");
|
|
|
5
5
|
const object_js_1 = require("../../base/object.js");
|
|
6
6
|
const typedValue_js_1 = require("../../base/typedValue.js");
|
|
7
7
|
const encrypt_js_1 = require("../../coprocessor/encrypt.js");
|
|
8
|
+
const CoreFhevm_p_js_1 = require("../../runtime/CoreFhevm-p.js");
|
|
8
9
|
async function encryptValue(fhevm, parameters) {
|
|
9
10
|
const { contractAddress, userAddress, options } = parameters;
|
|
10
11
|
const values = (0, object_js_1.toArray)(parameters.value).map(typedValue_js_1.createTypedValue);
|
|
11
12
|
(0, address_js_1.assertIsAddress)(contractAddress, {});
|
|
12
13
|
(0, address_js_1.assertIsAddress)(userAddress, {});
|
|
13
|
-
const
|
|
14
|
+
const f = (0, CoreFhevm_p_js_1.asFhevmWithTfheVersion)(fhevm);
|
|
15
|
+
const result = await (0, encrypt_js_1.encrypt)(f, {
|
|
14
16
|
contractAddress: (0, address_js_1.addressToChecksummedAddress)(contractAddress),
|
|
15
17
|
userAddress: (0, address_js_1.addressToChecksummedAddress)(userAddress),
|
|
16
18
|
values,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encryptValue.js","sourceRoot":"","sources":["../../../../core/actions/encrypt/encryptValue.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"encryptValue.js","sourceRoot":"","sources":["../../../../core/actions/encrypt/encryptValue.ts"],"names":[],"mappings":";;AA4BA,oCA0BC;AAhDD,sDAAqF;AACrF,oDAA+C;AAC/C,4DAA4D;AAC5D,6DAAmE;AACnE,iEAAsE;AAkB/D,KAAK,UAAU,YAAY,CAChC,KAAqC,EACrC,UAAkC;IAElC,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC;IAG7D,MAAM,MAAM,GAAG,IAAA,mBAAO,EAAC,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,gCAAgB,CAAC,CAAC;IAE/D,IAAA,4BAAe,EAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IACrC,IAAA,4BAAe,EAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAEjC,MAAM,CAAC,GAAG,IAAA,uCAAsB,EAAC,KAAK,CAAC,CAAC;IAExC,MAAM,MAAM,GAAG,MAAM,IAAA,oBAAQ,EAAC,CAAC,EAAE;QAC/B,eAAe,EAAE,IAAA,wCAA2B,EAAC,eAAe,CAAC;QAC7D,WAAW,EAAE,IAAA,wCAA2B,EAAC,WAAW,CAAC;QACrD,MAAM;QACN,OAAO;KACR,CAAC,CAAC;IAEH,OAAO;QAEL,cAAc,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,CAAE,CAAC,UAAuC;QAC/E,UAAU,EAAE,MAAM,CAAC,UAAU;KAC9B,CAAC;AACJ,CAAC"}
|
|
@@ -4,12 +4,14 @@ exports.encryptValues = encryptValues;
|
|
|
4
4
|
const address_js_1 = require("../../base/address.js");
|
|
5
5
|
const typedValue_js_1 = require("../../base/typedValue.js");
|
|
6
6
|
const encrypt_js_1 = require("../../coprocessor/encrypt.js");
|
|
7
|
+
const CoreFhevm_p_js_1 = require("../../runtime/CoreFhevm-p.js");
|
|
7
8
|
async function encryptValues(fhevm, parameters) {
|
|
8
9
|
const { contractAddress, userAddress, options } = parameters;
|
|
9
10
|
const values = parameters.values.map(typedValue_js_1.createTypedValue);
|
|
10
11
|
(0, address_js_1.assertIsAddress)(contractAddress, {});
|
|
11
12
|
(0, address_js_1.assertIsAddress)(userAddress, {});
|
|
12
|
-
const
|
|
13
|
+
const f = (0, CoreFhevm_p_js_1.asFhevmWithTfheVersion)(fhevm);
|
|
14
|
+
const result = await (0, encrypt_js_1.encrypt)(f, {
|
|
13
15
|
contractAddress: (0, address_js_1.addressToChecksummedAddress)(contractAddress),
|
|
14
16
|
userAddress: (0, address_js_1.addressToChecksummedAddress)(userAddress),
|
|
15
17
|
values,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encryptValues.js","sourceRoot":"","sources":["../../../../core/actions/encrypt/encryptValues.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"encryptValues.js","sourceRoot":"","sources":["../../../../core/actions/encrypt/encryptValues.ts"],"names":[],"mappings":";;AA2BA,sCA0BC;AA/CD,sDAAqF;AACrF,4DAA4D;AAC5D,6DAAmE;AACnE,iEAAsE;AAkB/D,KAAK,UAAU,aAAa,CACjC,KAAqC,EACrC,UAAmC;IAEnC,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC;IAE7D,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,gCAAgB,CAAC,CAAC;IAEvD,IAAA,4BAAe,EAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IACrC,IAAA,4BAAe,EAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAEjC,MAAM,CAAC,GAAG,IAAA,uCAAsB,EAAC,KAAK,CAAC,CAAC;IAExC,MAAM,MAAM,GAAG,MAAM,IAAA,oBAAQ,EAAC,CAAC,EAAE;QAC/B,eAAe,EAAE,IAAA,wCAA2B,EAAC,eAAe,CAAC;QAC7D,WAAW,EAAE,IAAA,wCAA2B,EAAC,WAAW,CAAC;QACrD,MAAM;QACN,OAAO;KACR,CAAC,CAAC;IAEH,OAAO;QACL,eAAe,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG,CACtC,CAAC,cAAc,EAAE,EAAE,CAAC,cAAc,CAAC,UAAuC,CAC3E;QACD,UAAU,EAAE,MAAM,CAAC,UAAU;KAC9B,CAAC;AACJ,CAAC"}
|
|
@@ -3,15 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.generateZkProof = generateZkProof;
|
|
4
4
|
const typedValue_js_1 = require("../../base/typedValue.js");
|
|
5
5
|
const ZkProofBuilder_p_js_1 = require("../../coprocessor/ZkProofBuilder-p.js");
|
|
6
|
+
const CoreFhevm_p_js_1 = require("../../runtime/CoreFhevm-p.js");
|
|
6
7
|
async function generateZkProof(fhevm, parameters) {
|
|
7
8
|
const { values, contractAddress, userAddress } = parameters;
|
|
9
|
+
const hardCodedExtraData = '0x00';
|
|
8
10
|
const builder = (0, ZkProofBuilder_p_js_1.createZkProofBuilder)();
|
|
9
11
|
for (const value of values) {
|
|
10
12
|
builder.addTypedValue((0, typedValue_js_1.createTypedValue)(value));
|
|
11
13
|
}
|
|
12
|
-
|
|
14
|
+
const f = (0, CoreFhevm_p_js_1.asFhevmWithTfheVersion)(fhevm);
|
|
15
|
+
return builder.build(f, {
|
|
13
16
|
contractAddress,
|
|
14
17
|
userAddress,
|
|
18
|
+
extraData: hardCodedExtraData,
|
|
15
19
|
});
|
|
16
20
|
}
|
|
17
21
|
//# sourceMappingURL=generateZkProof.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateZkProof.js","sourceRoot":"","sources":["../../../../core/actions/encrypt/generateZkProof.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"generateZkProof.js","sourceRoot":"","sources":["../../../../core/actions/encrypt/generateZkProof.ts"],"names":[],"mappings":";;AAqBA,0CAmBC;AAnCD,4DAA4D;AAC5D,+EAA6E;AAC7E,iEAAsE;AAc/D,KAAK,UAAU,eAAe,CACnC,KAAqC,EACrC,UAAqC;IAErC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,UAAU,CAAC;IAC5D,MAAM,kBAAkB,GAAG,MAAkB,CAAC;IAE9C,MAAM,OAAO,GAAG,IAAA,0CAAoB,GAAE,CAAC;IACvC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,OAAO,CAAC,aAAa,CAAC,IAAA,gCAAgB,EAAC,KAAK,CAAC,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,GAAG,IAAA,uCAAsB,EAAC,KAAK,CAAC,CAAC;IAExC,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE;QACtB,eAAe;QACf,WAAW;QACX,SAAS,EAAE,kBAAkB;KAC9B,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -12,13 +12,13 @@ const HostContractVersion_p_js_1 = require("../../host-contracts/HostContractVer
|
|
|
12
12
|
const HostContractVersion_p_js_2 = require("../../host-contracts/HostContractVersion-p.js");
|
|
13
13
|
const getInputVerifierAddress_p_js_1 = require("../../host-contracts/getInputVerifierAddress-p.js");
|
|
14
14
|
async function readFhevmExecutorContractData(fhevm, parameters) {
|
|
15
|
-
const
|
|
15
|
+
const fhevmExecutorAddress = parameters.address;
|
|
16
16
|
const rpcCalls = [
|
|
17
|
-
() => (0, HostContractVersion_p_js_2.
|
|
18
|
-
() => (0, getAclAddress_p_js_1.getAclAddress)(fhevm,
|
|
19
|
-
() => (0, getHcuLimitAddress_p_js_1.getHcuLimitAddress)(fhevm,
|
|
20
|
-
() => (0, getInputVerifierAddress_p_js_1.getInputVerifierAddress)(fhevm,
|
|
21
|
-
() => (0, getHandleVersion_p_js_1.getHandleVersion)(fhevm,
|
|
17
|
+
() => (0, HostContractVersion_p_js_2.getHostContractVersion)(fhevm, parameters),
|
|
18
|
+
() => (0, getAclAddress_p_js_1.getAclAddress)(fhevm, { fhevmExecutorAddress }),
|
|
19
|
+
() => (0, getHcuLimitAddress_p_js_1.getHcuLimitAddress)(fhevm, { fhevmExecutorAddress }),
|
|
20
|
+
() => (0, getInputVerifierAddress_p_js_1.getInputVerifierAddress)(fhevm, { fhevmExecutorAddress }),
|
|
21
|
+
() => (0, getHandleVersion_p_js_1.getHandleVersion)(fhevm, { fhevmExecutorAddress }),
|
|
22
22
|
];
|
|
23
23
|
const res = await (0, promise_js_1.executeWithBatching)(rpcCalls, fhevm.options.batchRpcCalls);
|
|
24
24
|
const contractVersion = res[0];
|
|
@@ -35,7 +35,7 @@ async function readFhevmExecutorContractData(fhevm, parameters) {
|
|
|
35
35
|
(0, address_js_1.assertIsChecksummedAddress)(inputVerifierContractAddress, {});
|
|
36
36
|
const data = (0, FhevmExecutorContractData_p_js_1.createFhevmExecutorContractData)(new WeakRef(fhevm.runtime), {
|
|
37
37
|
version: contractVersion,
|
|
38
|
-
address:
|
|
38
|
+
address: fhevmExecutorAddress,
|
|
39
39
|
aclContractAddress,
|
|
40
40
|
inputVerifierContractAddress,
|
|
41
41
|
hcuLimitContractAddress,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readFhevmExecutorContractData.js","sourceRoot":"","sources":["../../../../core/actions/host/readFhevmExecutorContractData.ts"],"names":[],"mappings":";;AAoBA,sEAqDC;AArED,sDAAmE;AACnE,sDAA4D;AAC5D,gDAA6C;AAC7C,wGAAsG;AACtG,gFAAwE;AACxE,sFAA8E;AAC9E,0FAAkF;AAClF,4FAA8F;AAC9F,
|
|
1
|
+
{"version":3,"file":"readFhevmExecutorContractData.js","sourceRoot":"","sources":["../../../../core/actions/host/readFhevmExecutorContractData.ts"],"names":[],"mappings":";;AAoBA,sEAqDC;AArED,sDAAmE;AACnE,sDAA4D;AAC5D,gDAA6C;AAC7C,wGAAsG;AACtG,gFAAwE;AACxE,sFAA8E;AAC9E,0FAAkF;AAClF,4FAA8F;AAC9F,4FAAuF;AACvF,oGAA4F;AAOrF,KAAK,UAAU,6BAA6B,CACjD,KAAY,EACZ,UAAmD;IAEnD,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,CAAC;IAahD,MAAM,QAAQ,GAAG;QACf,GAAG,EAAE,CAAC,IAAA,iDAAsB,EAAC,KAAK,EAAE,UAAU,CAAC;QAC/C,GAAG,EAAE,CAAC,IAAA,kCAAa,EAAC,KAAK,EAAE,EAAE,oBAAoB,EAAE,CAAC;QACpD,GAAG,EAAE,CAAC,IAAA,4CAAkB,EAAC,KAAK,EAAE,EAAE,oBAAoB,EAAE,CAAC;QACzD,GAAG,EAAE,CAAC,IAAA,sDAAuB,EAAC,KAAK,EAAE,EAAE,oBAAoB,EAAE,CAAC;QAC9D,GAAG,EAAE,CAAC,IAAA,wCAAgB,EAAC,KAAK,EAAE,EAAE,oBAAoB,EAAE,CAAC;KACxD,CAAC;IAEF,MAAM,GAAG,GAAG,MAAM,IAAA,gCAAmB,EAAU,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAEtF,MAAM,eAAe,GAAG,GAAG,CAAC,CAAC,CAAwB,CAAC;IACtD,MAAM,kBAAkB,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IAClC,MAAM,uBAAuB,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IACvC,MAAM,4BAA4B,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IAC5C,MAAM,aAAa,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IAE7B,IAAA,wDAA6B,EAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IAEhE,IAAI,CAAC,IAAA,iBAAO,EAAC,aAAa,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,IAAA,uCAA0B,EAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;IACnD,IAAA,uCAA0B,EAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;IACxD,IAAA,uCAA0B,EAAC,4BAA4B,EAAE,EAAE,CAAC,CAAC;IAE7D,MAAM,IAAI,GAAG,IAAA,gEAA+B,EAAC,IAAI,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;QACvE,OAAO,EAAE,eAAe;QACxB,OAAO,EAAE,oBAAoB;QAC7B,kBAAkB;QAClB,4BAA4B;QAC5B,uBAAuB;QACvB,aAAa,EAAE,MAAM,CAAC,aAAa,CAAgB;KACpD,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -11,7 +11,7 @@ const InputVerifierContractData_p_js_1 = require("../../host-contracts/InputVeri
|
|
|
11
11
|
async function readInputVerifierContractData(fhevm, parameters) {
|
|
12
12
|
const inputVerifierContractAddress = parameters.address;
|
|
13
13
|
const rpcCalls = [
|
|
14
|
-
() => (0, HostContractVersion_p_js_2.
|
|
14
|
+
() => (0, HostContractVersion_p_js_2.getHostContractVersion)(fhevm, parameters),
|
|
15
15
|
() => (0, eip712Domain_p_js_1.eip712Domain)(fhevm, parameters),
|
|
16
16
|
() => (0, readCoprocessorSignersContext_p_js_1.readCoprocessorSignersContext)(fhevm, parameters),
|
|
17
17
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readInputVerifierContractData.js","sourceRoot":"","sources":["../../../../core/actions/host/readInputVerifierContractData.ts"],"names":[],"mappings":";;AAuBA,sEAkDC;AApED,8EAAmG;AACnG,4FAA8F;AAC9F,gHAAwG;AACxG,
|
|
1
|
+
{"version":3,"file":"readInputVerifierContractData.js","sourceRoot":"","sources":["../../../../core/actions/host/readInputVerifierContractData.ts"],"names":[],"mappings":";;AAuBA,sEAkDC;AApED,8EAAmG;AACnG,4FAA8F;AAC9F,gHAAwG;AACxG,4FAAuF;AACvF,sDAA4D;AAC5D,6GAAuG;AACvG,wGAAsG;AAY/F,KAAK,UAAU,6BAA6B,CACjD,KAAY,EACZ,UAAmD;IAEnD,MAAM,4BAA4B,GAAG,UAAU,CAAC,OAAO,CAAC;IAaxD,MAAM,QAAQ,GAAG;QACf,GAAG,EAAE,CAAC,IAAA,iDAAsB,EAAC,KAAK,EAAE,UAAU,CAAC;QAC/C,GAAG,EAAE,CAAC,IAAA,gCAAY,EAAC,KAAK,EAAE,UAAU,CAAC;QACrC,GAAG,EAAE,CAAC,IAAA,kEAA6B,EAAC,KAAK,EAAE,UAAU,CAAC;KACvD,CAAC;IAEF,MAAM,GAAG,GAAG,MAAM,IAAA,gCAAmB,EAAU,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAEtF,MAAM,eAAe,GAAG,GAAG,CAAC,CAAC,CAAwB,CAAC;IACtD,MAAM,eAAe,GAAG,GAAG,CAAC,CAAC,CAA2B,CAAC;IACzD,MAAM,yBAAyB,GAAG,GAAG,CAAC,CAAC,CAA8B,CAAC;IAEtE,IAAA,wDAA6B,EAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IAEhE,IAAI,CAAC;QACH,IAAA,oEAA+B,EAAC,eAAe,EAAE,8BAA8B,EAAE,EAAE,CAAC,CAAC;IACvF,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,uCAAuC,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IACzE,CAAC;IAED,IAAI,eAAe,CAAC,iBAAiB,CAAC,WAAW,EAAE,KAAK,4BAA4B,CAAC,WAAW,EAAE,EAAE,CAAC;QACnG,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;IACzF,CAAC;IAED,MAAM,IAAI,GAAG,IAAA,gEAA+B,EAAC,IAAI,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;QACvE,OAAO,EAAE,eAAe;QACxB,OAAO,EAAE,4BAA4B;QACrC,YAAY,EAAE,eAAe;QAC7B,0BAA0B,EAAE,yBAAyB,CAAC,SAAS;QAC/D,kBAAkB,EAAE,yBAAyB,CAAC,OAAO;KACtD,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -9,11 +9,12 @@ const HostContractVersion_p_js_1 = require("../../host-contracts/HostContractVer
|
|
|
9
9
|
const HostContractVersion_p_js_2 = require("../../host-contracts/HostContractVersion-p.js");
|
|
10
10
|
const readKmsSignersContext_p_js_1 = require("../../host-contracts/readKmsSignersContext-p.js");
|
|
11
11
|
async function readKmsVerifierContractData(fhevm, parameters) {
|
|
12
|
-
const
|
|
12
|
+
const kmsVerifierAddress = parameters.address;
|
|
13
|
+
const protocolConfigAddress = parameters.protocolConfigAddress;
|
|
13
14
|
const rpcCalls = [
|
|
14
|
-
() => (0, HostContractVersion_p_js_2.
|
|
15
|
+
() => (0, HostContractVersion_p_js_2.getHostContractVersion)(fhevm, parameters),
|
|
15
16
|
() => (0, eip712Domain_p_js_1.eip712Domain)(fhevm, parameters),
|
|
16
|
-
() => (0, readKmsSignersContext_p_js_1.readKmsSignersContext)(fhevm,
|
|
17
|
+
() => (0, readKmsSignersContext_p_js_1.readKmsSignersContext)(fhevm, { kmsVerifierAddress, protocolConfigAddress }),
|
|
17
18
|
];
|
|
18
19
|
const res = await (0, promise_js_1.executeWithBatching)(rpcCalls, fhevm.options.batchRpcCalls);
|
|
19
20
|
const contractVersion = res[0];
|
|
@@ -26,12 +27,12 @@ async function readKmsVerifierContractData(fhevm, parameters) {
|
|
|
26
27
|
catch (e) {
|
|
27
28
|
throw new Error(`Invalid KMSVerifier EIP-712 domain.`, { cause: e });
|
|
28
29
|
}
|
|
29
|
-
if (eip712DomainRes.verifyingContract.toLowerCase() ===
|
|
30
|
+
if (eip712DomainRes.verifyingContract.toLowerCase() === kmsVerifierAddress.toLowerCase()) {
|
|
30
31
|
throw new Error(`Invalid KMSVerifier EIP-712 domain. Unexpected verifyingContract.`);
|
|
31
32
|
}
|
|
32
33
|
const data = (0, KmsVerifierContractData_p_js_1.createKmsVerifierContractData)(new WeakRef(fhevm.runtime), {
|
|
33
34
|
version: contractVersion,
|
|
34
|
-
address:
|
|
35
|
+
address: kmsVerifierAddress,
|
|
35
36
|
eip712Domain: eip712DomainRes,
|
|
36
37
|
kmsSignerThreshold: kmsSignersContext.threshold,
|
|
37
38
|
kmsSigners: kmsSignersContext.signers,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readKmsVerifierContractData.js","sourceRoot":"","sources":["../../../../core/actions/host/readKmsVerifierContractData.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"readKmsVerifierContractData.js","sourceRoot":"","sources":["../../../../core/actions/host/readKmsVerifierContractData.ts"],"names":[],"mappings":";;AAyBA,kEAmDC;AAtED,sDAA4D;AAC5D,oGAAkG;AAClG,iFAA6E;AAC7E,8EAAsE;AACtE,4FAA8F;AAC9F,4FAAuF;AACvF,gGAAwF;AAajF,KAAK,UAAU,2BAA2B,CAC/C,KAAY,EACZ,UAAiD;IAEjD,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,CAAC;IAC9C,MAAM,qBAAqB,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAa/D,MAAM,QAAQ,GAAG;QACf,GAAG,EAAE,CAAC,IAAA,iDAAsB,EAAC,KAAK,EAAE,UAAU,CAAC;QAC/C,GAAG,EAAE,CAAC,IAAA,gCAAY,EAAC,KAAK,EAAE,UAAU,CAAC;QACrC,GAAG,EAAE,CAAC,IAAA,kDAAqB,EAAC,KAAK,EAAE,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,CAAC;KAClF,CAAC;IAEF,MAAM,GAAG,GAAG,MAAM,IAAA,gCAAmB,EAAU,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAEtF,MAAM,eAAe,GAAG,GAAG,CAAC,CAAC,CAAwB,CAAC;IACtD,MAAM,eAAe,GAAG,GAAG,CAAC,CAAC,CAA2B,CAAC;IACzD,MAAM,iBAAiB,GAAG,GAAG,CAAC,CAAC,CAAsB,CAAC;IAEtD,IAAA,wDAA6B,EAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IAE9D,IAAI,CAAC;QACH,IAAA,kDAAuB,EAAC,eAAe,EAAE,4BAA4B,EAAE,EAAE,CAAC,CAAC;IAC7E,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,qCAAqC,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,eAAe,CAAC,iBAAiB,CAAC,WAAW,EAAE,KAAK,kBAAkB,CAAC,WAAW,EAAE,EAAE,CAAC;QACzF,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;IACvF,CAAC;IAED,MAAM,IAAI,GAAG,IAAA,4DAA6B,EAAC,IAAI,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;QACrE,OAAO,EAAE,eAAe;QACxB,OAAO,EAAE,kBAAkB;QAC3B,YAAY,EAAE,eAAe;QAC7B,kBAAkB,EAAE,iBAAiB,CAAC,SAAS;QAC/C,UAAU,EAAE,iBAAiB,CAAC,OAAO;KACtC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -11,6 +11,10 @@ const resolveChainId_js_1 = require("./resolveChainId.js");
|
|
|
11
11
|
async function resolveFhevmConfig(fhevm, parameters) {
|
|
12
12
|
const kmsVerifierAddress = parameters.fhevm.contracts.kmsVerifier.address;
|
|
13
13
|
(0, address_js_1.assertIsAddress)(kmsVerifierAddress, {});
|
|
14
|
+
const protocolConfigAddress = parameters.fhevm.contracts.protocolConfig?.address;
|
|
15
|
+
if (protocolConfigAddress !== undefined) {
|
|
16
|
+
(0, address_js_1.assertIsAddress)(protocolConfigAddress, {});
|
|
17
|
+
}
|
|
14
18
|
const id = await (0, resolveChainId_js_1.resolveChainId)(fhevm, parameters);
|
|
15
19
|
const fhevmExecutorData = await _resolveFhevmExecutor(fhevm, parameters.fhevm.contracts);
|
|
16
20
|
_assertOptionalAddressMatch(parameters.fhevm.contracts.inputVerifier?.address, fhevmExecutorData.inputVerifierContractAddress, 'InputVerifier');
|
|
@@ -21,6 +25,7 @@ async function resolveFhevmConfig(fhevm, parameters) {
|
|
|
21
25
|
}),
|
|
22
26
|
() => (0, readKmsVerifierContractData_js_1.readKmsVerifierContractData)(fhevm, {
|
|
23
27
|
address: (0, address_js_1.addressToChecksummedAddress)(kmsVerifierAddress),
|
|
28
|
+
protocolConfigAddress: protocolConfigAddress ? (0, address_js_1.addressToChecksummedAddress)(protocolConfigAddress) : undefined,
|
|
24
29
|
}),
|
|
25
30
|
];
|
|
26
31
|
const res = await (0, promise_js_1.executeWithBatching)(rpcCalls, fhevm.options.batchRpcCalls);
|
|
@@ -36,6 +41,7 @@ async function resolveFhevmConfig(fhevm, parameters) {
|
|
|
36
41
|
fhevmExecutor: fhevmExecutorData,
|
|
37
42
|
inputVerifier: inputVerifierData,
|
|
38
43
|
kmsVerifier: kmsVerifierData,
|
|
44
|
+
protocolConfig: protocolConfigAddress ? (0, address_js_1.addressToChecksummedAddress)(protocolConfigAddress) : undefined,
|
|
39
45
|
};
|
|
40
46
|
return Object.freeze(returnValue);
|
|
41
47
|
}
|
|
@@ -51,7 +57,7 @@ async function _resolveFhevmExecutor(fhevm, parameters) {
|
|
|
51
57
|
let address;
|
|
52
58
|
if (acl !== undefined) {
|
|
53
59
|
const aclFhevmExecutor = await (0, getFhevmExecutorAddress_p_js_1.getFhevmExecutorAddress)(fhevm, {
|
|
54
|
-
|
|
60
|
+
aclAddress: (0, address_js_1.addressToChecksummedAddress)(acl),
|
|
55
61
|
});
|
|
56
62
|
if (fhevmExecutor !== undefined) {
|
|
57
63
|
if (aclFhevmExecutor !== fhevmExecutor) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveFhevmConfig.js","sourceRoot":"","sources":["../../../../core/actions/host/resolveFhevmConfig.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"resolveFhevmConfig.js","sourceRoot":"","sources":["../../../../core/actions/host/resolveFhevmConfig.ts"],"names":[],"mappings":";;AA4DA,gDA0EC;AAlID,sDAAqF;AACrF,sDAA4D;AAC5D,oGAA4F;AAC5F,yFAAmF;AACnF,yFAAmF;AACnF,qFAA+E;AAC/E,2DAAqD;AAkD9C,KAAK,UAAU,kBAAkB,CACtC,KAAY,EACZ,UAAwC;IAGxC,MAAM,kBAAkB,GAAG,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC;IAC1E,IAAA,4BAAe,EAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;IAExC,MAAM,qBAAqB,GAAG,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,cAAc,EAAE,OAAO,CAAC;IACjF,IAAI,qBAAqB,KAAK,SAAS,EAAE,CAAC;QACxC,IAAA,4BAAe,EAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,EAAE,GAAiB,MAAM,IAAA,kCAAc,EAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IACjE,MAAM,iBAAiB,GAAG,MAAM,qBAAqB,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAEzF,2BAA2B,CACzB,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE,OAAO,EACjD,iBAAiB,CAAC,4BAA4B,EAC9C,eAAe,CAChB,CAAC;IACF,2BAA2B,CACzB,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAC5C,iBAAiB,CAAC,uBAAuB,EACzC,UAAU,CACX,CAAC;IAEF,MAAM,QAAQ,GAAG;QACf,GAAG,EAAE,CACH,IAAA,gEAA6B,EAAC,KAAK,EAAE;YACnC,OAAO,EAAE,iBAAiB,CAAC,4BAA4B;SACxD,CAAC;QACJ,GAAG,EAAE,CACH,IAAA,4DAA2B,EAAC,KAAK,EAAE;YACjC,OAAO,EAAE,IAAA,wCAA2B,EAAC,kBAAkB,CAAC;YACxD,qBAAqB,EAAE,qBAAqB,CAAC,CAAC,CAAC,IAAA,wCAA2B,EAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,SAAS;SAC9G,CAAC;KACL,CAAC;IAEF,MAAM,GAAG,GAAG,MAAM,IAAA,gCAAmB,EAAU,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAEtF,MAAM,iBAAiB,GAAG,GAAG,CAAC,CAAC,CAA8B,CAAC;IAC9D,MAAM,eAAe,GAAG,GAAG,CAAC,CAAC,CAA4B,CAAC;IAE1D,2BAA2B,CACzB,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EACxD,eAAe,CAAC,YAAY,CAAC,iBAAiB,EAC9C,oCAAoC,CACrC,CAAC;IAEF,2BAA2B,CACzB,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAC/D,iBAAiB,CAAC,YAAY,CAAC,iBAAiB,EAChD,2CAA2C,CAC5C,CAAC;IAEF,2BAA2B,CACzB,iBAAiB,CAAC,YAAY,CAAC,OAAO,EACtC,eAAe,CAAC,YAAY,CAAC,OAAO,EACpC,gBAAgB,CACjB,CAAC;IAEF,2BAA2B,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,EAAE,iBAAiB,CAAC,YAAY,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;IAEpH,MAAM,WAAW,GAAiC;QAChD,EAAE;QACF,GAAG,EAAE,iBAAiB,CAAC,kBAAkB;QACzC,aAAa,EAAE,iBAAiB;QAChC,aAAa,EAAE,iBAAiB;QAChC,WAAW,EAAE,eAAe;QAC5B,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC,IAAA,wCAA2B,EAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,SAAS;KACvG,CAAC;IAEF,OAAO,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AACpC,CAAC;AAMD,KAAK,UAAU,qBAAqB,CAClC,KAAY,EACZ,UAGC;IAED,MAAM,GAAG,GAAG,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;IACpC,MAAM,aAAa,GAAG,UAAU,CAAC,aAAa,EAAE,OAAO,CAAC;IAExD,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,IAAA,4BAAe,EAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAC3B,CAAC;IACD,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QAChC,IAAA,4BAAe,EAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,IAAI,OAAO,CAAC;IAEZ,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,MAAM,gBAAgB,GAAG,MAAM,IAAA,sDAAuB,EAAC,KAAK,EAAE;YAC5D,UAAU,EAAE,IAAA,wCAA2B,EAAC,GAAG,CAAC;SAC7C,CAAC,CAAC;QACH,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;YAChC,IAAI,gBAAgB,KAAK,aAAa,EAAE,CAAC;gBACvC,MAAM,IAAI,KAAK,CACb,+CAA+C,gBAAgB,SAAS,aAAa,eAAe,CACrG,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO,GAAG,gBAAgB,CAAC;IAC7B,CAAC;SAAM,CAAC;QACN,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;QAC1F,CAAC;QACD,OAAO,GAAG,IAAA,wCAA2B,EAAC,aAAa,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,MAAM,IAAA,gEAA6B,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;AACjE,CAAC;AAID,SAAS,2BAA2B,CAAC,MAA0B,EAAE,QAAgB,EAAE,KAAa;IAC9F,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,IAAI,MAAM,CAAC,WAAW,EAAE,KAAK,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;YACpD,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,+BAA+B,QAAQ,SAAS,MAAM,eAAe,CAAC,CAAC;QACjG,CAAC;IACH,CAAC;AACH,CAAC;AAID,SAAS,2BAA2B,CAAC,MAAmC,EAAE,QAAgB,EAAE,KAAa;IACvG,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,uBAAuB,QAAQ,SAAS,MAAM,eAAe,CAAC,CAAC;QACzF,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/_cjs/core/base/object.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toArray = toArray;
|
|
4
4
|
exports.simpleDeepFreeze = simpleDeepFreeze;
|
|
5
|
+
exports.isDeepEqual = isDeepEqual;
|
|
5
6
|
exports.addInternalFunction = addInternalFunction;
|
|
6
7
|
function toArray(value) {
|
|
7
8
|
if (Array.isArray(value)) {
|
|
@@ -18,6 +19,28 @@ function simpleDeepFreeze(obj) {
|
|
|
18
19
|
}
|
|
19
20
|
return obj;
|
|
20
21
|
}
|
|
22
|
+
function isDeepEqual(value, expected) {
|
|
23
|
+
if (value === expected) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
if (Array.isArray(expected)) {
|
|
27
|
+
return (Array.isArray(value) &&
|
|
28
|
+
value.length === expected.length &&
|
|
29
|
+
expected.every((expectedItem, index) => isDeepEqual(value[index], expectedItem)));
|
|
30
|
+
}
|
|
31
|
+
if (expected === null || typeof expected !== 'object') {
|
|
32
|
+
return value === expected;
|
|
33
|
+
}
|
|
34
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value)) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
const record = value;
|
|
38
|
+
const expectedRecord = expected;
|
|
39
|
+
const keys = Object.keys(record);
|
|
40
|
+
const expectedKeys = Object.keys(expectedRecord);
|
|
41
|
+
return (keys.length === expectedKeys.length &&
|
|
42
|
+
expectedKeys.every((key) => Object.hasOwn(record, key) && isDeepEqual(record[key], expectedRecord[key])));
|
|
43
|
+
}
|
|
21
44
|
function addInternalFunction(target, fnName, fn) {
|
|
22
45
|
Object.defineProperty(target, fnName, {
|
|
23
46
|
value: fn,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.js","sourceRoot":"","sources":["../../../core/base/object.ts"],"names":[],"mappings":";;AACA,0BAKC;AAED,4CAQC;AAYD,kDAYC;
|
|
1
|
+
{"version":3,"file":"object.js","sourceRoot":"","sources":["../../../core/base/object.ts"],"names":[],"mappings":";;AACA,0BAKC;AAED,4CAQC;AAQD,kCA8BC;AAYD,kDAYC;AA7ED,SAAgB,OAAO,CAAI,KAAuB;IAChD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAqB,CAAC;IAC/B,CAAC;IACD,OAAO,CAAC,KAAU,CAAC,CAAC;AACtB,CAAC;AAED,SAAgB,gBAAgB,CAAmB,GAAM;IACvD,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACnB,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;QACvC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACpG,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAQD,SAAgB,WAAW,CAAC,KAAc,EAAE,QAAiB;IAC3D,IAAI,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,OAAO,CACL,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YACpB,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM;YAChC,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,EAAE,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC,CACjF,CAAC;IACJ,CAAC;IAED,IAAI,QAAQ,KAAK,IAAI,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACtD,OAAO,KAAK,KAAK,QAAQ,CAAC;IAC5B,CAAC;IAED,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACxE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,MAAM,GAAG,KAAgC,CAAC;IAChD,MAAM,cAAc,GAAG,QAAmC,CAAC;IAC3D,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAEjD,OAAO,CACL,IAAI,CAAC,MAAM,KAAK,YAAY,CAAC,MAAM;QACnC,YAAY,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CACzG,CAAC;AACJ,CAAC;AAYD,SAAgB,mBAAmB,CACjC,MAAS,EACT,MAAc,EACd,EAAM;IAEN,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE;QACpC,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,KAAK;QACf,YAAY,EAAE,KAAK;QACnB,UAAU,EAAE,KAAK;KAClB,CAAC,CAAC;IACH,OAAO,MAA0C,CAAC;AACpD,CAAC"}
|