@fhevm/sdk 1.1.0-alpha.6 → 1.1.0-alpha.8
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/README.md +5 -5
- package/_cjs/core/_version.js +1 -1
- package/_cjs/core/actions/base/index.js +1 -17
- package/_cjs/core/actions/base/index.js.map +1 -1
- package/_cjs/core/actions/base/signDecryptionPermit.js +0 -3
- package/_cjs/core/actions/base/signDecryptionPermit.js.map +1 -1
- package/_cjs/core/actions/chain/index.js +1 -13
- package/_cjs/core/actions/chain/index.js.map +1 -1
- package/_cjs/core/actions/chain/parseSignedDecryptionPermit.js.map +1 -1
- package/_cjs/core/actions/chain/serializeSignedDecryptionPermit.js.map +1 -1
- package/_cjs/core/actions/decrypt/canDecryptValue.js.map +1 -1
- package/_cjs/core/actions/decrypt/canDecryptValues.js.map +1 -1
- package/_cjs/core/actions/decrypt/canDecryptValuesFromPairs.js.map +1 -1
- package/_cjs/core/actions/decrypt/decryptValue.js +1 -0
- package/_cjs/core/actions/decrypt/decryptValue.js.map +1 -1
- package/_cjs/core/actions/decrypt/decryptValues.js +2 -0
- package/_cjs/core/actions/decrypt/decryptValues.js.map +1 -1
- package/_cjs/core/actions/decrypt/decryptValuesFromPairs.js +2 -0
- package/_cjs/core/actions/decrypt/decryptValuesFromPairs.js.map +1 -1
- package/_cjs/core/actions/decrypt/index.js +1 -3
- package/_cjs/core/actions/decrypt/index.js.map +1 -1
- package/_cjs/core/actions/encrypt/encryptValue.js +2 -1
- package/_cjs/core/actions/encrypt/encryptValue.js.map +1 -1
- package/_cjs/core/actions/encrypt/encryptValues.js +2 -1
- package/_cjs/core/actions/encrypt/encryptValues.js.map +1 -1
- package/_cjs/core/actions/encrypt/generateZkProof.js +2 -1
- package/_cjs/core/actions/encrypt/generateZkProof.js.map +1 -1
- package/_cjs/core/actions/host/index.js +1 -9
- package/_cjs/core/actions/host/index.js.map +1 -1
- package/_cjs/core/actions/host/readKmsVerifierContractData.js +1 -1
- package/_cjs/core/actions/host/readKmsVerifierContractData.js.map +1 -1
- package/_cjs/core/base/cachedFetch.js +2 -1
- package/_cjs/core/base/cachedFetch.js.map +1 -1
- package/_cjs/core/base/uint.js +7 -0
- package/_cjs/core/base/uint.js.map +1 -1
- package/_cjs/core/clients/decorators/base.js +1 -1
- package/_cjs/core/clients/decorators/base.js.map +1 -1
- package/_cjs/core/handle/FheType.js +4 -0
- package/_cjs/core/handle/FheType.js.map +1 -1
- package/_cjs/core/host-contracts/HostContractVersion-p.js +4 -0
- package/_cjs/core/host-contracts/HostContractVersion-p.js.map +1 -1
- package/_cjs/core/host-contracts/KmsSignersContext-p.js +15 -25
- package/_cjs/core/host-contracts/KmsSignersContext-p.js.map +1 -1
- package/_cjs/core/host-contracts/canDecryptValuesFromPairs.js +4 -1
- package/_cjs/core/host-contracts/canDecryptValuesFromPairs.js.map +1 -1
- package/_cjs/core/host-contracts/getCoprocessorContextSignersAndThreshold-p.js +1 -1
- package/_cjs/core/host-contracts/getCoprocessorContextSignersAndThreshold-p.js.map +1 -1
- package/_cjs/core/host-contracts/getCurrentKmsContextAndEpoch-p.js +1 -1
- package/_cjs/core/host-contracts/getCurrentKmsContextAndEpoch-p.js.map +1 -1
- package/_cjs/core/host-contracts/getCurrentKmsContextId-p.js +1 -1
- package/_cjs/core/host-contracts/getCurrentKmsContextId-p.js.map +1 -1
- package/_cjs/core/host-contracts/getKmsContextSignersAndThreshold-p.js +1 -1
- package/_cjs/core/host-contracts/getKmsContextSignersAndThreshold-p.js.map +1 -1
- package/_cjs/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.js +7 -6
- package/_cjs/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.js.map +1 -1
- package/_cjs/core/host-contracts/readKmsSignersContext-p.js +54 -66
- package/_cjs/core/host-contracts/readKmsSignersContext-p.js.map +1 -1
- package/_cjs/core/kms/KmsSigncryptedShares-p.js +40 -4
- package/_cjs/core/kms/KmsSigncryptedShares-p.js.map +1 -1
- package/_cjs/core/kms/PublicDecryptionProof-p.js +8 -7
- package/_cjs/core/kms/PublicDecryptionProof-p.js.map +1 -1
- package/_cjs/core/kms/SignedDecryptionPermit-p.js +33 -199
- package/_cjs/core/kms/SignedDecryptionPermit-p.js.map +1 -1
- package/_cjs/core/kms/SignedDecryptionPermitV1-p.js +204 -0
- package/_cjs/core/kms/SignedDecryptionPermitV1-p.js.map +1 -0
- package/_cjs/core/kms/SignedDecryptionPermitV2-p.js +172 -0
- package/_cjs/core/kms/SignedDecryptionPermitV2-p.js.map +1 -0
- package/_cjs/core/kms/{createKmsDelegatedUserDecryptEip712.js → createKmsDelegatedUserDecryptEip712V1.js} +12 -13
- package/_cjs/core/kms/createKmsDelegatedUserDecryptEip712V1.js.map +1 -0
- package/_cjs/core/kms/{createKmsUserDecryptEip712.js → createKmsUserDecryptEip712V1.js} +22 -21
- package/_cjs/core/kms/createKmsUserDecryptEip712V1.js.map +1 -0
- package/_cjs/core/kms/createKmsUserDecryptEip712V2.js +4 -5
- package/_cjs/core/kms/createKmsUserDecryptEip712V2.js.map +1 -1
- package/_cjs/core/kms/decryptValuesFromPairs.js +18 -2
- package/_cjs/core/kms/decryptValuesFromPairs.js.map +1 -1
- package/_cjs/core/kms/{fetchKmsSigncryptedShares-p.js → fetchKmsSigncryptedSharesV1-p.js} +19 -9
- package/_cjs/core/kms/fetchKmsSigncryptedSharesV1-p.js.map +1 -0
- package/_cjs/core/kms/fetchKmsSigncryptedSharesV2-p.js +95 -0
- package/_cjs/core/kms/fetchKmsSigncryptedSharesV2-p.js.map +1 -0
- package/_cjs/core/kms/{kmsDelegatedUserDecryptEip712Types.js → kmsDelegatedUserDecryptEip712V1Types.js} +8 -8
- package/_cjs/core/kms/kmsDelegatedUserDecryptEip712V1Types.js.map +1 -0
- package/_cjs/core/kms/kmsExtraData-p.js +234 -0
- package/_cjs/core/kms/kmsExtraData-p.js.map +1 -0
- package/_cjs/core/kms/{kmsUserDecryptEip712Types.js → kmsUserDecryptEip712V1Types.js} +8 -8
- package/_cjs/core/kms/kmsUserDecryptEip712V1Types.js.map +1 -0
- package/_cjs/core/kms/kmsUserDecryptEip712V2Types.js.map +1 -1
- package/_cjs/core/kms/publicDecrypt.js +5 -5
- package/_cjs/core/kms/publicDecrypt.js.map +1 -1
- package/_cjs/core/kms/utils.js +0 -19
- package/_cjs/core/kms/utils.js.map +1 -1
- package/_cjs/core/kms/verifyKmsPublicDecryptEip712-p.js +6 -5
- package/_cjs/core/kms/verifyKmsPublicDecryptEip712-p.js.map +1 -1
- package/_cjs/core/modules/decrypt/mock.js +6 -6
- package/_cjs/core/modules/decrypt/mock.js.map +1 -1
- package/_cjs/core/modules/decrypt/module/api-p.js +12 -12
- package/_cjs/core/modules/decrypt/module/api-p.js.map +1 -1
- package/_cjs/core/modules/decrypt/module/init-p.js +6 -7
- package/_cjs/core/modules/decrypt/module/init-p.js.map +1 -1
- package/_cjs/core/modules/encrypt/module/init-p.js +12 -11
- package/_cjs/core/modules/encrypt/module/init-p.js.map +1 -1
- package/_cjs/core/modules/relayer/cleartext/fetchCoprocessorSignatures.js +53 -3
- package/_cjs/core/modules/relayer/cleartext/fetchCoprocessorSignatures.js.map +1 -1
- package/_cjs/core/modules/relayer/cleartext/{fetchDelegatedUserDecrypt.js → fetchDelegatedUserDecryptV1.js} +67 -21
- package/_cjs/core/modules/relayer/cleartext/fetchDelegatedUserDecryptV1.js.map +1 -0
- package/_cjs/core/modules/relayer/cleartext/fetchPublicDecrypt.js +64 -7
- package/_cjs/core/modules/relayer/cleartext/fetchPublicDecrypt.js.map +1 -1
- package/_cjs/core/modules/relayer/cleartext/fetchUserDecrypt.js +9 -108
- package/_cjs/core/modules/relayer/cleartext/fetchUserDecrypt.js.map +1 -1
- package/_cjs/core/modules/relayer/cleartext/fetchUserDecryptV1.js +163 -0
- package/_cjs/core/modules/relayer/cleartext/fetchUserDecryptV1.js.map +1 -0
- package/_cjs/core/modules/relayer/cleartext/fetchUserDecryptV2.js +7 -0
- package/_cjs/core/modules/relayer/cleartext/fetchUserDecryptV2.js.map +1 -0
- package/_cjs/core/modules/relayer/cleartext/forgeFhevmV1.js +83 -0
- package/_cjs/core/modules/relayer/cleartext/forgeFhevmV1.js.map +1 -0
- package/_cjs/core/modules/relayer/cleartext/mock.js +2 -2
- package/_cjs/core/modules/relayer/cleartext/mock.js.map +1 -1
- package/_cjs/core/modules/relayer/cleartext/signers.js +14 -0
- package/_cjs/core/modules/relayer/cleartext/signers.js.map +1 -1
- package/_cjs/core/modules/relayer/module/{fetchDelegatedUserDecrypt.js → fetchDelegatedUserDecryptV1.js} +1 -1
- package/_cjs/core/modules/relayer/module/fetchDelegatedUserDecryptV1.js.map +1 -0
- package/_cjs/core/modules/relayer/module/fetchPublicDecrypt.js +1 -1
- package/_cjs/core/modules/relayer/module/fetchUserDecrypt.js +11 -45
- package/_cjs/core/modules/relayer/module/fetchUserDecrypt.js.map +1 -1
- package/_cjs/core/modules/relayer/module/fetchUserDecryptV1.js +52 -0
- package/_cjs/core/modules/relayer/module/fetchUserDecryptV1.js.map +1 -0
- package/_cjs/core/modules/relayer/module/fetchUserDecryptV2.js +54 -0
- package/_cjs/core/modules/relayer/module/fetchUserDecryptV2.js.map +1 -0
- package/_cjs/core/modules/relayer/module/guards/RelayerResponseFailed.js +10 -2
- package/_cjs/core/modules/relayer/module/guards/RelayerResponseFailed.js.map +1 -1
- package/_cjs/core/modules/relayer/module/guards/api-errors/RelayerApiError400NoDetails.js +5 -2
- package/_cjs/core/modules/relayer/module/guards/api-errors/RelayerApiError400NoDetails.js.map +1 -1
- package/_cjs/core/modules/relayer/module/guards/api-errors/RelayerApiError503.js +2 -0
- package/_cjs/core/modules/relayer/module/guards/api-errors/RelayerApiError503.js.map +1 -1
- package/_cjs/core/modules/relayer/module/index.js +2 -2
- package/_cjs/core/modules/relayer/module/index.js.map +1 -1
- package/_cjs/core/runtime/HyperWasmSolver-p.js +1 -6
- package/_cjs/core/runtime/HyperWasmSolver-p.js.map +1 -1
- package/_cjs/core/utils-p/decrypt/{verifyKmsDelegatedUserDecryptEip712.js → verifyKmsDelegatedUserDecryptEip712V1.js} +5 -5
- package/_cjs/core/utils-p/decrypt/verifyKmsDelegatedUserDecryptEip712V1.js.map +1 -0
- package/_cjs/core/utils-p/decrypt/{verifyKmsUserDecryptEip712.js → verifyKmsUserDecryptEip712V1.js} +5 -5
- package/_cjs/core/utils-p/decrypt/verifyKmsUserDecryptEip712V1.js.map +1 -0
- package/_cjs/core/utils-p/decrypt/verifyKmsUserDecryptEip712V2.js +30 -0
- package/_cjs/core/utils-p/decrypt/verifyKmsUserDecryptEip712V2.js.map +1 -0
- package/_cjs/ethers/internal/ethereum-ct.js +11 -0
- package/_cjs/ethers/internal/ethereum-ct.js.map +1 -1
- package/_cjs/ethers/internal/runtime-ct.js +9 -7
- package/_cjs/ethers/internal/runtime-ct.js.map +1 -1
- package/_cjs/viem/internal/ethereum-ct.js +8 -0
- package/_cjs/viem/internal/ethereum-ct.js.map +1 -1
- package/_cjs/viem/internal/runtime-ct.js +9 -7
- package/_cjs/viem/internal/runtime-ct.js.map +1 -1
- package/_cjs/wasm/tfhe/loadTfheLib.js.map +1 -1
- package/_cjs/wasm/tkms/loadKmsLib.js.map +1 -1
- package/_esm/core/_version.js +1 -1
- package/_esm/core/actions/base/index.js +0 -8
- package/_esm/core/actions/base/index.js.map +1 -1
- package/_esm/core/actions/base/signDecryptionPermit.js +0 -6
- package/_esm/core/actions/base/signDecryptionPermit.js.map +1 -1
- package/_esm/core/actions/chain/index.js +0 -6
- package/_esm/core/actions/chain/index.js.map +1 -1
- package/_esm/core/actions/chain/parseSignedDecryptionPermit.js.map +1 -1
- package/_esm/core/actions/chain/serializeSignedDecryptionPermit.js.map +1 -1
- package/_esm/core/actions/decrypt/canDecryptValue.js +40 -0
- package/_esm/core/actions/decrypt/canDecryptValue.js.map +1 -1
- package/_esm/core/actions/decrypt/canDecryptValues.js +1 -0
- package/_esm/core/actions/decrypt/canDecryptValues.js.map +1 -1
- package/_esm/core/actions/decrypt/canDecryptValuesFromPairs.js +1 -0
- package/_esm/core/actions/decrypt/canDecryptValuesFromPairs.js.map +1 -1
- package/_esm/core/actions/decrypt/decryptValue.js +1 -0
- package/_esm/core/actions/decrypt/decryptValue.js.map +1 -1
- package/_esm/core/actions/decrypt/decryptValues.js +2 -0
- package/_esm/core/actions/decrypt/decryptValues.js.map +1 -1
- package/_esm/core/actions/decrypt/decryptValuesFromPairs.js +2 -0
- package/_esm/core/actions/decrypt/decryptValuesFromPairs.js.map +1 -1
- package/_esm/core/actions/decrypt/index.js +0 -1
- package/_esm/core/actions/decrypt/index.js.map +1 -1
- package/_esm/core/actions/encrypt/encryptValue.js +2 -1
- package/_esm/core/actions/encrypt/encryptValue.js.map +1 -1
- package/_esm/core/actions/encrypt/encryptValues.js +2 -1
- package/_esm/core/actions/encrypt/encryptValues.js.map +1 -1
- package/_esm/core/actions/encrypt/generateZkProof.js +2 -1
- package/_esm/core/actions/encrypt/generateZkProof.js.map +1 -1
- package/_esm/core/actions/host/index.js +0 -4
- package/_esm/core/actions/host/index.js.map +1 -1
- package/_esm/core/actions/host/readKmsVerifierContractData.js +2 -2
- package/_esm/core/actions/host/readKmsVerifierContractData.js.map +1 -1
- package/_esm/core/base/cachedFetch.js +1 -0
- package/_esm/core/base/cachedFetch.js.map +1 -1
- package/_esm/core/base/uint.js +7 -0
- package/_esm/core/base/uint.js.map +1 -1
- package/_esm/core/clients/decorators/base.js +2 -4
- package/_esm/core/clients/decorators/base.js.map +1 -1
- package/_esm/core/coprocessor/coprocessorEip712Types.js +2 -2
- package/_esm/core/handle/FheType.js +10 -0
- package/_esm/core/handle/FheType.js.map +1 -1
- package/_esm/core/host-contracts/HostContractVersion-p.js +6 -0
- package/_esm/core/host-contracts/HostContractVersion-p.js.map +1 -1
- package/_esm/core/host-contracts/KmsSignersContext-p.js +16 -25
- package/_esm/core/host-contracts/KmsSignersContext-p.js.map +1 -1
- package/_esm/core/host-contracts/canDecryptValuesFromPairs.js +5 -2
- package/_esm/core/host-contracts/canDecryptValuesFromPairs.js.map +1 -1
- package/_esm/core/host-contracts/getCoprocessorContextSignersAndThreshold-p.js +2 -2
- package/_esm/core/host-contracts/getCoprocessorContextSignersAndThreshold-p.js.map +1 -1
- package/_esm/core/host-contracts/getCurrentKmsContextAndEpoch-p.js +2 -2
- package/_esm/core/host-contracts/getCurrentKmsContextAndEpoch-p.js.map +1 -1
- package/_esm/core/host-contracts/getCurrentKmsContextId-p.js +2 -2
- package/_esm/core/host-contracts/getCurrentKmsContextId-p.js.map +1 -1
- package/_esm/core/host-contracts/getKmsContextSignersAndThreshold-p.js +2 -2
- package/_esm/core/host-contracts/getKmsContextSignersAndThreshold-p.js.map +1 -1
- package/_esm/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.js +6 -5
- package/_esm/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.js.map +1 -1
- package/_esm/core/host-contracts/readKmsSignersContext-p.js +132 -68
- package/_esm/core/host-contracts/readKmsSignersContext-p.js.map +1 -1
- package/_esm/core/kms/KmsSigncryptedShares-p.js +70 -4
- package/_esm/core/kms/KmsSigncryptedShares-p.js.map +1 -1
- package/_esm/core/kms/PublicDecryptionProof-p.js +8 -7
- package/_esm/core/kms/PublicDecryptionProof-p.js.map +1 -1
- package/_esm/core/kms/SignedDecryptionPermit-p.js +48 -245
- package/_esm/core/kms/SignedDecryptionPermit-p.js.map +1 -1
- package/_esm/core/kms/SignedDecryptionPermitV1-p.js +228 -0
- package/_esm/core/kms/SignedDecryptionPermitV1-p.js.map +1 -0
- package/_esm/core/kms/SignedDecryptionPermitV2-p.js +192 -0
- package/_esm/core/kms/SignedDecryptionPermitV2-p.js.map +1 -0
- package/_esm/core/kms/{createKmsDelegatedUserDecryptEip712.js → createKmsDelegatedUserDecryptEip712V1.js} +11 -12
- package/_esm/core/kms/createKmsDelegatedUserDecryptEip712V1.js.map +1 -0
- package/_esm/core/kms/createKmsPublicDecryptEip712.js +1 -1
- package/_esm/core/kms/{createKmsUserDecryptEip712.js → createKmsUserDecryptEip712V1.js} +23 -22
- package/_esm/core/kms/createKmsUserDecryptEip712V1.js.map +1 -0
- package/_esm/core/kms/createKmsUserDecryptEip712V2.js +4 -5
- package/_esm/core/kms/createKmsUserDecryptEip712V2.js.map +1 -1
- package/_esm/core/kms/decryptValuesFromPairs.js +18 -2
- package/_esm/core/kms/decryptValuesFromPairs.js.map +1 -1
- package/_esm/core/kms/{fetchKmsSigncryptedShares-p.js → fetchKmsSigncryptedSharesV1-p.js} +49 -15
- package/_esm/core/kms/fetchKmsSigncryptedSharesV1-p.js.map +1 -0
- package/_esm/core/kms/fetchKmsSigncryptedSharesV2-p.js +119 -0
- package/_esm/core/kms/fetchKmsSigncryptedSharesV2-p.js.map +1 -0
- package/_esm/core/kms/{kmsDelegatedUserDecryptEip712Types.js → kmsDelegatedUserDecryptEip712V1Types.js} +9 -8
- package/_esm/core/kms/kmsDelegatedUserDecryptEip712V1Types.js.map +1 -0
- package/_esm/core/kms/kmsExtraData-p.js +298 -0
- package/_esm/core/kms/kmsExtraData-p.js.map +1 -0
- package/_esm/core/kms/kmsPublicDecryptEip712Types.js +1 -1
- package/_esm/core/kms/{kmsUserDecryptEip712Types.js → kmsUserDecryptEip712V1Types.js} +9 -8
- package/_esm/core/kms/kmsUserDecryptEip712V1Types.js.map +1 -0
- package/_esm/core/kms/kmsUserDecryptEip712V2Types.js +2 -1
- package/_esm/core/kms/kmsUserDecryptEip712V2Types.js.map +1 -1
- package/_esm/core/kms/publicDecrypt.js +6 -6
- package/_esm/core/kms/publicDecrypt.js.map +1 -1
- package/_esm/core/kms/utils.js +0 -18
- package/_esm/core/kms/utils.js.map +1 -1
- package/_esm/core/kms/verifyKmsPublicDecryptEip712-p.js +7 -6
- package/_esm/core/kms/verifyKmsPublicDecryptEip712-p.js.map +1 -1
- package/_esm/core/modules/decrypt/mock.js +6 -6
- package/_esm/core/modules/decrypt/mock.js.map +1 -1
- package/_esm/core/modules/decrypt/module/api-p.js +13 -13
- package/_esm/core/modules/decrypt/module/api-p.js.map +1 -1
- package/_esm/core/modules/decrypt/module/init-p.js +7 -7
- package/_esm/core/modules/decrypt/module/init-p.js.map +1 -1
- package/_esm/core/modules/encrypt/module/init-p.js +13 -11
- package/_esm/core/modules/encrypt/module/init-p.js.map +1 -1
- package/_esm/core/modules/relayer/cleartext/fetchCoprocessorSignatures.js +69 -12
- package/_esm/core/modules/relayer/cleartext/fetchCoprocessorSignatures.js.map +1 -1
- package/_esm/core/modules/relayer/cleartext/{fetchDelegatedUserDecrypt.js → fetchDelegatedUserDecryptV1.js} +76 -22
- package/_esm/core/modules/relayer/cleartext/fetchDelegatedUserDecryptV1.js.map +1 -0
- package/_esm/core/modules/relayer/cleartext/fetchPublicDecrypt.js +80 -7
- package/_esm/core/modules/relayer/cleartext/fetchPublicDecrypt.js.map +1 -1
- package/_esm/core/modules/relayer/cleartext/fetchUserDecrypt.js +13 -114
- package/_esm/core/modules/relayer/cleartext/fetchUserDecrypt.js.map +1 -1
- package/_esm/core/modules/relayer/cleartext/fetchUserDecryptV1.js +173 -0
- package/_esm/core/modules/relayer/cleartext/fetchUserDecryptV1.js.map +1 -0
- package/_esm/core/modules/relayer/cleartext/fetchUserDecryptV2.js +6 -0
- package/_esm/core/modules/relayer/cleartext/fetchUserDecryptV2.js.map +1 -0
- package/_esm/core/modules/relayer/cleartext/forgeFhevmV1.js +140 -0
- package/_esm/core/modules/relayer/cleartext/forgeFhevmV1.js.map +1 -0
- package/_esm/core/modules/relayer/cleartext/mock.js +1 -1
- package/_esm/core/modules/relayer/cleartext/mock.js.map +1 -1
- package/_esm/core/modules/relayer/cleartext/signers.js +26 -0
- package/_esm/core/modules/relayer/cleartext/signers.js.map +1 -1
- package/_esm/core/modules/relayer/module/{fetchDelegatedUserDecrypt.js → fetchDelegatedUserDecryptV1.js} +1 -1
- package/_esm/core/modules/relayer/module/fetchDelegatedUserDecryptV1.js.map +1 -0
- package/_esm/core/modules/relayer/module/fetchPublicDecrypt.js +1 -1
- package/_esm/core/modules/relayer/module/fetchUserDecrypt.js +11 -46
- package/_esm/core/modules/relayer/module/fetchUserDecrypt.js.map +1 -1
- package/_esm/core/modules/relayer/module/fetchUserDecryptV1.js +53 -0
- package/_esm/core/modules/relayer/module/fetchUserDecryptV1.js.map +1 -0
- package/_esm/core/modules/relayer/module/fetchUserDecryptV2.js +56 -0
- package/_esm/core/modules/relayer/module/fetchUserDecryptV2.js.map +1 -0
- package/_esm/core/modules/relayer/module/guards/RelayerResponseFailed.js +10 -2
- package/_esm/core/modules/relayer/module/guards/RelayerResponseFailed.js.map +1 -1
- package/_esm/core/modules/relayer/module/guards/api-errors/RelayerApiError400NoDetails.js +6 -3
- package/_esm/core/modules/relayer/module/guards/api-errors/RelayerApiError400NoDetails.js.map +1 -1
- package/_esm/core/modules/relayer/module/guards/api-errors/RelayerApiError503.js +2 -0
- package/_esm/core/modules/relayer/module/guards/api-errors/RelayerApiError503.js.map +1 -1
- package/_esm/core/modules/relayer/module/index.js +1 -1
- package/_esm/core/modules/relayer/module/index.js.map +1 -1
- package/_esm/core/runtime/HyperWasmSolver-p.js +1 -6
- package/_esm/core/runtime/HyperWasmSolver-p.js.map +1 -1
- package/_esm/core/utils-p/decrypt/{verifyKmsDelegatedUserDecryptEip712.js → verifyKmsDelegatedUserDecryptEip712V1.js} +5 -5
- package/_esm/core/utils-p/decrypt/verifyKmsDelegatedUserDecryptEip712V1.js.map +1 -0
- package/_esm/core/utils-p/decrypt/{verifyKmsUserDecryptEip712.js → verifyKmsUserDecryptEip712V1.js} +5 -5
- package/_esm/core/utils-p/decrypt/verifyKmsUserDecryptEip712V1.js.map +1 -0
- package/_esm/core/utils-p/decrypt/verifyKmsUserDecryptEip712V2.js +27 -0
- package/_esm/core/utils-p/decrypt/verifyKmsUserDecryptEip712V2.js.map +1 -0
- package/_esm/ethers/internal/ethereum-ct.js +12 -1
- package/_esm/ethers/internal/ethereum-ct.js.map +1 -1
- package/_esm/ethers/internal/runtime-ct.js +9 -7
- package/_esm/ethers/internal/runtime-ct.js.map +1 -1
- package/_esm/viem/internal/ethereum-ct.js +10 -2
- package/_esm/viem/internal/ethereum-ct.js.map +1 -1
- package/_esm/viem/internal/runtime-ct.js +9 -7
- package/_esm/viem/internal/runtime-ct.js.map +1 -1
- package/_types/core/actions/base/index.d.ts +0 -8
- package/_types/core/actions/base/index.d.ts.map +1 -1
- package/_types/core/actions/base/signDecryptionPermit.d.ts +4 -5
- package/_types/core/actions/base/signDecryptionPermit.d.ts.map +1 -1
- package/_types/core/actions/chain/index.d.ts +1 -7
- package/_types/core/actions/chain/index.d.ts.map +1 -1
- package/_types/core/actions/chain/parseSignedDecryptionPermit.d.ts +1 -0
- package/_types/core/actions/chain/parseSignedDecryptionPermit.d.ts.map +1 -1
- package/_types/core/actions/chain/serializeSignedDecryptionPermit.d.ts +3 -2
- package/_types/core/actions/chain/serializeSignedDecryptionPermit.d.ts.map +1 -1
- package/_types/core/actions/decrypt/canDecryptValue.d.ts +3 -4
- package/_types/core/actions/decrypt/canDecryptValue.d.ts.map +1 -1
- package/_types/core/actions/decrypt/canDecryptValues.d.ts +3 -4
- package/_types/core/actions/decrypt/canDecryptValues.d.ts.map +1 -1
- package/_types/core/actions/decrypt/canDecryptValuesFromPairs.d.ts +3 -4
- package/_types/core/actions/decrypt/canDecryptValuesFromPairs.d.ts.map +1 -1
- 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/index.d.ts +0 -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/index.d.ts +0 -4
- package/_types/core/actions/host/index.d.ts.map +1 -1
- package/_types/core/base/cachedFetch.d.ts +1 -0
- package/_types/core/base/cachedFetch.d.ts.map +1 -1
- package/_types/core/base/uint.d.ts +2 -1
- package/_types/core/base/uint.d.ts.map +1 -1
- package/_types/core/clients/decorators/base.d.ts +12 -23
- package/_types/core/clients/decorators/base.d.ts.map +1 -1
- package/_types/core/handle/FheType.d.ts +8 -0
- package/_types/core/handle/FheType.d.ts.map +1 -1
- package/_types/core/host-contracts/HostContractVersion-p.d.ts +8 -0
- package/_types/core/host-contracts/HostContractVersion-p.d.ts.map +1 -1
- package/_types/core/host-contracts/KmsSignersContext-p.d.ts +3 -2
- package/_types/core/host-contracts/KmsSignersContext-p.d.ts.map +1 -1
- package/_types/core/host-contracts/canDecryptValuesFromPairs.d.ts +2 -2
- package/_types/core/host-contracts/canDecryptValuesFromPairs.d.ts.map +1 -1
- package/_types/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.d.ts +3 -2
- package/_types/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.d.ts.map +1 -1
- package/_types/core/host-contracts/readKmsSignersContext-p.d.ts +43 -26
- package/_types/core/host-contracts/readKmsSignersContext-p.d.ts.map +1 -1
- package/_types/core/kms/KmsSigncryptedShares-p.d.ts +18 -0
- package/_types/core/kms/KmsSigncryptedShares-p.d.ts.map +1 -1
- package/_types/core/kms/PublicDecryptionProof-p.d.ts +1 -1
- package/_types/core/kms/PublicDecryptionProof-p.d.ts.map +1 -1
- package/_types/core/kms/SignedDecryptionPermit-p.d.ts +15 -29
- package/_types/core/kms/SignedDecryptionPermit-p.d.ts.map +1 -1
- package/_types/core/kms/SignedDecryptionPermitV1-p.d.ts +7 -0
- package/_types/core/kms/SignedDecryptionPermitV1-p.d.ts.map +1 -0
- package/_types/core/kms/SignedDecryptionPermitV2-p.d.ts +7 -0
- package/_types/core/kms/SignedDecryptionPermitV2-p.d.ts.map +1 -0
- package/_types/core/kms/createKmsDelegatedUserDecryptEip712V1.d.ts +16 -0
- package/_types/core/kms/createKmsDelegatedUserDecryptEip712V1.d.ts.map +1 -0
- package/_types/core/kms/createKmsUserDecryptEip712V1.d.ts +27 -0
- package/_types/core/kms/createKmsUserDecryptEip712V1.d.ts.map +1 -0
- package/_types/core/kms/createKmsUserDecryptEip712V2.d.ts +3 -2
- package/_types/core/kms/createKmsUserDecryptEip712V2.d.ts.map +1 -1
- package/_types/core/kms/decryptValuesFromPairs.d.ts +4 -11
- package/_types/core/kms/decryptValuesFromPairs.d.ts.map +1 -1
- package/_types/core/kms/{fetchKmsSigncryptedShares-p.d.ts → fetchKmsSigncryptedSharesV1-p.d.ts} +10 -12
- package/_types/core/kms/fetchKmsSigncryptedSharesV1-p.d.ts.map +1 -0
- package/_types/core/kms/fetchKmsSigncryptedSharesV2-p.d.ts +28 -0
- package/_types/core/kms/fetchKmsSigncryptedSharesV2-p.d.ts.map +1 -0
- package/_types/core/kms/kmsDelegatedUserDecryptEip712V1Types.d.ts +3 -0
- package/_types/core/kms/kmsDelegatedUserDecryptEip712V1Types.d.ts.map +1 -0
- package/_types/core/kms/kmsExtraData-p.d.ts +66 -0
- package/_types/core/kms/kmsExtraData-p.d.ts.map +1 -0
- package/_types/core/kms/kmsUserDecryptEip712V1Types.d.ts +3 -0
- package/_types/core/kms/kmsUserDecryptEip712V1Types.d.ts.map +1 -0
- package/_types/core/kms/kmsUserDecryptEip712V2Types.d.ts.map +1 -1
- package/_types/core/kms/publicDecrypt.d.ts.map +1 -1
- package/_types/core/kms/utils.d.ts +0 -4
- package/_types/core/kms/utils.d.ts.map +1 -1
- package/_types/core/kms/verifyKmsPublicDecryptEip712-p.d.ts +1 -1
- package/_types/core/kms/verifyKmsPublicDecryptEip712-p.d.ts.map +1 -1
- package/_types/core/modules/encrypt/module/init-p.d.ts.map +1 -1
- package/_types/core/modules/ethereum/types-ct.d.ts +20 -2
- package/_types/core/modules/ethereum/types-ct.d.ts.map +1 -1
- package/_types/core/modules/relayer/cleartext/fetchCoprocessorSignatures.d.ts.map +1 -1
- package/_types/core/modules/relayer/cleartext/{fetchDelegatedUserDecrypt.d.ts → fetchDelegatedUserDecryptV1.d.ts} +1 -1
- package/_types/core/modules/relayer/cleartext/fetchDelegatedUserDecryptV1.d.ts.map +1 -0
- package/_types/core/modules/relayer/cleartext/fetchPublicDecrypt.d.ts.map +1 -1
- package/_types/core/modules/relayer/cleartext/fetchUserDecrypt.d.ts.map +1 -1
- package/_types/core/modules/relayer/cleartext/fetchUserDecryptV1.d.ts +3 -0
- package/_types/core/modules/relayer/cleartext/fetchUserDecryptV1.d.ts.map +1 -0
- package/_types/core/modules/relayer/cleartext/fetchUserDecryptV2.d.ts +3 -0
- package/_types/core/modules/relayer/cleartext/fetchUserDecryptV2.d.ts.map +1 -0
- package/_types/core/modules/relayer/cleartext/forgeFhevmV1.d.ts +29 -0
- package/_types/core/modules/relayer/cleartext/forgeFhevmV1.d.ts.map +1 -0
- package/_types/core/modules/relayer/cleartext/signers.d.ts +1 -0
- package/_types/core/modules/relayer/cleartext/signers.d.ts.map +1 -1
- package/_types/core/modules/relayer/module/{fetchDelegatedUserDecrypt.d.ts → fetchDelegatedUserDecryptV1.d.ts} +1 -1
- package/_types/core/modules/relayer/module/fetchDelegatedUserDecryptV1.d.ts.map +1 -0
- package/_types/core/modules/relayer/module/fetchUserDecrypt.d.ts.map +1 -1
- package/_types/core/modules/relayer/module/fetchUserDecryptV1.d.ts +3 -0
- package/_types/core/modules/relayer/module/fetchUserDecryptV1.d.ts.map +1 -0
- package/_types/core/modules/relayer/module/fetchUserDecryptV2.d.ts +3 -0
- package/_types/core/modules/relayer/module/fetchUserDecryptV2.d.ts.map +1 -0
- package/_types/core/modules/relayer/module/guards/RelayerResponseFailed.d.ts.map +1 -1
- package/_types/core/modules/relayer/module/guards/api-errors/RelayerApiError400NoDetails.d.ts +1 -1
- package/_types/core/modules/relayer/module/guards/api-errors/RelayerApiError400NoDetails.d.ts.map +1 -1
- package/_types/core/modules/relayer/module/guards/api-errors/RelayerApiError503.d.ts.map +1 -1
- package/_types/core/modules/relayer/types.d.ts +18 -5
- package/_types/core/modules/relayer/types.d.ts.map +1 -1
- package/_types/core/types/kms-p.d.ts +7 -1
- package/_types/core/types/kms-p.d.ts.map +1 -1
- package/_types/core/types/kms.d.ts +18 -19
- package/_types/core/types/kms.d.ts.map +1 -1
- package/_types/core/types/logger.d.ts +3 -3
- package/_types/core/types/logger.d.ts.map +1 -1
- package/_types/core/types/record-p.d.ts +2 -1
- package/_types/core/types/record-p.d.ts.map +1 -1
- package/_types/core/types/relayer-p.d.ts +27 -5
- package/_types/core/types/relayer-p.d.ts.map +1 -1
- package/_types/core/types/signedDecryptionPermit.d.ts +37 -26
- package/_types/core/types/signedDecryptionPermit.d.ts.map +1 -1
- package/_types/core/utils-p/decrypt/verifyKmsDelegatedUserDecryptEip712V1.d.ts +14 -0
- package/_types/core/utils-p/decrypt/verifyKmsDelegatedUserDecryptEip712V1.d.ts.map +1 -0
- package/_types/core/utils-p/decrypt/verifyKmsUserDecryptEip712V1.d.ts +14 -0
- package/_types/core/utils-p/decrypt/verifyKmsUserDecryptEip712V1.d.ts.map +1 -0
- package/_types/core/utils-p/decrypt/verifyKmsUserDecryptEip712V2.d.ts +14 -0
- package/_types/core/utils-p/decrypt/verifyKmsUserDecryptEip712V2.d.ts.map +1 -0
- package/_types/core/utils-p/runtime/recoverSigners.d.ts +2 -2
- package/_types/ethers/internal/ethereum-ct.d.ts.map +1 -1
- package/_types/ethers/internal/runtime-ct.d.ts.map +1 -1
- package/_types/viem/internal/ethereum-ct.d.ts.map +1 -1
- package/_types/viem/internal/runtime-ct.d.ts.map +1 -1
- package/core/_version.ts +1 -1
- package/core/actions/base/index.ts +0 -42
- package/core/actions/base/signDecryptionPermit.ts +3 -31
- package/core/actions/chain/index.ts +0 -28
- package/core/actions/chain/parseSignedDecryptionPermit.ts +1 -0
- package/core/actions/chain/serializeSignedDecryptionPermit.ts +3 -2
- package/core/actions/decrypt/canDecryptValue.ts +2 -16
- package/core/actions/decrypt/canDecryptValues.ts +2 -16
- package/core/actions/decrypt/canDecryptValuesFromPairs.ts +2 -16
- package/core/actions/decrypt/decryptValue.ts +2 -1
- package/core/actions/decrypt/decryptValues.ts +3 -1
- package/core/actions/decrypt/decryptValuesFromPairs.ts +3 -1
- package/core/actions/decrypt/index.ts +0 -6
- package/core/actions/encrypt/encryptValue.ts +4 -1
- package/core/actions/encrypt/encryptValues.ts +5 -1
- package/core/actions/encrypt/generateZkProof.ts +2 -1
- package/core/actions/host/index.ts +0 -20
- package/core/actions/host/readKmsVerifierContractData.ts +2 -2
- package/core/base/cachedFetch.ts +1 -0
- package/core/base/uint.ts +18 -1
- package/core/clients/decorators/base.ts +13 -37
- package/core/coprocessor/coprocessorEip712Types.ts +2 -2
- package/core/handle/FheType.ts +11 -0
- package/core/host-contracts/HostContractVersion-p.ts +12 -0
- package/core/host-contracts/KmsSignersContext-p.ts +29 -36
- package/core/host-contracts/canDecryptValuesFromPairs.ts +7 -7
- package/core/host-contracts/getCoprocessorContextSignersAndThreshold-p.ts +2 -2
- package/core/host-contracts/getCurrentKmsContextAndEpoch-p.ts +2 -2
- package/core/host-contracts/getCurrentKmsContextId-p.ts +2 -2
- package/core/host-contracts/getKmsContextSignersAndThreshold-p.ts +3 -2
- package/core/host-contracts/getKmsContextSignersAndThresholdFromExtraData-p.ts +10 -7
- package/core/host-contracts/readKmsSignersContext-p.ts +156 -115
- package/core/kms/KmsSigncryptedShares-p.ts +87 -4
- package/core/kms/PublicDecryptionProof-p.ts +11 -9
- package/core/kms/SignedDecryptionPermit-p.ts +67 -357
- package/core/kms/SignedDecryptionPermitV1-p.ts +308 -0
- package/core/kms/SignedDecryptionPermitV2-p.ts +275 -0
- package/core/kms/{createKmsDelegatedUserDecryptEip712.ts → createKmsDelegatedUserDecryptEip712V1.ts} +21 -21
- package/core/kms/createKmsPublicDecryptEip712.ts +1 -1
- package/core/kms/{createKmsUserDecryptEip712.ts → createKmsUserDecryptEip712V1.ts} +35 -31
- package/core/kms/createKmsUserDecryptEip712V2.ts +7 -7
- package/core/kms/decryptValuesFromPairs.ts +34 -22
- package/core/kms/{fetchKmsSigncryptedShares-p.ts → fetchKmsSigncryptedSharesV1-p.ts} +62 -45
- package/core/kms/fetchKmsSigncryptedSharesV2-p.ts +176 -0
- package/core/kms/{kmsDelegatedUserDecryptEip712Types.ts → kmsDelegatedUserDecryptEip712V1Types.ts} +9 -8
- package/core/kms/kmsExtraData-p.ts +374 -0
- package/core/kms/kmsPublicDecryptEip712Types.ts +1 -1
- package/core/kms/{kmsUserDecryptEip712Types.ts → kmsUserDecryptEip712V1Types.ts} +9 -8
- package/core/kms/kmsUserDecryptEip712V2Types.ts +2 -1
- package/core/kms/publicDecrypt.ts +10 -9
- package/core/kms/utils.ts +0 -32
- package/core/kms/verifyKmsPublicDecryptEip712-p.ts +10 -8
- package/core/modules/decrypt/mock.ts +6 -6
- package/core/modules/decrypt/module/api-p.ts +15 -15
- package/core/modules/decrypt/module/init-p.ts +7 -7
- package/core/modules/encrypt/module/init-p.ts +16 -11
- package/core/modules/ethereum/types-ct.ts +25 -2
- package/core/modules/relayer/cleartext/fetchCoprocessorSignatures.ts +98 -15
- package/core/modules/relayer/cleartext/{fetchDelegatedUserDecrypt.ts → fetchDelegatedUserDecryptV1.ts} +115 -27
- package/core/modules/relayer/cleartext/fetchPublicDecrypt.ts +115 -9
- package/core/modules/relayer/cleartext/fetchUserDecrypt.ts +23 -131
- package/core/modules/relayer/cleartext/fetchUserDecryptV1.ts +229 -0
- package/core/modules/relayer/cleartext/fetchUserDecryptV2.ts +11 -0
- package/core/modules/relayer/cleartext/forgeFhevmV1.ts +185 -0
- package/core/modules/relayer/cleartext/mock.ts +1 -1
- package/core/modules/relayer/cleartext/signers.ts +35 -0
- package/core/modules/relayer/module/fetchPublicDecrypt.ts +1 -1
- package/core/modules/relayer/module/fetchUserDecrypt.ts +20 -56
- package/core/modules/relayer/module/fetchUserDecryptV1.ts +69 -0
- package/core/modules/relayer/module/fetchUserDecryptV2.ts +71 -0
- package/core/modules/relayer/module/guards/RelayerResponseFailed.ts +10 -2
- package/core/modules/relayer/module/guards/api-errors/RelayerApiError400NoDetails.ts +6 -3
- package/core/modules/relayer/module/guards/api-errors/RelayerApiError503.ts +2 -0
- package/core/modules/relayer/module/index.ts +1 -1
- package/core/modules/relayer/types.ts +24 -5
- package/core/runtime/HyperWasmSolver-p.ts +1 -5
- package/core/types/kms-p.ts +16 -1
- package/core/types/kms.ts +40 -28
- package/core/types/logger.ts +3 -3
- package/core/types/record-p.ts +2 -1
- package/core/types/relayer-p.ts +48 -5
- package/core/types/signedDecryptionPermit.ts +47 -26
- package/core/utils-p/decrypt/{verifyKmsDelegatedUserDecryptEip712.ts → verifyKmsDelegatedUserDecryptEip712V1.ts} +9 -9
- package/core/utils-p/decrypt/{verifyKmsUserDecryptEip712.ts → verifyKmsUserDecryptEip712V1.ts} +9 -9
- package/core/utils-p/decrypt/verifyKmsUserDecryptEip712V2.ts +43 -0
- package/core/utils-p/runtime/recoverSigners.ts +2 -2
- package/ethers/internal/ethereum-ct.ts +15 -1
- package/ethers/internal/runtime-ct.ts +9 -7
- package/package.json +1 -1
- package/viem/internal/ethereum-ct.ts +14 -2
- package/viem/internal/runtime-ct.ts +9 -7
- package/_cjs/core/actions/base/createVerifiedInputProofFromRawBytes.js +0 -10
- package/_cjs/core/actions/base/createVerifiedInputProofFromRawBytes.js.map +0 -1
- package/_cjs/core/actions/base/fetchKmsSigncryptedShares.js +0 -19
- package/_cjs/core/actions/base/fetchKmsSigncryptedShares.js.map +0 -1
- package/_cjs/core/actions/base/fetchVerifiedInputProof.js +0 -11
- package/_cjs/core/actions/base/fetchVerifiedInputProof.js.map +0 -1
- package/_cjs/core/actions/base/readKmsSignersContext.js +0 -11
- package/_cjs/core/actions/base/readKmsSignersContext.js.map +0 -1
- package/_cjs/core/actions/base/verifyHandlesCoprocessorSignatures.js +0 -31
- package/_cjs/core/actions/base/verifyHandlesCoprocessorSignatures.js.map +0 -1
- package/_cjs/core/actions/base/verifyInputProof.js +0 -24
- package/_cjs/core/actions/base/verifyInputProof.js.map +0 -1
- package/_cjs/core/actions/base/verifyZkProofCoprocessorSignatures.js +0 -17
- package/_cjs/core/actions/base/verifyZkProofCoprocessorSignatures.js.map +0 -1
- package/_cjs/core/actions/chain/createCoprocessorEip712Domain.js +0 -11
- package/_cjs/core/actions/chain/createCoprocessorEip712Domain.js.map +0 -1
- package/_cjs/core/actions/chain/createKmsDelegatedUserDecryptEip712.js +0 -17
- package/_cjs/core/actions/chain/createKmsDelegatedUserDecryptEip712.js.map +0 -1
- package/_cjs/core/actions/chain/createKmsEip712Domain.js +0 -11
- package/_cjs/core/actions/chain/createKmsEip712Domain.js.map +0 -1
- package/_cjs/core/actions/chain/createKmsUserDecryptEip712.js +0 -16
- package/_cjs/core/actions/chain/createKmsUserDecryptEip712.js.map +0 -1
- package/_cjs/core/actions/chain/verifyKmsDelegatedUserDecryptEip712.js +0 -8
- package/_cjs/core/actions/chain/verifyKmsDelegatedUserDecryptEip712.js.map +0 -1
- package/_cjs/core/actions/chain/verifyKmsUserDecryptEip712.js +0 -8
- package/_cjs/core/actions/chain/verifyKmsUserDecryptEip712.js.map +0 -1
- package/_cjs/core/actions/decrypt/decryptKmsSigncryptedShares.js +0 -13
- package/_cjs/core/actions/decrypt/decryptKmsSigncryptedShares.js.map +0 -1
- package/_cjs/core/kms/createKmsDelegatedUserDecryptEip712.js.map +0 -1
- package/_cjs/core/kms/createKmsUserDecryptEip712.js.map +0 -1
- package/_cjs/core/kms/fetchKmsSigncryptedShares-p.js.map +0 -1
- package/_cjs/core/kms/kmsDelegatedUserDecryptEip712Types.js.map +0 -1
- package/_cjs/core/kms/kmsExtraData.js +0 -82
- package/_cjs/core/kms/kmsExtraData.js.map +0 -1
- package/_cjs/core/kms/kmsUserDecryptEip712Types.js.map +0 -1
- package/_cjs/core/modules/relayer/cleartext/fetchDelegatedUserDecrypt.js.map +0 -1
- package/_cjs/core/modules/relayer/module/fetchDelegatedUserDecrypt.js.map +0 -1
- package/_cjs/core/utils-p/decrypt/verifyKmsDelegatedUserDecryptEip712.js.map +0 -1
- package/_cjs/core/utils-p/decrypt/verifyKmsUserDecryptEip712.js.map +0 -1
- package/_esm/core/actions/base/createVerifiedInputProofFromRawBytes.js +0 -7
- package/_esm/core/actions/base/createVerifiedInputProofFromRawBytes.js.map +0 -1
- package/_esm/core/actions/base/fetchKmsSigncryptedShares.js +0 -17
- package/_esm/core/actions/base/fetchKmsSigncryptedShares.js.map +0 -1
- package/_esm/core/actions/base/fetchVerifiedInputProof.js +0 -8
- package/_esm/core/actions/base/fetchVerifiedInputProof.js.map +0 -1
- package/_esm/core/actions/base/readKmsSignersContext.js +0 -10
- package/_esm/core/actions/base/readKmsSignersContext.js.map +0 -1
- package/_esm/core/actions/base/verifyHandlesCoprocessorSignatures.js +0 -35
- package/_esm/core/actions/base/verifyHandlesCoprocessorSignatures.js.map +0 -1
- package/_esm/core/actions/base/verifyInputProof.js +0 -22
- package/_esm/core/actions/base/verifyInputProof.js.map +0 -1
- package/_esm/core/actions/base/verifyZkProofCoprocessorSignatures.js +0 -14
- package/_esm/core/actions/base/verifyZkProofCoprocessorSignatures.js.map +0 -1
- package/_esm/core/actions/chain/createCoprocessorEip712Domain.js +0 -8
- package/_esm/core/actions/chain/createCoprocessorEip712Domain.js.map +0 -1
- package/_esm/core/actions/chain/createKmsDelegatedUserDecryptEip712.js +0 -15
- package/_esm/core/actions/chain/createKmsDelegatedUserDecryptEip712.js.map +0 -1
- package/_esm/core/actions/chain/createKmsEip712Domain.js +0 -8
- package/_esm/core/actions/chain/createKmsEip712Domain.js.map +0 -1
- package/_esm/core/actions/chain/createKmsUserDecryptEip712.js +0 -14
- package/_esm/core/actions/chain/createKmsUserDecryptEip712.js.map +0 -1
- package/_esm/core/actions/chain/verifyKmsDelegatedUserDecryptEip712.js +0 -5
- package/_esm/core/actions/chain/verifyKmsDelegatedUserDecryptEip712.js.map +0 -1
- package/_esm/core/actions/chain/verifyKmsUserDecryptEip712.js +0 -5
- package/_esm/core/actions/chain/verifyKmsUserDecryptEip712.js.map +0 -1
- package/_esm/core/actions/decrypt/decryptKmsSigncryptedShares.js +0 -11
- package/_esm/core/actions/decrypt/decryptKmsSigncryptedShares.js.map +0 -1
- package/_esm/core/kms/createKmsDelegatedUserDecryptEip712.js.map +0 -1
- package/_esm/core/kms/createKmsUserDecryptEip712.js.map +0 -1
- package/_esm/core/kms/fetchKmsSigncryptedShares-p.js.map +0 -1
- package/_esm/core/kms/kmsDelegatedUserDecryptEip712Types.js.map +0 -1
- package/_esm/core/kms/kmsExtraData.js +0 -99
- package/_esm/core/kms/kmsExtraData.js.map +0 -1
- package/_esm/core/kms/kmsUserDecryptEip712Types.js.map +0 -1
- package/_esm/core/modules/relayer/cleartext/fetchDelegatedUserDecrypt.js.map +0 -1
- package/_esm/core/modules/relayer/module/fetchDelegatedUserDecrypt.js.map +0 -1
- package/_esm/core/utils-p/decrypt/verifyKmsDelegatedUserDecryptEip712.js.map +0 -1
- package/_esm/core/utils-p/decrypt/verifyKmsUserDecryptEip712.js.map +0 -1
- package/_types/core/actions/base/createVerifiedInputProofFromRawBytes.d.ts +0 -14
- package/_types/core/actions/base/createVerifiedInputProofFromRawBytes.d.ts.map +0 -1
- package/_types/core/actions/base/fetchKmsSigncryptedShares.d.ts +0 -41
- package/_types/core/actions/base/fetchKmsSigncryptedShares.d.ts.map +0 -1
- package/_types/core/actions/base/fetchVerifiedInputProof.d.ts +0 -14
- package/_types/core/actions/base/fetchVerifiedInputProof.d.ts.map +0 -1
- package/_types/core/actions/base/readKmsSignersContext.d.ts +0 -6
- package/_types/core/actions/base/readKmsSignersContext.d.ts.map +0 -1
- package/_types/core/actions/base/verifyHandlesCoprocessorSignatures.d.ts +0 -14
- package/_types/core/actions/base/verifyHandlesCoprocessorSignatures.d.ts.map +0 -1
- package/_types/core/actions/base/verifyInputProof.d.ts +0 -14
- package/_types/core/actions/base/verifyInputProof.d.ts.map +0 -1
- package/_types/core/actions/base/verifyZkProofCoprocessorSignatures.d.ts +0 -11
- package/_types/core/actions/base/verifyZkProofCoprocessorSignatures.d.ts.map +0 -1
- package/_types/core/actions/chain/createCoprocessorEip712Domain.d.ts +0 -7
- package/_types/core/actions/chain/createCoprocessorEip712Domain.d.ts.map +0 -1
- package/_types/core/actions/chain/createKmsDelegatedUserDecryptEip712.d.ts +0 -15
- package/_types/core/actions/chain/createKmsDelegatedUserDecryptEip712.d.ts.map +0 -1
- package/_types/core/actions/chain/createKmsEip712Domain.d.ts +0 -7
- package/_types/core/actions/chain/createKmsEip712Domain.d.ts.map +0 -1
- package/_types/core/actions/chain/createKmsUserDecryptEip712.d.ts +0 -14
- package/_types/core/actions/chain/createKmsUserDecryptEip712.d.ts.map +0 -1
- package/_types/core/actions/chain/verifyKmsDelegatedUserDecryptEip712.d.ts +0 -7
- package/_types/core/actions/chain/verifyKmsDelegatedUserDecryptEip712.d.ts.map +0 -1
- package/_types/core/actions/chain/verifyKmsUserDecryptEip712.d.ts +0 -7
- package/_types/core/actions/chain/verifyKmsUserDecryptEip712.d.ts.map +0 -1
- package/_types/core/actions/decrypt/decryptKmsSigncryptedShares.d.ts +0 -13
- package/_types/core/actions/decrypt/decryptKmsSigncryptedShares.d.ts.map +0 -1
- package/_types/core/kms/createKmsDelegatedUserDecryptEip712.d.ts +0 -15
- package/_types/core/kms/createKmsDelegatedUserDecryptEip712.d.ts.map +0 -1
- package/_types/core/kms/createKmsUserDecryptEip712.d.ts +0 -26
- package/_types/core/kms/createKmsUserDecryptEip712.d.ts.map +0 -1
- package/_types/core/kms/fetchKmsSigncryptedShares-p.d.ts.map +0 -1
- package/_types/core/kms/kmsDelegatedUserDecryptEip712Types.d.ts +0 -3
- package/_types/core/kms/kmsDelegatedUserDecryptEip712Types.d.ts.map +0 -1
- package/_types/core/kms/kmsExtraData.d.ts +0 -25
- package/_types/core/kms/kmsExtraData.d.ts.map +0 -1
- package/_types/core/kms/kmsUserDecryptEip712Types.d.ts +0 -3
- package/_types/core/kms/kmsUserDecryptEip712Types.d.ts.map +0 -1
- package/_types/core/modules/relayer/cleartext/fetchDelegatedUserDecrypt.d.ts.map +0 -1
- package/_types/core/modules/relayer/module/fetchDelegatedUserDecrypt.d.ts.map +0 -1
- package/_types/core/utils-p/decrypt/verifyKmsDelegatedUserDecryptEip712.d.ts +0 -14
- package/_types/core/utils-p/decrypt/verifyKmsDelegatedUserDecryptEip712.d.ts.map +0 -1
- package/_types/core/utils-p/decrypt/verifyKmsUserDecryptEip712.d.ts +0 -14
- package/_types/core/utils-p/decrypt/verifyKmsUserDecryptEip712.d.ts.map +0 -1
- package/core/actions/base/createVerifiedInputProofFromRawBytes.ts +0 -24
- package/core/actions/base/fetchKmsSigncryptedShares.ts +0 -83
- package/core/actions/base/fetchVerifiedInputProof.ts +0 -25
- package/core/actions/base/readKmsSignersContext.ts +0 -20
- package/core/actions/base/verifyHandlesCoprocessorSignatures.ts +0 -60
- package/core/actions/base/verifyInputProof.ts +0 -45
- package/core/actions/base/verifyZkProofCoprocessorSignatures.ts +0 -32
- package/core/actions/chain/createCoprocessorEip712Domain.ts +0 -16
- package/core/actions/chain/createKmsDelegatedUserDecryptEip712.ts +0 -36
- package/core/actions/chain/createKmsEip712Domain.ts +0 -16
- package/core/actions/chain/createKmsUserDecryptEip712.ts +0 -34
- package/core/actions/chain/verifyKmsDelegatedUserDecryptEip712.ts +0 -16
- package/core/actions/chain/verifyKmsUserDecryptEip712.ts +0 -16
- package/core/actions/decrypt/decryptKmsSigncryptedShares.ts +0 -34
- package/core/kms/kmsExtraData.ts +0 -127
- /package/core/modules/relayer/module/{fetchDelegatedUserDecrypt.ts → fetchDelegatedUserDecryptV1.ts} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { KmsSignersContext } from '../types/kmsSignersContext.js';
|
|
2
|
-
import type { BytesHex, ChecksummedAddress
|
|
2
|
+
import type { BytesHex, ChecksummedAddress } from '../types/primitives.js';
|
|
3
3
|
import type { FhevmRuntime } from '../types/coreFhevmRuntime.js';
|
|
4
|
+
import type { KmsExtraData } from '../types/kms-p.js';
|
|
4
5
|
type Context = {
|
|
5
6
|
readonly runtime: FhevmRuntime;
|
|
6
7
|
readonly client: NonNullable<object>;
|
|
@@ -12,11 +13,21 @@ type Parameters = {
|
|
|
12
13
|
readonly kmsVerifierAddress: ChecksummedAddress;
|
|
13
14
|
readonly protocolConfigAddress: ChecksummedAddress | undefined;
|
|
14
15
|
readonly forceRefresh?: boolean | undefined;
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
};
|
|
17
|
+
type ParametersWithExtraData = Parameters & {
|
|
18
|
+
readonly extraData: KmsExtraData;
|
|
17
19
|
};
|
|
18
20
|
type ReturnType = KmsSignersContext;
|
|
19
|
-
export declare function
|
|
21
|
+
export declare function readCurrentKmsSignersContext(context: Context, parameters: Parameters): Promise<ReturnType>;
|
|
22
|
+
/**
|
|
23
|
+
* Reads the {@link KmsSignersContext} for a caller-provided `extraData`.
|
|
24
|
+
*
|
|
25
|
+
* Accepts an `extraData` of any version (v0, v1, v2, …); the underlying resolver
|
|
26
|
+
* selects the right protocol path and verifies the version is compatible with
|
|
27
|
+
* the on-chain KMSVerifier, throwing if it is not.
|
|
28
|
+
*/
|
|
29
|
+
export declare function readKmsSignersContextFromExtraData(context: Context, parameters: ParametersWithExtraData): Promise<ReturnType>;
|
|
30
|
+
export type ReconcileMode = 'exact' | 'strict' | 'loose';
|
|
20
31
|
/**
|
|
21
32
|
* Reconciles the KMS signers context used by the SDK with the one the relayer
|
|
22
33
|
* actually used when forwarding the decryption request to KMS nodes.
|
|
@@ -31,8 +42,10 @@ export declare function readKmsSignersContext(context: Context, parameters: Para
|
|
|
31
42
|
*
|
|
32
43
|
* ### Nomenclature
|
|
33
44
|
*
|
|
34
|
-
* - `
|
|
35
|
-
*
|
|
45
|
+
* - `requestedKmsExtraData` — `createKmsExtraData({ kmsContextId, kmsEpochId })`
|
|
46
|
+
* derived from `requestedKmsSignersContext`.
|
|
47
|
+
* - `relayerKmsExtraData` — `fromKmsExtraDataBytesHex(relayerKmsExtraDataBytesHex)`
|
|
48
|
+
* (its `.kmsContextId` / `.kmsEpochId`).
|
|
36
49
|
*
|
|
37
50
|
* ### Host-Contract Compatibility
|
|
38
51
|
*
|
|
@@ -43,37 +56,41 @@ export declare function readKmsSignersContext(context: Context, parameters: Para
|
|
|
43
56
|
* - host-contracts v12 and v13 support `extraData` v0 and v1.
|
|
44
57
|
* - host-contracts v14 support `extraData` v0, v1, and v2.
|
|
45
58
|
*
|
|
46
|
-
* ### Resolution (checked in order)
|
|
59
|
+
* ### Resolution (checked in order, then by `mode`)
|
|
47
60
|
*
|
|
48
|
-
* 1. `
|
|
49
|
-
* `requestedKmsSignersContext`. This is the **only** path that trusts cached
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* (
|
|
57
|
-
*
|
|
58
|
-
*
|
|
61
|
+
* 1. `relayerKmsExtraData` equals `requestedKmsExtraData` → return
|
|
62
|
+
* `requestedKmsSignersContext`. This is the **only** path that trusts cached
|
|
63
|
+
* data, and it applies in every mode.
|
|
64
|
+
* 2. Otherwise, in `'exact'` mode → **throw**. This mode never parses, refreshes,
|
|
65
|
+
* or reconciles differing `extraData`.
|
|
66
|
+
* 3. `extraData` serialization version mismatch → **throw** (`'strict'`/`'loose'`).
|
|
67
|
+
* The SDK and relayer must agree on the encoding format, even for the same context ID.
|
|
68
|
+
* 4. Versions match but context/epoch differ → force a **full on-chain refetch**
|
|
69
|
+
* (cached data is never reused, since a mismatch means on-chain state may have
|
|
70
|
+
* diverged: rotation, destruction, signer/epoch changes). The accept criterion
|
|
71
|
+
* then depends on `mode`:
|
|
72
|
+
* - `'strict'` → accept **only** if the relayer's context equals the *current*
|
|
73
|
+
* on-chain context (both `kmsContextId` and `kmsEpochId`); otherwise throw.
|
|
74
|
+
* - `'loose'` → accept **any** on-chain-valid context (non-destroyed, in range),
|
|
75
|
+
* current or not; throw only if destroyed / out of range.
|
|
59
76
|
*
|
|
60
77
|
* ### Modes
|
|
61
78
|
*
|
|
62
|
-
* - `'exact'` — Accept only step 1 (
|
|
63
|
-
*
|
|
64
|
-
* - `'strict'` — Accept step 1
|
|
65
|
-
*
|
|
66
|
-
* The epoch check is required because RFC 005 introduces same-context
|
|
67
|
-
* (new shares, same party set) — a stale epoch must be rejected
|
|
79
|
+
* - `'exact'` — Accept only step 1 (`extraData` equality). Rejects any
|
|
80
|
+
* relayer/context drift without parsing or on-chain recovery.
|
|
81
|
+
* - `'strict'` — Accept step 1, or a relayer context whose `kmsContextId` **and**
|
|
82
|
+
* `kmsEpochId` equal the current on-chain values. Rejects valid-but-not-current
|
|
83
|
+
* contexts. The epoch check is required because RFC 005 introduces same-context
|
|
84
|
+
* epoch rotations (new shares, same party set) — a stale epoch must be rejected
|
|
85
|
+
* even when the context ID matches.
|
|
68
86
|
* - `'loose'` — Accept any on-chain valid context (non-destroyed, in range),
|
|
69
87
|
* regardless of whether it is current. Covers context rotations in either direction.
|
|
70
88
|
*/
|
|
71
|
-
export type ReconcileMode = 'exact' | 'strict' | 'loose';
|
|
72
89
|
export declare function reconcileKmsSignersContext(context: Context, parameters: {
|
|
73
90
|
readonly kmsVerifierAddress: ChecksummedAddress;
|
|
74
91
|
readonly protocolConfigAddress: ChecksummedAddress | undefined;
|
|
75
92
|
readonly requestedKmsSignersContext: KmsSignersContext;
|
|
76
|
-
readonly
|
|
93
|
+
readonly relayerKmsExtraDataBytesHex: BytesHex;
|
|
77
94
|
readonly mode: ReconcileMode;
|
|
78
95
|
}): Promise<KmsSignersContext>;
|
|
79
96
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readKmsSignersContext-p.d.ts","sourceRoot":"","sources":["../../../core/host-contracts/readKmsSignersContext-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"readKmsSignersContext-p.d.ts","sourceRoot":"","sources":["../../../core/host-contracts/readKmsSignersContext-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAiB,MAAM,wBAAwB,CAAC;AAC1F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAmBtD,KAAK,OAAO,GAAG;IACb,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;CACvD,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAChD,QAAQ,CAAC,qBAAqB,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC/D,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7C,CAAC;AAEF,KAAK,uBAAuB,GAAG,UAAU,GAAG;IAC1C,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;CAClC,CAAC;AAMF,KAAK,UAAU,GAAG,iBAAiB,CAAC;AAIpC,wBAAsB,4BAA4B,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAEhH;AAID;;;;;;GAMG;AACH,wBAAsB,kCAAkC,CACtD,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,uBAAuB,GAClC,OAAO,CAAC,UAAU,CAAC,CAGrB;AAsJD,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE;IACV,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAChD,QAAQ,CAAC,qBAAqB,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC/D,QAAQ,CAAC,0BAA0B,EAAE,iBAAiB,CAAC;IACvD,QAAQ,CAAC,2BAA2B,EAAE,QAAQ,CAAC;IAC/C,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;CAC9B,GACA,OAAO,CAAC,iBAAiB,CAAC,CAmE5B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { KmsSigncryptedSharesMetadata, KmsSigncryptedShare } from '../types/kms-p.js';
|
|
2
2
|
import type { KmsSigncryptedShares } from '../types/kms.js';
|
|
3
|
+
import type { BytesHex } from '../types/primitives.js';
|
|
3
4
|
import type { FhevmRuntime } from '../types/coreFhevmRuntime.js';
|
|
4
5
|
import type { FhevmChain } from '../types/fhevmChain.js';
|
|
5
6
|
type Context = {
|
|
@@ -10,6 +11,23 @@ type Context = {
|
|
|
10
11
|
readonly batchRpcCalls: boolean;
|
|
11
12
|
};
|
|
12
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Helper:
|
|
16
|
+
* Verifies the EIP-712 signature of a single KMS signcrypted share.
|
|
17
|
+
*
|
|
18
|
+
* Rebuilds the `UserDecryptResponseVerification` payload the KMS node signed,
|
|
19
|
+
* recovers the signer, and asserts it belongs to the reconciled KMS signers
|
|
20
|
+
* context. This is an independent, JS-only check — the same verification is also
|
|
21
|
+
* performed inside the tkms WASM during reconstruction (`verify=true`), so this
|
|
22
|
+
* is primarily a test/defense-in-depth pass and is not required for correctness.
|
|
23
|
+
*
|
|
24
|
+
* @throws If the signer cannot be recovered, or is not a known KMS signer.
|
|
25
|
+
*/
|
|
26
|
+
export declare function verifyKmsSigncryptedShare(context: Context, parameters: {
|
|
27
|
+
readonly share: KmsSigncryptedShare;
|
|
28
|
+
readonly metadata: KmsSigncryptedSharesMetadata;
|
|
29
|
+
readonly transportPublicKey: BytesHex;
|
|
30
|
+
}): Promise<void>;
|
|
13
31
|
/**
|
|
14
32
|
* Creates a validated {@link KmsSigncryptedShares} instance.
|
|
15
33
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KmsSigncryptedShares-p.d.ts","sourceRoot":"","sources":["../../../core/kms/KmsSigncryptedShares-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC3F,OAAO,KAAK,EAAE,oBAAoB,EAA6B,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"KmsSigncryptedShares-p.d.ts","sourceRoot":"","sources":["../../../core/kms/KmsSigncryptedShares-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC3F,OAAO,KAAK,EAAE,oBAAoB,EAA6B,MAAM,iBAAiB,CAAC;AACvF,OAAO,KAAK,EAAE,QAAQ,EAAoC,MAAM,wBAAwB,CAAC;AAEzF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAmGzD,KAAK,OAAO,GAAG;IACb,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;CACvD,CAAC;AAyBF;;;;;;;;;;;GAWG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE;IACV,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,4BAA4B,CAAC;IAChD,QAAQ,CAAC,kBAAkB,EAAE,QAAQ,CAAC;CACvC,GACA,OAAO,CAAC,IAAI,CAAC,CAiCf;AAED;;;;;;;;;GASG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE;IACV,QAAQ,CAAC,QAAQ,EAAE,4BAA4B,CAAC;IAChD,QAAQ,CAAC,MAAM,EAAE,SAAS,mBAAmB,EAAE,CAAC;CACjD,GACA,OAAO,CAAC,oBAAoB,CAAC,CAkC/B;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,iBAAiB,EAAE,oBAAoB,GAAG,SAAS,mBAAmB,EAAE,CAKjG;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,iBAAiB,EAAE,oBAAoB,GAAG,4BAA4B,CAKjG"}
|
|
@@ -29,7 +29,7 @@ type Parameters = {
|
|
|
29
29
|
readonly originToken: symbol;
|
|
30
30
|
readonly orderedHandles: readonly Handle[];
|
|
31
31
|
readonly orderedAbiEncodedClearValues: BytesHex;
|
|
32
|
-
readonly
|
|
32
|
+
readonly kmsPublicDecryptEip712Signatures: readonly Bytes65Hex[];
|
|
33
33
|
readonly kmsSignersContext: KmsSignersContext;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicDecryptionProof-p.d.ts","sourceRoot":"","sources":["../../../core/kms/PublicDecryptionProof-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"PublicDecryptionProof-p.d.ts","sourceRoot":"","sources":["../../../core/kms/PublicDecryptionProof-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAiBvE;;GAEG;AACH,qBAAa,yBAA0B,YAAW,qBAAqB;;gBASnE,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE;QACV,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC;QACnC,QAAQ,CAAC,kBAAkB,EAAE,SAAS,UAAU,EAAE,CAAC;QACnD,QAAQ,CAAC,4BAA4B,EAAE,QAAQ,CAAC;QAChD,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC;KAC9B;IAkBH,IAAW,eAAe,IAAI,QAAQ,CAErC;IAED,IAAW,kBAAkB,IAAI,qBAAqB,CAAC,UAAU,CAAC,CAEjE;IAED,IAAW,4BAA4B,IAAI,QAAQ,CAElD;IAED,IAAW,SAAS,IAAI,QAAQ,CAE/B;CACF;AASD,KAAK,OAAO,GAAG;IACb,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;CAChC,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,4BAA4B,EAAE,QAAQ,CAAC;IAChD,QAAQ,CAAC,gCAAgC,EAAE,SAAS,UAAU,EAAE,CAAC;IACjE,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;CAC/C,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,qBAAqB,CAAC,CA6EhC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { SignedDecryptionPermit
|
|
2
|
-
import type {
|
|
1
|
+
import type { SignedDecryptionPermit } from '../types/signedDecryptionPermit.js';
|
|
2
|
+
import type { KmsDelegatedUserDecryptEip712V1, KmsUserDecryptEip712V1, KmsUserDecryptEip712V2 } from '../types/kms.js';
|
|
3
3
|
import type { FhevmChain } from '../types/fhevmChain.js';
|
|
4
4
|
import type { FhevmRuntime } from '../types/coreFhevmRuntime.js';
|
|
5
5
|
import type { ErrorMetadataParams } from '../base/errors/ErrorBase.js';
|
|
6
6
|
import type { NativeSigner } from '../modules/ethereum/types.js';
|
|
7
|
-
import {
|
|
7
|
+
import type { TransportKeyPair } from './TransportKeyPair-p.js';
|
|
8
8
|
/**
|
|
9
9
|
* Serializes a signed decryption permit to a plain object suitable for
|
|
10
10
|
* JSON serialization. Uses the public getters — does not access private fields.
|
|
@@ -13,7 +13,13 @@ import { type TransportKeyPair } from './TransportKeyPair-p.js';
|
|
|
13
13
|
* serialization of sensitive data via `JSON.stringify(permit)`.
|
|
14
14
|
*/
|
|
15
15
|
export declare function serializeSignedDecryptionPermitToJSON(permit: SignedDecryptionPermit): {
|
|
16
|
-
|
|
16
|
+
version: 1;
|
|
17
|
+
eip712: KmsUserDecryptEip712V1 | KmsDelegatedUserDecryptEip712V1;
|
|
18
|
+
signature: string;
|
|
19
|
+
signerAddress: string;
|
|
20
|
+
} | {
|
|
21
|
+
version: 2;
|
|
22
|
+
eip712: KmsUserDecryptEip712V2;
|
|
17
23
|
signature: string;
|
|
18
24
|
signerAddress: string;
|
|
19
25
|
};
|
|
@@ -22,11 +28,6 @@ export declare function isSignedDecryptionPermit(value: unknown): value is Signe
|
|
|
22
28
|
export declare function assertIsSignedDecryptionPermit(value: unknown, options: {
|
|
23
29
|
subject?: string;
|
|
24
30
|
} & ErrorMetadataParams): asserts value is SignedDecryptionPermit;
|
|
25
|
-
/**
|
|
26
|
-
* Asserts that every address in {@link contractAddresses} is listed in the
|
|
27
|
-
* permit's `contractAddresses` (case-insensitive comparison).
|
|
28
|
-
*/
|
|
29
|
-
export declare function assertPermitIncludesContractAddresses(permit: SignedDecryptionPermit, contractAddresses: readonly string[]): void;
|
|
30
31
|
export type SignDecryptionPermitContext = {
|
|
31
32
|
readonly chain: FhevmChain;
|
|
32
33
|
readonly runtime: FhevmRuntime;
|
|
@@ -35,21 +36,15 @@ export type SignDecryptionPermitContext = {
|
|
|
35
36
|
readonly batchRpcCalls: boolean;
|
|
36
37
|
};
|
|
37
38
|
};
|
|
38
|
-
type
|
|
39
|
+
export type SignDecryptionPermitParameters = {
|
|
39
40
|
readonly contractAddresses: readonly string[];
|
|
40
41
|
readonly startTimestamp: number;
|
|
41
|
-
readonly
|
|
42
|
+
readonly durationSeconds: number;
|
|
42
43
|
readonly signerAddress: string;
|
|
43
44
|
readonly signer: NativeSigner;
|
|
45
|
+
readonly delegatorAddress?: string | undefined;
|
|
44
46
|
readonly transportKeyPair: TransportKeyPair;
|
|
45
47
|
};
|
|
46
|
-
export type SignSelfDecryptionPermitParameters = SignDecryptionPermitCommonParameters & {
|
|
47
|
-
readonly delegatorAddress?: undefined;
|
|
48
|
-
};
|
|
49
|
-
export type SignDelegatedDecryptionPermitParameters = SignDecryptionPermitCommonParameters & {
|
|
50
|
-
readonly delegatorAddress: string;
|
|
51
|
-
};
|
|
52
|
-
export type SignDecryptionPermitParameters = SignSelfDecryptionPermitParameters | SignDelegatedDecryptionPermitParameters;
|
|
53
48
|
/**
|
|
54
49
|
* Creates a signed decryption permit by constructing the EIP-712 typed data
|
|
55
50
|
* and signing it with the provided signer.
|
|
@@ -64,15 +59,6 @@ export type SignDecryptionPermitParameters = SignSelfDecryptionPermitParameters
|
|
|
64
59
|
* @throws If the signer, address, or key pair is invalid.
|
|
65
60
|
* @throws If the signature verification fails.
|
|
66
61
|
*/
|
|
67
|
-
export declare function signDecryptionPermit(context: SignDecryptionPermitContext, parameters:
|
|
68
|
-
export declare function
|
|
69
|
-
export declare function parseSignedDecryptionPermit(context: {
|
|
70
|
-
readonly chain: FhevmChain;
|
|
71
|
-
readonly runtime: FhevmRuntime;
|
|
72
|
-
readonly client: NonNullable<object>;
|
|
73
|
-
readonly options: {
|
|
74
|
-
readonly batchRpcCalls: boolean;
|
|
75
|
-
};
|
|
76
|
-
}, transportKeyPair: TransportKeyPair, permit: unknown): Promise<SignedDecryptionPermit>;
|
|
77
|
-
export {};
|
|
62
|
+
export declare function signDecryptionPermit(context: SignDecryptionPermitContext, parameters: SignDecryptionPermitParameters): Promise<SignedDecryptionPermit>;
|
|
63
|
+
export declare function parseSignedDecryptionPermit(context: SignDecryptionPermitContext, transportKeyPair: TransportKeyPair, permit: unknown): Promise<SignedDecryptionPermit>;
|
|
78
64
|
//# sourceMappingURL=SignedDecryptionPermit-p.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignedDecryptionPermit-p.d.ts","sourceRoot":"","sources":["../../../core/kms/SignedDecryptionPermit-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"SignedDecryptionPermit-p.d.ts","sourceRoot":"","sources":["../../../core/kms/SignedDecryptionPermit-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,KAAK,EAAE,+BAA+B,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACvH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAkBhE;;;;;;GAMG;AACH,wBAAgB,qCAAqC,CAAC,MAAM,EAAE,sBAAsB,GAChF;IACE,OAAO,EAAE,CAAC,CAAC;IACX,MAAM,EAAE,sBAAsB,GAAG,+BAA+B,CAAC;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,GACD;IACE,OAAO,EAAE,CAAC,CAAC;IACX,MAAM,EAAE,sBAAsB,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CAyBJ;AAMD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,sBAAsB,CAExF;AAED,8FAA8F;AAC9F,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,EACd,OAAO,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,mBAAmB,GAClD,OAAO,CAAC,KAAK,IAAI,sBAAsB,CAWzC;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;CACvD,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,2BAA2B,EACpC,UAAU,EAAE,8BAA8B,GACzC,OAAO,CAAC,sBAAsB,CAAC,CAajC;AAMD,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,2BAA2B,EACpC,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,sBAAsB,CAAC,CAejC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SignedDecryptionPermit, SignedDecryptionPermitV1 } from '../types/signedDecryptionPermit.js';
|
|
2
|
+
import type { SignDecryptionPermitContext, SignDecryptionPermitParameters } from './SignedDecryptionPermit-p.js';
|
|
3
|
+
import { type TransportKeyPair } from './TransportKeyPair-p.js';
|
|
4
|
+
export declare function isSignedDecryptionPermitV1(value: unknown): value is SignedDecryptionPermitV1;
|
|
5
|
+
export declare function signDecryptionPermitV1(context: SignDecryptionPermitContext, parameters: SignDecryptionPermitParameters): Promise<SignedDecryptionPermit>;
|
|
6
|
+
export declare function parseSignedDecryptionPermitV1(context: SignDecryptionPermitContext, transportKeyPair: TransportKeyPair, permit: unknown): Promise<SignedDecryptionPermit>;
|
|
7
|
+
//# sourceMappingURL=SignedDecryptionPermitV1-p.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignedDecryptionPermitV1-p.d.ts","sourceRoot":"","sources":["../../../core/kms/SignedDecryptionPermitV1-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAK3G,OAAO,KAAK,EAAE,2BAA2B,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAajH,OAAO,EAA4B,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AA0H1F,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,wBAAwB,CAE5F;AAiDD,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,2BAA2B,EACpC,UAAU,EAAE,8BAA8B,GACzC,OAAO,CAAC,sBAAsB,CAAC,CAkEjC;AAMD,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,2BAA2B,EACpC,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,sBAAsB,CAAC,CAqCjC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SignedDecryptionPermit, SignedDecryptionPermitV2 } from '../types/signedDecryptionPermit.js';
|
|
2
|
+
import type { SignDecryptionPermitContext, SignDecryptionPermitParameters } from './SignedDecryptionPermit-p.js';
|
|
3
|
+
import { type TransportKeyPair } from './TransportKeyPair-p.js';
|
|
4
|
+
export declare function isSignedDecryptionPermitV2(value: unknown): value is SignedDecryptionPermitV2;
|
|
5
|
+
export declare function signDecryptionPermitV2(context: SignDecryptionPermitContext, parameters: SignDecryptionPermitParameters): Promise<SignedDecryptionPermit>;
|
|
6
|
+
export declare function parseSignedDecryptionPermitV2(context: SignDecryptionPermitContext, transportKeyPair: TransportKeyPair, permit: unknown): Promise<SignedDecryptionPermitV2>;
|
|
7
|
+
//# sourceMappingURL=SignedDecryptionPermitV2-p.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignedDecryptionPermitV2-p.d.ts","sourceRoot":"","sources":["../../../core/kms/SignedDecryptionPermitV2-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAK3G,OAAO,KAAK,EAAE,2BAA2B,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAMjH,OAAO,EAA4B,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AA0G1F,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,wBAAwB,CAE5F;AA8BD,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,2BAA2B,EACpC,UAAU,EAAE,8BAA8B,GACzC,OAAO,CAAC,sBAAsB,CAAC,CAkFjC;AAMD,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,2BAA2B,EACpC,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,wBAAwB,CAAC,CA8BnC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { KmsDelegatedUserDecryptEip712V1 } from '../types/kms.js';
|
|
2
|
+
import type { ErrorMetadataParams } from '../base/errors/ErrorBase.js';
|
|
3
|
+
import type { KmsExtraData } from '../types/kms-p.js';
|
|
4
|
+
export type CreateKmsDelegatedUserDecryptEip712V1Parameters = {
|
|
5
|
+
readonly verifyingContractAddressDecryption: string;
|
|
6
|
+
readonly chainId: number | bigint;
|
|
7
|
+
readonly publicKey: string | Uint8Array;
|
|
8
|
+
readonly contractAddresses: readonly string[];
|
|
9
|
+
readonly startTimestamp: number;
|
|
10
|
+
readonly durationDays: number;
|
|
11
|
+
readonly extraData: KmsExtraData;
|
|
12
|
+
readonly delegatorAddress: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function createKmsDelegatedUserDecryptEip712V1(parameters: CreateKmsDelegatedUserDecryptEip712V1Parameters): KmsDelegatedUserDecryptEip712V1;
|
|
15
|
+
export declare function assertIsKmsDelegatedUserDecryptEip712V1(value: unknown, name: string, options: ErrorMetadataParams): asserts value is KmsDelegatedUserDecryptEip712V1;
|
|
16
|
+
//# sourceMappingURL=createKmsDelegatedUserDecryptEip712V1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createKmsDelegatedUserDecryptEip712V1.d.ts","sourceRoot":"","sources":["../../../core/kms/createKmsDelegatedUserDecryptEip712V1.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAEvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAiBtD,MAAM,MAAM,+CAA+C,GAAG;IAC5D,QAAQ,CAAC,kCAAkC,EAAE,MAAM,CAAC;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC;IACxC,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;IACjC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC,CAAC;AAMF,wBAAgB,qCAAqC,CACnD,UAAU,EAAE,+CAA+C,GAC1D,+BAA+B,CAqDjC;AAID,wBAAgB,uCAAuC,CACrD,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,KAAK,IAAI,+BAA+B,CAclD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ErrorMetadataParams } from '../base/errors/ErrorBase.js';
|
|
2
|
+
import type { KmsEip712Domain, KmsUserDecryptEip712V1 } from '../types/kms.js';
|
|
3
|
+
import type { KmsUserDecryptEip712V1Message } from '../types/kms.js';
|
|
4
|
+
import type { KmsExtraData } from '../types/kms-p.js';
|
|
5
|
+
export type CreateKmsUserDecryptEip712V1Parameters = {
|
|
6
|
+
readonly verifyingContractAddressDecryption: string;
|
|
7
|
+
readonly chainId: number | bigint;
|
|
8
|
+
readonly publicKey: string | Uint8Array;
|
|
9
|
+
readonly contractAddresses: readonly string[];
|
|
10
|
+
readonly startTimestamp: number;
|
|
11
|
+
readonly durationDays: number;
|
|
12
|
+
readonly extraData: KmsExtraData;
|
|
13
|
+
};
|
|
14
|
+
export declare function createKmsUserDecryptEip712V1(parameters: CreateKmsUserDecryptEip712V1Parameters): KmsUserDecryptEip712V1;
|
|
15
|
+
export declare function assertIsKmsUserDecryptEip712V1(value: unknown, name: string, options: ErrorMetadataParams): asserts value is KmsUserDecryptEip712V1;
|
|
16
|
+
/**
|
|
17
|
+
* Validates the common structure shared by both
|
|
18
|
+
* {@link KmsUserDecryptEip712V1} and {@link KmsDelegatedUserDecryptEip712V1}:
|
|
19
|
+
* domain, types, primaryType, and base message fields.
|
|
20
|
+
*/
|
|
21
|
+
export declare function _assertIsKmsUserDecryptEip712V1Base(value: unknown, name: string, primaryType: string, options: ErrorMetadataParams): asserts value is {
|
|
22
|
+
readonly domain: KmsEip712Domain;
|
|
23
|
+
readonly types: object;
|
|
24
|
+
readonly primaryType: string;
|
|
25
|
+
readonly message: KmsUserDecryptEip712V1Message;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=createKmsUserDecryptEip712V1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createKmsUserDecryptEip712V1.d.ts","sourceRoot":"","sources":["../../../core/kms/createKmsUserDecryptEip712V1.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE/E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAmBtD,MAAM,MAAM,sCAAsC,GAAG;IACnD,QAAQ,CAAC,kCAAkC,EAAE,MAAM,CAAC;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC;IACxC,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;CAClC,CAAC;AAMF,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,sCAAsC,GACjD,sBAAsB,CAkDxB;AAID,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,KAAK,IAAI,sBAAsB,CAOzC;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,KAAK,IAAI;IAClB,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,6BAA6B,CAAC;CACjD,CAuBA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ErrorMetadataParams } from '../base/errors/ErrorBase.js';
|
|
2
2
|
import type { KmsUserDecryptEip712V2 } from '../types/kms.js';
|
|
3
|
+
import type { KmsExtraData } from '../types/kms-p.js';
|
|
3
4
|
export type CreateKmsUserDecryptEip712V2Parameters = {
|
|
4
5
|
readonly verifyingContractAddressDecryption: string;
|
|
5
6
|
readonly chainId: number | bigint;
|
|
@@ -7,8 +8,8 @@ export type CreateKmsUserDecryptEip712V2Parameters = {
|
|
|
7
8
|
readonly publicKey: string | Uint8Array;
|
|
8
9
|
readonly allowedContracts: readonly string[];
|
|
9
10
|
readonly startTimestamp: number | bigint;
|
|
10
|
-
readonly durationSeconds:
|
|
11
|
-
readonly extraData:
|
|
11
|
+
readonly durationSeconds: bigint;
|
|
12
|
+
readonly extraData: KmsExtraData;
|
|
12
13
|
};
|
|
13
14
|
export declare function createKmsUserDecryptEip712V2(parameters: CreateKmsUserDecryptEip712V2Parameters): KmsUserDecryptEip712V2;
|
|
14
15
|
export declare function assertIsKmsUserDecryptEip712V2(value: unknown, name: string, options: ErrorMetadataParams): asserts value is KmsUserDecryptEip712V2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createKmsUserDecryptEip712V2.d.ts","sourceRoot":"","sources":["../../../core/kms/createKmsUserDecryptEip712V2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"createKmsUserDecryptEip712V2.d.ts","sourceRoot":"","sources":["../../../core/kms/createKmsUserDecryptEip712V2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAG9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAmBtD,MAAM,MAAM,sCAAsC,GAAG;IACnD,QAAQ,CAAC,kCAAkC,EAAE,MAAM,CAAC;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC;IACxC,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC;IACzC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;CAClC,CAAC;AAMF,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,sCAAsC,GACjD,sBAAsB,CAsDxB;AAID,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,KAAK,IAAI,sBAAsB,CAiBzC"}
|
|
@@ -4,7 +4,7 @@ import type { Handle } from '../types/encryptedTypes-p.js';
|
|
|
4
4
|
import type { FhevmChain } from '../types/fhevmChain.js';
|
|
5
5
|
import type { ChecksummedAddress, TypedValue } from '../types/primitives.js';
|
|
6
6
|
import type { RelayerDelegatedUserDecryptOptions, RelayerUserDecryptOptions } from '../types/relayer.js';
|
|
7
|
-
import type {
|
|
7
|
+
import type { SignedDecryptionPermit } from '../types/signedDecryptionPermit.js';
|
|
8
8
|
import type { TransportKeyPair } from './TransportKeyPair-p.js';
|
|
9
9
|
type Context = {
|
|
10
10
|
readonly chain: FhevmChain;
|
|
@@ -19,18 +19,11 @@ type Parameters = {
|
|
|
19
19
|
readonly pairs: ReadonlyArray<{
|
|
20
20
|
readonly handle: Handle;
|
|
21
21
|
readonly contractAddress: ChecksummedAddress;
|
|
22
|
+
readonly ownerAddress?: ChecksummedAddress | undefined;
|
|
22
23
|
}>;
|
|
23
|
-
readonly signedPermit:
|
|
24
|
+
readonly signedPermit: SignedDecryptionPermit;
|
|
24
25
|
readonly transportKeyPair: TransportKeyPair;
|
|
25
|
-
readonly options?: RelayerUserDecryptOptions | undefined;
|
|
26
|
-
} | {
|
|
27
|
-
readonly pairs: ReadonlyArray<{
|
|
28
|
-
readonly handle: Handle;
|
|
29
|
-
readonly contractAddress: ChecksummedAddress;
|
|
30
|
-
}>;
|
|
31
|
-
readonly signedPermit: SignedDelegatedDecryptionPermit;
|
|
32
|
-
readonly transportKeyPair: TransportKeyPair;
|
|
33
|
-
readonly options?: RelayerDelegatedUserDecryptOptions | undefined;
|
|
26
|
+
readonly options?: RelayerUserDecryptOptions | RelayerDelegatedUserDecryptOptions | undefined;
|
|
34
27
|
};
|
|
35
28
|
export type ReturnType = readonly TypedValue[];
|
|
36
29
|
export declare function decryptValuesFromPairs(fhevm: Context, parameters: Parameters): Promise<ReturnType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decryptValuesFromPairs.d.ts","sourceRoot":"","sources":["../../../core/kms/decryptValuesFromPairs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,KAAK,EAAE,kCAAkC,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACzG,OAAO,KAAK,EAAE
|
|
1
|
+
{"version":3,"file":"decryptValuesFromPairs.d.ts","sourceRoot":"","sources":["../../../core/kms/decryptValuesFromPairs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,KAAK,EAAE,kCAAkC,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACzG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAShE,KAAK,OAAO,GAAG;IACb,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;CACvD,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;QAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,eAAe,EAAE,kBAAkB,CAAC;QAI7C,QAAQ,CAAC,YAAY,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;KACxD,CAAC,CAAC;IACH,QAAQ,CAAC,YAAY,EAAE,sBAAsB,CAAC;IAC9C,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,OAAO,CAAC,EAAE,yBAAyB,GAAG,kCAAkC,GAAG,SAAS,CAAC;CAC/F,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,SAAS,UAAU,EAAE,CAAC;AAI/C,wBAAsB,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAyBxG"}
|
package/_types/core/kms/{fetchKmsSigncryptedShares-p.d.ts → fetchKmsSigncryptedSharesV1-p.d.ts}
RENAMED
|
@@ -3,7 +3,7 @@ import type { KmsSigncryptedShares } from '../types/kms.js';
|
|
|
3
3
|
import type { ChecksummedAddress } from '../types/primitives.js';
|
|
4
4
|
import type { FhevmChain } from '../types/fhevmChain.js';
|
|
5
5
|
import type { RelayerDelegatedUserDecryptOptions, RelayerUserDecryptOptions } from '../types/relayer.js';
|
|
6
|
-
import type {
|
|
6
|
+
import type { SignedDecryptionPermit, SignedDecryptionPermitV1 } from '../types/signedDecryptionPermit.js';
|
|
7
7
|
import type { Handle } from '../types/encryptedTypes-p.js';
|
|
8
8
|
type Context = {
|
|
9
9
|
readonly runtime: FhevmRuntime;
|
|
@@ -18,17 +18,15 @@ type Parameters = {
|
|
|
18
18
|
readonly handle: Handle;
|
|
19
19
|
readonly contractAddress: ChecksummedAddress;
|
|
20
20
|
}>;
|
|
21
|
-
readonly signedPermit:
|
|
22
|
-
readonly options?: RelayerUserDecryptOptions | undefined;
|
|
23
|
-
} | {
|
|
24
|
-
readonly pairs: ReadonlyArray<{
|
|
25
|
-
readonly handle: Handle;
|
|
26
|
-
readonly contractAddress: ChecksummedAddress;
|
|
27
|
-
}>;
|
|
28
|
-
readonly signedPermit: SignedDelegatedDecryptionPermit;
|
|
29
|
-
readonly options?: RelayerDelegatedUserDecryptOptions | undefined;
|
|
21
|
+
readonly signedPermit: SignedDecryptionPermit;
|
|
22
|
+
readonly options?: RelayerUserDecryptOptions | RelayerDelegatedUserDecryptOptions | undefined;
|
|
30
23
|
};
|
|
31
24
|
type ReturnType = KmsSigncryptedShares;
|
|
32
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Asserts that every address in {@link contractAddresses} is listed in the
|
|
27
|
+
* permit's `contractAddresses` (case-insensitive comparison).
|
|
28
|
+
*/
|
|
29
|
+
export declare function assertPermitV1IncludesContractAddresses(permit: SignedDecryptionPermitV1, contractAddresses: readonly string[]): void;
|
|
30
|
+
export declare function fetchKmsSigncryptedSharesV1(context: Context, parameters: Parameters): Promise<ReturnType>;
|
|
33
31
|
export {};
|
|
34
|
-
//# sourceMappingURL=
|
|
32
|
+
//# sourceMappingURL=fetchKmsSigncryptedSharesV1-p.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchKmsSigncryptedSharesV1-p.d.ts","sourceRoot":"","sources":["../../../core/kms/fetchKmsSigncryptedSharesV1-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,wBAAwB,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,kCAAkC,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACzG,OAAO,KAAK,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC3G,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAc3D,KAAK,OAAO,GAAG;IACb,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;CACvD,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;QAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,eAAe,EAAE,kBAAkB,CAAC;KAC9C,CAAC,CAAC;IACH,QAAQ,CAAC,YAAY,EAAE,sBAAsB,CAAC;IAC9C,QAAQ,CAAC,OAAO,CAAC,EAAE,yBAAyB,GAAG,kCAAkC,GAAG,SAAS,CAAC;CAC/F,CAAC;AAEF,KAAK,UAAU,GAAG,oBAAoB,CAAC;AAMvC;;;GAGG;AACH,wBAAgB,uCAAuC,CACrD,MAAM,EAAE,wBAAwB,EAChC,iBAAiB,EAAE,SAAS,MAAM,EAAE,GACnC,IAAI,CAON;AAMD,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CA4K/G"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { FhevmRuntime } from '../types/coreFhevmRuntime.js';
|
|
2
|
+
import type { KmsSigncryptedShares } from '../types/kms.js';
|
|
3
|
+
import type { ChecksummedAddress } from '../types/primitives.js';
|
|
4
|
+
import type { FhevmChain } from '../types/fhevmChain.js';
|
|
5
|
+
import type { RelayerUserDecryptOptions } from '../types/relayer.js';
|
|
6
|
+
import type { SignedDecryptionPermit } from '../types/signedDecryptionPermit.js';
|
|
7
|
+
import type { Handle } from '../types/encryptedTypes-p.js';
|
|
8
|
+
type Context = {
|
|
9
|
+
readonly runtime: FhevmRuntime;
|
|
10
|
+
readonly chain: FhevmChain;
|
|
11
|
+
readonly client: NonNullable<object>;
|
|
12
|
+
readonly options: {
|
|
13
|
+
readonly batchRpcCalls: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
type Parameters = {
|
|
17
|
+
readonly pairs: ReadonlyArray<{
|
|
18
|
+
readonly handle: Handle;
|
|
19
|
+
readonly contractAddress: ChecksummedAddress;
|
|
20
|
+
readonly ownerAddress?: ChecksummedAddress | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
readonly signedPermit: SignedDecryptionPermit;
|
|
23
|
+
readonly options?: RelayerUserDecryptOptions | undefined;
|
|
24
|
+
};
|
|
25
|
+
type ReturnType = KmsSigncryptedShares;
|
|
26
|
+
export declare function fetchKmsSigncryptedSharesV2(context: Context, parameters: Parameters): Promise<ReturnType>;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=fetchKmsSigncryptedSharesV2-p.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchKmsSigncryptedSharesV2-p.d.ts","sourceRoot":"","sources":["../../../core/kms/fetchKmsSigncryptedSharesV2-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,wBAAwB,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAA4B,MAAM,oCAAoC,CAAC;AAC3G,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAc3D,KAAK,OAAO,GAAG;IACb,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;CACvD,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;QAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,eAAe,EAAE,kBAAkB,CAAC;QAG7C,QAAQ,CAAC,YAAY,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;KACxD,CAAC,CAAC;IACH,QAAQ,CAAC,YAAY,EAAE,sBAAsB,CAAC;IAC9C,QAAQ,CAAC,OAAO,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CAC1D,CAAC;AAEF,KAAK,UAAU,GAAG,oBAAoB,CAAC;AAMvC,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAgI/G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kmsDelegatedUserDecryptEip712V1Types.d.ts","sourceRoot":"","sources":["../../../core/kms/kmsDelegatedUserDecryptEip712V1Types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,iBAAiB,CAAC;AAO5E,eAAO,MAAM,oCAAoC,EAAE,oCAkBzC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { BytesHex, Uint256BigInt, Uint8Number } from '../types/primitives.js';
|
|
2
|
+
import type { ErrorMetadataParams } from '../base/errors/ErrorBase.js';
|
|
3
|
+
import type { HostContractVersion } from '../types/hostContract.js';
|
|
4
|
+
import type { KmsExtraData } from '../types/kms-p.js';
|
|
5
|
+
export declare const EXTRA_DATA_V0: Uint8Number;
|
|
6
|
+
export declare const EXTRA_DATA_V1: Uint8Number;
|
|
7
|
+
export declare const EXTRA_DATA_V2: Uint8Number;
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare class KmsExtraDataImpl implements KmsExtraData {
|
|
12
|
+
#private;
|
|
13
|
+
constructor(privateToken: symbol, parameters: {
|
|
14
|
+
readonly version: Uint8Number;
|
|
15
|
+
readonly kmsContextId: Uint256BigInt;
|
|
16
|
+
readonly kmsEpochId: Uint256BigInt;
|
|
17
|
+
});
|
|
18
|
+
get version(): Uint8Number;
|
|
19
|
+
get kmsContextId(): Uint256BigInt;
|
|
20
|
+
get kmsEpochId(): Uint256BigInt;
|
|
21
|
+
/**
|
|
22
|
+
* Encodes a KMS context into an extraData format.
|
|
23
|
+
* v0: `0x00`
|
|
24
|
+
* v1: `0x01` + 32-byte big-endian context ID.
|
|
25
|
+
* v2: `0x02` + 32-byte big-endian context ID + 32-byte big-endian epoch ID.
|
|
26
|
+
*/
|
|
27
|
+
toBytesHex(): BytesHex;
|
|
28
|
+
}
|
|
29
|
+
export declare function fromKmsExtraDataBytesHex(extraDataBytesHex: BytesHex): KmsExtraData;
|
|
30
|
+
export declare function createKmsExtraDataV0(): KmsExtraData;
|
|
31
|
+
export declare function createKmsExtraDataV1(parameters: {
|
|
32
|
+
readonly kmsContextId: Uint256BigInt;
|
|
33
|
+
}): KmsExtraData;
|
|
34
|
+
export declare function createKmsExtraDataV2(parameters: {
|
|
35
|
+
readonly kmsContextId: Uint256BigInt;
|
|
36
|
+
readonly kmsEpochId: Uint256BigInt;
|
|
37
|
+
}): KmsExtraData;
|
|
38
|
+
export declare function validateKmsExtraDataParams(parameters: {
|
|
39
|
+
readonly kmsContextId: Uint256BigInt;
|
|
40
|
+
readonly kmsEpochId: Uint256BigInt;
|
|
41
|
+
}): void;
|
|
42
|
+
export declare function createKmsExtraData(parameters: {
|
|
43
|
+
readonly kmsContextId: Uint256BigInt;
|
|
44
|
+
readonly kmsEpochId: Uint256BigInt;
|
|
45
|
+
}): KmsExtraData;
|
|
46
|
+
export declare function equalsKmsExtraData(a: KmsExtraData, b: KmsExtraData): boolean;
|
|
47
|
+
export declare function isKmsExtraData(value: unknown): value is KmsExtraData;
|
|
48
|
+
export declare function assertIsKmsExtraData(value: unknown, options: {
|
|
49
|
+
readonly subject?: string;
|
|
50
|
+
} & ErrorMetadataParams): asserts value is KmsExtraData;
|
|
51
|
+
export declare function assertIsKmsExtraDataBytesHex(value: unknown, options: {
|
|
52
|
+
subject?: string;
|
|
53
|
+
} & ErrorMetadataParams): asserts value is BytesHex;
|
|
54
|
+
/**
|
|
55
|
+
* Returns `true` if `kmsExtraData`'s version is accepted by the given
|
|
56
|
+
* KMSVerifier contract version.
|
|
57
|
+
*
|
|
58
|
+
* | KMSVerifier version | protocol | max extraData version |
|
|
59
|
+
* | ------------------- | --------------- | --------------------- |
|
|
60
|
+
* | < 0.2.0 | v0.11.0 | v0 |
|
|
61
|
+
* | 0.2.0 – 0.3.x | v0.12.0/v0.13.0 | v1 |
|
|
62
|
+
* | 0.4.0 | v0.14.0 | v2 |
|
|
63
|
+
* | > 0.4.0 | v0.14.1+ | not checked (`true`) |
|
|
64
|
+
*/
|
|
65
|
+
export declare function isKmsExtraDataCompatibleWithKmsVerifier(kmsExtraData: KmsExtraData, kmsVerifierVersion: HostContractVersion): boolean;
|
|
66
|
+
//# sourceMappingURL=kmsExtraData-p.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kmsExtraData-p.d.ts","sourceRoot":"","sources":["../../../core/kms/kmsExtraData-p.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMtD,eAAO,MAAM,aAAa,EAAE,WAAiC,CAAC;AAC9D,eAAO,MAAM,aAAa,EAAE,WAAiC,CAAC;AAC9D,eAAO,MAAM,aAAa,EAAE,WAAiC,CAAC;AAU9D;;GAEG;AACH,qBAAa,gBAAiB,YAAW,YAAY;;gBAMjD,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE;QACV,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;QAC9B,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;QACrC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;KACpC;IA+CH,IAAW,OAAO,IAAI,WAAW,CAEhC;IAED,IAAW,YAAY,IAAI,aAAa,CAEvC;IAED,IAAW,UAAU,IAAI,aAAa,CAErC;IAED;;;;;OAKG;IACI,UAAU,IAAI,QAAQ;CAoB9B;AAID,wBAAgB,wBAAwB,CAAC,iBAAiB,EAAE,QAAQ,GAAG,YAAY,CAmElF;AAID,wBAAgB,oBAAoB,IAAI,YAAY,CAMnD;AAID,wBAAgB,oBAAoB,CAAC,UAAU,EAAE;IAAE,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAA;CAAE,GAAG,YAAY,CAMvG;AAID,wBAAgB,oBAAoB,CAAC,UAAU,EAAE;IAC/C,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;CACpC,GAAG,YAAY,CAMf;AAID,wBAAgB,0BAA0B,CAAC,UAAU,EAAE;IACrD,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;CACpC,GAAG,IAAI,CAIP;AAID,wBAAgB,kBAAkB,CAAC,UAAU,EAAE;IAC7C,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;CACpC,GAAG,YAAY,CAgBf;AAID,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,GAAG,OAAO,CAI5E;AAyBD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE;AAID,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,mBAAmB,GAC3D,OAAO,CAAC,KAAK,IAAI,YAAY,CAW/B;AAID,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,OAAO,EACd,OAAO,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,mBAAmB,GAClD,OAAO,CAAC,KAAK,IAAI,QAAQ,CAS3B;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,uCAAuC,CACrD,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,mBAAmB,GACtC,OAAO,CA4BT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kmsUserDecryptEip712V1Types.d.ts","sourceRoot":"","sources":["../../../core/kms/kmsUserDecryptEip712V1Types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAOnE,eAAO,MAAM,2BAA2B,EAAE,2BAiBhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kmsUserDecryptEip712V2Types.d.ts","sourceRoot":"","sources":["../../../core/kms/kmsUserDecryptEip712V2Types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"kmsUserDecryptEip712V2Types.d.ts","sourceRoot":"","sources":["../../../core/kms/kmsUserDecryptEip712V2Types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAOnE,eAAO,MAAM,2BAA2B,EAAE,2BAkBhC,CAAC"}
|