pshenmic-dpp 1.1.2-dev.8 → 2.0.0-dev.10

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 (328) hide show
  1. package/README.md +14 -99
  2. package/dist/binaries/bindingsTypes.d.ts +1721 -0
  3. package/dist/binaries/bindingsTypes.js +99 -0
  4. package/dist/binaries/pshenmic_dpp.android.node/react-native-node-api-module +0 -0
  5. package/dist/binaries/pshenmic_dpp.android.node/x86_64/libpshenmic_dpp.so +0 -0
  6. package/dist/binaries/pshenmic_dpp.d.ts +171 -0
  7. package/dist/binaries/pshenmic_dpp.js +3 -0
  8. package/dist/binaries/wasm/wasmBytes.d.ts +2 -0
  9. package/dist/binaries/wasm/wasmBytes.js +2 -0
  10. package/dist/binaries/wasm.d.ts +171 -0
  11. package/dist/binaries/wasm.js +44 -0
  12. package/dist/src/dpp/constants.d.ts +4 -0
  13. package/dist/src/dpp/constants.js +19 -0
  14. package/dist/src/dpp/dpp.d.ts +112 -0
  15. package/dist/src/dpp/dpp.js +112 -0
  16. package/dist/src/dpp/enums.d.ts +1 -0
  17. package/dist/src/dpp/enums.js +1 -0
  18. package/dist/src/dpp/provider.d.ts +11 -0
  19. package/dist/src/dpp/provider.js +21 -0
  20. package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.d.ts +38 -0
  21. package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.js +95 -0
  22. package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.d.ts +35 -0
  23. package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.js +85 -0
  24. package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.d.ts +30 -0
  25. package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.js +72 -0
  26. package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.d.ts +33 -0
  27. package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.js +82 -0
  28. package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.d.ts +31 -0
  29. package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.js +77 -0
  30. package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.d.ts +31 -0
  31. package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.js +76 -0
  32. package/dist/src/dpp/structs/AddressTransitions/entities/AddressFundsFeeStrategyStep.d.ts +12 -0
  33. package/dist/src/dpp/structs/AddressTransitions/entities/AddressFundsFeeStrategyStep.js +26 -0
  34. package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.d.ts +15 -0
  35. package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.js +33 -0
  36. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.d.ts +13 -0
  37. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.js +27 -0
  38. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.d.ts +13 -0
  39. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.js +30 -0
  40. package/dist/src/dpp/structs/AssetLockProof/AssetLockProof.d.ts +19 -0
  41. package/dist/src/dpp/structs/AssetLockProof/AssetLockProof.js +50 -0
  42. package/dist/src/dpp/structs/AssetLockProof/ChainAssetLockProof.d.ts +17 -0
  43. package/dist/src/dpp/structs/AssetLockProof/ChainAssetLockProof.js +36 -0
  44. package/dist/src/dpp/structs/AssetLockProof/InstantAssetLockProof.d.ts +24 -0
  45. package/dist/src/dpp/structs/AssetLockProof/InstantAssetLockProof.js +48 -0
  46. package/dist/src/dpp/structs/AssetLockProof/OutPoint.d.ts +15 -0
  47. package/dist/src/dpp/structs/AssetLockProof/OutPoint.js +40 -0
  48. package/dist/src/dpp/structs/AssetLockProof/Transaction.d.ts +20 -0
  49. package/dist/src/dpp/structs/AssetLockProof/Transaction.js +49 -0
  50. package/dist/src/dpp/structs/AssetLockProof/TxIn.d.ts +17 -0
  51. package/dist/src/dpp/structs/AssetLockProof/TxIn.js +39 -0
  52. package/dist/src/dpp/structs/AssetLockProof/TxOut.d.ts +13 -0
  53. package/dist/src/dpp/structs/AssetLockProof/TxOut.js +34 -0
  54. package/dist/src/dpp/structs/AssetLockProof/Witness.d.ts +11 -0
  55. package/dist/src/dpp/structs/AssetLockProof/Witness.js +25 -0
  56. package/dist/src/dpp/structs/Batch/BatchTransition.d.ts +34 -0
  57. package/dist/src/dpp/structs/Batch/BatchTransition.js +95 -0
  58. package/dist/src/dpp/structs/Batch/BatchedTransition.d.ts +14 -0
  59. package/dist/src/dpp/structs/Batch/BatchedTransition.js +39 -0
  60. package/dist/src/dpp/structs/Batch/DocumentBaseTransition.d.ts +20 -0
  61. package/dist/src/dpp/structs/Batch/DocumentBaseTransition.js +54 -0
  62. package/dist/src/dpp/structs/Batch/DocumentTransition.d.ts +33 -0
  63. package/dist/src/dpp/structs/Batch/DocumentTransition.js +77 -0
  64. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.d.ts +23 -0
  65. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.js +58 -0
  66. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentDeleteTransition.d.ts +14 -0
  67. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentDeleteTransition.js +26 -0
  68. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentPurchaseTransition.d.ts +19 -0
  69. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentPurchaseTransition.js +39 -0
  70. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.d.ts +19 -0
  71. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.js +40 -0
  72. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentTransferTransition.d.ts +19 -0
  73. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentTransferTransition.js +35 -0
  74. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentUpdatePriceTransition.d.ts +17 -0
  75. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentUpdatePriceTransition.js +33 -0
  76. package/dist/src/dpp/structs/Batch/PrefundedVotingBalance.d.ts +9 -0
  77. package/dist/src/dpp/structs/Batch/PrefundedVotingBalance.js +19 -0
  78. package/dist/src/dpp/structs/Batch/TokenBaseTransition.d.ts +20 -0
  79. package/dist/src/dpp/structs/Batch/TokenBaseTransition.js +49 -0
  80. package/dist/src/dpp/structs/Batch/TokenPaymentInfo.d.ts +19 -0
  81. package/dist/src/dpp/structs/Batch/TokenPaymentInfo.js +54 -0
  82. package/dist/src/dpp/structs/Batch/TokenPricingSchedule.d.ts +17 -0
  83. package/dist/src/dpp/structs/Batch/TokenPricingSchedule.js +41 -0
  84. package/dist/src/dpp/structs/Batch/TokenTransition.d.ts +21 -0
  85. package/dist/src/dpp/structs/Batch/TokenTransition.js +95 -0
  86. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenBurnTransition.d.ts +14 -0
  87. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenBurnTransition.js +32 -0
  88. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenClaimTransition.d.ts +15 -0
  89. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenClaimTransition.js +33 -0
  90. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenConfigUpdateTransition.d.ts +15 -0
  91. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenConfigUpdateTransition.js +33 -0
  92. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDestroyFrozenFundsTransition.d.ts +16 -0
  93. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDestroyFrozenFundsTransition.js +34 -0
  94. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDirectPurchaseTransition.d.ts +14 -0
  95. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDirectPurchaseTransition.js +32 -0
  96. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenEmergencyActionTransition.d.ts +15 -0
  97. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenEmergencyActionTransition.js +33 -0
  98. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenFreezeTransition.d.ts +16 -0
  99. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenFreezeTransition.js +34 -0
  100. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenMintTransition.d.ts +18 -0
  101. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenMintTransition.js +43 -0
  102. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenSetPriceForDirectPurchaseTransition.d.ts +15 -0
  103. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenSetPriceForDirectPurchaseTransition.js +36 -0
  104. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.d.ts +24 -0
  105. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.js +60 -0
  106. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenUnFreezeTransition.d.ts +16 -0
  107. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenUnFreezeTransition.js +34 -0
  108. package/dist/src/dpp/structs/ConsensusError.d.ts +8 -0
  109. package/dist/src/dpp/structs/ConsensusError.js +22 -0
  110. package/dist/src/dpp/structs/ContractBounds.d.ts +17 -0
  111. package/dist/src/dpp/structs/ContractBounds.js +39 -0
  112. package/dist/src/dpp/structs/CoreScript.d.ts +15 -0
  113. package/dist/src/dpp/structs/CoreScript.js +37 -0
  114. package/dist/src/dpp/structs/DataContract.d.ts +38 -0
  115. package/dist/src/dpp/structs/DataContract.js +125 -0
  116. package/dist/src/dpp/structs/DataContractTransitions/DataContractCreateTransition.d.ts +23 -0
  117. package/dist/src/dpp/structs/DataContractTransitions/DataContractCreateTransition.js +55 -0
  118. package/dist/src/dpp/structs/DataContractTransitions/DataContractUpdateTransition.d.ts +23 -0
  119. package/dist/src/dpp/structs/DataContractTransitions/DataContractUpdateTransition.js +55 -0
  120. package/dist/src/dpp/structs/Document.d.ts +51 -0
  121. package/dist/src/dpp/structs/Document.js +184 -0
  122. package/dist/src/dpp/structs/EncryptedNote/PrivateEncryptedNote.d.ts +13 -0
  123. package/dist/src/dpp/structs/EncryptedNote/PrivateEncryptedNote.js +31 -0
  124. package/dist/src/dpp/structs/EncryptedNote/SharedEncryptedNote.d.ts +13 -0
  125. package/dist/src/dpp/structs/EncryptedNote/SharedEncryptedNote.js +31 -0
  126. package/dist/src/dpp/structs/GroupStateTransitionInfo.d.ts +15 -0
  127. package/dist/src/dpp/structs/GroupStateTransitionInfo.js +33 -0
  128. package/dist/src/dpp/structs/Identifier.d.ts +17 -0
  129. package/dist/src/dpp/structs/Identifier.js +50 -0
  130. package/dist/src/dpp/structs/Identity.d.ts +26 -0
  131. package/dist/src/dpp/structs/Identity.js +73 -0
  132. package/dist/src/dpp/structs/IdentityPublicKey.d.ts +44 -0
  133. package/dist/src/dpp/structs/IdentityPublicKey.js +131 -0
  134. package/dist/src/dpp/structs/IdentityPublicKeyInCreation.d.ts +31 -0
  135. package/dist/src/dpp/structs/IdentityPublicKeyInCreation.js +82 -0
  136. package/dist/src/dpp/structs/IdentityTransitions/IdentityCreateTransition.d.ts +29 -0
  137. package/dist/src/dpp/structs/IdentityTransitions/IdentityCreateTransition.js +69 -0
  138. package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditTransfer.d.ts +33 -0
  139. package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditTransfer.js +85 -0
  140. package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditWithdrawalTransition.d.ts +42 -0
  141. package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditWithdrawalTransition.js +114 -0
  142. package/dist/src/dpp/structs/IdentityTransitions/IdentityTopUpTransition.d.ts +30 -0
  143. package/dist/src/dpp/structs/IdentityTransitions/IdentityTopUpTransition.js +75 -0
  144. package/dist/src/dpp/structs/IdentityTransitions/IdentityUpdateTransition.d.ts +40 -0
  145. package/dist/src/dpp/structs/IdentityTransitions/IdentityUpdateTransition.js +108 -0
  146. package/dist/src/dpp/structs/InstantLock.d.ts +17 -0
  147. package/dist/src/dpp/structs/InstantLock.js +43 -0
  148. package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.d.ts +37 -0
  149. package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.js +96 -0
  150. package/dist/src/dpp/structs/MasternodeVote/ResourceVoteChoice.d.ts +14 -0
  151. package/dist/src/dpp/structs/MasternodeVote/ResourceVoteChoice.js +29 -0
  152. package/dist/src/dpp/structs/MasternodeVote/Vote.d.ts +13 -0
  153. package/dist/src/dpp/structs/MasternodeVote/Vote.js +27 -0
  154. package/dist/src/dpp/structs/MasternodeVote/VotePoll.d.ts +18 -0
  155. package/dist/src/dpp/structs/MasternodeVote/VotePoll.js +42 -0
  156. package/dist/src/dpp/structs/PartialIdentity.d.ts +26 -0
  157. package/dist/src/dpp/structs/PartialIdentity.js +69 -0
  158. package/dist/src/dpp/structs/PlatformAddress/AddressWitness.d.ts +12 -0
  159. package/dist/src/dpp/structs/PlatformAddress/AddressWitness.js +23 -0
  160. package/dist/src/dpp/structs/PlatformAddress/PlatformAddress.d.ts +16 -0
  161. package/dist/src/dpp/structs/PlatformAddress/PlatformAddress.js +38 -0
  162. package/dist/src/dpp/structs/PrivateKey.d.ts +20 -0
  163. package/dist/src/dpp/structs/PrivateKey.js +48 -0
  164. package/dist/src/dpp/structs/PublicKey.d.ts +15 -0
  165. package/dist/src/dpp/structs/PublicKey.js +37 -0
  166. package/dist/src/dpp/structs/StateTransition.d.ts +39 -0
  167. package/dist/src/dpp/structs/StateTransition.js +103 -0
  168. package/dist/src/dpp/structs/TokenConfiguration/ActionTaker.d.ts +12 -0
  169. package/dist/src/dpp/structs/TokenConfiguration/ActionTaker.js +44 -0
  170. package/dist/src/dpp/structs/TokenConfiguration/AuthorizedActionTakers.d.ts +16 -0
  171. package/dist/src/dpp/structs/TokenConfiguration/AuthorizedActionTakers.js +43 -0
  172. package/dist/src/dpp/structs/TokenConfiguration/ChangeControlRules.d.ts +23 -0
  173. package/dist/src/dpp/structs/TokenConfiguration/ChangeControlRules.js +52 -0
  174. package/dist/src/dpp/structs/TokenConfiguration/DistributionFunction.d.ts +19 -0
  175. package/dist/src/dpp/structs/TokenConfiguration/DistributionFunction.js +57 -0
  176. package/dist/src/dpp/structs/TokenConfiguration/Group.d.ts +19 -0
  177. package/dist/src/dpp/structs/TokenConfiguration/Group.js +44 -0
  178. package/dist/src/dpp/structs/TokenConfiguration/RewardDistributionType.d.ts +13 -0
  179. package/dist/src/dpp/structs/TokenConfiguration/RewardDistributionType.js +40 -0
  180. package/dist/src/dpp/structs/TokenConfiguration/TokenConfiguration.d.ts +54 -0
  181. package/dist/src/dpp/structs/TokenConfiguration/TokenConfiguration.js +139 -0
  182. package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationChangeItem.d.ts +47 -0
  183. package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationChangeItem.js +140 -0
  184. package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationConvention.d.ts +19 -0
  185. package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationConvention.js +47 -0
  186. package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationLocalization.d.ts +15 -0
  187. package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationLocalization.js +34 -0
  188. package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRecipient.d.ts +14 -0
  189. package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRecipient.js +31 -0
  190. package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRules.d.ts +28 -0
  191. package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRules.js +75 -0
  192. package/dist/src/dpp/structs/TokenConfiguration/TokenKeepsHistoryRules.d.ts +19 -0
  193. package/dist/src/dpp/structs/TokenConfiguration/TokenKeepsHistoryRules.js +49 -0
  194. package/dist/src/dpp/structs/TokenConfiguration/TokenMarketplaceRules.d.ts +13 -0
  195. package/dist/src/dpp/structs/TokenConfiguration/TokenMarketplaceRules.js +27 -0
  196. package/dist/src/dpp/structs/TokenConfiguration/TokenPerpetualDistribution.d.ts +13 -0
  197. package/dist/src/dpp/structs/TokenConfiguration/TokenPerpetualDistribution.js +27 -0
  198. package/dist/src/dpp/structs/TokenConfiguration/TokenPreProgrammedDistribution.d.ts +21 -0
  199. package/dist/src/dpp/structs/TokenConfiguration/TokenPreProgrammedDistribution.js +42 -0
  200. package/dist/src/dpp/structs/TokenConfiguration/TokenTradeMode.d.ts +9 -0
  201. package/dist/src/dpp/structs/TokenConfiguration/TokenTradeMode.js +17 -0
  202. package/dist/src/dpp/types.d.ts +284 -0
  203. package/dist/src/dpp/types.js +1 -0
  204. package/dist/src/dpp/utils.d.ts +6 -0
  205. package/dist/src/dpp/utils.js +96 -0
  206. package/dist/src/dpp/verify/Contested/verifyVotePollVoteStateProof.d.ts +3 -0
  207. package/dist/src/dpp/verify/Contested/verifyVotePollVoteStateProof.js +34 -0
  208. package/dist/src/dpp/verify/Contract/verifyContract.d.ts +2 -0
  209. package/dist/src/dpp/verify/Contract/verifyContract.js +14 -0
  210. package/dist/src/dpp/verify/Document/verifyDocumentsProof.d.ts +3 -0
  211. package/dist/src/dpp/verify/Document/verifyDocumentsProof.js +10 -0
  212. package/dist/src/dpp/verify/Identity/verifyIdentifierByNonUniquePublicKeyHashProof.d.ts +2 -0
  213. package/dist/src/dpp/verify/Identity/verifyIdentifierByNonUniquePublicKeyHashProof.js +10 -0
  214. package/dist/src/dpp/verify/Identity/verifyIdentityBalanceProof.d.ts +2 -0
  215. package/dist/src/dpp/verify/Identity/verifyIdentityBalanceProof.js +9 -0
  216. package/dist/src/dpp/verify/Identity/verifyIdentityByIdentifierProof.d.ts +2 -0
  217. package/dist/src/dpp/verify/Identity/verifyIdentityByIdentifierProof.js +10 -0
  218. package/dist/src/dpp/verify/Identity/verifyIdentityByUniqueKeyHashProof.d.ts +2 -0
  219. package/dist/src/dpp/verify/Identity/verifyIdentityByUniqueKeyHashProof.js +10 -0
  220. package/dist/src/dpp/verify/Identity/verifyIdentityContractNonceProof.d.ts +2 -0
  221. package/dist/src/dpp/verify/Identity/verifyIdentityContractNonceProof.js +9 -0
  222. package/dist/src/dpp/verify/Identity/verifyIdentityKeysByIdentifierProof.d.ts +2 -0
  223. package/dist/src/dpp/verify/Identity/verifyIdentityKeysByIdentifierProof.js +10 -0
  224. package/dist/src/dpp/verify/Identity/verifyIdentityNonceProof.d.ts +2 -0
  225. package/dist/src/dpp/verify/Identity/verifyIdentityNonceProof.js +9 -0
  226. package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressInfo.d.ts +2 -0
  227. package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressInfo.js +12 -0
  228. package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressesInfos.d.ts +2 -0
  229. package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressesInfos.js +14 -0
  230. package/dist/src/dpp/verify/StateTransition/utils.d.ts +2 -0
  231. package/dist/src/dpp/verify/StateTransition/utils.js +115 -0
  232. package/dist/src/dpp/verify/StateTransition/verifyStateTransitionResult.d.ts +4 -0
  233. package/dist/src/dpp/verify/StateTransition/verifyStateTransitionResult.js +10 -0
  234. package/dist/src/dpp/verify/System/verifyEpochsInfoProof.d.ts +2 -0
  235. package/dist/src/dpp/verify/System/verifyEpochsInfoProof.js +16 -0
  236. package/dist/src/dpp/verify/System/verifyTotalCreditsProof.d.ts +2 -0
  237. package/dist/src/dpp/verify/System/verifyTotalCreditsProof.js +9 -0
  238. package/dist/src/dpp/verify/Tokens/verifyTokenBalancesForIdentitiesProof.d.ts +2 -0
  239. package/dist/src/dpp/verify/Tokens/verifyTokenBalancesForIdentitiesProof.js +13 -0
  240. package/dist/src/dpp/verify/Tokens/verifyTokenContractInfoProof.d.ts +2 -0
  241. package/dist/src/dpp/verify/Tokens/verifyTokenContractInfoProof.js +15 -0
  242. package/dist/src/dpp/verify/Tokens/verifyTokenDirectPurchasePrices.d.ts +2 -0
  243. package/dist/src/dpp/verify/Tokens/verifyTokenDirectPurchasePrices.js +14 -0
  244. package/dist/src/dpp/verify/Tokens/verifyTokenTotalSupplyProof.d.ts +2 -0
  245. package/dist/src/dpp/verify/Tokens/verifyTokenTotalSupplyProof.js +12 -0
  246. package/dist/src/dpp/verify/Tokens/verifyTokensBalancesForIdentityProof.d.ts +2 -0
  247. package/dist/src/dpp/verify/Tokens/verifyTokensBalancesForIdentityProof.js +13 -0
  248. package/dist/src/dpp/verify/verifySignatureDigest.d.ts +1 -0
  249. package/dist/src/dpp/verify/verifySignatureDigest.js +4 -0
  250. package/dist/src/react-native.d.ts +3 -0
  251. package/dist/src/react-native.js +6 -0
  252. package/dist/src/wasm.d.ts +3 -0
  253. package/dist/src/wasm.js +6 -0
  254. package/dist/utils/base122.d.ts +7 -0
  255. package/dist/utils/base122.js +63 -0
  256. package/package.json +30 -27
  257. package/tests/unit/DynamicValue.spec.ts +126 -0
  258. package/tests/unit/Identifier.spec.ts +105 -0
  259. package/tests/unit/Identity.spec.ts +119 -0
  260. package/tests/unit/IdentityPublicKey.spec.ts +126 -0
  261. package/dist/wasm/base122.d.ts +0 -1
  262. package/dist/wasm/base122.js +0 -67
  263. package/dist/wasm/index.d.ts +0 -148
  264. package/dist/wasm/index.js +0 -13
  265. package/dist/wasm/initAsync.d.ts +0 -4
  266. package/dist/wasm/initAsync.js +0 -20
  267. package/dist/wasm/initInterface.d.ts +0 -3
  268. package/dist/wasm/initInterface.js +0 -46
  269. package/dist/wasm/initWASM.d.ts +0 -1
  270. package/dist/wasm/initWASM.js +0 -28
  271. package/dist/wasm/pshenmic_dpp.d.ts +0 -5266
  272. package/dist/wasm/pshenmic_dpp.js +0 -25608
  273. package/dist/wasm/pshenmic_dpp_bg.d.ts +0 -3
  274. package/dist/wasm/pshenmic_dpp_bg.js +0 -2
  275. package/dist/wasm/pshenmic_dpp_bg.wasm.d.ts +0 -1636
  276. package/dist/wasm/pshenmic_dpp_zipped.d.ts +0 -3
  277. package/dist/wasm/pshenmic_dpp_zipped.js +0 -2
  278. package/dist/wasm/snippets/pshenmic_dpp_utils-23ab7381b198778d/stringify.js +0 -7
  279. package/tests/AssetLockProof.spec.cjs +0 -96
  280. package/tests/AsyncImportTest.spec.cjs +0 -930
  281. package/tests/AuthorizedActionTakers.spec.cjs +0 -75
  282. package/tests/BatchTransition.spec.cjs +0 -141
  283. package/tests/ChainLockProof.spec.cjs +0 -63
  284. package/tests/ChangeControlRules.spec.cjs +0 -184
  285. package/tests/CoreScript.spec.cjs +0 -37
  286. package/tests/DataContract.spec.cjs +0 -170
  287. package/tests/DataContractCreateStateTransition.spec.cjs +0 -102
  288. package/tests/DataContractUpdateStateTransition.spec.cjs +0 -103
  289. package/tests/DistributionFunction.spec.cjs +0 -416
  290. package/tests/Document.spec.cjs +0 -227
  291. package/tests/DocumentTransition.spec.cjs +0 -94
  292. package/tests/DocumentsTransitions.spec.cjs +0 -699
  293. package/tests/Identifier.spec.cjs +0 -82
  294. package/tests/Identity.spec.cjs +0 -107
  295. package/tests/IdentityCreateTransition.spec.cjs +0 -87
  296. package/tests/IdentityCreditTransferTransition.spec.cjs +0 -140
  297. package/tests/IdentityCreditWithdrawalTransition.spec.cjs +0 -186
  298. package/tests/IdentityPublicKey.spec.cjs +0 -166
  299. package/tests/IdentityTopUpTransition.spec.cjs +0 -125
  300. package/tests/IdentityUpdateTransition.spec.cjs +0 -141
  301. package/tests/InstantLockProof.spec.cjs +0 -91
  302. package/tests/OutPoint.spec.cjs +0 -49
  303. package/tests/PrivateKey.spec.cjs +0 -67
  304. package/tests/PublicKeyInCreation.spec.cjs +0 -252
  305. package/tests/RewardDistributionType.spec.cjs +0 -90
  306. package/tests/TokenBaseTransition.spec.cjs +0 -96
  307. package/tests/TokenConfiguration.spec.cjs +0 -188
  308. package/tests/TokenConfigurationConvention.spec.cjs +0 -93
  309. package/tests/TokenConfigurationLocalization.spec.cjs +0 -59
  310. package/tests/TokenDistributionRecipient.spec.cjs +0 -49
  311. package/tests/TokenDistributionRules.spec.cjs +0 -313
  312. package/tests/TokenKeepsHistoryRules.spec.cjs +0 -67
  313. package/tests/TokenPerpetualDistribution.spec.cjs +0 -130
  314. package/tests/TokenPreProgrammedDistribution.spec.cjs +0 -61
  315. package/tests/TokensTransitions.spec.cjs +0 -509
  316. package/tests/TxOut.spec.cjs +0 -70
  317. package/tests/mocks/DataContract/DataContract.json +0 -164
  318. package/tests/mocks/DataContract/index.js +0 -6
  319. package/tests/mocks/Document/DataContract.json +0 -23
  320. package/tests/mocks/Document/document.json +0 -3
  321. package/tests/mocks/Document/document2.json +0 -3
  322. package/tests/mocks/Document/index.js +0 -13
  323. package/tests/mocks/Identity/index.js +0 -13
  324. package/tests/mocks/Locks/index.js +0 -2
  325. package/tests/mocks/PrivateKey/index.js +0 -5
  326. package/tests/mocks/PublicKey/index.js +0 -13
  327. package/tests/mocks/TokenConfiguration/index.js +0 -5
  328. package/tests/utils/hex.js +0 -14
@@ -0,0 +1,17 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ export class TokenTradeModeWASM {
3
+ /** @private **/
4
+ _rawTokenTradeMode;
5
+ constructor(rawInstance) {
6
+ this._rawTokenTradeMode = rawInstance;
7
+ }
8
+ getValue() {
9
+ return this._rawTokenTradeMode.getValue();
10
+ }
11
+ static NotTradeable() {
12
+ return TokenTradeModeWASM.createFromRawInstance(dppProvider.dpp.TokenTradeModeNAPI.NotTradeable());
13
+ }
14
+ static createFromRawInstance(rawInstance) {
15
+ return new TokenTradeModeWASM(rawInstance);
16
+ }
17
+ }
@@ -0,0 +1,284 @@
1
+ import type * as protocol from '../../binaries/bindingsTypes.js';
2
+ import { ActionGoal, AssetLockProofType, GasFeesPaidByWASM, KeyType, NetworkWASM, PlatformVersionWASM, PoolingWASM, Purpose, SecurityLevel, TokenDistributionType, TokenEmergencyActionWASM, VoteStateResultType } from './enums.js';
3
+ import { IdentifierWASM } from './structs/Identifier.js';
4
+ import { languageCodes } from './constants.js';
5
+ import { DistributionFunctionWASM } from './structs/TokenConfiguration/DistributionFunction.js';
6
+ import { TokenConfigurationWASM } from './structs/TokenConfiguration/TokenConfiguration.js';
7
+ import { GroupWASM } from './structs/TokenConfiguration/Group.js';
8
+ import { DocumentCreateTransitionWASM } from './structs/Batch/DocumentTransitions/DocumentCreateTransition.js';
9
+ import { DocumentDeleteTransitionWASM } from './structs/Batch/DocumentTransitions/DocumentDeleteTransition.js';
10
+ import { DocumentPurchaseTransitionWASM } from './structs/Batch/DocumentTransitions/DocumentPurchaseTransition.js';
11
+ import { DocumentReplaceTransitionWASM } from './structs/Batch/DocumentTransitions/DocumentReplaceTransition.js';
12
+ import { DocumentTransferTransitionWASM } from './structs/Batch/DocumentTransitions/DocumentTransferTransition.js';
13
+ import { DocumentUpdatePriceTransitionWASM } from './structs/Batch/DocumentTransitions/DocumentUpdatePriceTransition.js';
14
+ import { TokenConfigUpdateTransitionWASM } from './structs/Batch/TokenTransitions/TokenConfigUpdateTransition.js';
15
+ import { TokenDirectPurchaseTransitionWASM } from './structs/Batch/TokenTransitions/TokenDirectPurchaseTransition.js';
16
+ import { TokenSetPriceForDirectPurchaseTransitionWASM } from './structs/Batch/TokenTransitions/TokenSetPriceForDirectPurchaseTransition.js';
17
+ import { TokenBurnTransitionWASM } from './structs/Batch/TokenTransitions/TokenBurnTransition.js';
18
+ import { TokenClaimTransitionWASM } from './structs/Batch/TokenTransitions/TokenClaimTransition.js';
19
+ import { TokenUnFreezeTransitionWASM } from './structs/Batch/TokenTransitions/TokenUnFreezeTransition.js';
20
+ import { TokenTransferTransitionWASM } from './structs/Batch/TokenTransitions/TokenTransferTransition.js';
21
+ import { TokenMintTransitionWASM } from './structs/Batch/TokenTransitions/TokenMintTransition.js';
22
+ import { TokenFreezeTransitionWASM } from './structs/Batch/TokenTransitions/TokenFreezeTransition.js';
23
+ import { TokenEmergencyActionTransitionWASM } from './structs/Batch/TokenTransitions/TokenEmergencyActionTransition.js';
24
+ import { TokenDestroyFrozenFundsTransitionWASM } from './structs/Batch/TokenTransitions/TokenDestroyFrozenFundsTransition.js';
25
+ import { DataContractWASM } from './structs/DataContract.js';
26
+ import { IdentityWASM } from './structs/Identity.js';
27
+ import { PartialIdentityWASM } from './structs/PartialIdentity.js';
28
+ import { DocumentWASM } from './structs/Document.js';
29
+ import { VoteWASM } from './structs/MasternodeVote/Vote.js';
30
+ import { TokenPricingScheduleWASM } from './structs/Batch/TokenPricingSchedule.js';
31
+ import { PlatformAddressWASM } from './structs/PlatformAddress/PlatformAddress.js';
32
+ export type DashPlatformProtocol = typeof protocol;
33
+ export type IdentifierLike = string | Uint8Array | protocol.IdentifierNAPI | IdentifierWASM;
34
+ export type PlatformAddressLike = string | Uint8Array | protocol.PlatformAddressNAPI | PlatformAddressWASM;
35
+ export type KeyTypeLike = KeyType | keyof typeof KeyType | Lowercase<keyof typeof KeyType>;
36
+ export type NetworkLike = NetworkWASM | keyof typeof NetworkWASM | Lowercase<keyof typeof NetworkWASM>;
37
+ export type SecurityLevelLike = SecurityLevel | keyof typeof SecurityLevel | Lowercase<keyof typeof SecurityLevel>;
38
+ export type PlatformVersionLike = PlatformVersionWASM | Lowercase<keyof typeof PlatformVersionWASM>;
39
+ export type PurposeLike = Purpose | keyof typeof Purpose | Lowercase<keyof typeof Purpose>;
40
+ export type ActionGoalLike = ActionGoal | keyof typeof ActionGoal | Lowercase<keyof typeof ActionGoal>;
41
+ export type GasFeesPaidByLike = GasFeesPaidByWASM | keyof typeof GasFeesPaidByWASM | Lowercase<keyof typeof GasFeesPaidByWASM>;
42
+ export type TokenDistributionLike = TokenDistributionType | keyof typeof TokenDistributionType | Lowercase<keyof typeof TokenDistributionType>;
43
+ export type TokenEmergencyActionLike = TokenEmergencyActionWASM | keyof typeof TokenEmergencyActionWASM | Lowercase<keyof typeof TokenEmergencyActionWASM>;
44
+ export type AssetLockProofTypeLike = AssetLockProofType | keyof typeof AssetLockProofType | Lowercase<keyof typeof AssetLockProofType>;
45
+ export type PoolingLike = PoolingWASM | keyof typeof PoolingWASM | Lowercase<keyof typeof PoolingWASM>;
46
+ export type VoteStateResultTypeLike = VoteStateResultType | keyof typeof VoteStateResultType | Lowercase<keyof typeof VoteStateResultType>;
47
+ export type AddressWitnessP2PKH = protocol.AddressWitnessP2pkhNAPI;
48
+ export type AddressWitnessP2SH = protocol.AddressWitnessP2shNAPI;
49
+ export type TokenConfigurationLocalizationJson = protocol.TokenConfigurationLocalizationJsonNAPI;
50
+ export type DistributionFixedAmount = protocol.DistributionFixedAmountNAPI;
51
+ export type DistributionRandom = protocol.DistributionRandomNAPI;
52
+ export type DistributionStepDecreasingAmount = protocol.DistributionStepDecreasingAmountNAPI;
53
+ export interface DistributionStepwiseStep {
54
+ step: bigint;
55
+ amount: bigint;
56
+ }
57
+ export type DistributionStepwise = DistributionStepwiseStep[];
58
+ export type DistributionLinear = protocol.DistributionLinearNAPI;
59
+ export type DistributionPolynomial = protocol.DistributionPolynomialNAPI;
60
+ export type DistributionExponential = protocol.DistributionExponentialNAPI;
61
+ export type DistributionLogarithmic = protocol.DistributionLogarithmicNAPI;
62
+ export type DistributionInvertedLogarithmic = protocol.DistributionInvertedLogarithmicNAPI;
63
+ export interface RewardDistribution {
64
+ interval: bigint | number;
65
+ function: DistributionFunctionWASM;
66
+ distributionType: 'BlockBasedDistribution' | 'TimeBasedDistribution' | 'EpochBasedDistribution';
67
+ }
68
+ export type ISO639_CODES = typeof languageCodes[number];
69
+ export interface DataContractTokens {
70
+ position: number;
71
+ tokenConfiguration: TokenConfigurationWASM;
72
+ }
73
+ export interface DataContractGroups {
74
+ position: number;
75
+ group: GroupWASM;
76
+ }
77
+ export type DocumentTransitionLike = DocumentCreateTransitionWASM | DocumentDeleteTransitionWASM | DocumentPurchaseTransitionWASM | DocumentReplaceTransitionWASM | DocumentTransferTransitionWASM | DocumentUpdatePriceTransitionWASM;
78
+ export type TokenTransitionLike = TokenConfigUpdateTransitionWASM | TokenDirectPurchaseTransitionWASM | TokenSetPriceForDirectPurchaseTransitionWASM | TokenBurnTransitionWASM | TokenClaimTransitionWASM | TokenDestroyFrozenFundsTransitionWASM | TokenEmergencyActionTransitionWASM | TokenFreezeTransitionWASM | TokenMintTransitionWASM | TokenTransferTransitionWASM | TokenUnFreezeTransitionWASM;
79
+ export interface ExtendedEpochInfo {
80
+ index: number;
81
+ firstBlockTime: bigint;
82
+ firstBlockHeight: bigint;
83
+ firstCoreBlockHeight: number;
84
+ feeMultiplierPermille: bigint;
85
+ protocolVersion: number;
86
+ }
87
+ export interface VerifiedEpochsInfo {
88
+ rootHash: Uint8Array;
89
+ epochsInfo: ExtendedEpochInfo[];
90
+ }
91
+ export interface VerifiedTotalCredits {
92
+ rootHash: Uint8Array;
93
+ totalCredits: bigint;
94
+ }
95
+ export interface StartAt {
96
+ startIdentifier: IdentifierLike;
97
+ startIdentifierIncluded: boolean;
98
+ }
99
+ export type Winner = undefined | NoWinner | LockedWinner | WonByIdentityWinner;
100
+ export type WinnerType = 'NoWinner' | 'Locked' | 'WonByIdentity';
101
+ export interface NoWinner {
102
+ type: WinnerType;
103
+ blockInfo: BlockInfo;
104
+ }
105
+ export interface LockedWinner {
106
+ type: WinnerType;
107
+ blockInfo: BlockInfo;
108
+ }
109
+ export interface WonByIdentityWinner {
110
+ type: WinnerType;
111
+ identityId: Uint8Array;
112
+ blockInfo: BlockInfo;
113
+ }
114
+ export interface BlockInfo {
115
+ height: bigint;
116
+ coreHeight: number;
117
+ timeMs: bigint;
118
+ epoch?: number;
119
+ }
120
+ export interface ContenderWithSerializedDocument {
121
+ identityId: IdentifierWASM;
122
+ serializedDocument?: Uint8Array;
123
+ voteTally?: number;
124
+ }
125
+ export interface ContestedDocumentVotePollQueryExecutionResult {
126
+ contenders: ContenderWithSerializedDocument[];
127
+ lockedVoteTally?: number;
128
+ abstainingVoteTally?: number;
129
+ winner?: Winner;
130
+ skipped: number;
131
+ }
132
+ export interface VerifiedVoteState {
133
+ rootHash: Uint8Array;
134
+ result: ContestedDocumentVotePollQueryExecutionResult;
135
+ }
136
+ export interface VerifiedContract {
137
+ rootHash: Uint8Array;
138
+ dataContract?: DataContractWASM;
139
+ }
140
+ export interface IdentityTokenInfo {
141
+ frozen: boolean;
142
+ }
143
+ export interface TokenStatus {
144
+ paused: boolean;
145
+ }
146
+ export interface VerifiedIdentityBalance {
147
+ balance: bigint;
148
+ id: IdentifierWASM;
149
+ }
150
+ export interface VerifiedIdentityTokenInfo {
151
+ tokenId: IdentifierWASM;
152
+ identityTokenInfo: IdentityTokenInfo;
153
+ }
154
+ export interface VerifiedTokenPricingSchedule {
155
+ tokenId: IdentifierWASM;
156
+ pricingSchedule?: TokenPricingScheduleWASM;
157
+ }
158
+ export interface VerifiedBalanceTransfer {
159
+ sender: PartialIdentityWASM;
160
+ recipient: PartialIdentityWASM;
161
+ }
162
+ export interface VerifiedDocument {
163
+ id: IdentifierWASM;
164
+ document?: DocumentWASM;
165
+ }
166
+ export interface VerifiedTokenGroupActionWithDocument {
167
+ groupSumPower: number;
168
+ document?: DocumentWASM;
169
+ }
170
+ export interface VerifiedTokenGroupActionWithTokenBalance {
171
+ groupSumPower: number;
172
+ groupActionStatus: string;
173
+ amount?: bigint;
174
+ }
175
+ export interface VerifiedTokenGroupActionWithTokenIdentityInfo {
176
+ groupSumPower: number;
177
+ groupActionStatus: string;
178
+ identityTokenInfo?: IdentityTokenInfo;
179
+ }
180
+ export interface VerifiedTokenGroupActionWithTokenPricingSchedule {
181
+ groupSumPower: number;
182
+ groupActionStatus: string;
183
+ pricingSchedule?: TokenPricingScheduleWASM;
184
+ }
185
+ export interface VerifiedPlatformAddressInfo {
186
+ address?: PlatformAddressWASM;
187
+ nonce?: number;
188
+ balance?: bigint;
189
+ }
190
+ export interface VerifiedIdentityFullWithAddressInfos {
191
+ identity: IdentityWASM;
192
+ infos: VerifiedPlatformAddressInfo[];
193
+ }
194
+ export interface VerifiedIdentityWithAddressInfos {
195
+ identity: PartialIdentityWASM;
196
+ infos: VerifiedPlatformAddressInfo[];
197
+ }
198
+ export type VerifiedStateTransitionResultVariants = DataContractWASM | IdentityWASM | IdentifierWASM | VerifiedIdentityBalance | VerifiedIdentityTokenInfo | VerifiedTokenPricingSchedule | TokenStatus | VerifiedIdentityBalance[] | PartialIdentityWASM | VerifiedBalanceTransfer | VerifiedDocument[] | DocumentWASM | VerifiedTokenGroupActionWithDocument | VerifiedTokenGroupActionWithTokenBalance | VerifiedTokenGroupActionWithTokenIdentityInfo | VerifiedTokenGroupActionWithTokenPricingSchedule | VoteWASM | VerifiedPlatformAddressInfo[] | VerifiedIdentityFullWithAddressInfos | VerifiedIdentityWithAddressInfos;
199
+ export type VerifiedStateTransitionResultVariantsRAW = protocol.DataContractNAPI | protocol.IdentityNAPI | protocol.IdentifierNAPI | protocol.VerifiedIdentityBalanceNAPI | protocol.VerifiedIdentityTokenInfoNAPI | protocol.VerifiedTokenPricingScheduleNAPI | protocol.TokenStatusNAPI | protocol.VerifiedIdentityBalanceNAPI[] | protocol.PartialIdentityNAPI | protocol.VerifiedBalanceTransferNAPI | protocol.VerifiedDocumentNAPI[] | protocol.DocumentNAPI | protocol.VerifiedTokenGroupActionWithDocumentNAPI | protocol.VerifiedTokenGroupActionWithTokenBalanceNAPI | protocol.VerifiedTokenGroupActionWithTokenIdentityInfoNAPI | protocol.VerifiedTokenGroupActionWithTokenPricingScheduleNAPI | protocol.VoteNAPI | protocol.PlatformAddressInfoNAPI[] | protocol.VerifiedIdentityFullWithAddressInfosNAPI | protocol.VerifiedIdentityWithAddressInfosNAPI;
200
+ export interface VerifiedStateTransitionResult {
201
+ rootHash: Uint8Array;
202
+ result: VerifiedStateTransitionResultVariants;
203
+ }
204
+ export type WhereOperator = '=' | '==' | '>' | '>=' | '<' | '<=' | 'Between' | 'between' | 'BetweenExcludeBounds' | 'betweenExcludeBounds' | 'betweenexcludebounds' | 'between_exclude_bounds' | 'BetweenExcludeLeft' | 'betweenExcludeLeft' | 'betweenexcludeleft' | 'between_exclude_left' | 'BetweenExcludeRight' | 'betweenExcludeRight' | 'betweenexcluderight' | 'between_exclude_right' | 'In' | 'in' | 'StartsWith' | 'startsWith' | 'startswith' | 'starts_with';
205
+ export type WhereClause = [
206
+ field: string,
207
+ operator: WhereOperator,
208
+ value: unknown
209
+ ];
210
+ export interface VerifiedDocuments {
211
+ rootHash: Uint8Array;
212
+ documents: DocumentWASM[];
213
+ }
214
+ export interface VerifiedIdentifierByNonUniquePublicKeyHash {
215
+ rootHash: Uint8Array;
216
+ identifier?: IdentifierWASM;
217
+ }
218
+ export interface VerifiedIdentityBalanceRootHash {
219
+ rootHash: Uint8Array;
220
+ balance?: bigint;
221
+ }
222
+ export interface VerifiedIdentityByIdentifier {
223
+ rootHash: Uint8Array;
224
+ identity?: IdentityWASM;
225
+ }
226
+ export interface VerifiedIdentityByUniqueKeyHash {
227
+ rootHash: Uint8Array;
228
+ identity?: IdentityWASM;
229
+ }
230
+ export interface VerifiedIdentityContractNonce {
231
+ rootHash: Uint8Array;
232
+ contractNonce?: bigint;
233
+ }
234
+ export interface VerifiedIdentityKeysByIdentifier {
235
+ rootHash: Uint8Array;
236
+ identity?: PartialIdentityWASM;
237
+ }
238
+ export interface VerifiedIdentityNonce {
239
+ rootHash: Uint8Array;
240
+ nonce?: bigint;
241
+ }
242
+ export interface IdentityTokenBalance {
243
+ balance: bigint;
244
+ id: IdentifierWASM;
245
+ }
246
+ export interface IdentityTokenBalanceOptional {
247
+ balance?: bigint;
248
+ id: IdentifierWASM;
249
+ }
250
+ export interface VerifiedTokenBalancesForIdentities {
251
+ rootHash: Uint8Array;
252
+ balances: IdentityTokenBalanceOptional[];
253
+ }
254
+ export interface TokenContractInfo {
255
+ contractId: IdentifierWASM;
256
+ tokenContractPosition: number;
257
+ }
258
+ export interface VerifiedTokenContractInfo {
259
+ rootHash: Uint8Array;
260
+ contractInfo?: TokenContractInfo;
261
+ }
262
+ export interface VerifiedTokenDirectPurchasePrices {
263
+ rootHash: Uint8Array;
264
+ prices: VerifiedTokenPricingSchedule[];
265
+ }
266
+ export interface TotalSingleTokenBalance {
267
+ tokenSupply: bigint;
268
+ aggregatedTokenAccountBalances: bigint;
269
+ }
270
+ export interface VerifiedTokenTotalSupply {
271
+ rootHash: Uint8Array;
272
+ totalBalance: TotalSingleTokenBalance;
273
+ }
274
+ export interface VerifiedTokensBalancesForIdentity {
275
+ rootHash: Uint8Array;
276
+ balances: IdentityTokenBalanceOptional[];
277
+ }
278
+ export type VerifiedPlatformAddressInfoWithRootHash = VerifiedPlatformAddressInfo & {
279
+ rootHash: Uint8Array;
280
+ };
281
+ export interface VerifiedPlatformAddressesInfosWithRootHash {
282
+ rootHash: Uint8Array;
283
+ infos: VerifiedPlatformAddressInfo[];
284
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { DynamicValue, IdentifierLikeNAPI, PlatformAddressLikeNAPI } from '../../binaries/bindingsTypes.js';
2
+ import { IdentifierLike, PlatformAddressLike } from './types.js';
3
+ export declare function valueToDynamicValue(value: any): DynamicValue;
4
+ export declare function valueFromDynamicValue(dynamicValue: DynamicValue, jsonLike?: boolean): any;
5
+ export declare function prepareIdentifierValue(identifier: IdentifierLike): IdentifierLikeNAPI;
6
+ export declare function preparePlatformAddressValue(address: PlatformAddressLike): PlatformAddressLikeNAPI;
@@ -0,0 +1,96 @@
1
+ import { dppProvider } from './provider.js';
2
+ import { UINT32MAX } from './constants.js';
3
+ import { IdentifierWASM } from './structs/Identifier.js';
4
+ import { PlatformAddressWASM } from './structs/PlatformAddress/PlatformAddress.js';
5
+ export function valueToDynamicValue(value) {
6
+ if (typeof value === 'bigint' || (value > UINT32MAX && typeof value !== 'string')) {
7
+ return dppProvider.dpp.DynamicValue.fromBigIntString(BigInt(value.toString()).toString());
8
+ }
9
+ else if (value instanceof IdentifierWASM || value instanceof dppProvider.dpp.IdentifierNAPI) {
10
+ return new dppProvider.dpp.DynamicValue(value.bytes());
11
+ }
12
+ else if (value instanceof Uint8Array) {
13
+ return new dppProvider.dpp.DynamicValue(value);
14
+ }
15
+ else if (Array.isArray(value)) {
16
+ return new dppProvider.dpp.DynamicValue(value.map(valueToDynamicValue));
17
+ }
18
+ else if (typeof value === 'object' && value !== null) {
19
+ const keys = Object.keys(value);
20
+ const objectWithDynamicValue = Object.assign({}, value);
21
+ for (const key of keys) {
22
+ objectWithDynamicValue[key] = valueToDynamicValue(value[key]);
23
+ }
24
+ return new dppProvider.dpp.DynamicValue(objectWithDynamicValue);
25
+ }
26
+ else if (typeof value === 'function') {
27
+ throw new Error('Cannot parse value from function');
28
+ }
29
+ if (typeof value === 'number') {
30
+ // we cannot strongly pass uint or float without js layer check
31
+ if (Number.isInteger(value)) {
32
+ if (value > 4294967295 || value < 0) {
33
+ return dppProvider.dpp.DynamicValue.fromInt(value);
34
+ }
35
+ else {
36
+ return dppProvider.dpp.DynamicValue.fromUInt(value);
37
+ }
38
+ }
39
+ else {
40
+ return dppProvider.dpp.DynamicValue.fromFloat(value);
41
+ }
42
+ }
43
+ else {
44
+ return new dppProvider.dpp.DynamicValue(value);
45
+ }
46
+ }
47
+ export function valueFromDynamicValue(dynamicValue, jsonLike = false) {
48
+ if (dynamicValue.value instanceof dppProvider.dpp.DynamicValue) {
49
+ return valueFromDynamicValue(dynamicValue.value, jsonLike);
50
+ }
51
+ else if (dynamicValue.isBigInt()) {
52
+ const num = BigInt(dynamicValue.value);
53
+ if (jsonLike && num < BigInt(Number.MAX_SAFE_INTEGER) && num > BigInt(Number.MIN_SAFE_INTEGER)) {
54
+ return Number(dynamicValue.value);
55
+ }
56
+ else {
57
+ return num;
58
+ }
59
+ }
60
+ else if (Array.isArray(dynamicValue.value)) {
61
+ return dynamicValue.value.map(v => valueFromDynamicValue(v, jsonLike));
62
+ }
63
+ else if (typeof dynamicValue.value === 'object' && !(dynamicValue.value instanceof Uint8Array) && dynamicValue.value !== null) {
64
+ const obj = {};
65
+ const keys = Object.keys(dynamicValue.value);
66
+ for (const key of keys) {
67
+ obj[key] = valueFromDynamicValue(dynamicValue.value[key], jsonLike);
68
+ }
69
+ return obj;
70
+ }
71
+ else {
72
+ return dynamicValue.value;
73
+ }
74
+ }
75
+ export function prepareIdentifierValue(identifier) {
76
+ if (identifier instanceof IdentifierWASM) {
77
+ return identifier._rawIdentifier;
78
+ }
79
+ else if (identifier instanceof dppProvider.dpp.IdentifierNAPI) {
80
+ return identifier;
81
+ }
82
+ else {
83
+ return new dppProvider.dpp.DynamicValue(identifier);
84
+ }
85
+ }
86
+ export function preparePlatformAddressValue(address) {
87
+ if (address instanceof PlatformAddressWASM) {
88
+ return address._rawPlatformAddress;
89
+ }
90
+ else if (address instanceof dppProvider.dpp.PlatformAddressNAPI) {
91
+ return address;
92
+ }
93
+ else {
94
+ return new dppProvider.dpp.DynamicValue(address);
95
+ }
96
+ }
@@ -0,0 +1,3 @@
1
+ import { PlatformVersionLike, StartAt, VerifiedVoteState, VoteStateResultTypeLike } from '../../types.js';
2
+ import { DataContractWASM } from '../../structs/DataContract.js';
3
+ export declare function verifyVotePollVoteStateProof(proof: Uint8Array, contract: DataContractWASM, documentTypeName: string, indexName: string, indexValues: Uint8Array[], resultType: VoteStateResultTypeLike, allowIncludeLockedAndAbstainingVoteTally: boolean | undefined, count: number | undefined, startAt: StartAt | undefined, platformVersion: PlatformVersionLike): VerifiedVoteState;
@@ -0,0 +1,34 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { valueFromDynamicValue, valueToDynamicValue } from '../../utils.js';
3
+ import { IdentifierWASM } from '../../structs/Identifier.js';
4
+ export function verifyVotePollVoteStateProof(proof, contract, documentTypeName, indexName, indexValues, resultType, allowIncludeLockedAndAbstainingVoteTally, count, startAt, platformVersion) {
5
+ const result = dppProvider.dpp.verifyVotePollVoteStateProof(proof, contract._rawDataContract, documentTypeName, indexName, indexValues, valueToDynamicValue(resultType), allowIncludeLockedAndAbstainingVoteTally ?? false, count, valueToDynamicValue(startAt), valueToDynamicValue(platformVersion));
6
+ const winner = valueFromDynamicValue(result.result.winner);
7
+ const winnerBlockInfo = winner?.blockInfo;
8
+ const outWinner = winner != null
9
+ ? {
10
+ type: winner.type,
11
+ identityId: winner.identityId,
12
+ blockInfo: {
13
+ height: BigInt(winnerBlockInfo.height),
14
+ coreHeight: winnerBlockInfo.coreHeight,
15
+ timeMs: BigInt(winnerBlockInfo.timeMs),
16
+ epoch: winnerBlockInfo.epoch != null ? winnerBlockInfo?.epoch : undefined
17
+ }
18
+ }
19
+ : undefined;
20
+ return {
21
+ rootHash: result.rootHash,
22
+ result: {
23
+ lockedVoteTally: result.result.lockedVoteTally ?? undefined,
24
+ contenders: result.result.contenders.map(c => ({
25
+ identityId: IdentifierWASM.createFromRawInstance(c.identityId),
26
+ serializedDocument: c.serializedDocument ?? undefined,
27
+ voteTally: c.voteTally ?? undefined
28
+ })),
29
+ abstainingVoteTally: result.result.abstainingVoteTally ?? undefined,
30
+ winner: outWinner,
31
+ skipped: result.result.skipped
32
+ }
33
+ };
34
+ }
@@ -0,0 +1,2 @@
1
+ import { IdentifierLike, PlatformVersionLike, VerifiedContract } from '../../types.js';
2
+ export declare function verifyContractProof(proof: Uint8Array, contractKnownKeepsHistory: boolean | undefined, isProofSubset: boolean, inMultipleContractProofForm: boolean, contractId: IdentifierLike, platformVersion: PlatformVersionLike): VerifiedContract;
@@ -0,0 +1,14 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { prepareIdentifierValue, valueToDynamicValue } from '../../utils.js';
3
+ import { DataContractWASM } from '../../structs/DataContract.js';
4
+ export function verifyContractProof(proof, contractKnownKeepsHistory, isProofSubset, inMultipleContractProofForm, contractId, platformVersion) {
5
+ const result = dppProvider.dpp.verifyContractProof(proof, contractKnownKeepsHistory, isProofSubset, inMultipleContractProofForm, prepareIdentifierValue(contractId), valueToDynamicValue(platformVersion));
6
+ let dataContract;
7
+ if (result.dataContract != null) {
8
+ dataContract = DataContractWASM.createFromRawInstance(result.dataContract);
9
+ }
10
+ return {
11
+ rootHash: result.rootHash,
12
+ dataContract
13
+ };
14
+ }
@@ -0,0 +1,3 @@
1
+ import { IdentifierLike, PlatformVersionLike, VerifiedDocuments, WhereClause } from '../../types.js';
2
+ import { DataContractWASM } from '../../structs/DataContract.js';
3
+ export declare function verifyDocumentsProof(proof: Uint8Array, contract: DataContractWASM, documentTypeName: string, whereClauses: WhereClause[] | undefined, orderBy: string[][] | undefined, limit: number | undefined | null, startAt: IdentifierLike | undefined | null, startAtIncluded: boolean, blockTimeMs: bigint | undefined | null, platformVersion: PlatformVersionLike): VerifiedDocuments;
@@ -0,0 +1,10 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { DocumentWASM } from '../../structs/Document.js';
3
+ import { prepareIdentifierValue, valueToDynamicValue } from '../../utils.js';
4
+ export function verifyDocumentsProof(proof, contract, documentTypeName, whereClauses, orderBy, limit, startAt, startAtIncluded, blockTimeMs, platformVersion) {
5
+ const result = dppProvider.dpp.verifyDocumentsProof(proof, contract._rawDataContract, documentTypeName, valueToDynamicValue(whereClauses), orderBy ?? [], limit, startAt != null ? prepareIdentifierValue(startAt) : undefined, startAtIncluded, blockTimeMs?.toString(), valueToDynamicValue(platformVersion));
6
+ return {
7
+ rootHash: result.rootHash,
8
+ documents: result.documents.map(DocumentWASM.createFromRawInstance)
9
+ };
10
+ }
@@ -0,0 +1,2 @@
1
+ import { IdentifierLike, PlatformVersionLike, VerifiedIdentifierByNonUniquePublicKeyHash } from '../../types.js';
2
+ export declare function verifyIdentifierByNonUniquePublicKeyHashProof(proof: Uint8Array, proofSubset: boolean, publicKeyHash: Uint8Array, after: IdentifierLike | undefined | null, platformVersion: PlatformVersionLike): VerifiedIdentifierByNonUniquePublicKeyHash;
@@ -0,0 +1,10 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { prepareIdentifierValue, valueToDynamicValue } from '../../utils.js';
3
+ import { IdentifierWASM } from '../../structs/Identifier.js';
4
+ export function verifyIdentifierByNonUniquePublicKeyHashProof(proof, proofSubset, publicKeyHash, after, platformVersion) {
5
+ const result = dppProvider.dpp.verifyIdentifierByNonUniquePublicKeyHashProof(proof, proofSubset, publicKeyHash, after != null ? prepareIdentifierValue(after) : undefined, valueToDynamicValue(platformVersion));
6
+ return {
7
+ rootHash: result.rootHash,
8
+ identifier: result.identifier != null ? IdentifierWASM.createFromRawInstance(result.identifier) : undefined
9
+ };
10
+ }
@@ -0,0 +1,2 @@
1
+ import { IdentifierLike, PlatformVersionLike, VerifiedIdentityBalanceRootHash } from '../../types.js';
2
+ export declare function verifyIdentityBalanceProof(proof: Uint8Array, identityId: IdentifierLike, verifySubsetOfProof: boolean, platformVersion: PlatformVersionLike): VerifiedIdentityBalanceRootHash;
@@ -0,0 +1,9 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { prepareIdentifierValue, valueToDynamicValue } from '../../utils.js';
3
+ export function verifyIdentityBalanceProof(proof, identityId, verifySubsetOfProof, platformVersion) {
4
+ const result = dppProvider.dpp.verifyIdentityBalanceProof(proof, prepareIdentifierValue(identityId), verifySubsetOfProof, valueToDynamicValue(platformVersion));
5
+ return {
6
+ rootHash: result.rootHash,
7
+ balance: result.balance != null ? BigInt(result.balance) : undefined
8
+ };
9
+ }
@@ -0,0 +1,2 @@
1
+ import { IdentifierLike, PlatformVersionLike, VerifiedIdentityByIdentifier } from '../../types.js';
2
+ export declare function verifyIdentityByIdentifierProof(proof: Uint8Array, identityId: IdentifierLike, isProofSubset: boolean, platformVersion: PlatformVersionLike): VerifiedIdentityByIdentifier;
@@ -0,0 +1,10 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { prepareIdentifierValue, valueToDynamicValue } from '../../utils.js';
3
+ import { IdentityWASM } from '../../structs/Identity.js';
4
+ export function verifyIdentityByIdentifierProof(proof, identityId, isProofSubset, platformVersion) {
5
+ const result = dppProvider.dpp.verifyIdentityByIdentifierProof(proof, prepareIdentifierValue(identityId), isProofSubset, valueToDynamicValue(platformVersion));
6
+ return {
7
+ rootHash: result.rootHash,
8
+ identity: result.identity != null ? IdentityWASM.createFromRawInstance(result.identity) : undefined
9
+ };
10
+ }
@@ -0,0 +1,2 @@
1
+ import { PlatformVersionLike, VerifiedIdentityByUniqueKeyHash } from '../../types.js';
2
+ export declare function verifyIdentityByUniqueKeyHashProof(proof: Uint8Array, publicKeyHash: Uint8Array, platformVersion: PlatformVersionLike): VerifiedIdentityByUniqueKeyHash;
@@ -0,0 +1,10 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { valueToDynamicValue } from '../../utils.js';
3
+ import { IdentityWASM } from '../../structs/Identity.js';
4
+ export function verifyIdentityByUniqueKeyHashProof(proof, publicKeyHash, platformVersion) {
5
+ const result = dppProvider.dpp.verifyIdentityByUniqueKeyHashProof(proof, publicKeyHash, valueToDynamicValue(platformVersion));
6
+ return {
7
+ rootHash: result.rootHash,
8
+ identity: result.identity != null ? IdentityWASM.createFromRawInstance(result.identity) : undefined
9
+ };
10
+ }
@@ -0,0 +1,2 @@
1
+ import { IdentifierLike, PlatformVersionLike, VerifiedIdentityContractNonce } from '../../types.js';
2
+ export declare function verifyIdentityContractNonceProof(proof: Uint8Array, identityId: IdentifierLike, contractId: IdentifierLike, verifySubsetOfProof: boolean, platformVersion: PlatformVersionLike): VerifiedIdentityContractNonce;
@@ -0,0 +1,9 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { prepareIdentifierValue, valueToDynamicValue } from '../../utils.js';
3
+ export function verifyIdentityContractNonceProof(proof, identityId, contractId, verifySubsetOfProof, platformVersion) {
4
+ const result = dppProvider.dpp.verifyIdentityContractNonceProof(proof, prepareIdentifierValue(identityId), prepareIdentifierValue(contractId), verifySubsetOfProof, valueToDynamicValue(platformVersion));
5
+ return {
6
+ rootHash: result.rootHash,
7
+ contractNonce: result.contractNonce != null ? BigInt(result.contractNonce) : undefined
8
+ };
9
+ }
@@ -0,0 +1,2 @@
1
+ import { IdentifierLike, PlatformVersionLike, VerifiedIdentityKeysByIdentifier } from '../../types.js';
2
+ export declare function verifyIdentityKeysByIdentifierProof(proof: Uint8Array, identityId: IdentifierLike, specificKeyIds: number[] | undefined | null, withRevision: boolean, withBalance: boolean, isProofSubset: boolean, limit: number | undefined | null, offset: number | undefined | null, platformVersion: PlatformVersionLike): VerifiedIdentityKeysByIdentifier;
@@ -0,0 +1,10 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { prepareIdentifierValue, valueToDynamicValue } from '../../utils.js';
3
+ import { PartialIdentityWASM } from '../../structs/PartialIdentity.js';
4
+ export function verifyIdentityKeysByIdentifierProof(proof, identityId, specificKeyIds, withRevision, withBalance, isProofSubset, limit, offset, platformVersion) {
5
+ const result = dppProvider.dpp.verifyIdentityKeysByIdentifierProof(proof, prepareIdentifierValue(identityId), specificKeyIds, withRevision, withBalance, isProofSubset, limit, offset, valueToDynamicValue(platformVersion));
6
+ return {
7
+ rootHash: result.rootHash,
8
+ identity: result.identity != null ? PartialIdentityWASM.createFromRawInstance(result.identity) : undefined
9
+ };
10
+ }
@@ -0,0 +1,2 @@
1
+ import { IdentifierLike, PlatformVersionLike, VerifiedIdentityNonce } from '../../types.js';
2
+ export declare function verifyIdentityNonceProof(proof: Uint8Array, identityId: IdentifierLike, verifySubsetOfProof: boolean, platformVersion: PlatformVersionLike): VerifiedIdentityNonce;
@@ -0,0 +1,9 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { prepareIdentifierValue, valueToDynamicValue } from '../../utils.js';
3
+ export function verifyIdentityNonceProof(proof, identityId, verifySubsetOfProof, platformVersion) {
4
+ const result = dppProvider.dpp.verifyIdentityNonceProof(proof, prepareIdentifierValue(identityId), verifySubsetOfProof, valueToDynamicValue(platformVersion));
5
+ return {
6
+ rootHash: result.rootHash,
7
+ nonce: result.nonce != null ? BigInt(result.nonce) : undefined
8
+ };
9
+ }
@@ -0,0 +1,2 @@
1
+ import { PlatformAddressLike, PlatformVersionLike, VerifiedPlatformAddressInfoWithRootHash } from '../../types.js';
2
+ export declare function verifyPlatformAddressInfo(proof: Uint8Array, platformAddress: PlatformAddressLike, verifySubsetOfProof: boolean, platformVersion: PlatformVersionLike): VerifiedPlatformAddressInfoWithRootHash;
@@ -0,0 +1,12 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { preparePlatformAddressValue, valueToDynamicValue } from '../../utils.js';
3
+ import { PlatformAddressWASM } from '../../structs/PlatformAddress/PlatformAddress.js';
4
+ export function verifyPlatformAddressInfo(proof, platformAddress, verifySubsetOfProof, platformVersion) {
5
+ const result = dppProvider.dpp.verifyAddressInfo(proof, preparePlatformAddressValue(platformAddress), verifySubsetOfProof, valueToDynamicValue(platformVersion));
6
+ return {
7
+ rootHash: result.rootHash,
8
+ address: result.address != null ? PlatformAddressWASM.createFromRawInstance(result.address) : undefined,
9
+ balance: result.balance != null ? BigInt(result.balance) : undefined,
10
+ nonce: result.nonce
11
+ };
12
+ }
@@ -0,0 +1,2 @@
1
+ import { PlatformAddressLike, PlatformVersionLike, VerifiedPlatformAddressesInfosWithRootHash } from '../../types.js';
2
+ export declare function verifyPlatformAddressesInfos(proof: Uint8Array, platformAddresses: PlatformAddressLike[], verifySubsetOfProof: boolean, platformVersion: PlatformVersionLike): VerifiedPlatformAddressesInfosWithRootHash;
@@ -0,0 +1,14 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { preparePlatformAddressValue, valueToDynamicValue } from '../../utils.js';
3
+ import { PlatformAddressWASM } from '../../structs/PlatformAddress/PlatformAddress.js';
4
+ export function verifyPlatformAddressesInfos(proof, platformAddresses, verifySubsetOfProof, platformVersion) {
5
+ const result = dppProvider.dpp.verifyAddressesInfos(proof, platformAddresses.map(preparePlatformAddressValue), verifySubsetOfProof, valueToDynamicValue(platformVersion));
6
+ return {
7
+ rootHash: result.rootHash,
8
+ infos: result.infos.map(({ nonce, credits, address }) => ({
9
+ nonce,
10
+ balance: credits != null ? BigInt(credits) : undefined,
11
+ address: PlatformAddressWASM.createFromRawInstance(address)
12
+ }))
13
+ };
14
+ }
@@ -0,0 +1,2 @@
1
+ import { VerifiedStateTransitionResultVariants, VerifiedStateTransitionResultVariantsRAW } from '../../types.js';
2
+ export declare function convertResult(result: VerifiedStateTransitionResultVariantsRAW): VerifiedStateTransitionResultVariants;