@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.
Files changed (486) hide show
  1. package/dist/blockchain/feesCalculator/FeesCalculationFormulaFactory.d.ts +13 -0
  2. package/dist/blockchain/feesCalculator/FeesCalculationFormulaFactory.d.ts.map +1 -0
  3. package/dist/blockchain/feesCalculator/FirstFeesFormula.d.ts +28 -0
  4. package/dist/blockchain/feesCalculator/FirstFeesFormula.d.ts.map +1 -0
  5. package/dist/blockchain/feesCalculator/IFeesFormula.d.ts +19 -0
  6. package/dist/blockchain/feesCalculator/IFeesFormula.d.ts.map +1 -0
  7. package/dist/blockchain/feesCalculator/RetentionCostCalculator.d.ts +9 -0
  8. package/dist/blockchain/feesCalculator/RetentionCostCalculator.d.ts.map +1 -0
  9. package/dist/blockchain/internalStates/AccountInternalState.d.ts +14 -0
  10. package/dist/blockchain/internalStates/AccountInternalState.d.ts.map +1 -0
  11. package/dist/blockchain/internalStates/ApplicationInternalState.d.ts +16 -0
  12. package/dist/blockchain/internalStates/ApplicationInternalState.d.ts.map +1 -0
  13. package/dist/blockchain/internalStates/ApplicationLedgerInternalState.d.ts +102 -0
  14. package/dist/blockchain/internalStates/ApplicationLedgerInternalState.d.ts.map +1 -0
  15. package/dist/blockchain/internalStates/IInternalState.d.ts +4 -0
  16. package/dist/blockchain/internalStates/IInternalState.d.ts.map +1 -0
  17. package/dist/blockchain/internalStates/IInternalStateUpdater.d.ts +11 -0
  18. package/dist/blockchain/internalStates/IInternalStateUpdater.d.ts.map +1 -0
  19. package/dist/blockchain/internalStates/InternalStateFactory.d.ts +6 -0
  20. package/dist/blockchain/internalStates/InternalStateFactory.d.ts.map +1 -0
  21. package/dist/blockchain/internalStates/OrganizationInternalState.d.ts +15 -0
  22. package/dist/blockchain/internalStates/OrganizationInternalState.d.ts.map +1 -0
  23. package/dist/blockchain/internalStates/ProtocolInternalState.d.ts +62 -0
  24. package/dist/blockchain/internalStates/ProtocolInternalState.d.ts.map +1 -0
  25. package/dist/blockchain/internalStates/ValidatorNodeInternalState.d.ts +24 -0
  26. package/dist/blockchain/internalStates/ValidatorNodeInternalState.d.ts.map +1 -0
  27. package/dist/blockchain/internalStatesUpdater/AccountInternalStateUpdater.d.ts +17 -0
  28. package/dist/blockchain/internalStatesUpdater/AccountInternalStateUpdater.d.ts.map +1 -0
  29. package/dist/blockchain/internalStatesUpdater/ApplicationInternalStateUpdater.d.ts +8 -0
  30. package/dist/blockchain/internalStatesUpdater/ApplicationInternalStateUpdater.d.ts.map +1 -0
  31. package/dist/blockchain/internalStatesUpdater/ApplicationLedgerLocalStateUpdater.d.ts +26 -0
  32. package/dist/blockchain/internalStatesUpdater/ApplicationLedgerLocalStateUpdater.d.ts.map +1 -0
  33. package/dist/blockchain/internalStatesUpdater/InternalStateUpdaterFactory.d.ts +23 -0
  34. package/dist/blockchain/internalStatesUpdater/InternalStateUpdaterFactory.d.ts.map +1 -0
  35. package/dist/blockchain/internalStatesUpdater/OrganizationInternalStateUpdater.d.ts +8 -0
  36. package/dist/blockchain/internalStatesUpdater/OrganizationInternalStateUpdater.d.ts.map +1 -0
  37. package/dist/blockchain/internalStatesUpdater/ProtocolInternalStateUpdater.d.ts +9 -0
  38. package/dist/blockchain/internalStatesUpdater/ProtocolInternalStateUpdater.d.ts.map +1 -0
  39. package/dist/blockchain/internalStatesUpdater/ValidatorNodeInternalStateUpdater.d.ts +9 -0
  40. package/dist/blockchain/internalStatesUpdater/ValidatorNodeInternalStateUpdater.d.ts.map +1 -0
  41. package/dist/blockchain/microblock/Microblock.d.ts +349 -0
  42. package/dist/blockchain/microblock/Microblock.d.ts.map +1 -0
  43. package/dist/blockchain/microblock/MicroblockConsistencyChecker.d.ts +49 -0
  44. package/dist/blockchain/microblock/MicroblockConsistencyChecker.d.ts.map +1 -0
  45. package/dist/blockchain/microblock/TimestampValidationResult.d.ts +6 -0
  46. package/dist/blockchain/microblock/TimestampValidationResult.d.ts.map +1 -0
  47. package/dist/blockchain/structureCheckers/AccountMicroblockStructureChecker.d.ts +7 -0
  48. package/dist/blockchain/structureCheckers/AccountMicroblockStructureChecker.d.ts.map +1 -0
  49. package/dist/blockchain/structureCheckers/ApplicationLedgerMicroblockStructureChecker.d.ts +7 -0
  50. package/dist/blockchain/structureCheckers/ApplicationLedgerMicroblockStructureChecker.d.ts.map +1 -0
  51. package/dist/blockchain/structureCheckers/ApplicationMicroblockStructureChecker.d.ts +7 -0
  52. package/dist/blockchain/structureCheckers/ApplicationMicroblockStructureChecker.d.ts.map +1 -0
  53. package/dist/blockchain/structureCheckers/IMicroblockStructureChecker.d.ts +5 -0
  54. package/dist/blockchain/structureCheckers/IMicroblockStructureChecker.d.ts.map +1 -0
  55. package/dist/blockchain/structureCheckers/OrganizationMicroblockStructureChecker.d.ts +7 -0
  56. package/dist/blockchain/structureCheckers/OrganizationMicroblockStructureChecker.d.ts.map +1 -0
  57. package/dist/blockchain/structureCheckers/ProtocolMicroblockStructureChecker.d.ts +7 -0
  58. package/dist/blockchain/structureCheckers/ProtocolMicroblockStructureChecker.d.ts.map +1 -0
  59. package/dist/blockchain/structureCheckers/SectionConstraint.d.ts +9 -0
  60. package/dist/blockchain/structureCheckers/SectionConstraint.d.ts.map +1 -0
  61. package/dist/blockchain/structureCheckers/StructureChecker.d.ts +280 -0
  62. package/dist/blockchain/structureCheckers/StructureChecker.d.ts.map +1 -0
  63. package/dist/blockchain/structureCheckers/ValidatorNodeMicroblockStructureChecker.d.ts +7 -0
  64. package/dist/blockchain/structureCheckers/ValidatorNodeMicroblockStructureChecker.d.ts.map +1 -0
  65. package/dist/blockchain/virtualBlockchains/AccountVb.d.ts +37 -0
  66. package/dist/blockchain/virtualBlockchains/AccountVb.d.ts.map +1 -0
  67. package/dist/blockchain/virtualBlockchains/ApplicationLedgerMicroblockBuilder.d.ts +19 -0
  68. package/dist/blockchain/virtualBlockchains/ApplicationLedgerMicroblockBuilder.d.ts.map +1 -0
  69. package/dist/blockchain/virtualBlockchains/ApplicationLedgerVb.d.ts +235 -0
  70. package/dist/blockchain/virtualBlockchains/ApplicationLedgerVb.d.ts.map +1 -0
  71. package/dist/blockchain/virtualBlockchains/ApplicationVb.d.ts +34 -0
  72. package/dist/blockchain/virtualBlockchains/ApplicationVb.d.ts.map +1 -0
  73. package/dist/blockchain/virtualBlockchains/OrganizationVb.d.ts +27 -0
  74. package/dist/blockchain/virtualBlockchains/OrganizationVb.d.ts.map +1 -0
  75. package/dist/blockchain/virtualBlockchains/ProtocolVb.d.ts +71 -0
  76. package/dist/blockchain/virtualBlockchains/ProtocolVb.d.ts.map +1 -0
  77. package/dist/blockchain/virtualBlockchains/ValidatorNodeVb.d.ts +39 -0
  78. package/dist/blockchain/virtualBlockchains/ValidatorNodeVb.d.ts.map +1 -0
  79. package/dist/blockchain/virtualBlockchains/VirtualBlockchain.d.ts +187 -0
  80. package/dist/blockchain/virtualBlockchains/VirtualBlockchain.d.ts.map +1 -0
  81. package/dist/blockchain/virtualBlockchains/WalletRequestBasedApplicationLedgerMicroblockBuilder.d.ts +51 -0
  82. package/dist/blockchain/virtualBlockchains/WalletRequestBasedApplicationLedgerMicroblockBuilder.d.ts.map +1 -0
  83. package/dist/blockchain/virtualBlockchains/events/OnMicroblockInsertedEventListener.d.ts +6 -0
  84. package/dist/blockchain/virtualBlockchains/events/OnMicroblockInsertedEventListener.d.ts.map +1 -0
  85. package/dist/blockchain/virtualBlockchains/fallbacks/IMicroblockSearchFailureFallback.d.ts +17 -0
  86. package/dist/blockchain/virtualBlockchains/fallbacks/IMicroblockSearchFailureFallback.d.ts.map +1 -0
  87. package/dist/blockchain/virtualBlockchains/fallbacks/ThrownErrorMicroblockSearchFailureFallback.d.ts +8 -0
  88. package/dist/blockchain/virtualBlockchains/fallbacks/ThrownErrorMicroblockSearchFailureFallback.d.ts.map +1 -0
  89. package/dist/blockchainOld/Account.d.ts +2 -0
  90. package/dist/blockchainOld/Account.d.ts.map +1 -0
  91. package/dist/blockchainOld/Application.d.ts +2 -0
  92. package/dist/blockchainOld/Application.d.ts.map +1 -0
  93. package/dist/blockchainOld/ApplicationLedger.d.ts +2 -0
  94. package/dist/blockchainOld/ApplicationLedger.d.ts.map +1 -0
  95. package/dist/blockchainOld/Organization.d.ts +2 -0
  96. package/dist/blockchainOld/Organization.d.ts.map +1 -0
  97. package/dist/blockchainOld/Protocol.d.ts +2 -0
  98. package/dist/blockchainOld/Protocol.d.ts.map +1 -0
  99. package/dist/blockchainOld/ValidatorNode.d.ts +2 -0
  100. package/dist/blockchainOld/ValidatorNode.d.ts.map +1 -0
  101. package/dist/blockchainOld/blockchain.d.ts +2 -0
  102. package/dist/blockchainOld/blockchain.d.ts.map +1 -0
  103. package/dist/carmentis-sdk-core.cjs +2 -3
  104. package/dist/carmentis-sdk-core.es +25 -2
  105. package/dist/cometbft/CometBFTPublicKey.d.ts +10 -0
  106. package/dist/cometbft/CometBFTPublicKey.d.ts.map +1 -0
  107. package/dist/common.d.ts +243 -0
  108. package/dist/common.d.ts.map +1 -0
  109. package/dist/constants/ActorType.d.ts +6 -0
  110. package/dist/constants/ActorType.d.ts.map +1 -0
  111. package/dist/constants/chain.d.ts +16 -0
  112. package/dist/constants/chain.d.ts.map +1 -0
  113. package/dist/constants/constants.d.ts +7 -0
  114. package/dist/constants/constants.d.ts.map +1 -0
  115. package/dist/constants/data.d.ts +26 -0
  116. package/dist/constants/data.d.ts.map +1 -0
  117. package/dist/constants/economics.d.ts +42 -0
  118. package/dist/constants/economics.d.ts.map +1 -0
  119. package/dist/constants/errors.d.ts +2 -0
  120. package/dist/constants/errors.d.ts.map +1 -0
  121. package/dist/constants/schemas.d.ts +107 -0
  122. package/dist/constants/schemas.d.ts.map +1 -0
  123. package/dist/constants/sections.d.ts +141 -0
  124. package/dist/constants/sections.d.ts.map +1 -0
  125. package/dist/crypto/CryptoSchemeFactory.d.ts +46 -0
  126. package/dist/crypto/CryptoSchemeFactory.d.ts.map +1 -0
  127. package/dist/crypto/aes.d.ts +8 -0
  128. package/dist/crypto/aes.d.ts.map +1 -0
  129. package/dist/crypto/crypto.d.ts +52 -0
  130. package/dist/crypto/crypto.d.ts.map +1 -0
  131. package/dist/crypto/encoder/CryptoEncoderFactory.d.ts +15 -0
  132. package/dist/crypto/encoder/CryptoEncoderFactory.d.ts.map +1 -0
  133. package/dist/crypto/encoder/signature/BytesSignatureEncoder.d.ts +18 -0
  134. package/dist/crypto/encoder/signature/BytesSignatureEncoder.d.ts.map +1 -0
  135. package/dist/crypto/encoder/signature/HandlerBasedSignatureEncoder.d.ts +26 -0
  136. package/dist/crypto/encoder/signature/HandlerBasedSignatureEncoder.d.ts.map +1 -0
  137. package/dist/crypto/encoder/signature/ISignatureEncoderHandler.d.ts +15 -0
  138. package/dist/crypto/encoder/signature/ISignatureEncoderHandler.d.ts.map +1 -0
  139. package/dist/crypto/encoder/signature/JwkSignatureEncoder.d.ts +25 -0
  140. package/dist/crypto/encoder/signature/JwkSignatureEncoder.d.ts.map +1 -0
  141. package/dist/crypto/encoder/signature/SignatureEncoderInterface.d.ts +69 -0
  142. package/dist/crypto/encoder/signature/SignatureEncoderInterface.d.ts.map +1 -0
  143. package/dist/crypto/encoder/signature/StringSignatureEncoder.d.ts +2 -0
  144. package/dist/crypto/encoder/signature/StringSignatureEncoder.d.ts.map +1 -0
  145. package/dist/crypto/encoder/signature/hcv/BaseHCVSignatureDecoder.d.ts +55 -0
  146. package/dist/crypto/encoder/signature/hcv/BaseHCVSignatureDecoder.d.ts.map +1 -0
  147. package/dist/crypto/encoder/signature/hcv/BaseHCVSignatureEncoder.d.ts +47 -0
  148. package/dist/crypto/encoder/signature/hcv/BaseHCVSignatureEncoder.d.ts.map +1 -0
  149. package/dist/crypto/encoder/signature/hcv/HCVSignatureEncoder.d.ts +2 -0
  150. package/dist/crypto/encoder/signature/hcv/HCVSignatureEncoder.d.ts.map +1 -0
  151. package/dist/crypto/encoder/signature/hcv/MLDSA65HCVSignatureDecoder.d.ts +23 -0
  152. package/dist/crypto/encoder/signature/hcv/MLDSA65HCVSignatureDecoder.d.ts.map +1 -0
  153. package/dist/crypto/encoder/signature/hcv/MLDSA65HCVSignatureEncoder.d.ts +37 -0
  154. package/dist/crypto/encoder/signature/hcv/MLDSA65HCVSignatureEncoder.d.ts.map +1 -0
  155. package/dist/crypto/encoder/signature/hcv/NativeHCVSignatureDecoder.d.ts +45 -0
  156. package/dist/crypto/encoder/signature/hcv/NativeHCVSignatureDecoder.d.ts.map +1 -0
  157. package/dist/crypto/encoder/signature/hcv/NativeHCVSignatureEncoder.d.ts +31 -0
  158. package/dist/crypto/encoder/signature/hcv/NativeHCVSignatureEncoder.d.ts.map +1 -0
  159. package/dist/crypto/encoder/signature/hcv/PkmsSecp256k1SignatureDecoder.d.ts +38 -0
  160. package/dist/crypto/encoder/signature/hcv/PkmsSecp256k1SignatureDecoder.d.ts.map +1 -0
  161. package/dist/crypto/encoder/signature/hcv/PkmsSecp256k1SignatureEncoder.d.ts +44 -0
  162. package/dist/crypto/encoder/signature/hcv/PkmsSecp256k1SignatureEncoder.d.ts.map +1 -0
  163. package/dist/crypto/encoder/signature/hcv/Secp256k1HCVSignatureDecoder.d.ts +10 -0
  164. package/dist/crypto/encoder/signature/hcv/Secp256k1HCVSignatureDecoder.d.ts.map +1 -0
  165. package/dist/crypto/encoder/signature/hcv/Secp256k1HCVSignatureEncoder.d.ts +32 -0
  166. package/dist/crypto/encoder/signature/hcv/Secp256k1HCVSignatureEncoder.d.ts.map +1 -0
  167. package/dist/crypto/encryption/public-key-encryption/HCVPkeEncoder.d.ts +18 -0
  168. package/dist/crypto/encryption/public-key-encryption/HCVPkeEncoder.d.ts.map +1 -0
  169. package/dist/crypto/encryption/public-key-encryption/MlKemCiphertextEncoder.d.ts +13 -0
  170. package/dist/crypto/encryption/public-key-encryption/MlKemCiphertextEncoder.d.ts.map +1 -0
  171. package/dist/crypto/encryption/public-key-encryption/MlKemPrivateDecryptionKey.d.ts +24 -0
  172. package/dist/crypto/encryption/public-key-encryption/MlKemPrivateDecryptionKey.d.ts.map +1 -0
  173. package/dist/crypto/encryption/public-key-encryption/MlKemPublicEncryptionKey.d.ts +10 -0
  174. package/dist/crypto/encryption/public-key-encryption/MlKemPublicEncryptionKey.d.ts.map +1 -0
  175. package/dist/crypto/encryption/public-key-encryption/MlKemPublicKeyEncryptionScheme.d.ts +7 -0
  176. package/dist/crypto/encryption/public-key-encryption/MlKemPublicKeyEncryptionScheme.d.ts.map +1 -0
  177. package/dist/crypto/encryption/public-key-encryption/PkeEncoderFactory.d.ts +13 -0
  178. package/dist/crypto/encryption/public-key-encryption/PkeEncoderFactory.d.ts.map +1 -0
  179. package/dist/crypto/encryption/public-key-encryption/PkeEncoderInterface.d.ts +13 -0
  180. package/dist/crypto/encryption/public-key-encryption/PkeEncoderInterface.d.ts.map +1 -0
  181. package/dist/crypto/encryption/public-key-encryption/PublicKeyEncryptionSchemeId.d.ts +10 -0
  182. package/dist/crypto/encryption/public-key-encryption/PublicKeyEncryptionSchemeId.d.ts.map +1 -0
  183. package/dist/crypto/encryption/public-key-encryption/PublicKeyEncryptionSchemeInterface.d.ts +52 -0
  184. package/dist/crypto/encryption/public-key-encryption/PublicKeyEncryptionSchemeInterface.d.ts.map +1 -0
  185. package/dist/crypto/encryption/symmetric-encryption/encryption-interface.d.ts +179 -0
  186. package/dist/crypto/encryption/symmetric-encryption/encryption-interface.d.ts.map +1 -0
  187. package/dist/crypto/encryption/symmetric-encryption/generic-symmetric-key-encoder.d.ts +25 -0
  188. package/dist/crypto/encryption/symmetric-encryption/generic-symmetric-key-encoder.d.ts.map +1 -0
  189. package/dist/crypto/hash/hash-interface.d.ts +12 -0
  190. package/dist/crypto/hash/hash-interface.d.ts.map +1 -0
  191. package/dist/crypto/hashes.d.ts +12 -0
  192. package/dist/crypto/hashes.d.ts.map +1 -0
  193. package/dist/crypto/kdf/HKDF.d.ts +7 -0
  194. package/dist/crypto/kdf/HKDF.d.ts.map +1 -0
  195. package/dist/crypto/kdf/KeyDerivationFunction.d.ts +7 -0
  196. package/dist/crypto/kdf/KeyDerivationFunction.d.ts.map +1 -0
  197. package/dist/crypto/kdf/PBKDF2.d.ts +7 -0
  198. package/dist/crypto/kdf/PBKDF2.d.ts.map +1 -0
  199. package/dist/crypto/kdf/PasswordBasedKeyDerivationFunction.d.ts +7 -0
  200. package/dist/crypto/kdf/PasswordBasedKeyDerivationFunction.d.ts.map +1 -0
  201. package/dist/crypto/kdf/PasswordBasedKeyDerivationFunctionSchemeId.d.ts +5 -0
  202. package/dist/crypto/kdf/PasswordBasedKeyDerivationFunctionSchemeId.d.ts.map +1 -0
  203. package/dist/crypto/kdf/Scrypt.d.ts +7 -0
  204. package/dist/crypto/kdf/Scrypt.d.ts.map +1 -0
  205. package/dist/crypto/kdf/keyDerivationFunctionSchemeId.d.ts +4 -0
  206. package/dist/crypto/kdf/keyDerivationFunctionSchemeId.d.ts.map +1 -0
  207. package/dist/crypto/ml-dsa.d.ts +13 -0
  208. package/dist/crypto/ml-dsa.d.ts.map +1 -0
  209. package/dist/crypto/ml-kem.d.ts +16 -0
  210. package/dist/crypto/ml-kem.d.ts.map +1 -0
  211. package/dist/crypto/random.d.ts +10 -0
  212. package/dist/crypto/random.d.ts.map +1 -0
  213. package/dist/crypto/secp256k1.d.ts +10 -0
  214. package/dist/crypto/secp256k1.d.ts.map +1 -0
  215. package/dist/crypto/signature/BasePrivateSignatureKey.d.ts +27 -0
  216. package/dist/crypto/signature/BasePrivateSignatureKey.d.ts.map +1 -0
  217. package/dist/crypto/signature/BasePublicSignatureKey.d.ts +24 -0
  218. package/dist/crypto/signature/BasePublicSignatureKey.d.ts.map +1 -0
  219. package/dist/crypto/signature/PrivateSignatureKey.d.ts +17 -0
  220. package/dist/crypto/signature/PrivateSignatureKey.d.ts.map +1 -0
  221. package/dist/crypto/signature/PublicSignatureKey.d.ts +27 -0
  222. package/dist/crypto/signature/PublicSignatureKey.d.ts.map +1 -0
  223. package/dist/crypto/signature/SignatureAlgorithmId.d.ts +8 -0
  224. package/dist/crypto/signature/SignatureAlgorithmId.d.ts.map +1 -0
  225. package/dist/crypto/signature/SignatureScheme.d.ts +11 -0
  226. package/dist/crypto/signature/SignatureScheme.d.ts.map +1 -0
  227. package/dist/crypto/signature/SignatureSchemeId.d.ts +16 -0
  228. package/dist/crypto/signature/SignatureSchemeId.d.ts.map +1 -0
  229. package/dist/crypto/signature/ed25519/Ed25519PrivateSignatureKey.d.ts +38 -0
  230. package/dist/crypto/signature/ed25519/Ed25519PrivateSignatureKey.d.ts.map +1 -0
  231. package/dist/crypto/signature/ed25519/Ed25519PublicSignatureKey.d.ts +17 -0
  232. package/dist/crypto/signature/ed25519/Ed25519PublicSignatureKey.d.ts.map +1 -0
  233. package/dist/crypto/signature/ed25519/Ed25519SignatureScheme.d.ts +12 -0
  234. package/dist/crypto/signature/ed25519/Ed25519SignatureScheme.d.ts.map +1 -0
  235. package/dist/crypto/signature/ml-dsa-65.d.ts +86 -0
  236. package/dist/crypto/signature/ml-dsa-65.d.ts.map +1 -0
  237. package/dist/crypto/signature/pkms/PkmsSecp256k1PrivateSignatureKey.d.ts +28 -0
  238. package/dist/crypto/signature/pkms/PkmsSecp256k1PrivateSignatureKey.d.ts.map +1 -0
  239. package/dist/crypto/signature/pkms/pkmsCredentialProvider/EnvApiKeyPkmsCredentialProvider.d.ts +5 -0
  240. package/dist/crypto/signature/pkms/pkmsCredentialProvider/EnvApiKeyPkmsCredentialProvider.d.ts.map +1 -0
  241. package/dist/crypto/signature/pkms/pkmsCredentialProvider/IPkmsCredentialProvider.d.ts +4 -0
  242. package/dist/crypto/signature/pkms/pkmsCredentialProvider/IPkmsCredentialProvider.d.ts.map +1 -0
  243. package/dist/crypto/signature/pkms/pkmsCredentialProvider/SelfProvidedApiKeyPkmsCredentialProvider.d.ts +7 -0
  244. package/dist/crypto/signature/pkms/pkmsCredentialProvider/SelfProvidedApiKeyPkmsCredentialProvider.d.ts.map +1 -0
  245. package/dist/crypto/signature/secp256k1/Secp256k1PrivateSignatureKey.d.ts +38 -0
  246. package/dist/crypto/signature/secp256k1/Secp256k1PrivateSignatureKey.d.ts.map +1 -0
  247. package/dist/crypto/signature/secp256k1/Secp256k1PublicSignatureKey.d.ts +17 -0
  248. package/dist/crypto/signature/secp256k1/Secp256k1PublicSignatureKey.d.ts.map +1 -0
  249. package/dist/crypto/signature/secp256k1/Secp256k1SignatureScheme.d.ts +12 -0
  250. package/dist/crypto/signature/secp256k1/Secp256k1SignatureScheme.d.ts.map +1 -0
  251. package/dist/crypto/signatureCache/SignatureCacheDisabled.d.ts +9 -0
  252. package/dist/crypto/signatureCache/SignatureCacheDisabled.d.ts.map +1 -0
  253. package/dist/crypto/signatureCache/SignatureCacheEntry.d.ts +6 -0
  254. package/dist/crypto/signatureCache/SignatureCacheEntry.d.ts.map +1 -0
  255. package/dist/crypto/signatureCache/SignatureCacheInterface.d.ts +7 -0
  256. package/dist/crypto/signatureCache/SignatureCacheInterface.d.ts.map +1 -0
  257. package/dist/crypto/signatureCache/SignatureCacheMonothread.d.ts +10 -0
  258. package/dist/crypto/signatureCache/SignatureCacheMonothread.d.ts.map +1 -0
  259. package/dist/crypto/signatureCache/test.d.ts +2 -0
  260. package/dist/crypto/signatureCache/test.d.ts.map +1 -0
  261. package/dist/data/base32.d.ts +15 -0
  262. package/dist/data/base32.d.ts.map +1 -0
  263. package/dist/data/base64.d.ts +14 -0
  264. package/dist/data/base64.d.ts.map +1 -0
  265. package/dist/data/byteStreams.d.ts +48 -0
  266. package/dist/data/byteStreams.d.ts.map +1 -0
  267. package/dist/data/messageSerializer.d.ts +32 -0
  268. package/dist/data/messageSerializer.d.ts.map +1 -0
  269. package/dist/data/schemaSerializer.d.ts +44 -0
  270. package/dist/data/schemaSerializer.d.ts.map +1 -0
  271. package/dist/data/schemaValidator.d.ts +27 -0
  272. package/dist/data/schemaValidator.d.ts.map +1 -0
  273. package/dist/data/types.d.ts +23 -0
  274. package/dist/data/types.d.ts.map +1 -0
  275. package/dist/data/utf8Encoder.d.ts +8 -0
  276. package/dist/data/utf8Encoder.d.ts.map +1 -0
  277. package/dist/economics/currencies/currency-converter.d.ts +51 -0
  278. package/dist/economics/currencies/currency-converter.d.ts.map +1 -0
  279. package/dist/economics/currencies/currency.d.ts +4 -0
  280. package/dist/economics/currencies/currency.d.ts.map +1 -0
  281. package/dist/economics/currencies/euros.d.ts +9 -0
  282. package/dist/economics/currencies/euros.d.ts.map +1 -0
  283. package/dist/economics/currencies/token.d.ts +167 -0
  284. package/dist/economics/currencies/token.d.ts.map +1 -0
  285. package/dist/economics/economics.d.ts +10 -0
  286. package/dist/economics/economics.d.ts.map +1 -0
  287. package/dist/entities/Hash.d.ts +60 -0
  288. package/dist/entities/Hash.d.ts.map +1 -0
  289. package/dist/entities/Optional.d.ts +14 -0
  290. package/dist/entities/Optional.d.ts.map +1 -0
  291. package/dist/entities/ProofVerificationResult.d.ts +48 -0
  292. package/dist/entities/ProofVerificationResult.d.ts.map +1 -0
  293. package/dist/errors/CometBFTErrorCode.d.ts +13 -0
  294. package/dist/errors/CometBFTErrorCode.d.ts.map +1 -0
  295. package/dist/errors/carmentis-error.d.ts +175 -0
  296. package/dist/errors/carmentis-error.d.ts.map +1 -0
  297. package/dist/errors/type-checking-failure-error.d.ts +5 -0
  298. package/dist/errors/type-checking-failure-error.d.ts.map +1 -0
  299. package/dist/network/network.d.ts +2 -0
  300. package/dist/network/network.d.ts.map +1 -0
  301. package/dist/providers/AbstractProvider.d.ts +43 -0
  302. package/dist/providers/AbstractProvider.d.ts.map +1 -0
  303. package/dist/providers/ExpirationDate.d.ts +11 -0
  304. package/dist/providers/ExpirationDate.d.ts.map +1 -0
  305. package/dist/providers/IExternalProvider.d.ts +23 -0
  306. package/dist/providers/IExternalProvider.d.ts.map +1 -0
  307. package/dist/providers/IInternalProvider.d.ts +20 -0
  308. package/dist/providers/IInternalProvider.d.ts.map +1 -0
  309. package/dist/providers/IProvider.d.ts +56 -0
  310. package/dist/providers/IProvider.d.ts.map +1 -0
  311. package/dist/providers/KeyedProvider.d.ts +2 -0
  312. package/dist/providers/KeyedProvider.d.ts.map +1 -0
  313. package/dist/providers/MemoryProvider.d.ts +45 -0
  314. package/dist/providers/MemoryProvider.d.ts.map +1 -0
  315. package/dist/providers/NetworkProvider.d.ts +145 -0
  316. package/dist/providers/NetworkProvider.d.ts.map +1 -0
  317. package/dist/providers/NullMemoryProvider.d.ts +31 -0
  318. package/dist/providers/NullMemoryProvider.d.ts.map +1 -0
  319. package/dist/providers/NullNetworkProvider.d.ts +28 -0
  320. package/dist/providers/NullNetworkProvider.d.ts.map +1 -0
  321. package/dist/providers/Provider.d.ts +84 -0
  322. package/dist/providers/Provider.d.ts.map +1 -0
  323. package/dist/providers/ProviderFactory.d.ts +24 -0
  324. package/dist/providers/ProviderFactory.d.ts.map +1 -0
  325. package/dist/providers/nodeRpc/CometBFTNodeWebSocket.d.ts +14 -0
  326. package/dist/providers/nodeRpc/CometBFTNodeWebSocket.d.ts.map +1 -0
  327. package/dist/providers/nodeRpc/NewBlockEventType.d.ts +79 -0
  328. package/dist/providers/nodeRpc/NewBlockEventType.d.ts.map +1 -0
  329. package/dist/providers/nodeRpc/RPCNodeStatusResponseSchema.d.ts +45 -0
  330. package/dist/providers/nodeRpc/RPCNodeStatusResponseSchema.d.ts.map +1 -0
  331. package/dist/providers/nodeRpc/RPCNodeWebSocketCallback.d.ts +5 -0
  332. package/dist/providers/nodeRpc/RPCNodeWebSocketCallback.d.ts.map +1 -0
  333. package/dist/providers/serverNetworkProvider.d.ts +5 -0
  334. package/dist/providers/serverNetworkProvider.d.ts.map +1 -0
  335. package/dist/records/MerkleLeaf.d.ts +27 -0
  336. package/dist/records/MerkleLeaf.d.ts.map +1 -0
  337. package/dist/records/MerkleRecord.d.ts +20 -0
  338. package/dist/records/MerkleRecord.d.ts.map +1 -0
  339. package/dist/records/OnChainRecord.d.ts +20 -0
  340. package/dist/records/OnChainRecord.d.ts.map +1 -0
  341. package/dist/records/PositionedLeaf.d.ts +8 -0
  342. package/dist/records/PositionedLeaf.d.ts.map +1 -0
  343. package/dist/records/ProofDocument.d.ts +74 -0
  344. package/dist/records/ProofDocument.d.ts.map +1 -0
  345. package/dist/records/ProofDocumentVB.d.ts +14 -0
  346. package/dist/records/ProofDocumentVB.d.ts.map +1 -0
  347. package/dist/records/ProofRecord.d.ts +26 -0
  348. package/dist/records/ProofRecord.d.ts.map +1 -0
  349. package/dist/records/Record.d.ts +49 -0
  350. package/dist/records/Record.d.ts.map +1 -0
  351. package/dist/records/RecordByChannels.d.ts +14 -0
  352. package/dist/records/RecordByChannels.d.ts.map +1 -0
  353. package/dist/records/SaltShaker.d.ts +11 -0
  354. package/dist/records/SaltShaker.d.ts.map +1 -0
  355. package/dist/records/types.d.ts +615 -0
  356. package/dist/records/types.d.ts.map +1 -0
  357. package/dist/records-old/Merklizer.d.ts +12 -0
  358. package/dist/records-old/Merklizer.d.ts.map +1 -0
  359. package/dist/records-old/PepperMerklizer.d.ts +20 -0
  360. package/dist/records-old/PepperMerklizer.d.ts.map +1 -0
  361. package/dist/records-old/SaltMerklizer.d.ts +15 -0
  362. package/dist/records-old/SaltMerklizer.d.ts.map +1 -0
  363. package/dist/records-old/intermediateRepresentation.d.ts +176 -0
  364. package/dist/records-old/intermediateRepresentation.d.ts.map +1 -0
  365. package/dist/records-old/maskManager.d.ts +15 -0
  366. package/dist/records-old/maskManager.d.ts.map +1 -0
  367. package/dist/records-old/messageManager.d.ts +8 -0
  368. package/dist/records-old/messageManager.d.ts.map +1 -0
  369. package/dist/records-old/pathManager.d.ts +17 -0
  370. package/dist/records-old/pathManager.d.ts.map +1 -0
  371. package/dist/trees/merkleTree.d.ts +18 -0
  372. package/dist/trees/merkleTree.d.ts.map +1 -0
  373. package/dist/trees/radixChecker.d.ts +6 -0
  374. package/dist/trees/radixChecker.d.ts.map +1 -0
  375. package/dist/trees/radixConstants.d.ts +6 -0
  376. package/dist/trees/radixConstants.d.ts.map +1 -0
  377. package/dist/trees/radixUtils.d.ts +14 -0
  378. package/dist/trees/radixUtils.d.ts.map +1 -0
  379. package/dist/type/AccountHistoryView.d.ts +41 -0
  380. package/dist/type/AccountHistoryView.d.ts.map +1 -0
  381. package/dist/type/AppLedgerStateUpdateRequest.d.ts +83 -0
  382. package/dist/type/AppLedgerStateUpdateRequest.d.ts.map +1 -0
  383. package/dist/type/Height.d.ts +12 -0
  384. package/dist/type/Height.d.ts.map +1 -0
  385. package/dist/type/Transaction.d.ts +85 -0
  386. package/dist/type/Transaction.d.ts.map +1 -0
  387. package/dist/type/VirtualBlockchainLabel.d.ts +5 -0
  388. package/dist/type/VirtualBlockchainLabel.d.ts.map +1 -0
  389. package/dist/type/VirtualBlockchainType.d.ts +9 -0
  390. package/dist/type/VirtualBlockchainType.d.ts.map +1 -0
  391. package/dist/type/types.d.ts +45 -0
  392. package/dist/type/types.d.ts.map +1 -0
  393. package/dist/type/valibot/account/Account.d.ts +632 -0
  394. package/dist/type/valibot/account/Account.d.ts.map +1 -0
  395. package/dist/type/valibot/blockchain/economics/RetentionPolicy.d.ts +20 -0
  396. package/dist/type/valibot/blockchain/economics/RetentionPolicy.d.ts.map +1 -0
  397. package/dist/type/valibot/blockchain/microblock/MicroblockBody.d.ts +567 -0
  398. package/dist/type/valibot/blockchain/microblock/MicroblockBody.d.ts.map +1 -0
  399. package/dist/type/valibot/blockchain/microblock/MicroblockHeader.d.ts +75 -0
  400. package/dist/type/valibot/blockchain/microblock/MicroblockHeader.d.ts.map +1 -0
  401. package/dist/type/valibot/blockchain/microblock/MicroblockStruct.d.ts +608 -0
  402. package/dist/type/valibot/blockchain/microblock/MicroblockStruct.d.ts.map +1 -0
  403. package/dist/type/valibot/blockchain/protocol/ProtocolUpdate.d.ts +30 -0
  404. package/dist/type/valibot/blockchain/protocol/ProtocolUpdate.d.ts.map +1 -0
  405. package/dist/type/valibot/blockchain/protocol/ProtocolVariables.d.ts +25 -0
  406. package/dist/type/valibot/blockchain/protocol/ProtocolVariables.d.ts.map +1 -0
  407. package/dist/type/valibot/blockchain/section/SectionType.d.ts +40 -0
  408. package/dist/type/valibot/blockchain/section/SectionType.d.ts.map +1 -0
  409. package/dist/type/valibot/blockchain/section/sections.d.ts +1201 -0
  410. package/dist/type/valibot/blockchain/section/sections.d.ts.map +1 -0
  411. package/dist/type/valibot/blockchain/virtualBlockchain/internalStates.d.ts +251 -0
  412. package/dist/type/valibot/blockchain/virtualBlockchain/internalStates.d.ts.map +1 -0
  413. package/dist/type/valibot/blockchain/virtualBlockchain/virtualBlockchains.d.ts +605 -0
  414. package/dist/type/valibot/blockchain/virtualBlockchain/virtualBlockchains.d.ts.map +1 -0
  415. package/dist/type/valibot/clientBridge/ClientBridgeEncoder.d.ts +9 -0
  416. package/dist/type/valibot/clientBridge/ClientBridgeEncoder.d.ts.map +1 -0
  417. package/dist/type/valibot/clientBridge/WiQrCodeEncoder.d.ts +6 -0
  418. package/dist/type/valibot/clientBridge/WiQrCodeEncoder.d.ts.map +1 -0
  419. package/dist/type/valibot/clientBridge/clientBridgeMessages.d.ts +215 -0
  420. package/dist/type/valibot/clientBridge/clientBridgeMessages.d.ts.map +1 -0
  421. package/dist/type/valibot/network/NetworksSchema.d.ts +14 -0
  422. package/dist/type/valibot/network/NetworksSchema.d.ts.map +1 -0
  423. package/dist/type/valibot/primitives.d.ts +105 -0
  424. package/dist/type/valibot/primitives.d.ts.map +1 -0
  425. package/dist/type/valibot/provider/MicroblockInformationSchema.d.ts +55 -0
  426. package/dist/type/valibot/provider/MicroblockInformationSchema.d.ts.map +1 -0
  427. package/dist/type/valibot/provider/VirtualBlockchainInfo.d.ts +16 -0
  428. package/dist/type/valibot/provider/VirtualBlockchainInfo.d.ts.map +1 -0
  429. package/dist/type/valibot/provider/VirtualBlockchainStatus.d.ts +301 -0
  430. package/dist/type/valibot/provider/VirtualBlockchainStatus.d.ts.map +1 -0
  431. package/dist/type/valibot/provider/abci/AbciRequest.d.ts +421 -0
  432. package/dist/type/valibot/provider/abci/AbciRequest.d.ts.map +1 -0
  433. package/dist/type/valibot/provider/abci/AbciResponse.d.ts +2884 -0
  434. package/dist/type/valibot/provider/abci/AbciResponse.d.ts.map +1 -0
  435. package/dist/type/valibot/walletOperatorMessages/Schemas.d.ts +83 -0
  436. package/dist/type/valibot/walletOperatorMessages/Schemas.d.ts.map +1 -0
  437. package/dist/type/valibot/walletRequest/WalletRequestEncoder.d.ts +12 -0
  438. package/dist/type/valibot/walletRequest/WalletRequestEncoder.d.ts.map +1 -0
  439. package/dist/type/valibot/walletRequest/walletRequests.d.ts +54 -0
  440. package/dist/type/valibot/walletRequest/walletRequests.d.ts.map +1 -0
  441. package/dist/utils/AbciQueryEncoder.d.ts +9 -0
  442. package/dist/utils/AbciQueryEncoder.d.ts.map +1 -0
  443. package/dist/utils/AccountSeedEncoder.d.ts +5 -0
  444. package/dist/utils/AccountSeedEncoder.d.ts.map +1 -0
  445. package/dist/utils/AccountTransactions.d.ts +94 -0
  446. package/dist/utils/AccountTransactions.d.ts.map +1 -0
  447. package/dist/utils/ActorSeedEncoder.d.ts +5 -0
  448. package/dist/utils/ActorSeedEncoder.d.ts.map +1 -0
  449. package/dist/utils/Assertion.d.ts +4 -0
  450. package/dist/utils/Assertion.d.ts.map +1 -0
  451. package/dist/utils/BalanceAvailability.d.ts +207 -0
  452. package/dist/utils/BalanceAvailability.d.ts.map +1 -0
  453. package/dist/utils/BinaryToStringEncoderInterface.d.ts +4 -0
  454. package/dist/utils/BinaryToStringEncoderInterface.d.ts.map +1 -0
  455. package/dist/utils/BlockchainUtils.d.ts +69 -0
  456. package/dist/utils/BlockchainUtils.d.ts.map +1 -0
  457. package/dist/utils/CometBFTPublicKeyConverter.d.ts +4 -0
  458. package/dist/utils/CometBFTPublicKeyConverter.d.ts.map +1 -0
  459. package/dist/utils/HCVCodec.d.ts +52 -0
  460. package/dist/utils/HCVCodec.d.ts.map +1 -0
  461. package/dist/utils/Logger.d.ts +14 -0
  462. package/dist/utils/Logger.d.ts.map +1 -0
  463. package/dist/utils/SectionLabel.d.ts +22 -0
  464. package/dist/utils/SectionLabel.d.ts.map +1 -0
  465. package/dist/utils/SeedEncoder.d.ts +9 -0
  466. package/dist/utils/SeedEncoder.d.ts.map +1 -0
  467. package/dist/utils/WalletInteractiveAnchoringEncoder.d.ts +13 -0
  468. package/dist/utils/WalletInteractiveAnchoringEncoder.d.ts.map +1 -0
  469. package/dist/utils/WalletSeedEncoder.d.ts +5 -0
  470. package/dist/utils/WalletSeedEncoder.d.ts.map +1 -0
  471. package/dist/utils/encoder.d.ts +117 -0
  472. package/dist/utils/encoder.d.ts.map +1 -0
  473. package/dist/utils/utils.d.ts +114 -0
  474. package/dist/utils/utils.d.ts.map +1 -0
  475. package/dist/wallet/AccountCrypto.d.ts +28 -0
  476. package/dist/wallet/AccountCrypto.d.ts.map +1 -0
  477. package/dist/wallet/ActorCrypto.d.ts +18 -0
  478. package/dist/wallet/ActorCrypto.d.ts.map +1 -0
  479. package/dist/wallet/ICryptoKeyHandler.d.ts +13 -0
  480. package/dist/wallet/ICryptoKeyHandler.d.ts.map +1 -0
  481. package/dist/wallet/WalletCrypto.d.ts +73 -0
  482. package/dist/wallet/WalletCrypto.d.ts.map +1 -0
  483. package/package.json +2 -3
  484. package/dist/carmentis-sdk-core.cjs.map +0 -1
  485. package/dist/carmentis-sdk-core.d.ts +0 -16204
  486. package/dist/carmentis-sdk-core.es.map +0 -1
@@ -0,0 +1,51 @@
1
+ import { Euros } from './euros';
2
+ import { CMTSToken } from './token';
3
+ /**
4
+ * Represents a generic interface for converting currency values from one type to another.
5
+ *
6
+ * @template FromCurrency - The source currency type.
7
+ * @template ToCurrency - The target currency type.
8
+ */
9
+ export interface CurrencyConverter<FromCurrency, ToCurrency> {
10
+ /**
11
+ * Converts an amount from one currency to another.
12
+ *
13
+ * @param {FromCurrency} from - The source currency object containing the amount and currency type to be converted.
14
+ * @return {ToCurrency} The target currency object representing the converted amount and currency type.
15
+ */
16
+ convert(from: FromCurrency): ToCurrency;
17
+ /**
18
+ * Inverts the given currency exchange rate by converting from the target currency back to the original currency.
19
+ *
20
+ * @param {ToCurrency} to - The target currency to be inverted.
21
+ * @return {FromCurrency} The original currency derived from the inversion process.
22
+ */
23
+ invert(to: ToCurrency): FromCurrency;
24
+ }
25
+ /**
26
+ * A factory class for creating currency converter instances.
27
+ */
28
+ export declare class CurrencyConverterFactory {
29
+ static defaultEurosToCMTSTokenConverter(): CurrencyConverter<Euros, CMTSToken>;
30
+ }
31
+ /**
32
+ * A converter class that facilitates the conversion between Euros and CMTS Tokens.
33
+ * Implements the `CurrencyConverter` interface to provide methods for converting
34
+ * from Euros to CMTS Tokens and vice versa.
35
+ *
36
+ * It uses a static conversion rate `TOKENS_FOR_ONE_EUROS` to determine the equivalent amount
37
+ * of CMTS Tokens for a given amount of Euros and inversely the equivalent amount
38
+ * of Euros for a given amount of CMTS Tokens.
39
+ *
40
+ * Methods:
41
+ * - `convert(from: Euros): CMTSToken`: Accepts an amount in Euros and converts it to CMTS Tokens.
42
+ * - `invert(to: CMTSToken): Euros`: Converts an amount in CMTS Tokens back to Euros.
43
+ *
44
+ * This class ensures the consistency of conversions through the use of a fixed conversion rate.
45
+ */
46
+ export declare class EurosToCMTSConverter implements CurrencyConverter<Euros, CMTSToken> {
47
+ private static TOKENS_FOR_ONE_EUROS;
48
+ convert(from: Euros): CMTSToken;
49
+ invert(to: CMTSToken): Euros;
50
+ }
51
+ //# sourceMappingURL=currency-converter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currency-converter.d.ts","sourceRoot":"","sources":["../../../src/economics/currencies/currency-converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAElC;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB,CAAC,YAAY,EAAE,UAAU;IACvD;;;;;OAKG;IACH,OAAO,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,EAAE,UAAU,GAAG,YAAY,CAAC;CACxC;AAED;;GAEG;AACH,qBAAa,wBAAwB;IACjC,MAAM,CAAC,gCAAgC,IAAI,iBAAiB,CAAC,KAAK,EAAE,SAAS,CAAC;CAGjF;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,oBAAqB,YAAW,iBAAiB,CAAC,KAAK,EAAE,SAAS,CAAC;IAC5E,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAO;IAE1C,OAAO,CAAC,IAAI,EAAE,KAAK,GAAG,SAAS;IAI/B,MAAM,CAAC,EAAE,EAAE,SAAS,GAAG,KAAK;CAG/B"}
@@ -0,0 +1,4 @@
1
+ export interface Currency {
2
+ toString(): string;
3
+ }
4
+ //# sourceMappingURL=currency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currency.d.ts","sourceRoot":"","sources":["../../../src/economics/currencies/currency.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACrB,QAAQ,IAAI,MAAM,CAAC;CACtB"}
@@ -0,0 +1,9 @@
1
+ import { Currency } from './currency';
2
+ export declare class Euros implements Currency {
3
+ private amount;
4
+ private constructor();
5
+ static create(amount: number): Euros;
6
+ getAmount(): number;
7
+ toString(): string;
8
+ }
9
+ //# sourceMappingURL=euros.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"euros.d.ts","sourceRoot":"","sources":["../../../src/economics/currencies/euros.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC,qBAAa,KAAM,YAAW,QAAQ;IACd,OAAO,CAAC,MAAM;IAAlC,OAAO;IAIP,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM;IAI5B,SAAS,IAAI,MAAM;IAInB,QAAQ;CAGX"}
@@ -0,0 +1,167 @@
1
+ import { Currency } from './currency';
2
+ /**
3
+ * Enum representing the units of a tokenized system.
4
+ *
5
+ * `TokenUnit` defines multiple denominations of a token, where
6
+ * each denomination is represented by a numeric value that
7
+ * corresponds to the fractional relationship with the base unit.
8
+ *
9
+ * Properties:
10
+ * - `TOKEN`: The base unit of the system. Equals 1.
11
+ * - `CENTI_TOKEN`: Represents one-hundredth (1/100) of the base unit. Equals 100.
12
+ * - `MILLI_TOKEN`: Represents one-thousandth (1/1000) of the base unit. Equals 1000.
13
+ *
14
+ * This enum can be used for token denomination conversions and comparisons.
15
+ */
16
+ export declare enum TokenUnit {
17
+ TOKEN = 100000,// 1 CMTS
18
+ DECI_TOKEN = 10000,// deci-token = 0.1 CMTS
19
+ CENTI_TOKEN = 1000,// centi-token = 0.01 CMTS
20
+ MILLI_TOKEN = 100,// milli-token = 0.001 CMTS
21
+ MICRO_TOKEN = 10,// micro-token = 0.0001 CMTS (FIXME: misleading name)
22
+ ATOMIC = 1
23
+ }
24
+ /**
25
+ * Enum representing token unit labels.
26
+ *
27
+ * This enum is used to define a label for tokens, where each key represents
28
+ * the name of the label and its associated value represents the specific token unit.
29
+ *
30
+ * The `TokenUnitLabel` provides a standardized way to represent token-related labels in the application.
31
+ *
32
+ * Enum Members:
33
+ * - `TOKEN`: Represents the token unit labeled as 'CMTS'.
34
+ *
35
+ * Typically used in contexts where token structure or labeling standardization is required.
36
+ */
37
+ export declare enum TokenUnitLabel {
38
+ TOKEN = "CMTS",// 100_000 (1 CMTS)
39
+ DECI_TOKEN = "dCMTS",// 10_000 (0.1 CMTS)
40
+ CENTI_TOKEN = "cCMTS",// 1_000 (0.01 CMTS)
41
+ MILLI_TOKEN = "mCMTS",// 100 (0.001 CMTS)
42
+ MICRO_TOKEN = "\u03BCCMTS",// 10 (0.0001 CMTS) (FIXME: misleading name)
43
+ ATOMIC = "aCMTS"
44
+ }
45
+ /**
46
+ * A class representing a specific amount of a token in a defined unit.
47
+ */
48
+ export declare class CMTSToken implements Currency {
49
+ private amount;
50
+ private constructor();
51
+ /**
52
+ * Creates an instance of TokenAmount with the given amount and unit.
53
+ * Throws an error if the provided unit is not of type TokenUnit.TOKEN.
54
+ *
55
+ * @param {number} amount - The numeric amount to be used for the TokenAmount instance.
56
+ * @param {TokenUnit} [unit=TokenUnit.TOKEN] - The unit type for the token, defaults to TokenUnit.TOKEN.
57
+ * @return {CMTSToken} A new instance of TokenAmount with the specified amount and unit.
58
+ */
59
+ static create(amount: number, unit?: TokenUnit): CMTSToken;
60
+ static createCMTS(amount: number): CMTSToken;
61
+ static createDeciToken(amount: number): CMTSToken;
62
+ static createMicroToken(amount: number): CMTSToken;
63
+ static createMilliToken(amount: number): CMTSToken;
64
+ static createCentiToken(amount: number): CMTSToken;
65
+ static createMillionToken(amount: number): CMTSToken;
66
+ static createAtomic(amount: number): CMTSToken;
67
+ private static createSafeCmtsToken;
68
+ /**
69
+ * Creates an instance of CMTSToken having zero-value.
70
+ *
71
+ * Example:
72
+ * ```ts
73
+ * const zero = CMTSToken.zero();
74
+ * ```
75
+ */
76
+ static zero(): CMTSToken;
77
+ static oneCMTS(): CMTSToken;
78
+ /**
79
+ * Parses a string representing a token amount and returns a TokenAmount instance.
80
+ *
81
+ * @param {string} value - The input string containing a numeric amount followed by a unit (e.g., "10.50 CMTS", "5 mCMTS").
82
+ * @return {CMTSToken} A TokenAmount object containing the parsed numeric amount and the token unit.
83
+ * @throws {EconomicsError} If the input string format is invalid.
84
+ * @throws {InvalidTokenUnitError} If the unit in the input string is not valid.
85
+ */
86
+ static parse(value: string): CMTSToken;
87
+ getAmount(unit?: TokenUnit): number;
88
+ /**
89
+ * Retrieves the amount as an atomic unit.
90
+ * Converts and returns the amount in the smallest unit of the token.
91
+ *
92
+ * @return {number} The amount represented as an atomic unit.
93
+ */
94
+ getAmountAsAtomic(): number;
95
+ /**
96
+ * Retrieves the amount formatted as CMTS (specific token unit).
97
+ * Utilizes the value formatted in the designated token
98
+ */
99
+ getAmountAsCMTS(): number;
100
+ /**
101
+ * Determines if the amount is positive or zero.
102
+ *
103
+ * @return {boolean} Returns true if the amount is greater than or equal to zero; otherwise, false.
104
+ */
105
+ isPositive(): boolean;
106
+ isPositiveStrict(): boolean;
107
+ isNegative(): boolean;
108
+ isZero(): boolean;
109
+ /**
110
+ * Compares the current TokenAmount instance with another TokenAmount instance for equality.
111
+ *
112
+ * @param {CMTSToken} other - The TokenAmount instance to compare with the current instance.
113
+ * @return {boolean} Returns true if both TokenAmount instances have the same amount and unit, otherwise returns false.
114
+ */
115
+ equals(other: CMTSToken): boolean;
116
+ /**
117
+ * Compares the current TokenAmount with another TokenAmount to determine if it is greater.
118
+ *
119
+ * @param {CMTSToken} other The TokenAmount to compare with.
120
+ * @return {boolean} Returns true if the current TokenAmount is greater than the given TokenAmount, otherwise false.
121
+ */
122
+ isGreaterThan(other: CMTSToken): boolean;
123
+ /**
124
+ * Compares the current TokenAmount instance with another TokenAmount instance
125
+ * to determine if it is less than the specified instance.
126
+ *
127
+ * @param {CMTSToken} other - The TokenAmount instance to compare against.
128
+ * @return {boolean} True if the current instance is less than the specified instance, otherwise false.
129
+ */
130
+ isLessThan(other: CMTSToken): boolean;
131
+ /**
132
+ * Adds the given CMTSToken instance to the current instance and returns a new CMTSToken with the combined value.
133
+ *
134
+ * @param {CMTSToken} other - The CMTSToken instance to add to the current instance.
135
+ * @return {CMTSToken} A new CMTSToken instance representing the sum of the two tokens.
136
+ */
137
+ add(other: CMTSToken): CMTSToken;
138
+ /**
139
+ * Subtracts the value of the provided CMTSToken from the current CMTSToken and returns a new CMTSToken with the resulting value.
140
+ *
141
+ * @param {CMTSToken} other - The CMTSToken to be subtracted from the current token.
142
+ * @return {CMTSToken} A new CMTSToken object representing the result of the subtraction.
143
+ */
144
+ sub(other: CMTSToken): CMTSToken;
145
+ /**
146
+ * Multiplies the value of the current CMTSToken by a provided constant and returns a new CMTSToken with the resulting value.
147
+ *
148
+ * @param {number} constant - The multiplication constant.
149
+ * @return {CMTSToken} A new CMTSToken object representing the result of the multiplication.
150
+ */
151
+ mul(constant: number): CMTSToken;
152
+ /**
153
+ * Converts the object to a string representation combining the amount and its unit label.
154
+ * The returned string typically includes the numerical value and its corresponding unit.
155
+ *
156
+ * @return {string} A string representation of the object in the format "{amount} {unitLabel}".
157
+ */
158
+ toString(unit?: TokenUnit): string;
159
+ /**
160
+ * Retrieves the label corresponding to the current unit of the token.
161
+ *
162
+ * @return {TokenUnitLabel} The label associated with the unit.
163
+ * @throws {InvalidTokenUnitError} If the unit does not have a defined label.
164
+ */
165
+ private static getUnitLabel;
166
+ }
167
+ //# sourceMappingURL=token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../src/economics/currencies/token.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAIpC;;;;;;;;;;;;;GAaG;AACH,oBAAY,SAAS;IACjB,KAAK,SAAU,CAAQ,SAAS;IAChC,UAAU,QAAS,CAAI,wBAAwB;IAC/C,WAAW,OAAQ,CAAI,0BAA0B;IACjD,WAAW,MAAM,CAAM,2BAA2B;IAClD,WAAW,KAAK,CAAO,qDAAqD;IAC5E,MAAM,IAAI;CACb;AAED;;;;;;;;;;;;GAYG;AACH,oBAAY,cAAc;IACtB,KAAK,SAAS,CAAW,mBAAmB;IAC5C,UAAU,UAAU,CAAK,oBAAoB;IAC7C,WAAW,UAAU,CAAI,oBAAoB;IAC7C,WAAW,UAAU,CAAI,mBAAmB;IAC5C,WAAW,eAAU,CAAI,4CAA4C;IACrE,MAAM,UAAU;CACnB;AAGD;;GAEG;AACH,qBAAa,SAAU,YAAW,QAAQ;IAElB,OAAO,CAAC,MAAM;IAAlC,OAAO;IAEP;;;;;;;OAOG;IACH,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,SAA2B;IAK/D,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM;IAIhC,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM;IAIrC,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM;IAItC,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM;IAItC,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM;IAItC,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,MAAM;IAIxC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM;IAIlC,OAAO,CAAC,MAAM,CAAC,mBAAmB;IASlC;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI;IAIX,MAAM,CAAC,OAAO;IAId;;;;;;;OAOG;IACH,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM;IA0B1B,SAAS,CAAC,IAAI,GAAG,SAA2B,GAAG,MAAM;IAWrD;;;;;OAKG;IACH,iBAAiB;IAIjB;;;OAGG;IACH,eAAe;IAIf;;;;OAIG;IACH,UAAU,IAAI,OAAO;IAIrB,gBAAgB,IAAI,OAAO;IAI3B,UAAU,IAAI,OAAO;IAIrB,MAAM,IAAI,OAAO;IAKjB;;;;;OAKG;IACH,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO;IAIjC;;;;;OAKG;IACH,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO;IAIxC;;;;;;OAMG;IACH,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO;IAIrC;;;;;OAKG;IACH,GAAG,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS;IAIhC;;;;;OAKG;IACH,GAAG,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS;IAIhC;;;;;OAKG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS;IAIhC;;;;;OAKG;IACH,QAAQ,CAAE,IAAI,GAAG,SAA2B;IAQ5C;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;CAO9B"}
@@ -0,0 +1,10 @@
1
+ export declare const Economics: {
2
+ getAccountTypeFromIdentifier: typeof getAccountTypeFromIdentifier;
3
+ getSpecialAccountTypeIdentifier: typeof getSpecialAccountTypeIdentifier;
4
+ isAllowedTransfer: typeof isAllowedTransfer;
5
+ };
6
+ declare function getAccountTypeFromIdentifier(accountIdentifier: Uint8Array): number;
7
+ declare function getSpecialAccountTypeIdentifier(type: number): Uint8Array;
8
+ declare function isAllowedTransfer(accountType: number, transferType: number): number;
9
+ export {};
10
+ //# sourceMappingURL=economics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"economics.d.ts","sourceRoot":"","sources":["../../src/economics/economics.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;CAIrB,CAAC;AAEF,iBAAS,4BAA4B,CAAC,iBAAiB,EAAE,UAAU,GAAG,MAAM,CAa3E;AAED,iBAAS,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAOjE;AAED,iBAAS,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,UAEnE"}
@@ -0,0 +1,60 @@
1
+ import { EncoderInterface } from '../utils/encoder';
2
+ /**
3
+ * Represents a hash object that allows encoding and creation from a string or Uint8Array.
4
+ */
5
+ export declare class Hash {
6
+ private hash;
7
+ /**
8
+ * Constructs a new instance of the class with the provided hash value.
9
+ *
10
+ * @param {Uint8Array} hash - The hash value to be used for this instance.
11
+ */
12
+ constructor(hash: Uint8Array);
13
+ /**
14
+ * Creates a new instance of Hash from a string or Uint8Array.
15
+ *
16
+ * ```
17
+ * const hash = Hash.from('0x1234567890abcdef');
18
+ * const hash = Hash.from(new Uint8Array([0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef]));
19
+ * ```
20
+ *
21
+ * @param {string | Uint8Array} hash - The hash input, which can either be a string or a Uint8Array.
22
+ * @return {Hash} A new Hash instance created from the given input.
23
+ *
24
+ *
25
+ */
26
+ static from(hash: string | Uint8Array): Hash;
27
+ static fromHex(hash: string): Hash;
28
+ /**
29
+ * Encodes the current hash using the provided encoder.
30
+ *
31
+ * ```
32
+ * const hash = Hash.from('0x1234567890abcdef');
33
+ * const hexEncoder = EncoderFactory.bytesToHexEncoder();
34
+ * const hexString = hash.encode(hexEncoder); // '0x1234567890abcdef'
35
+ * const hexString = hash.encode(); // '0x1234567890abcdef'
36
+ * ```
37
+ *
38
+ * @param {EncoderInterface<Uint8Array, string>} [encoder=new BytesToBase64Encoder()] - The encoder used to encode the hash. Defaults to a BytesToBase64Encoder.
39
+ * @return {string} The encoded string representation of the hash.
40
+ */
41
+ encode(encoder?: EncoderInterface<Uint8Array, string>): string;
42
+ /**
43
+ * Converts and retrieves the hash value as a Uint8Array.
44
+ *
45
+ * ```
46
+ * const hash = Hash.from('0x1234567890abcdef');
47
+ * const bytes = hash.toBytes(); // Uint8Array([0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef])
48
+ * ```
49
+ *
50
+ * @return {Uint8Array} The hash value as a Uint8Array.
51
+ */
52
+ toBytes(): Uint8Array;
53
+ /**
54
+ * Checks equality of this hash with respect to another hash provided in parameter.
55
+ *
56
+ * @param other
57
+ */
58
+ equals(other: Hash): boolean;
59
+ }
60
+ //# sourceMappingURL=Hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Hash.d.ts","sourceRoot":"","sources":["../../src/entities/Hash.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0D,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAE3G;;GAEG;AACH,qBAAa,IAAI;IAMD,OAAO,CAAC,IAAI;IALxB;;;;OAIG;gBACiB,IAAI,EAAE,UAAU;IAGpC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;IAUrC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM;IAI3B;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,OAAO,GAAE,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAA2B,GAAG,MAAM;IAIvF;;;;;;;;;OASG;IACH,OAAO,IAAI,UAAU;IAIrB;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO;CAG/B"}
@@ -0,0 +1,14 @@
1
+ export declare class Optional<T> {
2
+ private value;
3
+ private constructor();
4
+ static of<T>(value: T | null): Optional<T>;
5
+ static some<T>(value: T): Optional<T>;
6
+ static none<T>(): Optional<T>;
7
+ map<U>(fn: (value: T) => U): Optional<U>;
8
+ unwrap(): T;
9
+ unwrapOrThrow(error: Error): T & ({} | undefined);
10
+ unwrapOr(defaultValue: T): T;
11
+ isSome(): boolean;
12
+ isNone(): boolean;
13
+ }
14
+ //# sourceMappingURL=Optional.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Optional.d.ts","sourceRoot":"","sources":["../../src/entities/Optional.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAQ,CAAC,CAAC;IACC,OAAO,CAAC,KAAK;IAAjC,OAAO;IAGP,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC;IAI1C,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;IAIrC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC;IAI7B,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;IAOxC,MAAM,IAAI,CAAC;IAOX,aAAa,CAAC,KAAK,EAAE,KAAK;IAO1B,QAAQ,CAAC,YAAY,EAAE,CAAC,GAAG,CAAC;IAI5B,MAAM,IAAI,OAAO;IAIjB,MAAM,IAAI,OAAO;CAGpB"}
@@ -0,0 +1,48 @@
1
+ import { ImportedProof } from '../type/types';
2
+ import { Height } from '../type/Height';
3
+ import { Hash } from './Hash';
4
+ import { AbstractPrivateDecryptionKey } from '../crypto/encryption/public-key-encryption/PublicKeyEncryptionSchemeInterface';
5
+ import { ApplicationLedgerVb } from '../blockchain/virtualBlockchains/ApplicationLedgerVb';
6
+ /**
7
+ * Represents the result of a proof verification process, encapsulating the verified data and
8
+ * providing methods to check the validity of various elements of the proof.
9
+ */
10
+ export declare class ProofVerificationResult {
11
+ private verified;
12
+ private appLedger;
13
+ private importedProofs;
14
+ private constructor();
15
+ static createSuccessfulProofVerificationResult(appLedger: ApplicationLedgerVb, data: ImportedProof[]): ProofVerificationResult;
16
+ static createFailedProofVerificationResult(appLedger: ApplicationLedgerVb): ProofVerificationResult;
17
+ /**
18
+ * Checks if the current state is verified.
19
+ *
20
+ * @return {boolean} Returns true if verified, otherwise false.
21
+ */
22
+ isVerified(): boolean;
23
+ /**
24
+ * Retrieves the heights of the involved blocks based on the imported proofs.
25
+ *
26
+ * If there are imported proofs, the method returns an array of block heights
27
+ * extracted from the proofs. If there are no imported proofs, it returns an empty array.
28
+ *
29
+ * @return {Height[]} An array of block heights involved in the imported proofs,
30
+ * or an empty array if no proofs are available.
31
+ */
32
+ getInvolvedBlockHeights(): Height[];
33
+ /**
34
+ * Retrieves the ledger ID of the application as a hash.
35
+ *
36
+ * @return {Hash} The virtual blockchain ID associated with the application's ledger.
37
+ */
38
+ getApplicationLedgerId(): Hash;
39
+ /**
40
+ * Retrieves the record contained within a block at the specified height.
41
+ *
42
+ * @param {Height} blockHeight - The height of the block from which the record is to be retrieved.
43
+ * @return {T} The record contained within the block at the given height.
44
+ * @throws {IllegalParameterError} If a block at the specified height is not found.
45
+ */
46
+ getRecordContainedInBlockAtHeight<T>(blockHeight: Height, hostPrivateDecryptionKey: AbstractPrivateDecryptionKey): Promise<T>;
47
+ }
48
+ //# sourceMappingURL=ProofVerificationResult.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProofVerificationResult.d.ts","sourceRoot":"","sources":["../../src/entities/ProofVerificationResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EACH,4BAA4B,EAC/B,MAAM,+EAA+E,CAAC;AACvF,OAAO,EAAC,mBAAmB,EAAC,MAAM,sDAAsD,CAAC;AAEzF;;;GAGG;AACH,qBAAa,uBAAuB;IAE5B,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,cAAc;IAH1B,OAAO;IAMP,MAAM,CAAC,uCAAuC,CAAC,SAAS,EAAE,mBAAmB,EAAE,IAAI,EAAE,aAAa,EAAE;IAIpG,MAAM,CAAC,mCAAmC,CAAC,SAAS,EAAE,mBAAmB;IAIzE;;;;OAIG;IACH,UAAU,IAAI,OAAO;IAIrB;;;;;;;;OAQG;IACH,uBAAuB,IAAI,MAAM,EAAE;IASnC;;;;OAIG;IACH,sBAAsB,IAAI,IAAI;IAK9B;;;;;;OAMG;IACG,iCAAiC,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,wBAAwB,EAAE,4BAA4B,GAAG,OAAO,CAAC,CAAC,CAAC;CAGtI"}
@@ -0,0 +1,13 @@
1
+ export declare enum CometBFTErrorCode {
2
+ PARSE_ERROR = -32700,
3
+ INVALID_REQUEST = -32600,
4
+ METHOD_NOT_FOUND = -32601,
5
+ INVALID_PARAMS = -32602,
6
+ INTERNAL_ERROR = -32603,
7
+ ENDPOINT_CLOSED_WHILE_NODE_IS_CATCHING_UP = -32603,
8
+ TX_ALREADY_EXISTS = -32003,
9
+ TX_OUT_OF_GAS = -32002,
10
+ TX_CHECK_FAILED = -32001,
11
+ TX_DELIVER_FAILED = -32000
12
+ }
13
+ //# sourceMappingURL=CometBFTErrorCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CometBFTErrorCode.d.ts","sourceRoot":"","sources":["../../src/errors/CometBFTErrorCode.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAEzB,WAAW,SAAS;IACpB,eAAe,SAAS;IACxB,gBAAgB,SAAS;IACzB,cAAc,SAAS;IACvB,cAAc,SAAS;IAGvB,yCAAyC,SAAS;IAClD,iBAAiB,SAAS;IAC1B,aAAa,SAAS;IACtB,eAAe,SAAS;IACxB,iBAAiB,SAAS;CAC7B"}
@@ -0,0 +1,175 @@
1
+ import { Hash } from '../entities/Hash';
2
+ import { PublicSignatureKey } from '../crypto/signature/PublicSignatureKey';
3
+ export declare enum CarmentisErrorCode {
4
+ CARMENTIS_ERROR = 0,
5
+ NODE_ERROR = 1,
6
+ NODE_NOT_AVAILABLE_DURING_SYNCHRONISATION_ERROR = 2,
7
+ INTERNAL_ERROR = 500,
8
+ TYPE_CHECKING_FAILURE_ERROR = 501,
9
+ SERIALIZATION_ERROR = 502,
10
+ PROOF_VERIFICATION_FAILURE = 300,
11
+ BLOCKCHAIN_ERROR = 100,
12
+ ACCOUNT_NOT_FOUND = 101,
13
+ ACCOUNT_ALREADY_EXISTS = 102,
14
+ ACCOUNT_NOT_FOUND_FOR_PUBLIC_KEY = 103,
15
+ ACCOUNT_NOT_FOUND_FOR_PUBLIC_KEY_HASH = 104,
16
+ ACCOUNT_ALREADY_EXISTS_FOR_PUBLIC_KEY = 105,
17
+ ACCOUNT_NOT_FOUND_FOR_ADDRESS = 106,
18
+ ORGANIZATION_NOT_FOUND = 107,
19
+ APPLICATION_NOT_FOUND = 108,
20
+ APPLICATION_LEDGER_NOT_FOUND = 109,
21
+ VALIDATOR_NODE_NOT_FOUND = 110,
22
+ VIRTUAL_BLOCKCHAIN_NOT_FOUND = 111,
23
+ VIRTUAL_BLOCKCHAIN_ALREADY_EXISTS = 112,
24
+ MICROBLOCK_STRUCTURE_CHECKING_ERROR = 113,
25
+ ECONOMICS_ERROR = 200,
26
+ INVALID_TOKEN_UNIT = 201,
27
+ PROTOCOL_ERROR = 400
28
+ }
29
+ export declare class IllegalUsageError extends Error {
30
+ }
31
+ export declare class IllegalParameterError extends IllegalUsageError {
32
+ }
33
+ export declare class IllegalStateError extends IllegalUsageError {
34
+ }
35
+ export declare class CarmentisError extends Error {
36
+ private code;
37
+ constructor(message: string, code?: CarmentisErrorCode);
38
+ getErrorCode(): CarmentisErrorCode;
39
+ static isCarmentisError(error: any): error is CarmentisError;
40
+ }
41
+ export declare class MicroblockStructureCheckingError extends CarmentisError {
42
+ constructor(message?: string);
43
+ }
44
+ export declare class NotAuthenticatedError extends CarmentisError {
45
+ constructor();
46
+ }
47
+ export declare class ParsingError extends CarmentisError {
48
+ constructor(message?: string);
49
+ }
50
+ export declare class EmptyBlockError extends CarmentisError {
51
+ constructor(message: string);
52
+ }
53
+ export declare class CryptoError extends CarmentisError {
54
+ }
55
+ export declare class DecryptionError extends CryptoError {
56
+ constructor(message?: string);
57
+ }
58
+ export declare class SharedKeyDecryptionError extends DecryptionError {
59
+ constructor(message: string);
60
+ }
61
+ export declare class InternalError extends CarmentisError {
62
+ }
63
+ export declare class NodeError extends InternalError {
64
+ }
65
+ export declare class NodeConnectionRefusedError extends NodeError {
66
+ constructor(nodeUrl: string);
67
+ }
68
+ export declare class NodeEndpointClosedWhileCatchingUpError extends NodeError {
69
+ constructor();
70
+ }
71
+ export declare class EconomicsError extends CarmentisError {
72
+ constructor(message: string, code?: CarmentisErrorCode);
73
+ }
74
+ export declare class InvalidTokenUnitError extends EconomicsError {
75
+ constructor();
76
+ }
77
+ export declare class BlockchainError extends CarmentisError {
78
+ constructor(message: string, code?: CarmentisErrorCode);
79
+ }
80
+ export declare class NotImplementedError extends Error {
81
+ constructor();
82
+ }
83
+ export declare class MicroBlockNotFoundInVirtualBlockchainAtHeightError extends BlockchainError {
84
+ constructor(vbId: Hash, height: number);
85
+ }
86
+ export declare class MicroBlockNotFoundError extends BlockchainError {
87
+ constructor();
88
+ }
89
+ export declare class MicroBlockNotFoundInBlockError extends BlockchainError {
90
+ constructor();
91
+ }
92
+ export declare class ActorAlreadyDefinedError extends IllegalUsageError {
93
+ constructor(actorName: string);
94
+ }
95
+ export declare class InvalidActorError extends IllegalUsageError {
96
+ constructor(actorId: number, expectedId: number);
97
+ }
98
+ export declare class ChannelAlreadyDefinedError extends IllegalUsageError {
99
+ constructor(channelName: string);
100
+ }
101
+ export declare class ActorNotDefinedError extends IllegalUsageError {
102
+ constructor(actorName: string);
103
+ }
104
+ export declare class ChannelNotDefinedError extends IllegalUsageError {
105
+ constructor(actorName: string);
106
+ }
107
+ export declare class ProofVerificationFailedError extends CarmentisError {
108
+ constructor(channelId: number, computedHash: string, onChainHash: string);
109
+ }
110
+ export declare class CannotSubscribeError extends IllegalUsageError {
111
+ constructor(actorId: number);
112
+ }
113
+ export declare class AlreadySubscribedError extends IllegalUsageError {
114
+ constructor(actorId: number);
115
+ }
116
+ export declare class NotAllowedSignatureSchemeError extends IllegalUsageError {
117
+ constructor(signatureSchemeId: number);
118
+ }
119
+ export declare class NotAllowedPkeSchemeError extends IllegalUsageError {
120
+ constructor(pkeSchemeId: number);
121
+ }
122
+ export declare class InvalidChannelError extends IllegalUsageError {
123
+ constructor(channelId: number);
124
+ }
125
+ export declare class CurrentActorNotFoundError extends IllegalUsageError {
126
+ constructor();
127
+ }
128
+ export declare class SectionError extends BlockchainError {
129
+ }
130
+ export declare class ActorNotInvitedError extends BlockchainError {
131
+ constructor(actorId: number | string, channelId: number | string);
132
+ }
133
+ export declare class AccountNotFoundForPublicKeyError extends BlockchainError {
134
+ constructor(publicKey: PublicSignatureKey);
135
+ }
136
+ export declare class AccountNotFoundForAccountHashError extends BlockchainError {
137
+ constructor(accountHash: Hash);
138
+ }
139
+ export declare class OrganizationNotFoundError extends BlockchainError {
140
+ constructor(organizationHash: Hash);
141
+ }
142
+ export declare class ApplicationNotFoundError extends BlockchainError {
143
+ constructor(applicationId: Hash);
144
+ }
145
+ export declare class ValidatorNodeNotFoundError extends BlockchainError {
146
+ constructor(nodeId: Hash);
147
+ }
148
+ export declare class AccountNotFoundForPublicKeyHashError extends BlockchainError {
149
+ constructor(publicKeyHash: Hash);
150
+ }
151
+ export declare class VirtualBlockchainNotFoundError extends BlockchainError {
152
+ constructor(virtualBlockchainId: Hash);
153
+ }
154
+ export declare class ApplicationLedgerNotFoundError extends VirtualBlockchainNotFoundError {
155
+ constructor(applicationLedgerId: Hash);
156
+ }
157
+ export declare class ProtocolError extends CarmentisError {
158
+ constructor(message: string, code?: CarmentisErrorCode);
159
+ }
160
+ export declare class ActorNotSubscribedError extends ProtocolError {
161
+ private actorId;
162
+ private actorName;
163
+ constructor(actorId: number, actorName: string);
164
+ getNotSubscribedActorName(): string;
165
+ }
166
+ export declare class SectionNotFoundError extends ProtocolError {
167
+ constructor();
168
+ }
169
+ export declare class NoSharedSecretError extends ProtocolError {
170
+ constructor(guestId: number, hostId: number);
171
+ }
172
+ export declare class SerializationError extends CarmentisError {
173
+ constructor(message: string);
174
+ }
175
+ //# sourceMappingURL=carmentis-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carmentis-error.d.ts","sourceRoot":"","sources":["../../src/errors/carmentis-error.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,5 @@
1
+ import { InternalError } from './carmentis-error';
2
+ export declare class TypeCheckingFailureError extends InternalError {
3
+ constructor(message: string);
4
+ }
5
+ //# sourceMappingURL=type-checking-failure-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-checking-failure-error.d.ts","sourceRoot":"","sources":["../../src/errors/type-checking-failure-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAEpE,qBAAa,wBAAyB,SAAQ,aAAa;gBAC3C,OAAO,EAAE,MAAM;CAG9B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=network.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/network/network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAA"}