@cmts-dev/carmentis-sdk-core 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +349 -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 +2 -3
- package/dist/carmentis-sdk-core.es +25 -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,280 @@
|
|
|
1
|
+
import { Microblock } from '../microblock/Microblock';
|
|
2
|
+
import { SectionConstraint } from './SectionConstraint';
|
|
3
|
+
import { SectionType } from '../../type/valibot/blockchain/section/SectionType';
|
|
4
|
+
/**
|
|
5
|
+
* The StructureChecker class is responsible for validating the structure of a microblock.
|
|
6
|
+
* It enforces constraints and expectations on specific sections within a microblock based on their types.
|
|
7
|
+
* The class includes functionality to navigate sections, verify constraints, and group sections for validation.
|
|
8
|
+
*/
|
|
9
|
+
export declare class StructureChecker {
|
|
10
|
+
/**
|
|
11
|
+
* Represents a microblock in a blockchain system.
|
|
12
|
+
*/
|
|
13
|
+
private microblock;
|
|
14
|
+
/**
|
|
15
|
+
* A numeric variable that stores a memory address or a reference to another variable.
|
|
16
|
+
* This pointer is used to indirectly access the value or object located at the specified memory address.
|
|
17
|
+
*
|
|
18
|
+
* @type {number} The numeric address or reference.
|
|
19
|
+
*/
|
|
20
|
+
private pointer;
|
|
21
|
+
/**
|
|
22
|
+
* Constructs an instance of the class with the provided Microblock object.
|
|
23
|
+
*
|
|
24
|
+
* @param {Microblock} microblock - The Microblock instance to be associated with this object.
|
|
25
|
+
* @return {void} No return value.
|
|
26
|
+
*/
|
|
27
|
+
constructor(microblock: Microblock);
|
|
28
|
+
/**
|
|
29
|
+
* Checks if the current block is the first block in the chain.
|
|
30
|
+
*
|
|
31
|
+
* @return {boolean} Returns true if the block's height is 1, otherwise false.
|
|
32
|
+
*/
|
|
33
|
+
isFirstBlock(): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Validates and counts consecutive sections of a specified type in a list against a given constraint.
|
|
36
|
+
*
|
|
37
|
+
* @param constraint The constraint that defines the allowed count of sections.
|
|
38
|
+
* @param type The type of sections to be counted and validated.
|
|
39
|
+
* @return void
|
|
40
|
+
* @throws An error if the count of sections does not meet the specified constraint.
|
|
41
|
+
*/
|
|
42
|
+
expects(constraint: SectionConstraint, type: SectionType): number;
|
|
43
|
+
/**
|
|
44
|
+
* Groups elements based on the provided group constraint and a list of type constraints.
|
|
45
|
+
*
|
|
46
|
+
* @param groupConstraint The constraint that defines the grouping condition.
|
|
47
|
+
* @param list A list of type constraints, where each element is a tuple containing a constraint and a type.
|
|
48
|
+
* @return void
|
|
49
|
+
* @throws An error if the group constraint or type constraints are not met.
|
|
50
|
+
*/
|
|
51
|
+
group(groupConstraint: SectionConstraint, list: [SectionConstraint, SectionType][]): void;
|
|
52
|
+
/**
|
|
53
|
+
* Validates if the current section is at the end of the list.
|
|
54
|
+
* Throws an error if the current section is not the expected end.
|
|
55
|
+
*
|
|
56
|
+
* @return {void} Does not return a value.
|
|
57
|
+
*/
|
|
58
|
+
endsHere(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Retrieves the current section based on the pointer's position.
|
|
61
|
+
*
|
|
62
|
+
* @return {Object} The current section object from the list of all sections.
|
|
63
|
+
*/
|
|
64
|
+
currentSection(): ({
|
|
65
|
+
type: SectionType.CUSTOM;
|
|
66
|
+
} & {
|
|
67
|
+
[key: string]: unknown;
|
|
68
|
+
}) | {
|
|
69
|
+
type: SectionType.SIGNATURE;
|
|
70
|
+
signature: Uint8Array<ArrayBufferLike>;
|
|
71
|
+
schemeId: number;
|
|
72
|
+
} | {
|
|
73
|
+
type: SectionType.AUXILIARY_SIGNATURE;
|
|
74
|
+
tag: string;
|
|
75
|
+
signature: Uint8Array<ArrayBufferLike>;
|
|
76
|
+
schemeId: number;
|
|
77
|
+
} | {
|
|
78
|
+
type: SectionType.ALLOWED_ADDITIONAL_WRITER;
|
|
79
|
+
allowedWriterAccountId: Uint8Array<ArrayBufferLike>;
|
|
80
|
+
} | {
|
|
81
|
+
type: SectionType.PROTOCOL_CREATION;
|
|
82
|
+
organizationId: Uint8Array<ArrayBufferLike>;
|
|
83
|
+
} | {
|
|
84
|
+
protocolVersion: number;
|
|
85
|
+
protocolVersionName: string;
|
|
86
|
+
changeLog: string;
|
|
87
|
+
protocolVariables: {
|
|
88
|
+
protocolVersionName: string;
|
|
89
|
+
protocolVersion: number;
|
|
90
|
+
feesCalculationVersion: number;
|
|
91
|
+
globalStateUpdaterVersion: number;
|
|
92
|
+
applicationLedgerInternalStateUpdaterVersion: number;
|
|
93
|
+
applicationInternalStateUpdaterVersion: number;
|
|
94
|
+
organizationInternalStateUpdaterVersion: number;
|
|
95
|
+
validatorNodeInternalStateUpdaterVersion: number;
|
|
96
|
+
accountInternalStateUpdaterVersion: number;
|
|
97
|
+
protocolInternalStateUpdaterVersion: number;
|
|
98
|
+
minimumNodeStakingAmountInAtomics: number;
|
|
99
|
+
maximumNodeStakingAmountInAtomics: number;
|
|
100
|
+
unstakingDelayInDays: number;
|
|
101
|
+
maxBlockSizeInBytes: number;
|
|
102
|
+
retentionPolicy: {
|
|
103
|
+
retentionRatio: number;
|
|
104
|
+
maximumNumberOfDays: number;
|
|
105
|
+
dayDivisor: number;
|
|
106
|
+
}[];
|
|
107
|
+
abciVersion: number;
|
|
108
|
+
};
|
|
109
|
+
type: SectionType.PROTOCOL_UPDATE;
|
|
110
|
+
} | {
|
|
111
|
+
type: SectionType.PROTOCOL_VARIABLES;
|
|
112
|
+
protocolVariables: any;
|
|
113
|
+
} | {
|
|
114
|
+
type: SectionType.ACCOUNT_PUBLIC_KEY;
|
|
115
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
116
|
+
schemeId: number;
|
|
117
|
+
} | {
|
|
118
|
+
type: SectionType.ACCOUNT_TOKEN_ISSUANCE;
|
|
119
|
+
amount: number;
|
|
120
|
+
} | {
|
|
121
|
+
type: SectionType.ACCOUNT_CREATION;
|
|
122
|
+
sellerAccount: Uint8Array<ArrayBufferLike>;
|
|
123
|
+
amount: number;
|
|
124
|
+
} | {
|
|
125
|
+
type: SectionType.ACCOUNT_TRANSFER;
|
|
126
|
+
account: Uint8Array<ArrayBufferLike>;
|
|
127
|
+
amount: number;
|
|
128
|
+
publicReference: string;
|
|
129
|
+
privateReference: string;
|
|
130
|
+
} | {
|
|
131
|
+
type: SectionType.ACCOUNT_VESTING_TRANSFER;
|
|
132
|
+
account: Uint8Array<ArrayBufferLike>;
|
|
133
|
+
amount: number;
|
|
134
|
+
publicReference: string;
|
|
135
|
+
privateReference: string;
|
|
136
|
+
cliffDurationDays: number;
|
|
137
|
+
vestingDurationDays: number;
|
|
138
|
+
} | {
|
|
139
|
+
type: SectionType.ACCOUNT_ESCROW_TRANSFER;
|
|
140
|
+
account: Uint8Array<ArrayBufferLike>;
|
|
141
|
+
amount: number;
|
|
142
|
+
publicReference: string;
|
|
143
|
+
privateReference: string;
|
|
144
|
+
escrowIdentifier: Uint8Array<ArrayBufferLike>;
|
|
145
|
+
agentAccount: Uint8Array<ArrayBufferLike>;
|
|
146
|
+
durationDays: number;
|
|
147
|
+
} | {
|
|
148
|
+
type: SectionType.ACCOUNT_ESCROW_SETTLEMENT;
|
|
149
|
+
escrowIdentifier: Uint8Array<ArrayBufferLike>;
|
|
150
|
+
confirmed: boolean;
|
|
151
|
+
} | {
|
|
152
|
+
type: SectionType.ACCOUNT_STAKE;
|
|
153
|
+
amount: number;
|
|
154
|
+
objectType: number;
|
|
155
|
+
objectIdentifier: Uint8Array<ArrayBufferLike>;
|
|
156
|
+
} | {
|
|
157
|
+
type: SectionType.ACCOUNT_UNSTAKE;
|
|
158
|
+
amount: number;
|
|
159
|
+
objectType: number;
|
|
160
|
+
objectIdentifier: Uint8Array<ArrayBufferLike>;
|
|
161
|
+
} | {
|
|
162
|
+
type: SectionType.VN_CREATION;
|
|
163
|
+
organizationId: Uint8Array<ArrayBufferLike>;
|
|
164
|
+
} | {
|
|
165
|
+
type: SectionType.VN_COMETBFT_PUBLIC_KEY_DECLARATION;
|
|
166
|
+
cometPublicKeyType: string;
|
|
167
|
+
cometPublicKey: string;
|
|
168
|
+
} | {
|
|
169
|
+
type: SectionType.VN_RPC_ENDPOINT;
|
|
170
|
+
rpcEndpoint: string;
|
|
171
|
+
} | {
|
|
172
|
+
type: SectionType.VN_APPROVAL;
|
|
173
|
+
status: boolean;
|
|
174
|
+
} | {
|
|
175
|
+
type: SectionType.VN_SLASHING_CANCELLATION;
|
|
176
|
+
reason: string;
|
|
177
|
+
} | {
|
|
178
|
+
type: SectionType.ORG_CREATION;
|
|
179
|
+
accountId: Uint8Array<ArrayBufferLike>;
|
|
180
|
+
} | {
|
|
181
|
+
type: SectionType.ORG_DESCRIPTION;
|
|
182
|
+
name: string;
|
|
183
|
+
city: string;
|
|
184
|
+
countryCode: string;
|
|
185
|
+
website: string;
|
|
186
|
+
misc?: {
|
|
187
|
+
[x: string]: string;
|
|
188
|
+
} | undefined;
|
|
189
|
+
} | {
|
|
190
|
+
type: SectionType.APP_CREATION;
|
|
191
|
+
organizationId: Uint8Array<ArrayBufferLike>;
|
|
192
|
+
} | {
|
|
193
|
+
type: SectionType.APP_DESCRIPTION;
|
|
194
|
+
name: string;
|
|
195
|
+
logoUrl: string;
|
|
196
|
+
homepageUrl: string;
|
|
197
|
+
description: string;
|
|
198
|
+
misc?: {
|
|
199
|
+
[x: string]: string;
|
|
200
|
+
} | undefined;
|
|
201
|
+
} | {
|
|
202
|
+
type: SectionType.APP_LEDGER_ALLOWED_SIG_SCHEMES;
|
|
203
|
+
schemeIds: number[];
|
|
204
|
+
} | {
|
|
205
|
+
type: SectionType.APP_LEDGER_ALLOWED_PKE_SCHEMES;
|
|
206
|
+
schemeIds: number[];
|
|
207
|
+
} | {
|
|
208
|
+
type: SectionType.APP_LEDGER_CREATION;
|
|
209
|
+
applicationId: Uint8Array<ArrayBufferLike>;
|
|
210
|
+
} | {
|
|
211
|
+
type: SectionType.APP_LEDGER_ACTOR_CREATION;
|
|
212
|
+
id: number;
|
|
213
|
+
actorType: number;
|
|
214
|
+
name: string;
|
|
215
|
+
} | {
|
|
216
|
+
type: SectionType.APP_LEDGER_CHANNEL_CREATION;
|
|
217
|
+
id: number;
|
|
218
|
+
isPrivate: boolean;
|
|
219
|
+
creatorId: number;
|
|
220
|
+
name: string;
|
|
221
|
+
} | {
|
|
222
|
+
type: SectionType.APP_LEDGER_SHARED_SECRET;
|
|
223
|
+
hostId: number;
|
|
224
|
+
guestId: number;
|
|
225
|
+
encryptedSharedKey: Uint8Array<ArrayBufferLike>;
|
|
226
|
+
} | {
|
|
227
|
+
type: SectionType.APP_LEDGER_CHANNEL_INVITATION;
|
|
228
|
+
channelId: number;
|
|
229
|
+
hostId: number;
|
|
230
|
+
guestId: number;
|
|
231
|
+
encryptedChannelKey: Uint8Array<ArrayBufferLike>;
|
|
232
|
+
} | {
|
|
233
|
+
type: SectionType.APP_LEDGER_ACTOR_SUBSCRIPTION;
|
|
234
|
+
actorId: number;
|
|
235
|
+
actorType: number;
|
|
236
|
+
organizationId: Uint8Array<ArrayBufferLike>;
|
|
237
|
+
signatureSchemeId: number;
|
|
238
|
+
signaturePublicKey: Uint8Array<ArrayBufferLike>;
|
|
239
|
+
pkeSchemeId: number;
|
|
240
|
+
pkePublicKey: Uint8Array<ArrayBufferLike>;
|
|
241
|
+
} | {
|
|
242
|
+
type: SectionType.APP_LEDGER_PUBLIC_CHANNEL_DATA;
|
|
243
|
+
channelId: number;
|
|
244
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
245
|
+
} | {
|
|
246
|
+
type: SectionType.APP_LEDGER_PRIVATE_CHANNEL_DATA;
|
|
247
|
+
channelId: number;
|
|
248
|
+
merkleRootHash: Uint8Array<ArrayBufferLike>;
|
|
249
|
+
encryptedData: Uint8Array<ArrayBufferLike>;
|
|
250
|
+
} | {
|
|
251
|
+
type: SectionType.APP_LEDGER_AUTHOR;
|
|
252
|
+
authorId: number;
|
|
253
|
+
} | {
|
|
254
|
+
type: SectionType.APP_LEDGER_ENDORSEMENT_REQUEST;
|
|
255
|
+
endorserId: number;
|
|
256
|
+
message: string;
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* Determines if the current section is at its end.
|
|
260
|
+
*
|
|
261
|
+
* @return {boolean} Returns true if the current section is null or undefined, indicating the end of the list. Otherwise, returns false.
|
|
262
|
+
*/
|
|
263
|
+
endOfList(): boolean;
|
|
264
|
+
/**
|
|
265
|
+
* Evaluates a given constraint on a specified count and returns whether the constraint is satisfied.
|
|
266
|
+
*
|
|
267
|
+
* @param {number} constraint - The constraint to check. This could be any predefined constant such as SECTIONS.ANY, SECTIONS.ZERO, etc.
|
|
268
|
+
* @param {any} count - The actual count value to assess against the given constraint.
|
|
269
|
+
* @return {boolean} Returns true if the count satisfies the given constraint, otherwise false.
|
|
270
|
+
*/
|
|
271
|
+
checkConstraint(constraint: SectionConstraint, count: number): boolean;
|
|
272
|
+
/**
|
|
273
|
+
* Retrieves the label for a given type based on the defined sections of the microblock.
|
|
274
|
+
*
|
|
275
|
+
* @param {number} type - The type for which the label needs to be retrieved.
|
|
276
|
+
* @return {string} The label associated with the given type, or "unknown" if the type is not defined.
|
|
277
|
+
*/
|
|
278
|
+
getSectionLabelBySectionType(type: SectionType): string;
|
|
279
|
+
}
|
|
280
|
+
//# sourceMappingURL=StructureChecker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StructureChecker.d.ts","sourceRoot":"","sources":["../../../src/blockchain/structureCheckers/StructureChecker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAA6B,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAC,WAAW,EAAC,MAAM,mDAAmD,CAAC;AAG9E;;;;GAIG;AACH,qBAAa,gBAAgB;IACzB;;OAEG;IACH,OAAO,CAAC,UAAU,CAAa;IAC/B;;;;;OAKG;IACH,OAAO,CAAC,OAAO,CAAS;IAExB;;;;;OAKG;gBACS,UAAU,EAAE,UAAU;IAKlC;;;;OAIG;IACH,YAAY;IAIZ;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU,EAAE,iBAAiB,EAAE,IAAI,EAAE,WAAW;IAcxD;;;;;;;OAOG;IACH,KAAK,CAAC,eAAe,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,iBAAiB,EAAE,WAAW,CAAC,EAAE;IAgClF;;;;;OAKG;IACH,QAAQ,IAAI,IAAI;IAQhB;;;;OAIG;IACH,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAId;;;;OAIG;IACH,SAAS;IAIT;;;;;;OAMG;IACH,eAAe,CAAC,UAAU,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM;IAqB5D;;;;;OAKG;IACH,4BAA4B,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM;CAG1D"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IMicroblockStructureChecker } from './IMicroblockStructureChecker';
|
|
2
|
+
import { Microblock } from '../microblock/Microblock';
|
|
3
|
+
export declare class ValidatorNodeMicroblockStructureChecker implements IMicroblockStructureChecker {
|
|
4
|
+
private logger;
|
|
5
|
+
checkMicroblockStructure(microblock: Microblock): boolean;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ValidatorNodeMicroblockStructureChecker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValidatorNodeMicroblockStructureChecker.d.ts","sourceRoot":"","sources":["../../../src/blockchain/structureCheckers/ValidatorNodeMicroblockStructureChecker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,2BAA2B,EAAC,MAAM,+BAA+B,CAAC;AAE1E,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAMpD,qBAAa,uCAAwC,YAAW,2BAA2B;IACvF,OAAO,CAAC,MAAM,CAAgD;IAC9D,wBAAwB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO;CAqC5D"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { VirtualBlockchain } from './VirtualBlockchain';
|
|
2
|
+
import { PublicSignatureKey } from '../../crypto/signature/PublicSignatureKey';
|
|
3
|
+
import { Microblock } from '../microblock/Microblock';
|
|
4
|
+
import { CMTSToken } from '../../economics/currencies/token';
|
|
5
|
+
import { IProvider } from '../../providers/IProvider';
|
|
6
|
+
import { AccountInternalState } from '../internalStates/AccountInternalState';
|
|
7
|
+
import { ProtocolInternalState } from '../internalStates/ProtocolInternalState';
|
|
8
|
+
import { Hash } from '../../entities/Hash';
|
|
9
|
+
export declare class AccountVb extends VirtualBlockchain<AccountInternalState> {
|
|
10
|
+
constructor(provider: IProvider, state?: AccountInternalState);
|
|
11
|
+
protected updateInternalState(protocolState: ProtocolInternalState, state: AccountInternalState, microblock: Microblock): Promise<AccountInternalState>;
|
|
12
|
+
getVirtualBlockchainState(): Promise<{
|
|
13
|
+
expirationDay: number;
|
|
14
|
+
height: number;
|
|
15
|
+
internalState: {
|
|
16
|
+
signatureSchemeId: number;
|
|
17
|
+
publicKeyHeight: number;
|
|
18
|
+
};
|
|
19
|
+
lastMicroblockHash: Uint8Array<ArrayBufferLike>;
|
|
20
|
+
type: number;
|
|
21
|
+
}>;
|
|
22
|
+
getVirtualBlockchainOwnerId(): Promise<Hash>;
|
|
23
|
+
protected checkMicroblockStructure(microblock: Microblock): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves the public key for the current instance of the cryptographic context.
|
|
26
|
+
*
|
|
27
|
+
* The method fetches the raw public key and the signature scheme ID, then utilizes the CryptoSchemeFactory
|
|
28
|
+
* to create and return a public signature key object.
|
|
29
|
+
*
|
|
30
|
+
* @return {Promise<PublicSignatureKey>} A promise that resolves to a public signature key object.
|
|
31
|
+
*/
|
|
32
|
+
getPublicKey(): Promise<PublicSignatureKey>;
|
|
33
|
+
isIssuer(): Promise<boolean>;
|
|
34
|
+
static createAccountCreationMicroblock(accountOwnerPublicKey: PublicSignatureKey, initialAmount: CMTSToken, sellerAccountId: Uint8Array, accountName?: string): Promise<Microblock>;
|
|
35
|
+
static createIssuerAccountCreationMicroblock(genesisPublicKey: PublicSignatureKey): Promise<Microblock>;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=AccountVb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountVb.d.ts","sourceRoot":"","sources":["../../../src/blockchain/virtualBlockchains/AccountVb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAC,kBAAkB,EAAC,MAAM,2CAA2C,CAAC;AAI7E,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAC,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAC,oBAAoB,EAAC,MAAM,wCAAwC,CAAC;AAE5E,OAAO,EAAC,qBAAqB,EAAC,MAAM,yCAAyC,CAAC;AAG9E,OAAO,EAAC,IAAI,EAAC,MAAM,qBAAqB,CAAC;AAEzC,qBAAa,SAAU,SAAQ,iBAAiB,CAAC,oBAAoB,CAAC;gBAEtD,QAAQ,EAAE,SAAS,EAAE,KAAK,GAAE,oBAAgE;cAIxF,mBAAmB,CAAC,aAAa,EAAE,qBAAqB,EAAE,KAAK,EAAE,oBAAoB,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAQvJ,yBAAyB;;;;;;;;;;IAczB,2BAA2B;IAIjC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO;IAMnE;;;;;;;OAOG;IACG,YAAY;IAcZ,QAAQ;WAQD,+BAA+B,CAAC,qBAAqB,EAAE,kBAAkB,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,GAAE,MAAW;WAe1J,qCAAqC,CAAC,gBAAgB,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC;CAehH"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ApplicationLedgerVb } from './ApplicationLedgerVb';
|
|
2
|
+
import { Microblock } from '../microblock/Microblock';
|
|
3
|
+
import { IMicroblockSearchFailureFallback } from './fallbacks/IMicroblockSearchFailureFallback';
|
|
4
|
+
import { VirtualBlockchain } from './VirtualBlockchain';
|
|
5
|
+
import { Section } from '../../type/valibot/blockchain/section/sections';
|
|
6
|
+
import { IProvider } from '../../providers/IProvider';
|
|
7
|
+
import { Height } from '../../type/Height';
|
|
8
|
+
export declare class ApplicationLedgerMicroblockBuilder implements IMicroblockSearchFailureFallback {
|
|
9
|
+
protected mbUnderConstruction: Microblock;
|
|
10
|
+
protected vb: ApplicationLedgerVb;
|
|
11
|
+
private provider;
|
|
12
|
+
private stateUpdater?;
|
|
13
|
+
constructor(mbUnderConstruction: Microblock, vb: ApplicationLedgerVb, provider: IProvider);
|
|
14
|
+
onMicroblockSearchFailureForExceedingHeight(vb: VirtualBlockchain, askedHeight: Height): Promise<Microblock>;
|
|
15
|
+
protected getBuiltMicroblock(): Microblock;
|
|
16
|
+
protected updateStateWithSection(section: Section): Promise<void>;
|
|
17
|
+
protected getInternalState(): import('../internalStates/ApplicationLedgerInternalState').ApplicationLedgerInternalState;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=ApplicationLedgerMicroblockBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationLedgerMicroblockBuilder.d.ts","sourceRoot":"","sources":["../../../src/blockchain/virtualBlockchains/ApplicationLedgerMicroblockBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAC,gCAAgC,EAAC,MAAM,8CAA8C,CAAC;AAC9F,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAC,OAAO,EAAC,MAAM,gDAAgD,CAAC;AACvE,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAGzC,qBAAa,kCAAmC,YAAW,gCAAgC;IAG3E,SAAS,CAAC,mBAAmB,EAAE,UAAU;IAAE,SAAS,CAAC,EAAE,EAAE,mBAAmB;IAAE,OAAO,CAAC,QAAQ;IAD1G,OAAO,CAAC,YAAY,CAAC,CAAyC;gBACxC,mBAAmB,EAAE,UAAU,EAAY,EAAE,EAAE,mBAAmB,EAAU,QAAQ,EAAE,SAAS;IAIrH,2CAA2C,CAAC,EAAE,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAM5G,SAAS,CAAC,kBAAkB;cAIZ,sBAAsB,CAAC,OAAO,EAAE,OAAO;IAoBvD,SAAS,CAAC,gBAAgB;CAK7B"}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { VirtualBlockchain } from './VirtualBlockchain';
|
|
2
|
+
import { Microblock } from '../microblock/Microblock';
|
|
3
|
+
import { AbstractPublicEncryptionKey } from '../../crypto/encryption/public-key-encryption/PublicKeyEncryptionSchemeInterface';
|
|
4
|
+
import { PublicSignatureKey } from '../../crypto/signature/PublicSignatureKey';
|
|
5
|
+
import { Hash } from '../../entities/Hash';
|
|
6
|
+
import { Height } from '../../type/Height';
|
|
7
|
+
import { IProvider } from '../../providers/IProvider';
|
|
8
|
+
import { ApplicationLedgerInternalState } from '../internalStates/ApplicationLedgerInternalState';
|
|
9
|
+
import { ICryptoKeyHandler } from '../../wallet/ICryptoKeyHandler';
|
|
10
|
+
import { ProtocolInternalState } from '../internalStates/ProtocolInternalState';
|
|
11
|
+
import { ProofWrapper, JsonData } from '../../records/types';
|
|
12
|
+
import { ImportedProof } from '../../type/types';
|
|
13
|
+
export declare class ApplicationLedgerVb extends VirtualBlockchain<ApplicationLedgerInternalState> {
|
|
14
|
+
static createApplicationLedgerVirtualBlockchain(provider: IProvider): ApplicationLedgerVb;
|
|
15
|
+
/**
|
|
16
|
+
* The draft mode allows to write unchecked microblock to the virtual blockchain
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
private draftModeEnabled;
|
|
20
|
+
constructor(provider: IProvider, state?: ApplicationLedgerInternalState);
|
|
21
|
+
isAccountIdAllowedToWrite(accountId: Hash): Promise<boolean>;
|
|
22
|
+
getVirtualBlockchainState(): Promise<{
|
|
23
|
+
expirationDay: number;
|
|
24
|
+
height: number;
|
|
25
|
+
internalState: {
|
|
26
|
+
allowedAdditionalWriters: Uint8Array<ArrayBufferLike>[];
|
|
27
|
+
allowedSignatureSchemeIds: number[];
|
|
28
|
+
allowedPkeSchemeIds: number[];
|
|
29
|
+
applicationId: Uint8Array<ArrayBufferLike>;
|
|
30
|
+
channels: {
|
|
31
|
+
name: string;
|
|
32
|
+
isPrivate: boolean;
|
|
33
|
+
creatorId: number;
|
|
34
|
+
}[];
|
|
35
|
+
actors: {
|
|
36
|
+
name: string;
|
|
37
|
+
subscribed: boolean;
|
|
38
|
+
signatureKeyHeight: number;
|
|
39
|
+
pkeKeyHeight: number;
|
|
40
|
+
sharedSecrets: {
|
|
41
|
+
peerActorId: number;
|
|
42
|
+
height: number;
|
|
43
|
+
}[];
|
|
44
|
+
invitations: {
|
|
45
|
+
channelId: number;
|
|
46
|
+
height: number;
|
|
47
|
+
}[];
|
|
48
|
+
}[];
|
|
49
|
+
};
|
|
50
|
+
lastMicroblockHash: Uint8Array<ArrayBufferLike>;
|
|
51
|
+
type: number;
|
|
52
|
+
}>;
|
|
53
|
+
getVirtualBlockchainOwnerId(): Promise<Hash>;
|
|
54
|
+
protected updateInternalState(protocolState: ProtocolInternalState, state: ApplicationLedgerInternalState, microblock: Microblock): Promise<ApplicationLedgerInternalState>;
|
|
55
|
+
protected checkMicroblockStructure(microblock: Microblock): boolean;
|
|
56
|
+
enableDraftMode(): void;
|
|
57
|
+
disableDraftMode(): void;
|
|
58
|
+
setInternalState(state: ApplicationLedgerInternalState): void;
|
|
59
|
+
isActorDefined(name: string): boolean;
|
|
60
|
+
actorIsSubscribed(name: string): boolean;
|
|
61
|
+
getInternalState(): ApplicationLedgerInternalState;
|
|
62
|
+
/**
|
|
63
|
+
* Retrieves the public encryption key of an actor by its identifier.
|
|
64
|
+
*
|
|
65
|
+
* @param actorId The identifier of the actor.
|
|
66
|
+
* @returns The public encryption key of the actor.
|
|
67
|
+
*/
|
|
68
|
+
getActorIdByPublicSignatureKey(publicKey: PublicSignatureKey): Promise<number>;
|
|
69
|
+
/**
|
|
70
|
+
* Retrieves the public encryption key of an actor by its identifier.
|
|
71
|
+
*
|
|
72
|
+
* @param actorId The identifier of the actor.
|
|
73
|
+
* @returns The public encryption key of the actor.
|
|
74
|
+
*/
|
|
75
|
+
getPublicEncryptionKeyByActorId(actorId: number): Promise<AbstractPublicEncryptionKey>;
|
|
76
|
+
/**
|
|
77
|
+
* Retrieves the public encryption key of an actor by its identifier.
|
|
78
|
+
*
|
|
79
|
+
* @param actorId The identifier of the actor.
|
|
80
|
+
* @returns The public encryption key of the actor.
|
|
81
|
+
*/
|
|
82
|
+
getPublicSignatureKeyByActorId(actorId: number): Promise<PublicSignatureKey>;
|
|
83
|
+
/**
|
|
84
|
+
* Retrieves an existing shared key between two peers, or undefined.
|
|
85
|
+
*/
|
|
86
|
+
getExistingSharedKey(hostId: number, guestId: number): Promise<Uint8Array | undefined>;
|
|
87
|
+
getChannelIdByChannelName(channelName: string): number;
|
|
88
|
+
private getActorNameById;
|
|
89
|
+
getChannelNameById(channelId: number): string;
|
|
90
|
+
getActorIdFromActorName(name: string): number;
|
|
91
|
+
getActor(name: string): {
|
|
92
|
+
name: string;
|
|
93
|
+
subscribed: boolean;
|
|
94
|
+
signatureKeyHeight: number;
|
|
95
|
+
pkeKeyHeight: number;
|
|
96
|
+
sharedSecrets: {
|
|
97
|
+
peerActorId: number;
|
|
98
|
+
height: number;
|
|
99
|
+
}[];
|
|
100
|
+
invitations: {
|
|
101
|
+
channelId: number;
|
|
102
|
+
height: number;
|
|
103
|
+
}[];
|
|
104
|
+
};
|
|
105
|
+
getAllActors(): {
|
|
106
|
+
name: string;
|
|
107
|
+
subscribed: boolean;
|
|
108
|
+
signatureKeyHeight: number;
|
|
109
|
+
pkeKeyHeight: number;
|
|
110
|
+
sharedSecrets: {
|
|
111
|
+
peerActorId: number;
|
|
112
|
+
height: number;
|
|
113
|
+
}[];
|
|
114
|
+
invitations: {
|
|
115
|
+
channelId: number;
|
|
116
|
+
height: number;
|
|
117
|
+
}[];
|
|
118
|
+
}[];
|
|
119
|
+
getAllChannels(): {
|
|
120
|
+
name: string;
|
|
121
|
+
isPrivate: boolean;
|
|
122
|
+
creatorId: number;
|
|
123
|
+
}[];
|
|
124
|
+
getOrganizationId(): Promise<Hash>;
|
|
125
|
+
/**
|
|
126
|
+
* Retrieves the application ID from the current state.
|
|
127
|
+
*
|
|
128
|
+
* @return {Hash} The application ID.
|
|
129
|
+
*/
|
|
130
|
+
getApplicationId(): Hash;
|
|
131
|
+
/**
|
|
132
|
+
* Retrieves the total number of channels currently available.
|
|
133
|
+
*
|
|
134
|
+
* @return {number} The number of channels.
|
|
135
|
+
*/
|
|
136
|
+
getNumberOfChannels(): number;
|
|
137
|
+
/**
|
|
138
|
+
* Retrieves a channel object by its unique identifier.
|
|
139
|
+
*
|
|
140
|
+
* @param {number} channelId - The unique identifier of the channel
|
|
141
|
+
*/
|
|
142
|
+
getChannelById(channelId: number): {
|
|
143
|
+
name: string;
|
|
144
|
+
isPrivate: boolean;
|
|
145
|
+
creatorId: number;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Retrieves the total number of actors currently present in the state.
|
|
149
|
+
*
|
|
150
|
+
* @return {number} The number of actors.
|
|
151
|
+
*/
|
|
152
|
+
getNumberOfActors(): number;
|
|
153
|
+
private getMicroblockMerkleRecord;
|
|
154
|
+
deriveChannelSectionKey(channelKey: Uint8Array, height: number, channelId: number): Uint8Array<ArrayBufferLike>;
|
|
155
|
+
deriveChannelSectionIv(channelKey: Uint8Array, height: number, channelId: number): Uint8Array<ArrayBufferLike>;
|
|
156
|
+
deriveChannelSectionMaterial(channelKey: Uint8Array, prefix: string, height: number, channelId: number, keyLength: number): Uint8Array<ArrayBufferLike>;
|
|
157
|
+
/**
|
|
158
|
+
*
|
|
159
|
+
* @param actorId
|
|
160
|
+
* @param channelId
|
|
161
|
+
* @param actorPrivateDecryptionKey
|
|
162
|
+
*
|
|
163
|
+
* @throws ActorNotInvitedError Occurs when no invitation of the actor has been found.
|
|
164
|
+
* @throws NoSharedSecretError Occurs when no shared secret key has been found.
|
|
165
|
+
* @throws DecryptionError Occurs when one of the encrypted channel key or encrypted shared key cannot be decrypted.
|
|
166
|
+
*/
|
|
167
|
+
getChannelKey(actorId: number, channelId: number, hostIdentity: ICryptoKeyHandler): Promise<Uint8Array<ArrayBufferLike>>;
|
|
168
|
+
/**
|
|
169
|
+
* Returns a channel key derived directly from the private key of the current actor.
|
|
170
|
+
* @param channelId
|
|
171
|
+
*/
|
|
172
|
+
deriveChannelKey(seed: Uint8Array, channelId: number): Promise<Uint8Array<ArrayBufferLike>>;
|
|
173
|
+
/**
|
|
174
|
+
* Returns a channel key from an invitation obtained directly from a microblock.
|
|
175
|
+
*
|
|
176
|
+
* An invitation contains, in particular, contains the encryption of a channel key that should be decrypted
|
|
177
|
+
* by a shared key, encrypted using the public key of the actor id.
|
|
178
|
+
*
|
|
179
|
+
* @param actorId
|
|
180
|
+
* @param channelId
|
|
181
|
+
* @param actorPrivateDecryptionKey The (asymmetric) decryption key used to decrypt the shared key, later used to decrypt the channel key.
|
|
182
|
+
* @private
|
|
183
|
+
*
|
|
184
|
+
* @throws ActorNotInvitedError Occurs when no invitation of the actor has been found.
|
|
185
|
+
* @throws NoSharedSecretError Occurs when no shared secret key has been found.
|
|
186
|
+
* @throws DecryptionError Occurs when one of the encrypted channel key or encrypted shared key cannot be decrypted.
|
|
187
|
+
*/
|
|
188
|
+
private getChannelKeyFromInvitation;
|
|
189
|
+
/**
|
|
190
|
+
* Returns an instance of an intermediate representation defining only the channels.
|
|
191
|
+
*/
|
|
192
|
+
/**
|
|
193
|
+
* Exports a proof containing intermediate representations for all microblocks up to the current height of the virtual blockchain.
|
|
194
|
+
*
|
|
195
|
+
* @param {Object} customInfo - Custom information to include in the proof.
|
|
196
|
+
* @param hostPrivateSignatureKey
|
|
197
|
+
* @param hostPrivateDecryptionKey
|
|
198
|
+
* @param {string} customInfo.author - The author of the proof file.
|
|
199
|
+
* @return {Promise<Object>} A promise that resolves to an object containing metadata and the exported proof data.
|
|
200
|
+
* @return {Object} return.info - Metadata about the proof.
|
|
201
|
+
* @return {string} return.info.title - A title describing the proof file.
|
|
202
|
+
* @return {string} return.info.date - The date the proof was created, in ISO format.
|
|
203
|
+
* @return {string} return.info.author - The author of the proof file.
|
|
204
|
+
* @return {string} return.info.virtualBlockchainIdentifier - The identifier of the virtual blockchain.
|
|
205
|
+
* @return {Array<Object>} return.proofs - An array of exported proof data for each microblock.
|
|
206
|
+
* @return {number} return.proofs[].height - The height of the microblock.
|
|
207
|
+
* @return {Object} return.proofs[].data - The proof data for the corresponding microblock.
|
|
208
|
+
*/
|
|
209
|
+
exportProof(customInfo: {
|
|
210
|
+
author: string;
|
|
211
|
+
}, hostIdentity: ICryptoKeyHandler): Promise<ProofWrapper>;
|
|
212
|
+
/**
|
|
213
|
+
*
|
|
214
|
+
* @param proofObject
|
|
215
|
+
* @param hostPrivateSignatureKey
|
|
216
|
+
* @param hostPrivateDecryptionKey
|
|
217
|
+
* @throws ProofVerificationFailedError Occurs when the provided proof is not verified.
|
|
218
|
+
*/
|
|
219
|
+
importProof(proofWrapper: ProofWrapper): Promise<ImportedProof[]>;
|
|
220
|
+
/**
|
|
221
|
+
* Retrieves a record by fetching the microblock intermediate representation
|
|
222
|
+
* and exporting it to JSON.
|
|
223
|
+
*
|
|
224
|
+
* @param {Height} height - The height at which the record is to be fetched.
|
|
225
|
+
* @param hostPrivateSignatureKey
|
|
226
|
+
* @param {AbstractPrivateDecryptionKey} [hostPrivateDecryptionKey] - Optional private decryption key for the host.
|
|
227
|
+
* @return {Promise<T>} A promise that resolves with the exported record in JSON format.
|
|
228
|
+
*/
|
|
229
|
+
getRecord(height: Height, hostIdentity?: ICryptoKeyHandler): Promise<JsonData>;
|
|
230
|
+
/**
|
|
231
|
+
Section callbacks
|
|
232
|
+
*/
|
|
233
|
+
isActorInChannel(channelId: number, actorId: number): Promise<boolean>;
|
|
234
|
+
}
|
|
235
|
+
//# sourceMappingURL=ApplicationLedgerVb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationLedgerVb.d.ts","sourceRoot":"","sources":["../../../src/blockchain/virtualBlockchains/ApplicationLedgerVb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAetD,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAEH,2BAA2B,EAC9B,MAAM,kFAAkF,CAAC;AAK1F,OAAO,EAAC,kBAAkB,EAAC,MAAM,2CAA2C,CAAC;AAM7E,OAAO,EAAC,IAAI,EAAC,MAAM,qBAAqB,CAAC;AACzC,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAGzC,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAC,8BAA8B,EAAC,MAAM,kDAAkD,CAAC;AAEhG,OAAO,EAAC,iBAAiB,EAAC,MAAM,gCAAgC,CAAC;AAGjE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yCAAyC,CAAC;AAK9E,OAAO,EAAC,YAAY,EAAE,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAI/C,qBAAa,mBAAoB,SAAQ,iBAAiB,CAAC,8BAA8B,CAAC;IAKtF,MAAM,CAAC,wCAAwC,CAAC,QAAQ,EAAE,SAAS;IASnE;;;OAGG;IACH,OAAO,CAAC,gBAAgB,CAAmB;gBAE/B,QAAQ,EAAE,SAAS,EAAE,KAAK,GAAE,8BAAoF;IAItH,yBAAyB,CAAC,SAAS,EAAC,IAAI;IAexC,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAezB,2BAA2B;cAMjB,mBAAmB,CAAC,aAAa,EAAE,qBAAqB,EAAE,KAAK,EAAE,8BAA8B,EAAE,UAAU,EAAE,UAAU;IAQvI,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAC,UAAU;IAMxD,eAAe;IAGf,gBAAgB;IAKhB,gBAAgB,CAAC,KAAK,EAAE,8BAA8B;IAKtD,cAAc,CAAC,IAAI,EAAE,MAAM;IAI3B,iBAAiB,CAAC,IAAI,EAAE,MAAM;IAK9B,gBAAgB;IAKhB;;;;;OAKG;IACG,8BAA8B,CAAC,SAAS,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;IAiDpF;;;;;OAKG;IACG,+BAA+B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,CAAC;IA4B5F;;;;;OAKG;IACG,8BAA8B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA2BlF;;OAEG;IACG,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IA4B5F,yBAAyB,CAAC,WAAW,EAAE,MAAM;IAI7C,OAAO,CAAC,gBAAgB;IAKxB,kBAAkB,CAAC,SAAS,EAAE,MAAM;IAKpC,uBAAuB,CAAC,IAAI,EAAE,MAAM;IAIpC,QAAQ,CAAC,IAAI,EAAE,MAAM;;;;;;;;;;;;;;IAIrB,YAAY;;;;;;;;;;;;;;IAIZ,cAAc;;;;;IAIR,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAOxC;;;;OAIG;IACH,gBAAgB,IAAI,IAAI;IAIxB;;;;OAIG;IACH,mBAAmB,IAAI,MAAM;IAI7B;;;;OAIG;IACH,cAAc,CAAC,SAAS,EAAE,MAAM;;;;;IAIhC;;;;OAIG;IACH,iBAAiB,IAAI,MAAM;YAIb,yBAAyB;IAwFvC,uBAAuB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAIjF,sBAAsB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAIhF,4BAA4B,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAezH;;;;;;;;;OASG;IACG,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,iBAAiB;IAwBvF;;;OAGG;IACG,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM;IAe1D;;;;;;;;;;;;;;OAcG;YACW,2BAA2B;IA2EzC;;OAEG;IAmBH;;;;;;;;;;;;;;;;OAgBG;IACG,WAAW,CACb,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,EAC9B,YAAY,EAAE,iBAAiB,GAChC,OAAO,CAAC,YAAY,CAAC;IAqBxB;;;;;;OAMG;IACG,WAAW,CACb,YAAY,EAAE,YAAY,GAC3B,OAAO,CAAC,aAAa,EAAE,CAAC;IAqD3B;;;;;;;;OAQG;IACG,SAAS,CACX,MAAM,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,iBAAiB,GACjC,OAAO,CAAC,QAAQ,CAAC;IAMpB;;OAEG;IAqJG,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAI5D"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { VirtualBlockchain } from './VirtualBlockchain';
|
|
2
|
+
import { Microblock } from '../microblock/Microblock';
|
|
3
|
+
import { IProvider } from '../../providers/IProvider';
|
|
4
|
+
import { ApplicationInternalState } from '../internalStates/ApplicationInternalState';
|
|
5
|
+
import { ProtocolInternalState } from '../internalStates/ProtocolInternalState';
|
|
6
|
+
import { SectionType } from '../../type/valibot/blockchain/section/SectionType';
|
|
7
|
+
export declare class ApplicationVb extends VirtualBlockchain<ApplicationInternalState> {
|
|
8
|
+
constructor(provider: IProvider, state?: ApplicationInternalState);
|
|
9
|
+
protected updateInternalState(protocolState: ProtocolInternalState, state: ApplicationInternalState, microblock: Microblock): Promise<ApplicationInternalState>;
|
|
10
|
+
getVirtualBlockchainState(): Promise<{
|
|
11
|
+
expirationDay: number;
|
|
12
|
+
height: number;
|
|
13
|
+
internalState: {
|
|
14
|
+
organizationId: Uint8Array<ArrayBufferLike>;
|
|
15
|
+
descriptionHeight: number;
|
|
16
|
+
};
|
|
17
|
+
lastMicroblockHash: Uint8Array<ArrayBufferLike>;
|
|
18
|
+
type: number;
|
|
19
|
+
}>;
|
|
20
|
+
getVirtualBlockchainOwnerId(): Promise<import('../../common').Hash>;
|
|
21
|
+
protected checkMicroblockStructure(microblock: Microblock): boolean;
|
|
22
|
+
getOrganizationId(): import('../../common').Hash;
|
|
23
|
+
getApplicationDescription(): Promise<{
|
|
24
|
+
type: SectionType.APP_DESCRIPTION;
|
|
25
|
+
name: string;
|
|
26
|
+
logoUrl: string;
|
|
27
|
+
homepageUrl: string;
|
|
28
|
+
description: string;
|
|
29
|
+
misc?: {
|
|
30
|
+
[x: string]: string;
|
|
31
|
+
} | undefined;
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=ApplicationVb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationVb.d.ts","sourceRoot":"","sources":["../../../src/blockchain/virtualBlockchains/ApplicationVb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAGpD,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAC,wBAAwB,EAAC,MAAM,4CAA4C,CAAC;AAEpF,OAAO,EAAC,qBAAqB,EAAC,MAAM,yCAAyC,CAAC;AAE9E,OAAO,EAAC,WAAW,EAAC,MAAM,mDAAmD,CAAC;AAE9E,qBAAa,aAAc,SAAQ,iBAAiB,CAAC,wBAAwB,CAAC;gBAK9D,QAAQ,EAAE,SAAS,EAAG,KAAK,GAAE,wBAAwE;cAKjG,mBAAmB,CAAC,aAAa,EAAE,qBAAqB,EAAE,KAAK,EAAE,wBAAwB,EAAE,UAAU,EAAE,UAAU;IAQ3H,yBAAyB;;;;;;;;;;IAczB,2BAA2B;IAMjC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO;IAKnE,iBAAiB;IAIX,yBAAyB;;;;;;;;;;CAUlC"}
|