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

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 (324) hide show
  1. package/README.md +14 -99
  2. package/dist/binaries/bindingsTypes.d.ts +1696 -0
  3. package/dist/binaries/bindingsTypes.js +98 -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 +166 -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 +166 -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 +110 -0
  15. package/dist/src/dpp/dpp.js +110 -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/Address/AddressWitness.d.ts +12 -0
  21. package/dist/src/dpp/structs/Address/AddressWitness.js +23 -0
  22. package/dist/src/dpp/structs/Address/PlatformAddress.d.ts +14 -0
  23. package/dist/src/dpp/structs/Address/PlatformAddress.js +32 -0
  24. package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.d.ts +38 -0
  25. package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.js +95 -0
  26. package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.d.ts +35 -0
  27. package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.js +85 -0
  28. package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.d.ts +30 -0
  29. package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.js +72 -0
  30. package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.d.ts +33 -0
  31. package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.js +82 -0
  32. package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.d.ts +31 -0
  33. package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.js +77 -0
  34. package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.d.ts +31 -0
  35. package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.js +76 -0
  36. package/dist/src/dpp/structs/AddressTransitions/entities/AddressFundsFeeStrategyStep.d.ts +12 -0
  37. package/dist/src/dpp/structs/AddressTransitions/entities/AddressFundsFeeStrategyStep.js +26 -0
  38. package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.d.ts +14 -0
  39. package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.js +32 -0
  40. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.d.ts +12 -0
  41. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.js +26 -0
  42. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.d.ts +12 -0
  43. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.js +29 -0
  44. package/dist/src/dpp/structs/AssetLockProof/AssetLockProof.d.ts +19 -0
  45. package/dist/src/dpp/structs/AssetLockProof/AssetLockProof.js +51 -0
  46. package/dist/src/dpp/structs/AssetLockProof/ChainAssetLockProof.d.ts +17 -0
  47. package/dist/src/dpp/structs/AssetLockProof/ChainAssetLockProof.js +36 -0
  48. package/dist/src/dpp/structs/AssetLockProof/InstantAssetLockProof.d.ts +24 -0
  49. package/dist/src/dpp/structs/AssetLockProof/InstantAssetLockProof.js +48 -0
  50. package/dist/src/dpp/structs/AssetLockProof/OutPoint.d.ts +15 -0
  51. package/dist/src/dpp/structs/AssetLockProof/OutPoint.js +40 -0
  52. package/dist/src/dpp/structs/AssetLockProof/Transaction.d.ts +20 -0
  53. package/dist/src/dpp/structs/AssetLockProof/Transaction.js +49 -0
  54. package/dist/src/dpp/structs/AssetLockProof/TxIn.d.ts +17 -0
  55. package/dist/src/dpp/structs/AssetLockProof/TxIn.js +39 -0
  56. package/dist/src/dpp/structs/AssetLockProof/TxOut.d.ts +13 -0
  57. package/dist/src/dpp/structs/AssetLockProof/TxOut.js +34 -0
  58. package/dist/src/dpp/structs/AssetLockProof/Witness.d.ts +11 -0
  59. package/dist/src/dpp/structs/AssetLockProof/Witness.js +25 -0
  60. package/dist/src/dpp/structs/Batch/BatchTransition.d.ts +34 -0
  61. package/dist/src/dpp/structs/Batch/BatchTransition.js +95 -0
  62. package/dist/src/dpp/structs/Batch/BatchedTransition.d.ts +13 -0
  63. package/dist/src/dpp/structs/Batch/BatchedTransition.js +39 -0
  64. package/dist/src/dpp/structs/Batch/DocumentBaseTransition.d.ts +20 -0
  65. package/dist/src/dpp/structs/Batch/DocumentBaseTransition.js +54 -0
  66. package/dist/src/dpp/structs/Batch/DocumentTransition.d.ts +32 -0
  67. package/dist/src/dpp/structs/Batch/DocumentTransition.js +74 -0
  68. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.d.ts +23 -0
  69. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.js +58 -0
  70. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentDeleteTransition.d.ts +14 -0
  71. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentDeleteTransition.js +26 -0
  72. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentPurchaseTransition.d.ts +19 -0
  73. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentPurchaseTransition.js +39 -0
  74. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.d.ts +19 -0
  75. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.js +40 -0
  76. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentTransferTransition.d.ts +19 -0
  77. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentTransferTransition.js +35 -0
  78. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentUpdatePriceTransition.d.ts +17 -0
  79. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentUpdatePriceTransition.js +33 -0
  80. package/dist/src/dpp/structs/Batch/PrefundedVotingBalance.d.ts +9 -0
  81. package/dist/src/dpp/structs/Batch/PrefundedVotingBalance.js +19 -0
  82. package/dist/src/dpp/structs/Batch/TokenBaseTransition.d.ts +20 -0
  83. package/dist/src/dpp/structs/Batch/TokenBaseTransition.js +49 -0
  84. package/dist/src/dpp/structs/Batch/TokenPaymentInfo.d.ts +19 -0
  85. package/dist/src/dpp/structs/Batch/TokenPaymentInfo.js +54 -0
  86. package/dist/src/dpp/structs/Batch/TokenPricingSchedule.d.ts +17 -0
  87. package/dist/src/dpp/structs/Batch/TokenPricingSchedule.js +41 -0
  88. package/dist/src/dpp/structs/Batch/TokenTransition.d.ts +20 -0
  89. package/dist/src/dpp/structs/Batch/TokenTransition.js +92 -0
  90. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenBurnTransition.d.ts +14 -0
  91. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenBurnTransition.js +32 -0
  92. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenClaimTransition.d.ts +15 -0
  93. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenClaimTransition.js +33 -0
  94. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenConfigUpdateTransition.d.ts +15 -0
  95. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenConfigUpdateTransition.js +33 -0
  96. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDestroyFrozenFundsTransition.d.ts +16 -0
  97. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDestroyFrozenFundsTransition.js +34 -0
  98. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDirectPurchaseTransition.d.ts +14 -0
  99. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDirectPurchaseTransition.js +32 -0
  100. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenEmergencyActionTransition.d.ts +15 -0
  101. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenEmergencyActionTransition.js +33 -0
  102. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenFreezeTransition.d.ts +16 -0
  103. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenFreezeTransition.js +34 -0
  104. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenMintTransition.d.ts +18 -0
  105. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenMintTransition.js +43 -0
  106. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenSetPriceForDirectPurchaseTransition.d.ts +15 -0
  107. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenSetPriceForDirectPurchaseTransition.js +36 -0
  108. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.d.ts +21 -0
  109. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.js +53 -0
  110. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenUnFreezeTransition.d.ts +16 -0
  111. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenUnFreezeTransition.js +34 -0
  112. package/dist/src/dpp/structs/ConsensusError.d.ts +8 -0
  113. package/dist/src/dpp/structs/ConsensusError.js +22 -0
  114. package/dist/src/dpp/structs/ContractBounds.d.ts +17 -0
  115. package/dist/src/dpp/structs/ContractBounds.js +39 -0
  116. package/dist/src/dpp/structs/CoreScript.d.ts +15 -0
  117. package/dist/src/dpp/structs/CoreScript.js +37 -0
  118. package/dist/src/dpp/structs/DataContract.d.ts +35 -0
  119. package/dist/src/dpp/structs/DataContract.js +116 -0
  120. package/dist/src/dpp/structs/DataContractTransitions/DataContractCreateTransition.d.ts +23 -0
  121. package/dist/src/dpp/structs/DataContractTransitions/DataContractCreateTransition.js +55 -0
  122. package/dist/src/dpp/structs/DataContractTransitions/DataContractUpdateTransition.d.ts +23 -0
  123. package/dist/src/dpp/structs/DataContractTransitions/DataContractUpdateTransition.js +55 -0
  124. package/dist/src/dpp/structs/Document.d.ts +51 -0
  125. package/dist/src/dpp/structs/Document.js +184 -0
  126. package/dist/src/dpp/structs/EncryptedNote/PrivateEncryptedNote.d.ts +13 -0
  127. package/dist/src/dpp/structs/EncryptedNote/PrivateEncryptedNote.js +31 -0
  128. package/dist/src/dpp/structs/EncryptedNote/SharedEncryptedNote.d.ts +13 -0
  129. package/dist/src/dpp/structs/EncryptedNote/SharedEncryptedNote.js +31 -0
  130. package/dist/src/dpp/structs/GroupStateTransitionInfo.d.ts +15 -0
  131. package/dist/src/dpp/structs/GroupStateTransitionInfo.js +33 -0
  132. package/dist/src/dpp/structs/Identifier.d.ts +17 -0
  133. package/dist/src/dpp/structs/Identifier.js +50 -0
  134. package/dist/src/dpp/structs/Identity.d.ts +26 -0
  135. package/dist/src/dpp/structs/Identity.js +73 -0
  136. package/dist/src/dpp/structs/IdentityPublicKey.d.ts +43 -0
  137. package/dist/src/dpp/structs/IdentityPublicKey.js +126 -0
  138. package/dist/src/dpp/structs/IdentityPublicKeyInCreation.d.ts +30 -0
  139. package/dist/src/dpp/structs/IdentityPublicKeyInCreation.js +77 -0
  140. package/dist/src/dpp/structs/IdentityTransitions/IdentityCreateTransition.d.ts +29 -0
  141. package/dist/src/dpp/structs/IdentityTransitions/IdentityCreateTransition.js +69 -0
  142. package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditTransfer.d.ts +33 -0
  143. package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditTransfer.js +85 -0
  144. package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditWithdrawalTransition.d.ts +42 -0
  145. package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditWithdrawalTransition.js +114 -0
  146. package/dist/src/dpp/structs/IdentityTransitions/IdentityTopUpTransition.d.ts +30 -0
  147. package/dist/src/dpp/structs/IdentityTransitions/IdentityTopUpTransition.js +75 -0
  148. package/dist/src/dpp/structs/IdentityTransitions/IdentityUpdateTransition.d.ts +40 -0
  149. package/dist/src/dpp/structs/IdentityTransitions/IdentityUpdateTransition.js +108 -0
  150. package/dist/src/dpp/structs/InstantLock.d.ts +17 -0
  151. package/dist/src/dpp/structs/InstantLock.js +43 -0
  152. package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.d.ts +37 -0
  153. package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.js +96 -0
  154. package/dist/src/dpp/structs/MasternodeVote/ResourceVoteChoice.d.ts +14 -0
  155. package/dist/src/dpp/structs/MasternodeVote/ResourceVoteChoice.js +29 -0
  156. package/dist/src/dpp/structs/MasternodeVote/Vote.d.ts +13 -0
  157. package/dist/src/dpp/structs/MasternodeVote/Vote.js +27 -0
  158. package/dist/src/dpp/structs/MasternodeVote/VotePoll.d.ts +18 -0
  159. package/dist/src/dpp/structs/MasternodeVote/VotePoll.js +42 -0
  160. package/dist/src/dpp/structs/PartialIdentity.d.ts +26 -0
  161. package/dist/src/dpp/structs/PartialIdentity.js +69 -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 +38 -0
  167. package/dist/src/dpp/structs/StateTransition.js +100 -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 +274 -0
  203. package/dist/src/dpp/types.js +1 -0
  204. package/dist/src/dpp/utils.d.ts +5 -0
  205. package/dist/src/dpp/utils.js +64 -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/StateTransition/utils.d.ts +2 -0
  227. package/dist/src/dpp/verify/StateTransition/utils.js +115 -0
  228. package/dist/src/dpp/verify/StateTransition/verifyStateTransitionResult.d.ts +4 -0
  229. package/dist/src/dpp/verify/StateTransition/verifyStateTransitionResult.js +10 -0
  230. package/dist/src/dpp/verify/System/verifyEpochsInfoProof.d.ts +2 -0
  231. package/dist/src/dpp/verify/System/verifyEpochsInfoProof.js +16 -0
  232. package/dist/src/dpp/verify/System/verifyTotalCreditsProof.d.ts +2 -0
  233. package/dist/src/dpp/verify/System/verifyTotalCreditsProof.js +9 -0
  234. package/dist/src/dpp/verify/Tokens/verifyTokenBalancesForIdentitiesProof.d.ts +2 -0
  235. package/dist/src/dpp/verify/Tokens/verifyTokenBalancesForIdentitiesProof.js +13 -0
  236. package/dist/src/dpp/verify/Tokens/verifyTokenContractInfoProof.d.ts +2 -0
  237. package/dist/src/dpp/verify/Tokens/verifyTokenContractInfoProof.js +15 -0
  238. package/dist/src/dpp/verify/Tokens/verifyTokenDirectPurchasePrices.d.ts +2 -0
  239. package/dist/src/dpp/verify/Tokens/verifyTokenDirectPurchasePrices.js +14 -0
  240. package/dist/src/dpp/verify/Tokens/verifyTokenTotalSupplyProof.d.ts +2 -0
  241. package/dist/src/dpp/verify/Tokens/verifyTokenTotalSupplyProof.js +12 -0
  242. package/dist/src/dpp/verify/Tokens/verifyTokensBalancesForIdentityProof.d.ts +2 -0
  243. package/dist/src/dpp/verify/Tokens/verifyTokensBalancesForIdentityProof.js +13 -0
  244. package/dist/src/dpp/verify/verifySignatureDigest.d.ts +1 -0
  245. package/dist/src/dpp/verify/verifySignatureDigest.js +4 -0
  246. package/dist/src/react-native.d.ts +3 -0
  247. package/dist/src/react-native.js +6 -0
  248. package/dist/src/wasm.d.ts +3 -0
  249. package/dist/src/wasm.js +6 -0
  250. package/dist/utils/base122.d.ts +7 -0
  251. package/dist/utils/base122.js +63 -0
  252. package/package.json +30 -27
  253. package/tests/unit/DynamicValue.spec.ts +86 -0
  254. package/tests/unit/Identifier.spec.ts +105 -0
  255. package/tests/unit/Identity.spec.ts +119 -0
  256. package/tests/unit/IdentityPublicKey.spec.ts +126 -0
  257. package/dist/wasm/base122.d.ts +0 -1
  258. package/dist/wasm/base122.js +0 -67
  259. package/dist/wasm/index.d.ts +0 -148
  260. package/dist/wasm/index.js +0 -13
  261. package/dist/wasm/initAsync.d.ts +0 -4
  262. package/dist/wasm/initAsync.js +0 -20
  263. package/dist/wasm/initInterface.d.ts +0 -3
  264. package/dist/wasm/initInterface.js +0 -46
  265. package/dist/wasm/initWASM.d.ts +0 -1
  266. package/dist/wasm/initWASM.js +0 -28
  267. package/dist/wasm/pshenmic_dpp.d.ts +0 -5266
  268. package/dist/wasm/pshenmic_dpp.js +0 -25608
  269. package/dist/wasm/pshenmic_dpp_bg.d.ts +0 -3
  270. package/dist/wasm/pshenmic_dpp_bg.js +0 -2
  271. package/dist/wasm/pshenmic_dpp_bg.wasm.d.ts +0 -1636
  272. package/dist/wasm/pshenmic_dpp_zipped.d.ts +0 -3
  273. package/dist/wasm/pshenmic_dpp_zipped.js +0 -2
  274. package/dist/wasm/snippets/pshenmic_dpp_utils-23ab7381b198778d/stringify.js +0 -7
  275. package/tests/AssetLockProof.spec.cjs +0 -96
  276. package/tests/AsyncImportTest.spec.cjs +0 -930
  277. package/tests/AuthorizedActionTakers.spec.cjs +0 -75
  278. package/tests/BatchTransition.spec.cjs +0 -141
  279. package/tests/ChainLockProof.spec.cjs +0 -63
  280. package/tests/ChangeControlRules.spec.cjs +0 -184
  281. package/tests/CoreScript.spec.cjs +0 -37
  282. package/tests/DataContract.spec.cjs +0 -170
  283. package/tests/DataContractCreateStateTransition.spec.cjs +0 -102
  284. package/tests/DataContractUpdateStateTransition.spec.cjs +0 -103
  285. package/tests/DistributionFunction.spec.cjs +0 -416
  286. package/tests/Document.spec.cjs +0 -227
  287. package/tests/DocumentTransition.spec.cjs +0 -94
  288. package/tests/DocumentsTransitions.spec.cjs +0 -699
  289. package/tests/Identifier.spec.cjs +0 -82
  290. package/tests/Identity.spec.cjs +0 -107
  291. package/tests/IdentityCreateTransition.spec.cjs +0 -87
  292. package/tests/IdentityCreditTransferTransition.spec.cjs +0 -140
  293. package/tests/IdentityCreditWithdrawalTransition.spec.cjs +0 -186
  294. package/tests/IdentityPublicKey.spec.cjs +0 -166
  295. package/tests/IdentityTopUpTransition.spec.cjs +0 -125
  296. package/tests/IdentityUpdateTransition.spec.cjs +0 -141
  297. package/tests/InstantLockProof.spec.cjs +0 -91
  298. package/tests/OutPoint.spec.cjs +0 -49
  299. package/tests/PrivateKey.spec.cjs +0 -67
  300. package/tests/PublicKeyInCreation.spec.cjs +0 -252
  301. package/tests/RewardDistributionType.spec.cjs +0 -90
  302. package/tests/TokenBaseTransition.spec.cjs +0 -96
  303. package/tests/TokenConfiguration.spec.cjs +0 -188
  304. package/tests/TokenConfigurationConvention.spec.cjs +0 -93
  305. package/tests/TokenConfigurationLocalization.spec.cjs +0 -59
  306. package/tests/TokenDistributionRecipient.spec.cjs +0 -49
  307. package/tests/TokenDistributionRules.spec.cjs +0 -313
  308. package/tests/TokenKeepsHistoryRules.spec.cjs +0 -67
  309. package/tests/TokenPerpetualDistribution.spec.cjs +0 -130
  310. package/tests/TokenPreProgrammedDistribution.spec.cjs +0 -61
  311. package/tests/TokensTransitions.spec.cjs +0 -509
  312. package/tests/TxOut.spec.cjs +0 -70
  313. package/tests/mocks/DataContract/DataContract.json +0 -164
  314. package/tests/mocks/DataContract/index.js +0 -6
  315. package/tests/mocks/Document/DataContract.json +0 -23
  316. package/tests/mocks/Document/document.json +0 -3
  317. package/tests/mocks/Document/document2.json +0 -3
  318. package/tests/mocks/Document/index.js +0 -13
  319. package/tests/mocks/Identity/index.js +0 -13
  320. package/tests/mocks/Locks/index.js +0 -2
  321. package/tests/mocks/PrivateKey/index.js +0 -5
  322. package/tests/mocks/PublicKey/index.js +0 -13
  323. package/tests/mocks/TokenConfiguration/index.js +0 -5
  324. package/tests/utils/hex.js +0 -14
@@ -0,0 +1,76 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { InputAddressWASM } from './entities/InputAddress.js';
3
+ import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
4
+ import { AddressWitnessWASM } from '../Address/AddressWitness.js';
5
+ import { OutputAddressWASM } from './entities/OutputAddress.js';
6
+ import { prepareIdentifierValue } from '../../utils.js';
7
+ import { StateTransitionWASM } from '../StateTransition.js';
8
+ export class IdentityTopUpFromAddressesTransitionWASM {
9
+ /** @private **/
10
+ _rawIdentityTopUpFromAddressesTransition;
11
+ constructor(identifier, inputs, feeStrategy, userFeeIncrease, inputWitness, output) {
12
+ this._rawIdentityTopUpFromAddressesTransition = new dppProvider.dpp.IdentityTopUpFromAddressesTransitionNAPI(prepareIdentifierValue(identifier), inputs.map(i => i._rawInputAddress), feeStrategy.map(s => s._rawAddressFundsFeeStrategyStep), userFeeIncrease, inputWitness.map(w => w._rawWitness), output?._rawOutputAddress);
13
+ }
14
+ get inputs() {
15
+ return this._rawIdentityTopUpFromAddressesTransition.inputs.map(InputAddressWASM.createFromRawInstance);
16
+ }
17
+ set inputs(inputs) {
18
+ this._rawIdentityTopUpFromAddressesTransition.inputs = inputs.map(i => i._rawInputAddress);
19
+ }
20
+ get output() {
21
+ const output = this._rawIdentityTopUpFromAddressesTransition.output;
22
+ if (output != null) {
23
+ return OutputAddressWASM.createFromRawInstance(output);
24
+ }
25
+ }
26
+ set output(output) {
27
+ this._rawIdentityTopUpFromAddressesTransition.output = output?._rawOutputAddress;
28
+ }
29
+ get feeStrategy() {
30
+ return this._rawIdentityTopUpFromAddressesTransition.feeStrategy.map(AddressFundsFeeStrategyStepWASM.createFromRawInstance);
31
+ }
32
+ set feeStrategy(feeStrategy) {
33
+ this._rawIdentityTopUpFromAddressesTransition.feeStrategy = feeStrategy.map(s => s._rawAddressFundsFeeStrategyStep);
34
+ }
35
+ get userFeeIncrease() {
36
+ return this._rawIdentityTopUpFromAddressesTransition.userFeeIncrease;
37
+ }
38
+ set userFeeIncrease(userFeeIncrease) {
39
+ this._rawIdentityTopUpFromAddressesTransition.userFeeIncrease = userFeeIncrease;
40
+ }
41
+ get inputWitness() {
42
+ return this._rawIdentityTopUpFromAddressesTransition.inputWitness.map(AddressWitnessWASM.createFromRawInstance);
43
+ }
44
+ set inputWitness(addressWitness) {
45
+ this._rawIdentityTopUpFromAddressesTransition.inputWitness = addressWitness.map(w => w._rawWitness);
46
+ }
47
+ bytes() {
48
+ return this._rawIdentityTopUpFromAddressesTransition.bytes();
49
+ }
50
+ hex() {
51
+ return this._rawIdentityTopUpFromAddressesTransition.hex();
52
+ }
53
+ base64() {
54
+ return this._rawIdentityTopUpFromAddressesTransition.base64();
55
+ }
56
+ toStateTransition() {
57
+ return StateTransitionWASM.createFromRawInstance(this._rawIdentityTopUpFromAddressesTransition.toStateTransition());
58
+ }
59
+ static fromBytes(bytes) {
60
+ return IdentityTopUpFromAddressesTransitionWASM.createFromRawInstance(dppProvider.dpp.IdentityTopUpFromAddressesTransitionNAPI.fromBytes(bytes));
61
+ }
62
+ static fromHex(hex) {
63
+ return IdentityTopUpFromAddressesTransitionWASM.createFromRawInstance(dppProvider.dpp.IdentityTopUpFromAddressesTransitionNAPI.fromHex(hex));
64
+ }
65
+ static fromBase64(base64) {
66
+ return IdentityTopUpFromAddressesTransitionWASM.createFromRawInstance(dppProvider.dpp.IdentityTopUpFromAddressesTransitionNAPI.fromBase64(base64));
67
+ }
68
+ static fromStateTransition(stateTransition) {
69
+ return IdentityTopUpFromAddressesTransitionWASM.createFromRawInstance(dppProvider.dpp.IdentityTopUpFromAddressesTransitionNAPI.fromStateTransition(stateTransition._rawStateTransition));
70
+ }
71
+ static createFromRawInstance(rawInstance) {
72
+ const instance = Object.create(this.prototype);
73
+ instance._rawIdentityTopUpFromAddressesTransition = rawInstance;
74
+ return instance;
75
+ }
76
+ }
@@ -0,0 +1,12 @@
1
+ import { AddressFundsFeeStrategyStepNAPI } from '../../../../../binaries/bindingsTypes.js';
2
+ export declare class AddressFundsFeeStrategyStepWASM {
3
+ /** @private **/
4
+ _rawAddressFundsFeeStrategyStep: AddressFundsFeeStrategyStepNAPI;
5
+ private constructor();
6
+ getValue(): number;
7
+ setValue(value: number): void;
8
+ getValueType(): string;
9
+ static DeductFromInput(input: number): AddressFundsFeeStrategyStepWASM;
10
+ static ReduceOutput(output: number): AddressFundsFeeStrategyStepWASM;
11
+ static createFromRawInstance(rawInstance: AddressFundsFeeStrategyStepNAPI): AddressFundsFeeStrategyStepWASM;
12
+ }
@@ -0,0 +1,26 @@
1
+ import { dppProvider } from '../../../provider.js';
2
+ export class AddressFundsFeeStrategyStepWASM {
3
+ /** @private **/
4
+ _rawAddressFundsFeeStrategyStep;
5
+ constructor(addressFundsFeeStrategyStep) {
6
+ this._rawAddressFundsFeeStrategyStep = addressFundsFeeStrategyStep;
7
+ }
8
+ getValue() {
9
+ return this._rawAddressFundsFeeStrategyStep.getValue();
10
+ }
11
+ setValue(value) {
12
+ this._rawAddressFundsFeeStrategyStep.setValue(value);
13
+ }
14
+ getValueType() {
15
+ return this._rawAddressFundsFeeStrategyStep.getValueType();
16
+ }
17
+ static DeductFromInput(input) {
18
+ return new AddressFundsFeeStrategyStepWASM(dppProvider.dpp.AddressFundsFeeStrategyStepNAPI.DeductFromInput(input));
19
+ }
20
+ static ReduceOutput(output) {
21
+ return new AddressFundsFeeStrategyStepWASM(dppProvider.dpp.AddressFundsFeeStrategyStepNAPI.ReduceOutput(output));
22
+ }
23
+ static createFromRawInstance(rawInstance) {
24
+ return new AddressFundsFeeStrategyStepWASM(rawInstance);
25
+ }
26
+ }
@@ -0,0 +1,14 @@
1
+ import { InputAddressNAPI } from '../../../../../binaries/bindingsTypes.js';
2
+ import { PlatformAddressWASM } from '../../Address/PlatformAddress.js';
3
+ export declare class InputAddressWASM {
4
+ /** @private **/
5
+ _rawInputAddress: InputAddressNAPI;
6
+ constructor(address: PlatformAddressWASM, nonce: number, credits: bigint);
7
+ get address(): PlatformAddressWASM;
8
+ set address(value: PlatformAddressWASM);
9
+ get nonce(): number;
10
+ set nonce(value: number);
11
+ get credits(): bigint;
12
+ set credits(value: bigint);
13
+ static createFromRawInstance(rawInstance: InputAddressNAPI): InputAddressWASM;
14
+ }
@@ -0,0 +1,32 @@
1
+ import { PlatformAddressWASM } from '../../Address/PlatformAddress.js';
2
+ import { dppProvider } from '../../../provider.js';
3
+ export class InputAddressWASM {
4
+ /** @private **/
5
+ _rawInputAddress;
6
+ constructor(address, nonce, credits) {
7
+ this._rawInputAddress = new dppProvider.dpp.InputAddressNAPI(address._rawPlatformAddress, nonce, credits.toString());
8
+ }
9
+ get address() {
10
+ return PlatformAddressWASM.createFromRawInstance(this._rawInputAddress.address);
11
+ }
12
+ set address(value) {
13
+ this._rawInputAddress.address = value._rawPlatformAddress;
14
+ }
15
+ get nonce() {
16
+ return this._rawInputAddress.nonce;
17
+ }
18
+ set nonce(value) {
19
+ this._rawInputAddress.nonce = value;
20
+ }
21
+ get credits() {
22
+ return BigInt(this._rawInputAddress.credits);
23
+ }
24
+ set credits(value) {
25
+ this._rawInputAddress.credits = value.toString();
26
+ }
27
+ static createFromRawInstance(rawInstance) {
28
+ const instance = Object.create(this.prototype);
29
+ instance._rawInputAddress = rawInstance;
30
+ return instance;
31
+ }
32
+ }
@@ -0,0 +1,12 @@
1
+ import { OutputAddressNAPI } from '../../../../../binaries/bindingsTypes.js';
2
+ import { PlatformAddressWASM } from '../../Address/PlatformAddress.js';
3
+ export declare class OutputAddressWASM {
4
+ /** @private **/
5
+ _rawOutputAddress: OutputAddressNAPI;
6
+ constructor(address: PlatformAddressWASM, credits: bigint);
7
+ get address(): PlatformAddressWASM;
8
+ set address(address: PlatformAddressWASM);
9
+ get credits(): bigint;
10
+ set credits(credits: bigint);
11
+ static createFromRawInstance(rawInstance: OutputAddressNAPI): OutputAddressWASM;
12
+ }
@@ -0,0 +1,26 @@
1
+ import { dppProvider } from '../../../provider.js';
2
+ import { PlatformAddressWASM } from '../../Address/PlatformAddress.js';
3
+ export class OutputAddressWASM {
4
+ /** @private **/
5
+ _rawOutputAddress;
6
+ constructor(address, credits) {
7
+ this._rawOutputAddress = new dppProvider.dpp.OutputAddressNAPI(address._rawPlatformAddress, credits.toString());
8
+ }
9
+ get address() {
10
+ return PlatformAddressWASM.createFromRawInstance(this._rawOutputAddress.address);
11
+ }
12
+ set address(address) {
13
+ this._rawOutputAddress.address = address._rawPlatformAddress;
14
+ }
15
+ get credits() {
16
+ return BigInt(this._rawOutputAddress.credits);
17
+ }
18
+ set credits(credits) {
19
+ this._rawOutputAddress.credits = credits.toString();
20
+ }
21
+ static createFromRawInstance(rawInstance) {
22
+ const instance = Object.create(this.prototype);
23
+ instance._rawOutputAddress = rawInstance;
24
+ return instance;
25
+ }
26
+ }
@@ -0,0 +1,12 @@
1
+ import { OutputAddressNullableCreditsNAPI } from '../../../../../binaries/bindingsTypes.js';
2
+ import { PlatformAddressWASM } from '../../Address/PlatformAddress.js';
3
+ export declare class OutputAddressNullableCreditsWASM {
4
+ /** @private **/
5
+ _rawOutputAddressNullableCredits: OutputAddressNullableCreditsNAPI;
6
+ constructor(address: PlatformAddressWASM, credits?: bigint);
7
+ get address(): PlatformAddressWASM;
8
+ set address(address: PlatformAddressWASM);
9
+ get credits(): BigInt | undefined;
10
+ set credits(value: BigInt | undefined);
11
+ static createFromRawInstance(rawInstance: OutputAddressNullableCreditsNAPI): OutputAddressNullableCreditsWASM;
12
+ }
@@ -0,0 +1,29 @@
1
+ import { PlatformAddressWASM } from '../../Address/PlatformAddress.js';
2
+ import { dppProvider } from '../../../provider.js';
3
+ export class OutputAddressNullableCreditsWASM {
4
+ /** @private **/
5
+ _rawOutputAddressNullableCredits;
6
+ constructor(address, credits) {
7
+ this._rawOutputAddressNullableCredits = new dppProvider.dpp.OutputAddressNullableCreditsNAPI(address._rawPlatformAddress, credits?.toString());
8
+ }
9
+ get address() {
10
+ return PlatformAddressWASM.createFromRawInstance(this._rawOutputAddressNullableCredits.address);
11
+ }
12
+ set address(address) {
13
+ this._rawOutputAddressNullableCredits.address = address._rawPlatformAddress;
14
+ }
15
+ get credits() {
16
+ const credits = this._rawOutputAddressNullableCredits.credits;
17
+ if (credits != null) {
18
+ return BigInt(credits);
19
+ }
20
+ }
21
+ set credits(value) {
22
+ this._rawOutputAddressNullableCredits.credits = value?.toString();
23
+ }
24
+ static createFromRawInstance(rawInstance) {
25
+ const instance = Object.create(this.prototype);
26
+ instance._rawOutputAddressNullableCredits = rawInstance;
27
+ return instance;
28
+ }
29
+ }
@@ -0,0 +1,19 @@
1
+ import { AssetLockProofNAPI } from '../../../../binaries/bindingsTypes.js';
2
+ import { InstantAssetLockProofWASM } from './InstantAssetLockProof.js';
3
+ import { ChainAssetLockProofWASM } from './ChainAssetLockProof.js';
4
+ import { OutPointWASM } from './OutPoint.js';
5
+ import { IdentifierWASM } from '../Identifier.js';
6
+ export declare class AssetLockProofWASM {
7
+ _rawAssetLockProof: AssetLockProofNAPI;
8
+ constructor(lockProof: InstantAssetLockProofWASM | ChainAssetLockProofWASM);
9
+ static createInstantAssetLockProof(instantLock: Uint8Array, transaction: Uint8Array, outputIndex: number): AssetLockProofWASM;
10
+ static createChainAssetLockProof(coreChainLockedHeight: number, outPoint: OutPointWASM): AssetLockProofWASM;
11
+ getLockType(): string;
12
+ getInstantLockProof(): InstantAssetLockProofWASM;
13
+ getChainLockProof(): ChainAssetLockProofWASM;
14
+ getOutPoint(): OutPointWASM | null;
15
+ createIdentityId(): IdentifierWASM;
16
+ hex(): string;
17
+ static fromHex(value: string): AssetLockProofWASM;
18
+ static createFromRawInstance(rawInstance: AssetLockProofNAPI): AssetLockProofWASM;
19
+ }
@@ -0,0 +1,51 @@
1
+ import { AssetLockProofNAPI } from '../../../../binaries/bindingsTypes.js';
2
+ import { InstantAssetLockProofWASM } from './InstantAssetLockProof.js';
3
+ import { ChainAssetLockProofWASM } from './ChainAssetLockProof.js';
4
+ import { dppProvider } from '../../provider.js';
5
+ import { OutPointWASM } from './OutPoint.js';
6
+ import { IdentifierWASM } from '../Identifier.js';
7
+ export class AssetLockProofWASM {
8
+ _rawAssetLockProof;
9
+ constructor(lockProof) {
10
+ this._rawAssetLockProof = new dppProvider.dpp.AssetLockProofNAPI(lockProof._rawLockProof);
11
+ }
12
+ static createInstantAssetLockProof(instantLock, transaction, outputIndex) {
13
+ return AssetLockProofWASM.createFromRawInstance(dppProvider
14
+ .dpp
15
+ .AssetLockProofNAPI
16
+ .createInstantAssetLockProof(instantLock, transaction, outputIndex));
17
+ }
18
+ static createChainAssetLockProof(coreChainLockedHeight, outPoint) {
19
+ return AssetLockProofWASM.createFromRawInstance(dppProvider
20
+ .dpp
21
+ .AssetLockProofNAPI
22
+ .createChainAssetLockProof(coreChainLockedHeight, outPoint._rawOutPoint));
23
+ }
24
+ getLockType() {
25
+ return this._rawAssetLockProof.getLockType();
26
+ }
27
+ getInstantLockProof() {
28
+ return InstantAssetLockProofWASM.createFromRawInstance(this._rawAssetLockProof.getInstantLockProof());
29
+ }
30
+ getChainLockProof() {
31
+ return ChainAssetLockProofWASM.createFromRawInstance(this._rawAssetLockProof.getChainLockProof());
32
+ }
33
+ getOutPoint() {
34
+ const outPoint = this._rawAssetLockProof.getOutPoint();
35
+ return (outPoint != null) ? OutPointWASM.createFromRawInstance(outPoint) : null;
36
+ }
37
+ createIdentityId() {
38
+ return IdentifierWASM.createFromRawInstance(this._rawAssetLockProof.createIdentityId());
39
+ }
40
+ hex() {
41
+ return this._rawAssetLockProof.hex();
42
+ }
43
+ static fromHex(value) {
44
+ return AssetLockProofWASM.createFromRawInstance(AssetLockProofNAPI.fromHex(value));
45
+ }
46
+ static createFromRawInstance(rawInstance) {
47
+ const instance = Object.create(this.prototype);
48
+ instance._rawAssetLockProof = rawInstance;
49
+ return instance;
50
+ }
51
+ }
@@ -0,0 +1,17 @@
1
+ import { ChainAssetLockProofNAPI } from '../../../../binaries/bindingsTypes.js';
2
+ import { OutPointWASM } from './OutPoint.js';
3
+ import { IdentifierWASM } from '../Identifier.js';
4
+ export declare class ChainAssetLockProofWASM {
5
+ _rawLockProof: ChainAssetLockProofNAPI;
6
+ constructor(coreChainLockedHeight: number, outPoint: OutPointWASM);
7
+ set coreChainLockedHeight(height: number);
8
+ get coreChainLockedHeight(): number;
9
+ set outPoint(outPoint: OutPointWASM);
10
+ get outPoint(): OutPointWASM;
11
+ createIdentityId(): IdentifierWASM;
12
+ static fromRawObject(obj: {
13
+ coreChainLockedHeight: number;
14
+ outPoint: OutPointWASM | Uint8Array;
15
+ }): ChainAssetLockProofWASM;
16
+ static createFromRawInstance(rawInstance: ChainAssetLockProofNAPI): ChainAssetLockProofWASM;
17
+ }
@@ -0,0 +1,36 @@
1
+ import { OutPointWASM } from './OutPoint.js';
2
+ import { dppProvider } from '../../provider.js';
3
+ import { IdentifierWASM } from '../Identifier.js';
4
+ export class ChainAssetLockProofWASM {
5
+ _rawLockProof;
6
+ constructor(coreChainLockedHeight, outPoint) {
7
+ this._rawLockProof = new dppProvider.dpp.ChainAssetLockProofNAPI(coreChainLockedHeight, outPoint);
8
+ }
9
+ set coreChainLockedHeight(height) {
10
+ this._rawLockProof.coreChainLockedHeight = height;
11
+ }
12
+ get coreChainLockedHeight() {
13
+ return this._rawLockProof.coreChainLockedHeight;
14
+ }
15
+ set outPoint(outPoint) {
16
+ this._rawLockProof.outPoint = outPoint._rawOutPoint;
17
+ }
18
+ get outPoint() {
19
+ return OutPointWASM.createFromRawInstance(this._rawLockProof.outPoint);
20
+ }
21
+ createIdentityId() {
22
+ return IdentifierWASM.createFromRawInstance(this._rawLockProof.createIdentityId());
23
+ }
24
+ static fromRawObject(obj) {
25
+ const outPoint = obj.outPoint instanceof Uint8Array ? obj.outPoint : obj.outPoint.bytes();
26
+ return ChainAssetLockProofWASM.createFromRawInstance(dppProvider.dpp.ChainAssetLockProofNAPI.fromRawObject({
27
+ coreChainLockedHeight: obj.coreChainLockedHeight,
28
+ outPoint
29
+ }));
30
+ }
31
+ static createFromRawInstance(rawInstance) {
32
+ const instance = Object.create(this.prototype);
33
+ instance._rawLockProof = rawInstance;
34
+ return instance;
35
+ }
36
+ }
@@ -0,0 +1,24 @@
1
+ import { InstantAssetLockProofNAPI } from '../../../../binaries/bindingsTypes.js';
2
+ import { TxOutWASM } from './TxOut.js';
3
+ import { OutPointWASM } from './OutPoint.js';
4
+ import { InstantLockWASM } from '../InstantLock.js';
5
+ import { IdentifierWASM } from '../Identifier.js';
6
+ export declare class InstantAssetLockProofWASM {
7
+ _rawLockProof: InstantAssetLockProofNAPI;
8
+ constructor(instantLock: Uint8Array, transaction: Uint8Array, outputIndex: number);
9
+ get outputIndex(): number;
10
+ set outputIndex(value: number);
11
+ get instantLock(): InstantLockWASM;
12
+ set instantLock(instantLock: InstantLockWASM);
13
+ getOutput(): TxOutWASM | null;
14
+ getOutPoint(): OutPointWASM | null;
15
+ getTransaction(): Uint8Array;
16
+ getInstantLockBytes(): Uint8Array;
17
+ createIdentityId(): IdentifierWASM;
18
+ static fromRawObject(obj: {
19
+ instantLock: Uint8Array;
20
+ transaction: Uint8Array;
21
+ outputIndex: number;
22
+ }): InstantAssetLockProofWASM;
23
+ static createFromRawInstance(rawInstance: InstantAssetLockProofNAPI): InstantAssetLockProofWASM;
24
+ }
@@ -0,0 +1,48 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { TxOutWASM } from './TxOut.js';
3
+ import { OutPointWASM } from './OutPoint.js';
4
+ import { InstantLockWASM } from '../InstantLock.js';
5
+ import { IdentifierWASM } from '../Identifier.js';
6
+ export class InstantAssetLockProofWASM {
7
+ _rawLockProof;
8
+ constructor(instantLock, transaction, outputIndex) {
9
+ this._rawLockProof = new dppProvider.dpp.InstantAssetLockProofNAPI(instantLock, transaction, outputIndex);
10
+ }
11
+ get outputIndex() {
12
+ return this._rawLockProof.outputIndex;
13
+ }
14
+ set outputIndex(value) {
15
+ this._rawLockProof.outputIndex = value;
16
+ }
17
+ get instantLock() {
18
+ return InstantLockWASM.createFromRawInstance(this._rawLockProof.instantLock);
19
+ }
20
+ set instantLock(instantLock) {
21
+ this._rawLockProof.instantLock = instantLock._rawInstantLock;
22
+ }
23
+ getOutput() {
24
+ const out = this._rawLockProof.getOutput();
25
+ return out instanceof dppProvider.dpp.TxOutNAPI ? TxOutWASM.createFromRawInstance(out) : out;
26
+ }
27
+ getOutPoint() {
28
+ const out = this._rawLockProof.getOutPoint();
29
+ return out instanceof dppProvider.dpp.OutPointNAPI ? OutPointWASM.createFromRawInstance(out) : out;
30
+ }
31
+ getTransaction() {
32
+ return this._rawLockProof.getTransaction();
33
+ }
34
+ getInstantLockBytes() {
35
+ return this._rawLockProof.getInstantLockBytes();
36
+ }
37
+ createIdentityId() {
38
+ return IdentifierWASM.createFromRawInstance(this._rawLockProof.createIdentityId());
39
+ }
40
+ static fromRawObject(obj) {
41
+ return InstantAssetLockProofWASM.createFromRawInstance(dppProvider.dpp.InstantAssetLockProofNAPI.fromRawObject(obj));
42
+ }
43
+ static createFromRawInstance(rawInstance) {
44
+ const instance = Object.create(this.prototype);
45
+ instance._rawLockProof = rawInstance;
46
+ return instance;
47
+ }
48
+ }
@@ -0,0 +1,15 @@
1
+ import { OutPointNAPI } from '../../../../binaries/bindingsTypes.js';
2
+ export declare class OutPointWASM {
3
+ /** @private **/
4
+ _rawOutPoint: OutPointNAPI;
5
+ constructor(txId: string, vout: number);
6
+ getVOUT(): number;
7
+ getTXID(): string;
8
+ bytes(): Uint8Array;
9
+ base64(): string;
10
+ hex(): string;
11
+ static fromBytes(bytes: Uint8Array): OutPointWASM;
12
+ static fromHex(bytes: string): OutPointWASM;
13
+ static fromBase64(bytes: string): OutPointWASM;
14
+ static createFromRawInstance(rawInstance: OutPointNAPI): OutPointWASM;
15
+ }
@@ -0,0 +1,40 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ export class OutPointWASM {
3
+ /** @private **/
4
+ _rawOutPoint;
5
+ constructor(txId, vout) {
6
+ this._rawOutPoint = new dppProvider.dpp.OutPointNAPI(txId, vout);
7
+ }
8
+ getVOUT() {
9
+ return this._rawOutPoint.getVOUT();
10
+ }
11
+ getTXID() {
12
+ return this._rawOutPoint.getTXID();
13
+ }
14
+ bytes() {
15
+ return this._rawOutPoint.bytes();
16
+ }
17
+ base64() {
18
+ return this._rawOutPoint.base64();
19
+ }
20
+ hex() {
21
+ return this._rawOutPoint.hex();
22
+ }
23
+ static fromBytes(bytes) {
24
+ const instance = dppProvider.dpp.OutPointNAPI.fromBytes(bytes);
25
+ return OutPointWASM.createFromRawInstance(instance);
26
+ }
27
+ static fromHex(bytes) {
28
+ const instance = dppProvider.dpp.OutPointNAPI.fromHex(bytes);
29
+ return OutPointWASM.createFromRawInstance(instance);
30
+ }
31
+ static fromBase64(bytes) {
32
+ const instance = dppProvider.dpp.OutPointNAPI.fromBase64(bytes);
33
+ return OutPointWASM.createFromRawInstance(instance);
34
+ }
35
+ static createFromRawInstance(rawInstance) {
36
+ const instance = Object.create(this.prototype);
37
+ instance._rawOutPoint = rawInstance;
38
+ return instance;
39
+ }
40
+ }
@@ -0,0 +1,20 @@
1
+ import { TransactionNAPI } from '../../../../binaries/bindingsTypes.js';
2
+ import { TxInWASM } from './TxIn.js';
3
+ import { TxOutWASM } from './TxOut.js';
4
+ export declare class TransactionWASM {
5
+ /** @private **/
6
+ _rawTransaction: TransactionNAPI;
7
+ constructor(version: number, lockTime: number | Date, inputs: TxInWASM[], outputs: TxOutWASM[]);
8
+ get version(): number;
9
+ set version(version: number);
10
+ get lockTime(): number;
11
+ set lockTime(lockTime: number | Date);
12
+ get input(): TxInWASM[];
13
+ set input(input: TxInWASM[]);
14
+ get output(): TxOutWASM[];
15
+ set output(output: TxOutWASM[]);
16
+ isCoinBase(): boolean;
17
+ getTxType(): string;
18
+ getTxId(): string;
19
+ static createFromRawInstance(rawInstance: TransactionNAPI): TransactionWASM;
20
+ }
@@ -0,0 +1,49 @@
1
+ import { TxInWASM } from './TxIn.js';
2
+ import { TxOutWASM } from './TxOut.js';
3
+ import { dppProvider } from '../../provider.js';
4
+ export class TransactionWASM {
5
+ /** @private **/
6
+ _rawTransaction;
7
+ constructor(version, lockTime, inputs, outputs) {
8
+ const normalLockTime = typeof lockTime === 'number' ? lockTime : lockTime.getTime();
9
+ this._rawTransaction = new dppProvider.dpp.TransactionNAPI(version, normalLockTime, inputs.map(input => input._rawTxIn), outputs.map(output => output._rawTxOut));
10
+ }
11
+ get version() {
12
+ return this._rawTransaction.version;
13
+ }
14
+ set version(version) {
15
+ this._rawTransaction.version = version;
16
+ }
17
+ get lockTime() {
18
+ return this._rawTransaction.lockTime;
19
+ }
20
+ set lockTime(lockTime) {
21
+ this._rawTransaction.lockTime = typeof lockTime === 'number' ? lockTime : lockTime.getTime();
22
+ }
23
+ get input() {
24
+ return this._rawTransaction.input.map(TxInWASM.createFromRawInstance);
25
+ }
26
+ set input(input) {
27
+ this._rawTransaction.input = input.map(input => input._rawTxIn);
28
+ }
29
+ get output() {
30
+ return this._rawTransaction.output.map(TxOutWASM.createFromRawInstance);
31
+ }
32
+ set output(output) {
33
+ this._rawTransaction.output = output.map(output => output._rawTxOut);
34
+ }
35
+ isCoinBase() {
36
+ return this._rawTransaction.isCoinBase();
37
+ }
38
+ getTxType() {
39
+ return this._rawTransaction.getTxType();
40
+ }
41
+ getTxId() {
42
+ return this._rawTransaction.getTxId();
43
+ }
44
+ static createFromRawInstance(rawInstance) {
45
+ const instance = Object.create(this.prototype);
46
+ instance._rawTransaction = rawInstance;
47
+ return instance;
48
+ }
49
+ }
@@ -0,0 +1,17 @@
1
+ import { TxInNAPI } from '../../../../binaries/bindingsTypes.js';
2
+ import { OutPointWASM } from './OutPoint.js';
3
+ import { WitnessWASM } from './Witness.js';
4
+ export declare class TxInWASM {
5
+ /** @private **/
6
+ _rawTxIn: TxInNAPI;
7
+ constructor(previousOutPoint: OutPointWASM, scriptSig: Uint8Array, sequency: number, witness: WitnessWASM);
8
+ get previousOutput(): OutPointWASM;
9
+ set previousOutput(previousOutput: OutPointWASM);
10
+ get scriptSig(): Uint8Array;
11
+ set scriptSig(sig: Uint8Array);
12
+ get sequence(): number;
13
+ set sequence(sequence: number);
14
+ get witnesses(): WitnessWASM;
15
+ set witnesses(witness: WitnessWASM);
16
+ static createFromRawInstance(rawInstance: TxInNAPI): TxInWASM;
17
+ }
@@ -0,0 +1,39 @@
1
+ import { OutPointWASM } from './OutPoint.js';
2
+ import { WitnessWASM } from './Witness.js';
3
+ import { dppProvider } from '../../provider.js';
4
+ export class TxInWASM {
5
+ /** @private **/
6
+ _rawTxIn;
7
+ constructor(previousOutPoint, scriptSig, sequency, witness) {
8
+ this._rawTxIn = new dppProvider.dpp.TxInNAPI(previousOutPoint._rawOutPoint, scriptSig, sequency, witness._rawWitness);
9
+ }
10
+ get previousOutput() {
11
+ return OutPointWASM.createFromRawInstance(this._rawTxIn.previousOutput);
12
+ }
13
+ set previousOutput(previousOutput) {
14
+ this._rawTxIn.previousOutput = previousOutput._rawOutPoint;
15
+ }
16
+ get scriptSig() {
17
+ return this._rawTxIn.scriptSig;
18
+ }
19
+ set scriptSig(sig) {
20
+ this._rawTxIn.scriptSig = sig;
21
+ }
22
+ get sequence() {
23
+ return this._rawTxIn.sequence;
24
+ }
25
+ set sequence(sequence) {
26
+ this._rawTxIn.sequence = sequence;
27
+ }
28
+ get witnesses() {
29
+ return WitnessWASM.createFromRawInstance(this._rawTxIn.witnesses);
30
+ }
31
+ set witnesses(witness) {
32
+ this._rawTxIn.witnesses = witness._rawWitness;
33
+ }
34
+ static createFromRawInstance(rawInstance) {
35
+ const instance = Object.create(this.prototype);
36
+ instance._rawTxIn = rawInstance;
37
+ return instance;
38
+ }
39
+ }
@@ -0,0 +1,13 @@
1
+ import { TxOutNAPI } from '../../../../binaries/bindingsTypes.js';
2
+ export declare class TxOutWASM {
3
+ _rawTxOut: TxOutNAPI;
4
+ constructor(value: bigint, scriptPubKey: Uint8Array);
5
+ get value(): bigint;
6
+ set value(value: bigint);
7
+ get scriptPubKeyHex(): string;
8
+ set scriptPubKeyHex(script: string);
9
+ get scriptPubKeyBytes(): Uint8Array;
10
+ set scriptPubKeyBytes(script: Uint8Array);
11
+ getScriptPubKeyASM(): string;
12
+ static createFromRawInstance(rawInstance: TxOutNAPI): TxOutWASM;
13
+ }