@cmts-dev/carmentis-sdk-core 1.2.2 → 1.2.4
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/dist/blockchain/feesCalculator/FeesCalculationFormulaFactory.d.ts +13 -0
- package/dist/blockchain/feesCalculator/FeesCalculationFormulaFactory.d.ts.map +1 -0
- package/dist/blockchain/feesCalculator/FirstFeesFormula.d.ts +28 -0
- package/dist/blockchain/feesCalculator/FirstFeesFormula.d.ts.map +1 -0
- package/dist/blockchain/feesCalculator/IFeesFormula.d.ts +19 -0
- package/dist/blockchain/feesCalculator/IFeesFormula.d.ts.map +1 -0
- package/dist/blockchain/feesCalculator/RetentionCostCalculator.d.ts +9 -0
- package/dist/blockchain/feesCalculator/RetentionCostCalculator.d.ts.map +1 -0
- package/dist/blockchain/internalStates/AccountInternalState.d.ts +14 -0
- package/dist/blockchain/internalStates/AccountInternalState.d.ts.map +1 -0
- package/dist/blockchain/internalStates/ApplicationInternalState.d.ts +16 -0
- package/dist/blockchain/internalStates/ApplicationInternalState.d.ts.map +1 -0
- package/dist/blockchain/internalStates/ApplicationLedgerInternalState.d.ts +102 -0
- package/dist/blockchain/internalStates/ApplicationLedgerInternalState.d.ts.map +1 -0
- package/dist/blockchain/internalStates/IInternalState.d.ts +4 -0
- package/dist/blockchain/internalStates/IInternalState.d.ts.map +1 -0
- package/dist/blockchain/internalStates/IInternalStateUpdater.d.ts +11 -0
- package/dist/blockchain/internalStates/IInternalStateUpdater.d.ts.map +1 -0
- package/dist/blockchain/internalStates/InternalStateFactory.d.ts +6 -0
- package/dist/blockchain/internalStates/InternalStateFactory.d.ts.map +1 -0
- package/dist/blockchain/internalStates/OrganizationInternalState.d.ts +15 -0
- package/dist/blockchain/internalStates/OrganizationInternalState.d.ts.map +1 -0
- package/dist/blockchain/internalStates/ProtocolInternalState.d.ts +62 -0
- package/dist/blockchain/internalStates/ProtocolInternalState.d.ts.map +1 -0
- package/dist/blockchain/internalStates/ValidatorNodeInternalState.d.ts +24 -0
- package/dist/blockchain/internalStates/ValidatorNodeInternalState.d.ts.map +1 -0
- package/dist/blockchain/internalStatesUpdater/AccountInternalStateUpdater.d.ts +17 -0
- package/dist/blockchain/internalStatesUpdater/AccountInternalStateUpdater.d.ts.map +1 -0
- package/dist/blockchain/internalStatesUpdater/ApplicationInternalStateUpdater.d.ts +8 -0
- package/dist/blockchain/internalStatesUpdater/ApplicationInternalStateUpdater.d.ts.map +1 -0
- package/dist/blockchain/internalStatesUpdater/ApplicationLedgerLocalStateUpdater.d.ts +26 -0
- package/dist/blockchain/internalStatesUpdater/ApplicationLedgerLocalStateUpdater.d.ts.map +1 -0
- package/dist/blockchain/internalStatesUpdater/InternalStateUpdaterFactory.d.ts +23 -0
- package/dist/blockchain/internalStatesUpdater/InternalStateUpdaterFactory.d.ts.map +1 -0
- package/dist/blockchain/internalStatesUpdater/OrganizationInternalStateUpdater.d.ts +8 -0
- package/dist/blockchain/internalStatesUpdater/OrganizationInternalStateUpdater.d.ts.map +1 -0
- package/dist/blockchain/internalStatesUpdater/ProtocolInternalStateUpdater.d.ts +9 -0
- package/dist/blockchain/internalStatesUpdater/ProtocolInternalStateUpdater.d.ts.map +1 -0
- package/dist/blockchain/internalStatesUpdater/ValidatorNodeInternalStateUpdater.d.ts +9 -0
- package/dist/blockchain/internalStatesUpdater/ValidatorNodeInternalStateUpdater.d.ts.map +1 -0
- package/dist/blockchain/microblock/Microblock.d.ts +345 -0
- package/dist/blockchain/microblock/Microblock.d.ts.map +1 -0
- package/dist/blockchain/microblock/MicroblockConsistencyChecker.d.ts +49 -0
- package/dist/blockchain/microblock/MicroblockConsistencyChecker.d.ts.map +1 -0
- package/dist/blockchain/microblock/TimestampValidationResult.d.ts +6 -0
- package/dist/blockchain/microblock/TimestampValidationResult.d.ts.map +1 -0
- package/dist/blockchain/structureCheckers/AccountMicroblockStructureChecker.d.ts +7 -0
- package/dist/blockchain/structureCheckers/AccountMicroblockStructureChecker.d.ts.map +1 -0
- package/dist/blockchain/structureCheckers/ApplicationLedgerMicroblockStructureChecker.d.ts +7 -0
- package/dist/blockchain/structureCheckers/ApplicationLedgerMicroblockStructureChecker.d.ts.map +1 -0
- package/dist/blockchain/structureCheckers/ApplicationMicroblockStructureChecker.d.ts +7 -0
- package/dist/blockchain/structureCheckers/ApplicationMicroblockStructureChecker.d.ts.map +1 -0
- package/dist/blockchain/structureCheckers/IMicroblockStructureChecker.d.ts +5 -0
- package/dist/blockchain/structureCheckers/IMicroblockStructureChecker.d.ts.map +1 -0
- package/dist/blockchain/structureCheckers/OrganizationMicroblockStructureChecker.d.ts +7 -0
- package/dist/blockchain/structureCheckers/OrganizationMicroblockStructureChecker.d.ts.map +1 -0
- package/dist/blockchain/structureCheckers/ProtocolMicroblockStructureChecker.d.ts +7 -0
- package/dist/blockchain/structureCheckers/ProtocolMicroblockStructureChecker.d.ts.map +1 -0
- package/dist/blockchain/structureCheckers/SectionConstraint.d.ts +9 -0
- package/dist/blockchain/structureCheckers/SectionConstraint.d.ts.map +1 -0
- package/dist/blockchain/structureCheckers/StructureChecker.d.ts +280 -0
- package/dist/blockchain/structureCheckers/StructureChecker.d.ts.map +1 -0
- package/dist/blockchain/structureCheckers/ValidatorNodeMicroblockStructureChecker.d.ts +7 -0
- package/dist/blockchain/structureCheckers/ValidatorNodeMicroblockStructureChecker.d.ts.map +1 -0
- package/dist/blockchain/virtualBlockchains/AccountVb.d.ts +37 -0
- package/dist/blockchain/virtualBlockchains/AccountVb.d.ts.map +1 -0
- package/dist/blockchain/virtualBlockchains/ApplicationLedgerMicroblockBuilder.d.ts +19 -0
- package/dist/blockchain/virtualBlockchains/ApplicationLedgerMicroblockBuilder.d.ts.map +1 -0
- package/dist/blockchain/virtualBlockchains/ApplicationLedgerVb.d.ts +235 -0
- package/dist/blockchain/virtualBlockchains/ApplicationLedgerVb.d.ts.map +1 -0
- package/dist/blockchain/virtualBlockchains/ApplicationVb.d.ts +34 -0
- package/dist/blockchain/virtualBlockchains/ApplicationVb.d.ts.map +1 -0
- package/dist/blockchain/virtualBlockchains/OrganizationVb.d.ts +27 -0
- package/dist/blockchain/virtualBlockchains/OrganizationVb.d.ts.map +1 -0
- package/dist/blockchain/virtualBlockchains/ProtocolVb.d.ts +71 -0
- package/dist/blockchain/virtualBlockchains/ProtocolVb.d.ts.map +1 -0
- package/dist/blockchain/virtualBlockchains/ValidatorNodeVb.d.ts +39 -0
- package/dist/blockchain/virtualBlockchains/ValidatorNodeVb.d.ts.map +1 -0
- package/dist/blockchain/virtualBlockchains/VirtualBlockchain.d.ts +187 -0
- package/dist/blockchain/virtualBlockchains/VirtualBlockchain.d.ts.map +1 -0
- package/dist/blockchain/virtualBlockchains/WalletRequestBasedApplicationLedgerMicroblockBuilder.d.ts +51 -0
- package/dist/blockchain/virtualBlockchains/WalletRequestBasedApplicationLedgerMicroblockBuilder.d.ts.map +1 -0
- package/dist/blockchain/virtualBlockchains/events/OnMicroblockInsertedEventListener.d.ts +6 -0
- package/dist/blockchain/virtualBlockchains/events/OnMicroblockInsertedEventListener.d.ts.map +1 -0
- package/dist/blockchain/virtualBlockchains/fallbacks/IMicroblockSearchFailureFallback.d.ts +17 -0
- package/dist/blockchain/virtualBlockchains/fallbacks/IMicroblockSearchFailureFallback.d.ts.map +1 -0
- package/dist/blockchain/virtualBlockchains/fallbacks/ThrownErrorMicroblockSearchFailureFallback.d.ts +8 -0
- package/dist/blockchain/virtualBlockchains/fallbacks/ThrownErrorMicroblockSearchFailureFallback.d.ts.map +1 -0
- package/dist/blockchainOld/Account.d.ts +2 -0
- package/dist/blockchainOld/Account.d.ts.map +1 -0
- package/dist/blockchainOld/Application.d.ts +2 -0
- package/dist/blockchainOld/Application.d.ts.map +1 -0
- package/dist/blockchainOld/ApplicationLedger.d.ts +2 -0
- package/dist/blockchainOld/ApplicationLedger.d.ts.map +1 -0
- package/dist/blockchainOld/Organization.d.ts +2 -0
- package/dist/blockchainOld/Organization.d.ts.map +1 -0
- package/dist/blockchainOld/Protocol.d.ts +2 -0
- package/dist/blockchainOld/Protocol.d.ts.map +1 -0
- package/dist/blockchainOld/ValidatorNode.d.ts +2 -0
- package/dist/blockchainOld/ValidatorNode.d.ts.map +1 -0
- package/dist/blockchainOld/blockchain.d.ts +2 -0
- package/dist/blockchainOld/blockchain.d.ts.map +1 -0
- package/dist/carmentis-sdk-core.cjs +1 -2
- package/dist/carmentis-sdk-core.es +0 -2
- package/dist/cometbft/CometBFTPublicKey.d.ts +10 -0
- package/dist/cometbft/CometBFTPublicKey.d.ts.map +1 -0
- package/dist/common.d.ts +243 -0
- package/dist/common.d.ts.map +1 -0
- package/dist/constants/ActorType.d.ts +6 -0
- package/dist/constants/ActorType.d.ts.map +1 -0
- package/dist/constants/chain.d.ts +16 -0
- package/dist/constants/chain.d.ts.map +1 -0
- package/dist/constants/constants.d.ts +7 -0
- package/dist/constants/constants.d.ts.map +1 -0
- package/dist/constants/data.d.ts +26 -0
- package/dist/constants/data.d.ts.map +1 -0
- package/dist/constants/economics.d.ts +42 -0
- package/dist/constants/economics.d.ts.map +1 -0
- package/dist/constants/errors.d.ts +2 -0
- package/dist/constants/errors.d.ts.map +1 -0
- package/dist/constants/schemas.d.ts +107 -0
- package/dist/constants/schemas.d.ts.map +1 -0
- package/dist/constants/sections.d.ts +141 -0
- package/dist/constants/sections.d.ts.map +1 -0
- package/dist/crypto/CryptoSchemeFactory.d.ts +46 -0
- package/dist/crypto/CryptoSchemeFactory.d.ts.map +1 -0
- package/dist/crypto/aes.d.ts +8 -0
- package/dist/crypto/aes.d.ts.map +1 -0
- package/dist/crypto/crypto.d.ts +52 -0
- package/dist/crypto/crypto.d.ts.map +1 -0
- package/dist/crypto/encoder/CryptoEncoderFactory.d.ts +15 -0
- package/dist/crypto/encoder/CryptoEncoderFactory.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/BytesSignatureEncoder.d.ts +18 -0
- package/dist/crypto/encoder/signature/BytesSignatureEncoder.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/HandlerBasedSignatureEncoder.d.ts +26 -0
- package/dist/crypto/encoder/signature/HandlerBasedSignatureEncoder.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/ISignatureEncoderHandler.d.ts +15 -0
- package/dist/crypto/encoder/signature/ISignatureEncoderHandler.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/JwkSignatureEncoder.d.ts +25 -0
- package/dist/crypto/encoder/signature/JwkSignatureEncoder.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/SignatureEncoderInterface.d.ts +69 -0
- package/dist/crypto/encoder/signature/SignatureEncoderInterface.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/StringSignatureEncoder.d.ts +2 -0
- package/dist/crypto/encoder/signature/StringSignatureEncoder.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/hcv/BaseHCVSignatureDecoder.d.ts +55 -0
- package/dist/crypto/encoder/signature/hcv/BaseHCVSignatureDecoder.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/hcv/BaseHCVSignatureEncoder.d.ts +47 -0
- package/dist/crypto/encoder/signature/hcv/BaseHCVSignatureEncoder.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/hcv/HCVSignatureEncoder.d.ts +2 -0
- package/dist/crypto/encoder/signature/hcv/HCVSignatureEncoder.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/hcv/MLDSA65HCVSignatureDecoder.d.ts +23 -0
- package/dist/crypto/encoder/signature/hcv/MLDSA65HCVSignatureDecoder.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/hcv/MLDSA65HCVSignatureEncoder.d.ts +37 -0
- package/dist/crypto/encoder/signature/hcv/MLDSA65HCVSignatureEncoder.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/hcv/NativeHCVSignatureDecoder.d.ts +45 -0
- package/dist/crypto/encoder/signature/hcv/NativeHCVSignatureDecoder.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/hcv/NativeHCVSignatureEncoder.d.ts +31 -0
- package/dist/crypto/encoder/signature/hcv/NativeHCVSignatureEncoder.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/hcv/PkmsSecp256k1SignatureDecoder.d.ts +38 -0
- package/dist/crypto/encoder/signature/hcv/PkmsSecp256k1SignatureDecoder.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/hcv/PkmsSecp256k1SignatureEncoder.d.ts +44 -0
- package/dist/crypto/encoder/signature/hcv/PkmsSecp256k1SignatureEncoder.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/hcv/Secp256k1HCVSignatureDecoder.d.ts +10 -0
- package/dist/crypto/encoder/signature/hcv/Secp256k1HCVSignatureDecoder.d.ts.map +1 -0
- package/dist/crypto/encoder/signature/hcv/Secp256k1HCVSignatureEncoder.d.ts +32 -0
- package/dist/crypto/encoder/signature/hcv/Secp256k1HCVSignatureEncoder.d.ts.map +1 -0
- package/dist/crypto/encryption/public-key-encryption/HCVPkeEncoder.d.ts +18 -0
- package/dist/crypto/encryption/public-key-encryption/HCVPkeEncoder.d.ts.map +1 -0
- package/dist/crypto/encryption/public-key-encryption/MlKemCiphertextEncoder.d.ts +13 -0
- package/dist/crypto/encryption/public-key-encryption/MlKemCiphertextEncoder.d.ts.map +1 -0
- package/dist/crypto/encryption/public-key-encryption/MlKemPrivateDecryptionKey.d.ts +24 -0
- package/dist/crypto/encryption/public-key-encryption/MlKemPrivateDecryptionKey.d.ts.map +1 -0
- package/dist/crypto/encryption/public-key-encryption/MlKemPublicEncryptionKey.d.ts +10 -0
- package/dist/crypto/encryption/public-key-encryption/MlKemPublicEncryptionKey.d.ts.map +1 -0
- package/dist/crypto/encryption/public-key-encryption/MlKemPublicKeyEncryptionScheme.d.ts +7 -0
- package/dist/crypto/encryption/public-key-encryption/MlKemPublicKeyEncryptionScheme.d.ts.map +1 -0
- package/dist/crypto/encryption/public-key-encryption/PkeEncoderFactory.d.ts +13 -0
- package/dist/crypto/encryption/public-key-encryption/PkeEncoderFactory.d.ts.map +1 -0
- package/dist/crypto/encryption/public-key-encryption/PkeEncoderInterface.d.ts +13 -0
- package/dist/crypto/encryption/public-key-encryption/PkeEncoderInterface.d.ts.map +1 -0
- package/dist/crypto/encryption/public-key-encryption/PublicKeyEncryptionSchemeId.d.ts +10 -0
- package/dist/crypto/encryption/public-key-encryption/PublicKeyEncryptionSchemeId.d.ts.map +1 -0
- package/dist/crypto/encryption/public-key-encryption/PublicKeyEncryptionSchemeInterface.d.ts +52 -0
- package/dist/crypto/encryption/public-key-encryption/PublicKeyEncryptionSchemeInterface.d.ts.map +1 -0
- package/dist/crypto/encryption/symmetric-encryption/encryption-interface.d.ts +179 -0
- package/dist/crypto/encryption/symmetric-encryption/encryption-interface.d.ts.map +1 -0
- package/dist/crypto/encryption/symmetric-encryption/generic-symmetric-key-encoder.d.ts +25 -0
- package/dist/crypto/encryption/symmetric-encryption/generic-symmetric-key-encoder.d.ts.map +1 -0
- package/dist/crypto/hash/hash-interface.d.ts +12 -0
- package/dist/crypto/hash/hash-interface.d.ts.map +1 -0
- package/dist/crypto/hashes.d.ts +12 -0
- package/dist/crypto/hashes.d.ts.map +1 -0
- package/dist/crypto/kdf/HKDF.d.ts +7 -0
- package/dist/crypto/kdf/HKDF.d.ts.map +1 -0
- package/dist/crypto/kdf/KeyDerivationFunction.d.ts +7 -0
- package/dist/crypto/kdf/KeyDerivationFunction.d.ts.map +1 -0
- package/dist/crypto/kdf/PBKDF2.d.ts +7 -0
- package/dist/crypto/kdf/PBKDF2.d.ts.map +1 -0
- package/dist/crypto/kdf/PasswordBasedKeyDerivationFunction.d.ts +7 -0
- package/dist/crypto/kdf/PasswordBasedKeyDerivationFunction.d.ts.map +1 -0
- package/dist/crypto/kdf/PasswordBasedKeyDerivationFunctionSchemeId.d.ts +5 -0
- package/dist/crypto/kdf/PasswordBasedKeyDerivationFunctionSchemeId.d.ts.map +1 -0
- package/dist/crypto/kdf/Scrypt.d.ts +7 -0
- package/dist/crypto/kdf/Scrypt.d.ts.map +1 -0
- package/dist/crypto/kdf/keyDerivationFunctionSchemeId.d.ts +4 -0
- package/dist/crypto/kdf/keyDerivationFunctionSchemeId.d.ts.map +1 -0
- package/dist/crypto/ml-dsa.d.ts +13 -0
- package/dist/crypto/ml-dsa.d.ts.map +1 -0
- package/dist/crypto/ml-kem.d.ts +16 -0
- package/dist/crypto/ml-kem.d.ts.map +1 -0
- package/dist/crypto/random.d.ts +10 -0
- package/dist/crypto/random.d.ts.map +1 -0
- package/dist/crypto/secp256k1.d.ts +10 -0
- package/dist/crypto/secp256k1.d.ts.map +1 -0
- package/dist/crypto/signature/BasePrivateSignatureKey.d.ts +27 -0
- package/dist/crypto/signature/BasePrivateSignatureKey.d.ts.map +1 -0
- package/dist/crypto/signature/BasePublicSignatureKey.d.ts +24 -0
- package/dist/crypto/signature/BasePublicSignatureKey.d.ts.map +1 -0
- package/dist/crypto/signature/PrivateSignatureKey.d.ts +17 -0
- package/dist/crypto/signature/PrivateSignatureKey.d.ts.map +1 -0
- package/dist/crypto/signature/PublicSignatureKey.d.ts +27 -0
- package/dist/crypto/signature/PublicSignatureKey.d.ts.map +1 -0
- package/dist/crypto/signature/SignatureAlgorithmId.d.ts +8 -0
- package/dist/crypto/signature/SignatureAlgorithmId.d.ts.map +1 -0
- package/dist/crypto/signature/SignatureScheme.d.ts +11 -0
- package/dist/crypto/signature/SignatureScheme.d.ts.map +1 -0
- package/dist/crypto/signature/SignatureSchemeId.d.ts +16 -0
- package/dist/crypto/signature/SignatureSchemeId.d.ts.map +1 -0
- package/dist/crypto/signature/ed25519/Ed25519PrivateSignatureKey.d.ts +38 -0
- package/dist/crypto/signature/ed25519/Ed25519PrivateSignatureKey.d.ts.map +1 -0
- package/dist/crypto/signature/ed25519/Ed25519PublicSignatureKey.d.ts +17 -0
- package/dist/crypto/signature/ed25519/Ed25519PublicSignatureKey.d.ts.map +1 -0
- package/dist/crypto/signature/ed25519/Ed25519SignatureScheme.d.ts +12 -0
- package/dist/crypto/signature/ed25519/Ed25519SignatureScheme.d.ts.map +1 -0
- package/dist/crypto/signature/ml-dsa-65.d.ts +86 -0
- package/dist/crypto/signature/ml-dsa-65.d.ts.map +1 -0
- package/dist/crypto/signature/pkms/PkmsSecp256k1PrivateSignatureKey.d.ts +28 -0
- package/dist/crypto/signature/pkms/PkmsSecp256k1PrivateSignatureKey.d.ts.map +1 -0
- package/dist/crypto/signature/pkms/pkmsCredentialProvider/EnvApiKeyPkmsCredentialProvider.d.ts +5 -0
- package/dist/crypto/signature/pkms/pkmsCredentialProvider/EnvApiKeyPkmsCredentialProvider.d.ts.map +1 -0
- package/dist/crypto/signature/pkms/pkmsCredentialProvider/IPkmsCredentialProvider.d.ts +4 -0
- package/dist/crypto/signature/pkms/pkmsCredentialProvider/IPkmsCredentialProvider.d.ts.map +1 -0
- package/dist/crypto/signature/pkms/pkmsCredentialProvider/SelfProvidedApiKeyPkmsCredentialProvider.d.ts +7 -0
- package/dist/crypto/signature/pkms/pkmsCredentialProvider/SelfProvidedApiKeyPkmsCredentialProvider.d.ts.map +1 -0
- package/dist/crypto/signature/secp256k1/Secp256k1PrivateSignatureKey.d.ts +38 -0
- package/dist/crypto/signature/secp256k1/Secp256k1PrivateSignatureKey.d.ts.map +1 -0
- package/dist/crypto/signature/secp256k1/Secp256k1PublicSignatureKey.d.ts +17 -0
- package/dist/crypto/signature/secp256k1/Secp256k1PublicSignatureKey.d.ts.map +1 -0
- package/dist/crypto/signature/secp256k1/Secp256k1SignatureScheme.d.ts +12 -0
- package/dist/crypto/signature/secp256k1/Secp256k1SignatureScheme.d.ts.map +1 -0
- package/dist/crypto/signatureCache/SignatureCacheDisabled.d.ts +9 -0
- package/dist/crypto/signatureCache/SignatureCacheDisabled.d.ts.map +1 -0
- package/dist/crypto/signatureCache/SignatureCacheEntry.d.ts +6 -0
- package/dist/crypto/signatureCache/SignatureCacheEntry.d.ts.map +1 -0
- package/dist/crypto/signatureCache/SignatureCacheInterface.d.ts +7 -0
- package/dist/crypto/signatureCache/SignatureCacheInterface.d.ts.map +1 -0
- package/dist/crypto/signatureCache/SignatureCacheMonothread.d.ts +10 -0
- package/dist/crypto/signatureCache/SignatureCacheMonothread.d.ts.map +1 -0
- package/dist/crypto/signatureCache/test.d.ts +2 -0
- package/dist/crypto/signatureCache/test.d.ts.map +1 -0
- package/dist/data/base32.d.ts +15 -0
- package/dist/data/base32.d.ts.map +1 -0
- package/dist/data/base64.d.ts +14 -0
- package/dist/data/base64.d.ts.map +1 -0
- package/dist/data/byteStreams.d.ts +48 -0
- package/dist/data/byteStreams.d.ts.map +1 -0
- package/dist/data/messageSerializer.d.ts +32 -0
- package/dist/data/messageSerializer.d.ts.map +1 -0
- package/dist/data/schemaSerializer.d.ts +44 -0
- package/dist/data/schemaSerializer.d.ts.map +1 -0
- package/dist/data/schemaValidator.d.ts +27 -0
- package/dist/data/schemaValidator.d.ts.map +1 -0
- package/dist/data/types.d.ts +23 -0
- package/dist/data/types.d.ts.map +1 -0
- package/dist/data/utf8Encoder.d.ts +8 -0
- package/dist/data/utf8Encoder.d.ts.map +1 -0
- package/dist/economics/currencies/currency-converter.d.ts +51 -0
- package/dist/economics/currencies/currency-converter.d.ts.map +1 -0
- package/dist/economics/currencies/currency.d.ts +4 -0
- package/dist/economics/currencies/currency.d.ts.map +1 -0
- package/dist/economics/currencies/euros.d.ts +9 -0
- package/dist/economics/currencies/euros.d.ts.map +1 -0
- package/dist/economics/currencies/token.d.ts +167 -0
- package/dist/economics/currencies/token.d.ts.map +1 -0
- package/dist/economics/economics.d.ts +10 -0
- package/dist/economics/economics.d.ts.map +1 -0
- package/dist/entities/Hash.d.ts +60 -0
- package/dist/entities/Hash.d.ts.map +1 -0
- package/dist/entities/Optional.d.ts +14 -0
- package/dist/entities/Optional.d.ts.map +1 -0
- package/dist/entities/ProofVerificationResult.d.ts +48 -0
- package/dist/entities/ProofVerificationResult.d.ts.map +1 -0
- package/dist/errors/CometBFTErrorCode.d.ts +13 -0
- package/dist/errors/CometBFTErrorCode.d.ts.map +1 -0
- package/dist/errors/carmentis-error.d.ts +175 -0
- package/dist/errors/carmentis-error.d.ts.map +1 -0
- package/dist/errors/type-checking-failure-error.d.ts +5 -0
- package/dist/errors/type-checking-failure-error.d.ts.map +1 -0
- package/dist/network/network.d.ts +2 -0
- package/dist/network/network.d.ts.map +1 -0
- package/dist/providers/AbstractProvider.d.ts +43 -0
- package/dist/providers/AbstractProvider.d.ts.map +1 -0
- package/dist/providers/ExpirationDate.d.ts +11 -0
- package/dist/providers/ExpirationDate.d.ts.map +1 -0
- package/dist/providers/IExternalProvider.d.ts +23 -0
- package/dist/providers/IExternalProvider.d.ts.map +1 -0
- package/dist/providers/IInternalProvider.d.ts +20 -0
- package/dist/providers/IInternalProvider.d.ts.map +1 -0
- package/dist/providers/IProvider.d.ts +56 -0
- package/dist/providers/IProvider.d.ts.map +1 -0
- package/dist/providers/KeyedProvider.d.ts +2 -0
- package/dist/providers/KeyedProvider.d.ts.map +1 -0
- package/dist/providers/MemoryProvider.d.ts +45 -0
- package/dist/providers/MemoryProvider.d.ts.map +1 -0
- package/dist/providers/NetworkProvider.d.ts +145 -0
- package/dist/providers/NetworkProvider.d.ts.map +1 -0
- package/dist/providers/NullMemoryProvider.d.ts +31 -0
- package/dist/providers/NullMemoryProvider.d.ts.map +1 -0
- package/dist/providers/NullNetworkProvider.d.ts +28 -0
- package/dist/providers/NullNetworkProvider.d.ts.map +1 -0
- package/dist/providers/Provider.d.ts +84 -0
- package/dist/providers/Provider.d.ts.map +1 -0
- package/dist/providers/ProviderFactory.d.ts +24 -0
- package/dist/providers/ProviderFactory.d.ts.map +1 -0
- package/dist/providers/nodeRpc/CometBFTNodeWebSocket.d.ts +14 -0
- package/dist/providers/nodeRpc/CometBFTNodeWebSocket.d.ts.map +1 -0
- package/dist/providers/nodeRpc/NewBlockEventType.d.ts +79 -0
- package/dist/providers/nodeRpc/NewBlockEventType.d.ts.map +1 -0
- package/dist/providers/nodeRpc/RPCNodeStatusResponseSchema.d.ts +45 -0
- package/dist/providers/nodeRpc/RPCNodeStatusResponseSchema.d.ts.map +1 -0
- package/dist/providers/nodeRpc/RPCNodeWebSocketCallback.d.ts +5 -0
- package/dist/providers/nodeRpc/RPCNodeWebSocketCallback.d.ts.map +1 -0
- package/dist/providers/serverNetworkProvider.d.ts +5 -0
- package/dist/providers/serverNetworkProvider.d.ts.map +1 -0
- package/dist/records/MerkleLeaf.d.ts +27 -0
- package/dist/records/MerkleLeaf.d.ts.map +1 -0
- package/dist/records/MerkleRecord.d.ts +20 -0
- package/dist/records/MerkleRecord.d.ts.map +1 -0
- package/dist/records/OnChainRecord.d.ts +20 -0
- package/dist/records/OnChainRecord.d.ts.map +1 -0
- package/dist/records/PositionedLeaf.d.ts +8 -0
- package/dist/records/PositionedLeaf.d.ts.map +1 -0
- package/dist/records/ProofDocument.d.ts +74 -0
- package/dist/records/ProofDocument.d.ts.map +1 -0
- package/dist/records/ProofDocumentVB.d.ts +14 -0
- package/dist/records/ProofDocumentVB.d.ts.map +1 -0
- package/dist/records/ProofRecord.d.ts +26 -0
- package/dist/records/ProofRecord.d.ts.map +1 -0
- package/dist/records/Record.d.ts +49 -0
- package/dist/records/Record.d.ts.map +1 -0
- package/dist/records/RecordByChannels.d.ts +14 -0
- package/dist/records/RecordByChannels.d.ts.map +1 -0
- package/dist/records/SaltShaker.d.ts +11 -0
- package/dist/records/SaltShaker.d.ts.map +1 -0
- package/dist/records/types.d.ts +615 -0
- package/dist/records/types.d.ts.map +1 -0
- package/dist/records-old/Merklizer.d.ts +12 -0
- package/dist/records-old/Merklizer.d.ts.map +1 -0
- package/dist/records-old/PepperMerklizer.d.ts +20 -0
- package/dist/records-old/PepperMerklizer.d.ts.map +1 -0
- package/dist/records-old/SaltMerklizer.d.ts +15 -0
- package/dist/records-old/SaltMerklizer.d.ts.map +1 -0
- package/dist/records-old/intermediateRepresentation.d.ts +176 -0
- package/dist/records-old/intermediateRepresentation.d.ts.map +1 -0
- package/dist/records-old/maskManager.d.ts +15 -0
- package/dist/records-old/maskManager.d.ts.map +1 -0
- package/dist/records-old/messageManager.d.ts +8 -0
- package/dist/records-old/messageManager.d.ts.map +1 -0
- package/dist/records-old/pathManager.d.ts +17 -0
- package/dist/records-old/pathManager.d.ts.map +1 -0
- package/dist/trees/merkleTree.d.ts +18 -0
- package/dist/trees/merkleTree.d.ts.map +1 -0
- package/dist/trees/radixChecker.d.ts +6 -0
- package/dist/trees/radixChecker.d.ts.map +1 -0
- package/dist/trees/radixConstants.d.ts +6 -0
- package/dist/trees/radixConstants.d.ts.map +1 -0
- package/dist/trees/radixUtils.d.ts +14 -0
- package/dist/trees/radixUtils.d.ts.map +1 -0
- package/dist/type/AccountHistoryView.d.ts +41 -0
- package/dist/type/AccountHistoryView.d.ts.map +1 -0
- package/dist/type/AppLedgerStateUpdateRequest.d.ts +83 -0
- package/dist/type/AppLedgerStateUpdateRequest.d.ts.map +1 -0
- package/dist/type/Height.d.ts +12 -0
- package/dist/type/Height.d.ts.map +1 -0
- package/dist/type/Transaction.d.ts +85 -0
- package/dist/type/Transaction.d.ts.map +1 -0
- package/dist/type/VirtualBlockchainLabel.d.ts +5 -0
- package/dist/type/VirtualBlockchainLabel.d.ts.map +1 -0
- package/dist/type/VirtualBlockchainType.d.ts +9 -0
- package/dist/type/VirtualBlockchainType.d.ts.map +1 -0
- package/dist/type/types.d.ts +45 -0
- package/dist/type/types.d.ts.map +1 -0
- package/dist/type/valibot/account/Account.d.ts +632 -0
- package/dist/type/valibot/account/Account.d.ts.map +1 -0
- package/dist/type/valibot/blockchain/economics/RetentionPolicy.d.ts +20 -0
- package/dist/type/valibot/blockchain/economics/RetentionPolicy.d.ts.map +1 -0
- package/dist/type/valibot/blockchain/microblock/MicroblockBody.d.ts +567 -0
- package/dist/type/valibot/blockchain/microblock/MicroblockBody.d.ts.map +1 -0
- package/dist/type/valibot/blockchain/microblock/MicroblockHeader.d.ts +75 -0
- package/dist/type/valibot/blockchain/microblock/MicroblockHeader.d.ts.map +1 -0
- package/dist/type/valibot/blockchain/microblock/MicroblockStruct.d.ts +608 -0
- package/dist/type/valibot/blockchain/microblock/MicroblockStruct.d.ts.map +1 -0
- package/dist/type/valibot/blockchain/protocol/ProtocolUpdate.d.ts +30 -0
- package/dist/type/valibot/blockchain/protocol/ProtocolUpdate.d.ts.map +1 -0
- package/dist/type/valibot/blockchain/protocol/ProtocolVariables.d.ts +25 -0
- package/dist/type/valibot/blockchain/protocol/ProtocolVariables.d.ts.map +1 -0
- package/dist/type/valibot/blockchain/section/SectionType.d.ts +40 -0
- package/dist/type/valibot/blockchain/section/SectionType.d.ts.map +1 -0
- package/dist/type/valibot/blockchain/section/sections.d.ts +1201 -0
- package/dist/type/valibot/blockchain/section/sections.d.ts.map +1 -0
- package/dist/type/valibot/blockchain/virtualBlockchain/internalStates.d.ts +251 -0
- package/dist/type/valibot/blockchain/virtualBlockchain/internalStates.d.ts.map +1 -0
- package/dist/type/valibot/blockchain/virtualBlockchain/virtualBlockchains.d.ts +605 -0
- package/dist/type/valibot/blockchain/virtualBlockchain/virtualBlockchains.d.ts.map +1 -0
- package/dist/type/valibot/clientBridge/ClientBridgeEncoder.d.ts +9 -0
- package/dist/type/valibot/clientBridge/ClientBridgeEncoder.d.ts.map +1 -0
- package/dist/type/valibot/clientBridge/WiQrCodeEncoder.d.ts +6 -0
- package/dist/type/valibot/clientBridge/WiQrCodeEncoder.d.ts.map +1 -0
- package/dist/type/valibot/clientBridge/clientBridgeMessages.d.ts +215 -0
- package/dist/type/valibot/clientBridge/clientBridgeMessages.d.ts.map +1 -0
- package/dist/type/valibot/network/NetworksSchema.d.ts +14 -0
- package/dist/type/valibot/network/NetworksSchema.d.ts.map +1 -0
- package/dist/type/valibot/primitives.d.ts +105 -0
- package/dist/type/valibot/primitives.d.ts.map +1 -0
- package/dist/type/valibot/provider/MicroblockInformationSchema.d.ts +55 -0
- package/dist/type/valibot/provider/MicroblockInformationSchema.d.ts.map +1 -0
- package/dist/type/valibot/provider/VirtualBlockchainInfo.d.ts +16 -0
- package/dist/type/valibot/provider/VirtualBlockchainInfo.d.ts.map +1 -0
- package/dist/type/valibot/provider/VirtualBlockchainStatus.d.ts +301 -0
- package/dist/type/valibot/provider/VirtualBlockchainStatus.d.ts.map +1 -0
- package/dist/type/valibot/provider/abci/AbciRequest.d.ts +421 -0
- package/dist/type/valibot/provider/abci/AbciRequest.d.ts.map +1 -0
- package/dist/type/valibot/provider/abci/AbciResponse.d.ts +2884 -0
- package/dist/type/valibot/provider/abci/AbciResponse.d.ts.map +1 -0
- package/dist/type/valibot/walletOperatorMessages/Schemas.d.ts +83 -0
- package/dist/type/valibot/walletOperatorMessages/Schemas.d.ts.map +1 -0
- package/dist/type/valibot/walletRequest/WalletRequestEncoder.d.ts +12 -0
- package/dist/type/valibot/walletRequest/WalletRequestEncoder.d.ts.map +1 -0
- package/dist/type/valibot/walletRequest/walletRequests.d.ts +54 -0
- package/dist/type/valibot/walletRequest/walletRequests.d.ts.map +1 -0
- package/dist/utils/AbciQueryEncoder.d.ts +9 -0
- package/dist/utils/AbciQueryEncoder.d.ts.map +1 -0
- package/dist/utils/AccountSeedEncoder.d.ts +5 -0
- package/dist/utils/AccountSeedEncoder.d.ts.map +1 -0
- package/dist/utils/AccountTransactions.d.ts +94 -0
- package/dist/utils/AccountTransactions.d.ts.map +1 -0
- package/dist/utils/ActorSeedEncoder.d.ts +5 -0
- package/dist/utils/ActorSeedEncoder.d.ts.map +1 -0
- package/dist/utils/Assertion.d.ts +4 -0
- package/dist/utils/Assertion.d.ts.map +1 -0
- package/dist/utils/BalanceAvailability.d.ts +207 -0
- package/dist/utils/BalanceAvailability.d.ts.map +1 -0
- package/dist/utils/BinaryToStringEncoderInterface.d.ts +4 -0
- package/dist/utils/BinaryToStringEncoderInterface.d.ts.map +1 -0
- package/dist/utils/BlockchainUtils.d.ts +69 -0
- package/dist/utils/BlockchainUtils.d.ts.map +1 -0
- package/dist/utils/CometBFTPublicKeyConverter.d.ts +4 -0
- package/dist/utils/CometBFTPublicKeyConverter.d.ts.map +1 -0
- package/dist/utils/HCVCodec.d.ts +52 -0
- package/dist/utils/HCVCodec.d.ts.map +1 -0
- package/dist/utils/Logger.d.ts +14 -0
- package/dist/utils/Logger.d.ts.map +1 -0
- package/dist/utils/SectionLabel.d.ts +22 -0
- package/dist/utils/SectionLabel.d.ts.map +1 -0
- package/dist/utils/SeedEncoder.d.ts +9 -0
- package/dist/utils/SeedEncoder.d.ts.map +1 -0
- package/dist/utils/WalletInteractiveAnchoringEncoder.d.ts +13 -0
- package/dist/utils/WalletInteractiveAnchoringEncoder.d.ts.map +1 -0
- package/dist/utils/WalletSeedEncoder.d.ts +5 -0
- package/dist/utils/WalletSeedEncoder.d.ts.map +1 -0
- package/dist/utils/encoder.d.ts +117 -0
- package/dist/utils/encoder.d.ts.map +1 -0
- package/dist/utils/utils.d.ts +114 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/wallet/AccountCrypto.d.ts +28 -0
- package/dist/wallet/AccountCrypto.d.ts.map +1 -0
- package/dist/wallet/ActorCrypto.d.ts +18 -0
- package/dist/wallet/ActorCrypto.d.ts.map +1 -0
- package/dist/wallet/ICryptoKeyHandler.d.ts +13 -0
- package/dist/wallet/ICryptoKeyHandler.d.ts.map +1 -0
- package/dist/wallet/WalletCrypto.d.ts +73 -0
- package/dist/wallet/WalletCrypto.d.ts.map +1 -0
- package/package.json +2 -3
- package/dist/carmentis-sdk-core.cjs.map +0 -1
- package/dist/carmentis-sdk-core.d.ts +0 -16204
- package/dist/carmentis-sdk-core.es.map +0 -1
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
export interface SymmetricEncryptionKeyScheme {
|
|
2
|
+
getSymmetricEncryptionSchemeId(): number;
|
|
3
|
+
getSupportedKeyLengths(): number[];
|
|
4
|
+
getDefaultKeyLength(): number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Represents a symmetric encryption key capable of performing encryption and decryption
|
|
8
|
+
* operations, as well as providing the associated encryption algorithm identifier and raw key.
|
|
9
|
+
*/
|
|
10
|
+
export interface SymmetricEncryptionKey {
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves the unique identifier of the encryption algorithm being used.
|
|
13
|
+
*
|
|
14
|
+
* @return {number} The unique algorithm identifier as a numeric value.
|
|
15
|
+
*/
|
|
16
|
+
getSymmetricEncryptionSchemeId(): number;
|
|
17
|
+
/**
|
|
18
|
+
* Encrypts the given plaintext using a predefined encryption algorithm.
|
|
19
|
+
*
|
|
20
|
+
* @param {Uint8Array} plaintext - The plaintext data to be encrypted.
|
|
21
|
+
* @return {Promise<Uint8Array>} The encrypted data as a Uint8Array.
|
|
22
|
+
*/
|
|
23
|
+
encrypt(plaintext: Uint8Array): Promise<Uint8Array>;
|
|
24
|
+
/**
|
|
25
|
+
* Decrypts the given ciphertext and returns the resulting plaintext.
|
|
26
|
+
*
|
|
27
|
+
* @param {Uint8Array} ciphertext - The encrypted data to be decrypted.
|
|
28
|
+
* @return {Promise<Uint8Array>} The decrypted plaintext as a Uint8Array.
|
|
29
|
+
*/
|
|
30
|
+
decrypt(ciphertext: Uint8Array): Promise<Uint8Array>;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves the raw secret key as a Uint8Array.
|
|
33
|
+
*
|
|
34
|
+
* @return {Uint8Array} The raw secret key in binary format.
|
|
35
|
+
*/
|
|
36
|
+
getRawSecretKey(): Uint8Array;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Enumeration representing identifiers for symmetric encryption algorithms.
|
|
40
|
+
*
|
|
41
|
+
* This enum is used to specify the symmetric encryption algorithm to be utilized,
|
|
42
|
+
* enabling cryptographic operations such as encryption and decryption with specific
|
|
43
|
+
* algorithmic requirements. It currently supports the following algorithm:
|
|
44
|
+
*
|
|
45
|
+
* - AES-256-GCM: Advanced Encryption Standard with a 256-bit key in Galois/Counter Mode.
|
|
46
|
+
*
|
|
47
|
+
* The identifiers in this enum can be utilized to indicate the intended algorithm
|
|
48
|
+
* within encryption workflows or cryptographic libraries requiring algorithm specification.
|
|
49
|
+
*/
|
|
50
|
+
export declare enum SymmetricEncryptionSchemeId {
|
|
51
|
+
AES_256_GCM = 0
|
|
52
|
+
}
|
|
53
|
+
export declare class AES256GCMSymmetricEncryptionScheme implements SymmetricEncryptionKeyScheme {
|
|
54
|
+
private static KEY_LENGTH_IN_BYTES;
|
|
55
|
+
getSymmetricEncryptionSchemeId(): number;
|
|
56
|
+
getSupportedKeyLengths(): number[];
|
|
57
|
+
getDefaultKeyLength(): number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* This class provides methods for creating, managing, and utilizing a symmetric encryption key specifically
|
|
61
|
+
* designed for AES-256-GCM encryption. It implements the `SymmetricEncryptionKey` interface, enabling compatibility
|
|
62
|
+
* with other cryptographic operations requiring symmetric key encryption.
|
|
63
|
+
*
|
|
64
|
+
* AES-256-GCM (Advanced Encryption Standard with 256-bit keys in Galois/Counter Mode) ensures high-level cryptographic
|
|
65
|
+
* security with authenticated encryption, combining data confidentiality with integrity protection.
|
|
66
|
+
*/
|
|
67
|
+
export declare class AES256GCMSymmetricEncryptionKey implements SymmetricEncryptionKey {
|
|
68
|
+
private key;
|
|
69
|
+
constructor(key: Uint8Array);
|
|
70
|
+
/**
|
|
71
|
+
* Generates a new AES-256-GCM symmetric encryption key.
|
|
72
|
+
*
|
|
73
|
+
* @return {AES256GCMSymmetricEncryptionKey} An instance of AES256GCMSymmetricEncryptionKey containing a randomly generated 256-bit encryption key.
|
|
74
|
+
*/
|
|
75
|
+
static generate(): Promise<AES256GCMSymmetricEncryptionKey>;
|
|
76
|
+
/**
|
|
77
|
+
* Creates an instance of AES256GCMSymmetricEncryptionKey from the given byte array.
|
|
78
|
+
*
|
|
79
|
+
* @param {Uint8Array} keyBytes - The byte array representing the encryption key.
|
|
80
|
+
* @return {AES256GCMSymmetricEncryptionKey} A new instance of AES256GCMSymmetricEncryptionKey initialized with the provided key bytes.
|
|
81
|
+
*/
|
|
82
|
+
static createFromBytes(keyBytes: Uint8Array): AES256GCMSymmetricEncryptionKey;
|
|
83
|
+
/**
|
|
84
|
+
* Retrieves the raw secret key as a Uint8Array.
|
|
85
|
+
* This method provides access to the underlying key data stored in this instance.
|
|
86
|
+
*
|
|
87
|
+
* @return {Uint8Array} The raw secret key.
|
|
88
|
+
*/
|
|
89
|
+
getRawSecretKey(): Uint8Array;
|
|
90
|
+
/**
|
|
91
|
+
* Retrieves the identifier of the encryption algorithm being used.
|
|
92
|
+
*
|
|
93
|
+
* @return {number} The numerical ID corresponding to the encryption algorithm.
|
|
94
|
+
*/
|
|
95
|
+
getSymmetricEncryptionSchemeId(): number;
|
|
96
|
+
/**
|
|
97
|
+
* Encrypts the given plaintext using AES-GCM encryption.
|
|
98
|
+
* A random initialization vector (IV) is generated for each encryption operation.
|
|
99
|
+
* The result is a concatenation of the IV and the encrypted ciphertext.
|
|
100
|
+
*
|
|
101
|
+
* @param {Uint8Array} plaintext - The plaintext data to be encrypted.
|
|
102
|
+
* @return {Uint8Array} A Uint8Array containing the IV followed by the encrypted ciphertext.
|
|
103
|
+
*/
|
|
104
|
+
encrypt(plaintext: Uint8Array): Promise<Uint8Array>;
|
|
105
|
+
/**
|
|
106
|
+
* Decrypts the provided ciphertext using the GCM block cipher mode with the instance's key.
|
|
107
|
+
*
|
|
108
|
+
* @param {Uint8Array} ciphertext - The encrypted data to be decrypted. The first 12 bytes are assumed to be the initialization vector (IV), and the rest is the encrypted content.
|
|
109
|
+
* @return {Uint8Array} The decrypted plaintext as a Uint8Array.
|
|
110
|
+
*/
|
|
111
|
+
decrypt(ciphertext: Uint8Array): Promise<Uint8Array>;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* A class that extends the functionality of a symmetric encryption key.
|
|
115
|
+
* This class enables encryption and decryption of strings,
|
|
116
|
+
* while delegating the underlying encryption and decryption operations to a wrapped key.
|
|
117
|
+
*/
|
|
118
|
+
export declare class ExtendedSymmetricEncryptionKey implements SymmetricEncryptionKey {
|
|
119
|
+
private wrappedKey;
|
|
120
|
+
constructor(wrappedKey: SymmetricEncryptionKey);
|
|
121
|
+
/**
|
|
122
|
+
* Encrypts a given plaintext string and returns the encrypted data as a Base64-encoded string.
|
|
123
|
+
*
|
|
124
|
+
* @param {string} plaintext - The plain text string to be encrypted.
|
|
125
|
+
* @return {string} The Base64-encoded string representation of the encrypted data.
|
|
126
|
+
*/
|
|
127
|
+
encryptString(plaintext: string): Promise<string>;
|
|
128
|
+
/**
|
|
129
|
+
* Decrypts a given string that is encoded in Base64 format.
|
|
130
|
+
*
|
|
131
|
+
* @param ciphertext The Base64 encoded string to be decrypted.
|
|
132
|
+
* @return The decrypted string.
|
|
133
|
+
*/
|
|
134
|
+
decryptString(ciphertext: string): Promise<string>;
|
|
135
|
+
/**
|
|
136
|
+
* Retrieves the identifier of the encryption algorithm used.
|
|
137
|
+
*
|
|
138
|
+
* @return {number} The identifier of the encryption algorithm.
|
|
139
|
+
*/
|
|
140
|
+
getSymmetricEncryptionSchemeId(): number;
|
|
141
|
+
/**
|
|
142
|
+
* Encrypts the given plaintext using the wrapped key.
|
|
143
|
+
*
|
|
144
|
+
* @param {Uint8Array} plaintext - The data to be encrypted.
|
|
145
|
+
* @return {Uint8Array} The encrypted ciphertext as a Uint8Array.
|
|
146
|
+
*/
|
|
147
|
+
encrypt(plaintext: Uint8Array): Promise<Uint8Array>;
|
|
148
|
+
/**
|
|
149
|
+
* Decrypts the provided ciphertext using the wrapped key.
|
|
150
|
+
*
|
|
151
|
+
* @param {Uint8Array} ciphertext - The ciphertext to be decrypted.
|
|
152
|
+
* @return {Uint8Array} The decrypted plaintext as a Uint8Array.
|
|
153
|
+
*/
|
|
154
|
+
decrypt(ciphertext: Uint8Array): Promise<Uint8Array>;
|
|
155
|
+
/**
|
|
156
|
+
* Retrieves the raw secret key from the wrapped key.
|
|
157
|
+
*
|
|
158
|
+
* @return {Uint8Array} The raw secret key as a Uint8Array.
|
|
159
|
+
*/
|
|
160
|
+
getRawSecretKey(): Uint8Array;
|
|
161
|
+
}
|
|
162
|
+
export interface DecapsulationKey {
|
|
163
|
+
decapsulate(ct: string): SymmetricEncryptionKey;
|
|
164
|
+
getEncapsulationKey(): EncapsulationKey;
|
|
165
|
+
}
|
|
166
|
+
export interface EncapsulationKey {
|
|
167
|
+
encapsulate(): {
|
|
168
|
+
key: SymmetricEncryptionKey;
|
|
169
|
+
ct: string;
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
export interface EncapsulationKeyEncoder<T> {
|
|
173
|
+
encode(key: T): string;
|
|
174
|
+
decode(key: string): T;
|
|
175
|
+
}
|
|
176
|
+
export declare enum KeyExchangeSchemeId {
|
|
177
|
+
ML_KEM = 0
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=encryption-interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encryption-interface.d.ts","sourceRoot":"","sources":["../../../../src/crypto/encryption/symmetric-encryption/encryption-interface.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,4BAA4B;IACzC,8BAA8B,IAAI,MAAM,CAAC;IACzC,sBAAsB,IAAI,MAAM,EAAE,CAAC;IACnC,mBAAmB,IAAI,MAAM,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACnC;;;;OAIG;IACH,8BAA8B,IAAI,MAAM,CAAC;IAEzC;;;;;OAKG;IACH,OAAO,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACpD;;;;;OAKG;IACH,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACrD;;;;OAIG;IACH,eAAe,IAAI,UAAU,CAAC;CACjC;AAGD;;;;;;;;;;;GAWG;AACH,oBAAY,2BAA2B;IACnC,WAAW,IAAA;CACd;AAED,qBAAa,kCAAmC,YAAW,4BAA4B;IACnF,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAM;IAExC,8BAA8B,IAAI,MAAM;IAIxC,sBAAsB,IAAI,MAAM,EAAE;IAIlC,mBAAmB,IAAI,MAAM;CAGhC;AAED;;;;;;;GAOG;AACH,qBAAa,+BAAgC,YAAW,sBAAsB;IAC9D,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,UAAU;IAEnC;;;;OAIG;WACiB,QAAQ,IAAI,OAAO,CAAC,+BAA+B,CAAC;IAMxE;;;;;OAKG;WACW,eAAe,CAAC,QAAQ,EAAE,UAAU,GAAG,+BAA+B;IAIpF;;;;;OAKG;IACH,eAAe,IAAI,UAAU;IAI7B;;;;OAIG;IACH,8BAA8B,IAAI,MAAM;IAIxC;;;;;;;OAOG;IACG,OAAO,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAWzD;;;;;OAKG;IACG,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;CAc7D;AAGD;;;;GAIG;AACH,qBAAa,8BAA+B,YAAW,sBAAsB;IAC7D,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,sBAAsB;IAGtD;;;;;OAKG;IACU,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAO9D;;;;;OAKG;IACU,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAO/D;;;;OAIG;IACH,8BAA8B,IAAI,MAAM;IAIxC;;;;;OAKG;IACG,OAAO,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAIzD;;;;;OAKG;IACG,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAI1D;;;;OAIG;IACH,eAAe,IAAI,UAAU;CAGhC;AAED,MAAM,WAAW,gBAAgB;IAC7B,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,sBAAsB,CAAC;IAChD,mBAAmB,IAAI,gBAAgB,CAAC;CAC3C;AAED,MAAM,WAAW,gBAAgB;IAC7B,WAAW,IAAI;QAAE,GAAG,EAAE,sBAAsB,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9D;AAED,MAAM,WAAW,uBAAuB,CAAC,CAAC;IACtC,MAAM,CAAE,GAAG,EAAE,CAAC,GAAI,MAAM,CAAC;IACzB,MAAM,CAAE,GAAG,EAAE,MAAM,GAAI,CAAC,CAAC;CAC5B;AAED,oBAAY,mBAAmB;IAC3B,MAAM,IAAA;CACT"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SymmetricEncryptionKey } from './encryption-interface';
|
|
2
|
+
/**
|
|
3
|
+
* A class responsible for encoding and decoding symmetric encryption keys.
|
|
4
|
+
* It provides functionalities to serialize and deserialize symmetric encryption keys to and from a Uint8Array.
|
|
5
|
+
*/
|
|
6
|
+
export declare class GenericSymmetricKeyEncoder {
|
|
7
|
+
/**
|
|
8
|
+
* Encodes a given symmetric encryption key as a Uint8Array.
|
|
9
|
+
*
|
|
10
|
+
* @param {SymmetricEncryptionKey} key - The symmetric encryption key to encode.
|
|
11
|
+
* It must provide methods to retrieve the encryption scheme ID
|
|
12
|
+
* and the raw secret key as a hexadecimal string.
|
|
13
|
+
* @return {Uint8Array} The encoded representation of the symmetric encryption key in Uint8Array format.
|
|
14
|
+
*/
|
|
15
|
+
encodeAsUint8Array(key: SymmetricEncryptionKey): Uint8Array;
|
|
16
|
+
/**
|
|
17
|
+
* Decodes a Uint8Array into a SymmetricEncryptionKey object.
|
|
18
|
+
*
|
|
19
|
+
* @param {Uint8Array} key - The Uint8Array containing the encoded symmetric encryption key.
|
|
20
|
+
* @return {SymmetricEncryptionKey} Returns the decoded symmetric encryption key object.
|
|
21
|
+
* @throws {Error} Throws an error if the input format is invalid or does not meet the expected structure.
|
|
22
|
+
*/
|
|
23
|
+
decodeFromUint8Array(key: Uint8Array): SymmetricEncryptionKey;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=generic-symmetric-key-encoder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generic-symmetric-key-encoder.d.ts","sourceRoot":"","sources":["../../../../src/crypto/encryption/symmetric-encryption/generic-symmetric-key-encoder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,sBAAsB,EAAC,MAAM,wBAAwB,CAAC;AAG9D;;;GAGG;AACH,qBAAa,0BAA0B;IAEnC;;;;;;;OAOG;IACH,kBAAkB,CAAC,GAAG,EAAE,sBAAsB,GAAG,UAAU;IAO3D;;;;;;OAMG;IACH,oBAAoB,CAAC,GAAG,EAAE,UAAU,GAAG,sBAAsB;CAUhE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface CryptographicHash {
|
|
2
|
+
getHashSchemeId(): CryptographicHashSchemeId;
|
|
3
|
+
hash(data: Uint8Array): Uint8Array;
|
|
4
|
+
}
|
|
5
|
+
export declare enum CryptographicHashSchemeId {
|
|
6
|
+
SHA256 = 0
|
|
7
|
+
}
|
|
8
|
+
export declare class Sha256CryptographicHash implements CryptographicHash {
|
|
9
|
+
getHashSchemeId(): CryptographicHashSchemeId;
|
|
10
|
+
hash(data: Uint8Array): Uint8Array;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=hash-interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash-interface.d.ts","sourceRoot":"","sources":["../../../src/crypto/hash/hash-interface.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,iBAAiB;IAC9B,eAAe,IAAI,yBAAyB,CAAC;IAC7C,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;CACtC;AAED,oBAAY,yBAAyB;IACjC,MAAM,IAAA;CACT;AAED,qBAAa,uBAAwB,YAAW,iBAAiB;IAC7D,eAAe,IAAI,yBAAyB;IAI5C,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU;CAGrC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const Hashes: {
|
|
2
|
+
sha256AsBinary: typeof sha256AsBinary;
|
|
3
|
+
sha256: typeof sha256;
|
|
4
|
+
sha512AsBinary: typeof sha512AsBinary;
|
|
5
|
+
sha512: typeof sha512;
|
|
6
|
+
};
|
|
7
|
+
declare function sha256AsBinary(data: Uint8Array): Uint8Array;
|
|
8
|
+
declare function sha256(data: Uint8Array): string;
|
|
9
|
+
declare function sha512AsBinary(data: any): Uint8Array<ArrayBufferLike>;
|
|
10
|
+
declare function sha512(data: any): string;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=hashes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashes.d.ts","sourceRoot":"","sources":["../../src/crypto/hashes.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,MAAM;;;;;CAKlB,CAAC;AAEF,iBAAS,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,CAQpD;AAED,iBAAS,MAAM,CAAC,IAAI,EAAE,UAAU,UAE/B;AAED,iBAAS,cAAc,CAAC,IAAI,EAAE,GAAG,+BAMhC;AAED,iBAAS,MAAM,CAAC,IAAI,EAAE,GAAG,UAExB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { KeyDerivationFunction } from './KeyDerivationFunction';
|
|
2
|
+
import { KeyDerivationFunctionSchemeId } from './keyDerivationFunctionSchemeId';
|
|
3
|
+
export declare class HKDF extends KeyDerivationFunction {
|
|
4
|
+
getKeyDerivationFunctionSchemeId(): KeyDerivationFunctionSchemeId;
|
|
5
|
+
deriveKey(inputKeyingMaterial: Uint8Array, salt: Uint8Array, info: Uint8Array, keyLength: number): Uint8Array;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=HKDF.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HKDF.d.ts","sourceRoot":"","sources":["../../../src/crypto/kdf/HKDF.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,6BAA6B,EAAC,MAAM,iCAAiC,CAAC;AAE9E,qBAAa,IAAK,SAAQ,qBAAqB;IAC3C,gCAAgC,IAAI,6BAA6B;IAIjE,SAAS,CAAC,mBAAmB,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU;CAGhH"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { KeyDerivationFunctionSchemeId } from './keyDerivationFunctionSchemeId';
|
|
2
|
+
export declare abstract class KeyDerivationFunction {
|
|
3
|
+
abstract getKeyDerivationFunctionSchemeId(): KeyDerivationFunctionSchemeId;
|
|
4
|
+
abstract deriveKey(inputKeyingMaterial: Uint8Array, salt: Uint8Array, info: Uint8Array, keyLength: number): Uint8Array;
|
|
5
|
+
deriveKeyNoSalt(inputKeyingMaterial: Uint8Array, info: Uint8Array, keyLength: number): Uint8Array;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=KeyDerivationFunction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyDerivationFunction.d.ts","sourceRoot":"","sources":["../../../src/crypto/kdf/KeyDerivationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,iCAAiC,CAAC;AAE9E,8BAAsB,qBAAqB;IACvC,QAAQ,CAAE,gCAAgC,IAAI,6BAA6B;IAC3E,QAAQ,CAAC,SAAS,CAAC,mBAAmB,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU;IAC/G,eAAe,CAAC,mBAAmB,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU;CAK3G"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PasswordBasedKeyDerivationFunctionSchemeId } from './PasswordBasedKeyDerivationFunctionSchemeId';
|
|
2
|
+
import { PasswordBasedKeyDerivationFunction } from './PasswordBasedKeyDerivationFunction';
|
|
3
|
+
export declare class PBKDF2 extends PasswordBasedKeyDerivationFunction {
|
|
4
|
+
getKeyDerivationFunctionSchemeId(): PasswordBasedKeyDerivationFunctionSchemeId;
|
|
5
|
+
deriveKey(password: string, salt: string, keyLength: number): Uint8Array;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=PBKDF2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PBKDF2.d.ts","sourceRoot":"","sources":["../../../src/crypto/kdf/PBKDF2.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,0CAA0C,EAAC,MAAM,8CAA8C,CAAC;AACxG,OAAO,EAAC,kCAAkC,EAAC,MAAM,sCAAsC,CAAC;AAExF,qBAAa,MAAO,SAAQ,kCAAkC;IAC1D,gCAAgC,IAAI,0CAA0C;IAI9E,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU;CAG3E"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PasswordBasedKeyDerivationFunctionSchemeId } from './PasswordBasedKeyDerivationFunctionSchemeId';
|
|
2
|
+
export declare abstract class PasswordBasedKeyDerivationFunction {
|
|
3
|
+
abstract getKeyDerivationFunctionSchemeId(): PasswordBasedKeyDerivationFunctionSchemeId;
|
|
4
|
+
abstract deriveKey(password: string, salt: string, keyLength: number): Uint8Array;
|
|
5
|
+
deriveKeyNoSalt(password: string, keyLength: number): Uint8Array;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=PasswordBasedKeyDerivationFunction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordBasedKeyDerivationFunction.d.ts","sourceRoot":"","sources":["../../../src/crypto/kdf/PasswordBasedKeyDerivationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,0CAA0C,EAAC,MAAM,8CAA8C,CAAC;AAExG,8BAAsB,kCAAkC;IACpD,QAAQ,CAAC,gCAAgC,IAAI,0CAA0C;IACvF,QAAQ,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU;IACjF,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU;CAInE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordBasedKeyDerivationFunctionSchemeId.d.ts","sourceRoot":"","sources":["../../../src/crypto/kdf/PasswordBasedKeyDerivationFunctionSchemeId.ts"],"names":[],"mappings":"AAAA,oBAAY,0CAA0C;IAClD,MAAM,IAAA;IACN,MAAM,IAAA;CACT"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PasswordBasedKeyDerivationFunctionSchemeId } from './PasswordBasedKeyDerivationFunctionSchemeId';
|
|
2
|
+
import { PasswordBasedKeyDerivationFunction } from './PasswordBasedKeyDerivationFunction';
|
|
3
|
+
export declare class Scrypt extends PasswordBasedKeyDerivationFunction {
|
|
4
|
+
getKeyDerivationFunctionSchemeId(): PasswordBasedKeyDerivationFunctionSchemeId;
|
|
5
|
+
deriveKey(password: string, salt: string, keyLength: number): Uint8Array;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=Scrypt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Scrypt.d.ts","sourceRoot":"","sources":["../../../src/crypto/kdf/Scrypt.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,0CAA0C,EAAC,MAAM,8CAA8C,CAAC;AACxG,OAAO,EAAC,kCAAkC,EAAC,MAAM,sCAAsC,CAAC;AAExF,qBAAa,MAAO,SAAQ,kCAAkC;IAC1D,gCAAgC,IAAI,0CAA0C;IAI9E,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU;CAG3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyDerivationFunctionSchemeId.d.ts","sourceRoot":"","sources":["../../../src/crypto/kdf/keyDerivationFunctionSchemeId.ts"],"names":[],"mappings":"AAAA,oBAAY,6BAA6B;IACrC,IAAI,IAAA;CACP"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const MLDsa: {
|
|
2
|
+
generateKeyPair: typeof generateKeyPair;
|
|
3
|
+
sign: typeof sign;
|
|
4
|
+
verify: typeof verify;
|
|
5
|
+
};
|
|
6
|
+
declare function generateKeyPair(seed: any): {
|
|
7
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
8
|
+
privateKey: Uint8Array<ArrayBufferLike>;
|
|
9
|
+
};
|
|
10
|
+
declare function sign(privateKey: any, data: any): Uint8Array<ArrayBufferLike>;
|
|
11
|
+
declare function verify(publicKey: any, data: any, signature: any): boolean;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=ml-dsa.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ml-dsa.d.ts","sourceRoot":"","sources":["../../src/crypto/ml-dsa.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK;;;;CAIjB,CAAC;AAEF,iBAAS,eAAe,CAAC,IAAI,EAAE,GAAG;;;EAQjC;AAED,iBAAS,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,+BAEvC;AAED,iBAAS,MAAM,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,WAExD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const MLKem: {
|
|
2
|
+
generateKeyPair: typeof generateKeyPair;
|
|
3
|
+
encapsulate: typeof encapsulate;
|
|
4
|
+
decapsulate: typeof decapsulate;
|
|
5
|
+
};
|
|
6
|
+
declare function generateKeyPair(seed: any): {
|
|
7
|
+
publicKey: Uint8Array;
|
|
8
|
+
secretKey: Uint8Array;
|
|
9
|
+
};
|
|
10
|
+
declare function encapsulate(publicKey: any): {
|
|
11
|
+
cipherText: Uint8Array;
|
|
12
|
+
sharedSecret: Uint8Array;
|
|
13
|
+
};
|
|
14
|
+
declare function decapsulate(cipherText: any, privateKey: any): Uint8Array<ArrayBufferLike>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=ml-kem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ml-kem.d.ts","sourceRoot":"","sources":["../../src/crypto/ml-kem.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK;;;;CAIjB,CAAC;AAEF,iBAAS,eAAe,CAAC,IAAI,EAAE,GAAG;;;EAQjC;AAED,iBAAS,WAAW,CAAC,SAAS,EAAE,GAAG;;;EAElC;AAED,iBAAS,WAAW,CAAC,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,+BAEpD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const Random: {
|
|
2
|
+
getBytes: typeof getBytes;
|
|
3
|
+
getInteger: typeof getInteger;
|
|
4
|
+
getKey256: typeof getKey256;
|
|
5
|
+
};
|
|
6
|
+
declare function getBytes(n: any): Uint8Array<ArrayBufferLike>;
|
|
7
|
+
declare function getInteger(max: any): number;
|
|
8
|
+
declare function getKey256(): string;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=random.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../src/crypto/random.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM;;;;CAIlB,CAAC;AAEF,iBAAS,QAAQ,CAAC,CAAC,EAAE,GAAG,+BAEvB;AAED,iBAAS,UAAU,CAAC,GAAG,EAAE,GAAG,UAS3B;AAED,iBAAS,SAAS,WAIjB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const Secp256k1: {
|
|
2
|
+
publicKeyFromPrivateKey: typeof publicKeyFromPrivateKey;
|
|
3
|
+
sign: typeof sign;
|
|
4
|
+
verify: typeof verify;
|
|
5
|
+
};
|
|
6
|
+
declare function publicKeyFromPrivateKey(privateKey: any): import('@noble/secp256k1').Bytes;
|
|
7
|
+
declare function sign(privateKey: any, data: any): import('@noble/secp256k1').Bytes;
|
|
8
|
+
declare function verify(publicKey: any, data: any, signature: any): boolean;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=secp256k1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secp256k1.d.ts","sourceRoot":"","sources":["../../src/crypto/secp256k1.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS;;;;CAIrB,CAAC;AAEF,iBAAS,uBAAuB,CAAC,UAAU,EAAE,GAAG,oCAE/C;AAED,iBAAS,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,oCAKvC;AAED,iBAAS,MAAM,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,WAIxD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PrivateSignatureKey } from './PrivateSignatureKey';
|
|
2
|
+
import { SignatureScheme } from './SignatureScheme';
|
|
3
|
+
import { PublicSignatureKey } from './PublicSignatureKey';
|
|
4
|
+
import { EncoderInterface } from '../../utils/encoder';
|
|
5
|
+
import { SignatureSchemeId } from './SignatureSchemeId';
|
|
6
|
+
/**
|
|
7
|
+
* Abstract base class representing a private signature key. It provides
|
|
8
|
+
* methods for retrieving the private key, generating signatures, and
|
|
9
|
+
* accessing associated metadata and functionalities related to the
|
|
10
|
+
* signature scheme.
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class BasePrivateSignatureKey implements PrivateSignatureKey {
|
|
13
|
+
abstract getPrivateKeyAsBytes(): Uint8Array;
|
|
14
|
+
abstract sign(data: Uint8Array): Promise<Uint8Array>;
|
|
15
|
+
abstract getScheme(): SignatureScheme;
|
|
16
|
+
abstract getPublicKey(): Promise<PublicSignatureKey>;
|
|
17
|
+
getPrivateKeyAsString(encoder?: EncoderInterface<Uint8Array, string>): string;
|
|
18
|
+
getSignatureSchemeId(): SignatureSchemeId;
|
|
19
|
+
getSignatureSize(): number;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Use getSignatureSchemeId instead.
|
|
22
|
+
*
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
getSignatureAlgorithmId(): SignatureSchemeId;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=BasePrivateSignatureKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasePrivateSignatureKey.d.ts","sourceRoot":"","sources":["../../../src/crypto/signature/BasePrivateSignatureKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAiB,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,8BAAsB,uBAAwB,YAAW,mBAAmB;IACxE,QAAQ,CAAC,oBAAoB,IAAI,UAAU;IAE3C,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAEpD,QAAQ,CAAC,SAAS,IAAI,eAAe;IAErC,QAAQ,CAAC,YAAY,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAEpD,qBAAqB,CAAC,OAAO,GAAE,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAgD,GAAG,MAAM;IAI3H,oBAAoB,IAAI,iBAAiB;IAIzC,gBAAgB,IAAI,MAAM;IAI1B;;;;OAIG;IACH,uBAAuB,IAAI,iBAAiB;CAI/C"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PublicSignatureKey } from './PublicSignatureKey';
|
|
2
|
+
import { EncoderInterface } from '../../utils/encoder';
|
|
3
|
+
import { SignatureScheme } from './SignatureScheme';
|
|
4
|
+
import { SignatureSchemeId } from './SignatureSchemeId';
|
|
5
|
+
/**
|
|
6
|
+
* Abstract class representing the base implementation of a public signature key.
|
|
7
|
+
* This class provides a partial implementation for handling public keys and signing operations.
|
|
8
|
+
* It serves as a foundation for specific public signature key implementations.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class BasePublicSignatureKey implements PublicSignatureKey {
|
|
11
|
+
getPublicKeyAsString(encoder?: EncoderInterface<Uint8Array, string>): Promise<string>;
|
|
12
|
+
abstract getPublicKeyAsBytes(): Promise<Uint8Array>;
|
|
13
|
+
abstract verify(data: Uint8Array, signature: Uint8Array): Promise<boolean>;
|
|
14
|
+
abstract getScheme(): SignatureScheme;
|
|
15
|
+
getSignatureSize(): number;
|
|
16
|
+
getSignatureSchemeId(): SignatureSchemeId;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use getSignatureSchemeId instead.
|
|
19
|
+
*
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
getSignatureAlgorithmId(): SignatureSchemeId;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=BasePublicSignatureKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasePublicSignatureKey.d.ts","sourceRoot":"","sources":["../../../src/crypto/signature/BasePublicSignatureKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAiB,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD;;;;GAIG;AACH,8BAAsB,sBAAuB,YAAW,kBAAkB;IAChE,oBAAoB,CAAC,OAAO,GAAE,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAgD,GAAG,OAAO,CAAC,MAAM,CAAC;IAIzI,QAAQ,CAAC,mBAAmB,IAAI,OAAO,CAAC,UAAU,CAAC;IAEnD,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC;IAE1E,QAAQ,CAAC,SAAS,IAAI,eAAe;IAErC,gBAAgB,IAAI,MAAM;IAI1B,oBAAoB,IAAI,iBAAiB;IAIzC;;;;OAIG;IACH,uBAAuB,IAAI,iBAAiB;CAG/C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SignatureScheme } from './SignatureScheme';
|
|
2
|
+
import { PublicSignatureKey } from './PublicSignatureKey';
|
|
3
|
+
import { SignatureSchemeId } from './SignatureSchemeId';
|
|
4
|
+
/**
|
|
5
|
+
* Represents a private signature key utilized in cryptographic operations.
|
|
6
|
+
*
|
|
7
|
+
* This interface extends the `SignatureScheme` and provides functionality
|
|
8
|
+
* to generate a corresponding public key and to sign data.
|
|
9
|
+
*/
|
|
10
|
+
export interface PrivateSignatureKey {
|
|
11
|
+
getScheme(): SignatureScheme;
|
|
12
|
+
getPublicKey(): Promise<PublicSignatureKey>;
|
|
13
|
+
sign(data: Uint8Array): Promise<Uint8Array>;
|
|
14
|
+
getPrivateKeyAsBytes(): Uint8Array;
|
|
15
|
+
getSignatureSchemeId(): SignatureSchemeId;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=PrivateSignatureKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrivateSignatureKey.d.ts","sourceRoot":"","sources":["../../../src/crypto/signature/PrivateSignatureKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAChC,SAAS,IAAI,eAAe,CAAC;IAC7B,YAAY,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC5C,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC5C,oBAAoB,IAAI,UAAU,CAAC;IACnC,oBAAoB,IAAI,iBAAiB,CAAC;CAC7C"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SignatureScheme } from './SignatureScheme';
|
|
2
|
+
import { SignatureSchemeId } from './SignatureSchemeId';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a public signature key adhering to a specific signature scheme.
|
|
5
|
+
* This interface provides methods to verify digital signatures and fetch the raw public key.
|
|
6
|
+
*
|
|
7
|
+
* @interface PublicSignatureKey
|
|
8
|
+
* @extends SignatureScheme
|
|
9
|
+
*
|
|
10
|
+
* @method verify
|
|
11
|
+
* Verifies the digital signature for the provided data.
|
|
12
|
+
* @param {Uint8Array} data - The original data to be verified.
|
|
13
|
+
* @param {Uint8Array} signature - The digital signature corresponding to the provided data.
|
|
14
|
+
* @returns {boolean} - Returns true if the signature is valid for the data, false otherwise.
|
|
15
|
+
*
|
|
16
|
+
* @method getPublicKeyAsBytes
|
|
17
|
+
* Retrieves the raw representation of the public key.
|
|
18
|
+
* This is useful for serialization, transmission, or other forms of key processing.
|
|
19
|
+
* @returns {Uint8Array} - The raw bytes of the public key.
|
|
20
|
+
*/
|
|
21
|
+
export interface PublicSignatureKey {
|
|
22
|
+
getScheme(): SignatureScheme;
|
|
23
|
+
verify(data: Uint8Array, signature: Uint8Array): Promise<boolean>;
|
|
24
|
+
getPublicKeyAsBytes(): Promise<Uint8Array>;
|
|
25
|
+
getSignatureSchemeId(): SignatureSchemeId;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=PublicSignatureKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublicSignatureKey.d.ts","sourceRoot":"","sources":["../../../src/crypto/signature/PublicSignatureKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,kBAAkB;IAC/B,SAAS,IAAI,eAAe,CAAC;IAE7B,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAElE,mBAAmB,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;IAE3C,oBAAoB,IAAI,iBAAiB,CAAC;CAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignatureAlgorithmId.d.ts","sourceRoot":"","sources":["../../../src/crypto/signature/SignatureAlgorithmId.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,oBAAoB;IAC5B,SAAS,IAA8B;IACvC,SAAS,IAA8B;CAC1C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SignatureSchemeId } from './SignatureSchemeId';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a cryptographic signature scheme with methods to retrieve
|
|
4
|
+
* identifying information and utilities for encoding public keys.
|
|
5
|
+
*/
|
|
6
|
+
export interface SignatureScheme {
|
|
7
|
+
getSignatureSchemeId(): SignatureSchemeId;
|
|
8
|
+
expectedSeedSize(): number;
|
|
9
|
+
getSignatureSize(): number;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=SignatureScheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignatureScheme.d.ts","sourceRoot":"","sources":["../../../src/crypto/signature/SignatureScheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B,oBAAoB,IAAI,iBAAiB,CAAC;IAC1C,gBAAgB,IAAI,MAAM,CAAC;IAC3B,gBAAgB,IAAI,MAAM,CAAC;CAC9B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An enumeration representing the identifiers for different signature algorithms.
|
|
3
|
+
* This enum is used to indicate the type of cryptographic signature algorithm being utilized.
|
|
4
|
+
*
|
|
5
|
+
* Enum members:
|
|
6
|
+
* - SECP256K1: Indicates the SECP256K1 signature algorithm, typically associated with elliptic-curve cryptography.
|
|
7
|
+
* - ML_DSA_65: Represents the ML-DSA-65 signature algorithm.
|
|
8
|
+
* - PKMS_SECP256K1: Represents the P(roxy)KMS-based SECP256K1 signature algorithm.
|
|
9
|
+
*/
|
|
10
|
+
export declare enum SignatureSchemeId {
|
|
11
|
+
SECP256K1 = 0,
|
|
12
|
+
ML_DSA_65 = 1,
|
|
13
|
+
PKMS_SECP256K1 = 2,
|
|
14
|
+
ED25519 = 3
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=SignatureSchemeId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignatureSchemeId.d.ts","sourceRoot":"","sources":["../../../src/crypto/signature/SignatureSchemeId.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,oBAAY,iBAAiB;IACzB,SAAS,IAAI;IACb,SAAS,IAAI;IACb,cAAc,IAAI;IAClB,OAAO,IAAI;CACd"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Bytes } from '@noble/ed25519';
|
|
2
|
+
import { BasePrivateSignatureKey } from '../BasePrivateSignatureKey';
|
|
3
|
+
import { EncoderInterface } from '../../../utils/encoder';
|
|
4
|
+
import { PublicSignatureKey } from '../PublicSignatureKey';
|
|
5
|
+
import { SignatureScheme } from '../SignatureScheme';
|
|
6
|
+
/**
|
|
7
|
+
* Represents a private signature key using the Ed25519 curve. This class extends
|
|
8
|
+
* from `Ed25519PublicSignatureKey` and implements the `PrivateSignatureKey` interface.
|
|
9
|
+
* It provides functionality to generate a private key, derive its corresponding
|
|
10
|
+
* public key, and sign data.
|
|
11
|
+
*
|
|
12
|
+
* Methods enable key generation, retrieving the associated public key,
|
|
13
|
+
* and signing cryptographic hashes.
|
|
14
|
+
*/
|
|
15
|
+
export declare class Ed25519PrivateSignatureKey extends BasePrivateSignatureKey {
|
|
16
|
+
private privateKey;
|
|
17
|
+
constructor(privateKey: Bytes);
|
|
18
|
+
getPrivateKeyAsString(encoder: EncoderInterface<Uint8Array, string>): string;
|
|
19
|
+
/**
|
|
20
|
+
* Generates and returns a new instance of Ed25519PrivateSignatureKey
|
|
21
|
+
* initialized with a randomly generated private key.
|
|
22
|
+
*
|
|
23
|
+
* @return {Ed25519PrivateSignatureKey} A new Ed25519PrivateSignatureKey object.
|
|
24
|
+
*/
|
|
25
|
+
static gen(): Ed25519PrivateSignatureKey;
|
|
26
|
+
/**
|
|
27
|
+
* Generates a Ed25519 private signature key from a given seed.
|
|
28
|
+
*
|
|
29
|
+
* @param {Uint8Array} seed - The seed used to generate the private key.
|
|
30
|
+
* @return {Ed25519PrivateSignatureKey} The generated Ed25519 private signature key.
|
|
31
|
+
*/
|
|
32
|
+
static genFromSeed(seed: Uint8Array): Ed25519PrivateSignatureKey;
|
|
33
|
+
getPublicKey(): Promise<PublicSignatureKey>;
|
|
34
|
+
getPrivateKeyAsBytes(): Uint8Array;
|
|
35
|
+
sign(data: Uint8Array): Promise<Uint8Array>;
|
|
36
|
+
getScheme(): SignatureScheme;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=Ed25519PrivateSignatureKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ed25519PrivateSignatureKey.d.ts","sourceRoot":"","sources":["../../../../src/crypto/signature/ed25519/Ed25519PrivateSignatureKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,EAA6B,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAC,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;AAGzD,OAAO,EAAC,eAAe,EAAC,MAAM,oBAAoB,CAAC;AAKnD;;;;;;;;GAQG;AACH,qBAAa,0BAA2B,SAAQ,uBAAuB;IACvD,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,KAAK;IAIrC,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,MAAM;IAI5E;;;;;OAKG;IACH,MAAM,CAAC,GAAG,IAAI,0BAA0B;IAIxC;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,UAAU;IAI7B,YAAY,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAKjD,oBAAoB,IAAI,UAAU;IAK5B,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAKjD,SAAS,IAAI,eAAe;CAG/B"}
|