pshenmic-dpp 1.0.7-rc.2 → 1.0.7-rc.20

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 (48) hide show
  1. package/README.md +46 -1
  2. package/dist/wasm/index.d.ts +5 -1
  3. package/dist/wasm/index.js +14 -0
  4. package/dist/wasm/pshenmic_dpp.d.ts +589 -279
  5. package/dist/wasm/pshenmic_dpp.js +3480 -821
  6. package/dist/wasm/pshenmic_dpp_bg.js +1 -1
  7. package/dist/wasm/pshenmic_dpp_bg.wasm.d.ts +313 -151
  8. package/package.json +4 -3
  9. package/tests/AssetLockProof.spec.js +2 -8
  10. package/tests/AuthorizedActionTakers.spec.js +75 -0
  11. package/tests/BatchTransition.spec.js +21 -27
  12. package/tests/ChainLockProof.spec.js +3 -9
  13. package/tests/ChangeControlRules.spec.js +184 -0
  14. package/tests/CoreScript.spec.js +3 -9
  15. package/tests/DataContract.spec.js +18 -26
  16. package/tests/DataContractCreateStateTransition.spec.js +9 -15
  17. package/tests/DataContractUpdateStateTransition.spec.js +9 -15
  18. package/tests/DistributionFunction.spec.js +416 -0
  19. package/tests/Document.spec.js +40 -51
  20. package/tests/DocumentTransition.spec.js +4 -7
  21. package/tests/DocumentsTransitions.spec.js +76 -82
  22. package/tests/Identifier.spec.js +1 -3
  23. package/tests/Identity.spec.js +5 -11
  24. package/tests/IdentityCreateTransition.spec.js +4 -10
  25. package/tests/IdentityCreditTransferTransition.spec.js +2 -8
  26. package/tests/IdentityCreditWithdrawalTransition.spec.js +2 -8
  27. package/tests/IdentityPublicKey.spec.js +29 -35
  28. package/tests/IdentityTopUpTransition.spec.js +2 -8
  29. package/tests/IdentityUpdateTransition.spec.js +2 -8
  30. package/tests/InstantLockProof.spec.js +2 -8
  31. package/tests/OutPoint.spec.js +3 -9
  32. package/tests/PrivateKey.spec.js +2 -8
  33. package/tests/PublicKeyInCreation.spec.js +2 -8
  34. package/tests/RewardDistributionType.spec.js +90 -0
  35. package/tests/TokenBaseTransition.spec.js +96 -0
  36. package/tests/TokenConfiguration.spec.js +188 -0
  37. package/tests/TokenConfigurationConvention.spec.js +93 -0
  38. package/tests/TokenConfigurationLocalization.spec.js +59 -0
  39. package/tests/TokenDistributionRecipient.spec.js +49 -0
  40. package/tests/TokenDistributionRules.spec.js +313 -0
  41. package/tests/TokenKeepsHistoryRules.spec.js +67 -0
  42. package/tests/TokenPerpetualDistribution.spec.js +130 -0
  43. package/tests/TokenPreProgrammedDistribution.spec.js +61 -0
  44. package/tests/TokensTransitions.spec.js +1 -4
  45. package/tests/TxOut.spec.js +2 -8
  46. package/tests/mocks/PublicKey/index.js +1 -1
  47. package/tests/mocks/TokenConfiguration/index.js +7 -0
  48. package/tests/utils/wasm.js +0 -14
package/README.md CHANGED
@@ -37,10 +37,43 @@ ___
37
37
 
38
38
  **At this moment available structs:**
39
39
  - `Document`
40
- - `DocumentsBatch`
40
+ - `Batch`
41
41
  - `DocumentsBaseTransition`
42
+ - `TokenBaseTransitionWASM`
43
+ - `TokenPricingScheduleWASM`
44
+ - `TokenTransitionWASM`
45
+ - `BatchedTransitionWASM`
46
+ - `TokenConfigurationChangeItemWASM`
47
+ - `TokenConfigurationWASM`
48
+ - `ActionTakerWASM`
49
+ - `AuthorizedActionTakersWASM`
50
+ - `ChangeControlRulesWASM`
51
+ - `TokenConfigurationConventionWASM`
52
+ - `DistributionFunctionWASM`
53
+ - `TokenDistributionRecipientWASM`
54
+ - `TokenDistributionRulesWASM`
55
+ - distribution structs:
56
+ - `DistributionFixedAmountWASM`
57
+ - `DistributionRandomWASM`
58
+ - `DistributionStepDecreasingAmountWASM`
59
+ - `DistributionLinearWASM`
60
+ - `DistributionPolynomialWASM`
61
+ - `DistributionExponentialWASM`
62
+ - `DistributionLogarithmicWASM`
63
+ - `DistributionInvertedLogarithmicWASM`
64
+ - `GroupWASM`
65
+ - `TokenKeepsHistoryRulesWASM`
66
+ - `TokenConfigurationLocalizationWASM`
67
+ - `TokenMarketplaceRulesWASM`
68
+ - `TokenPerpetualDistributionWASM`
69
+ - `TokenPreProgrammedDistributionWASM`
70
+ - `RewardDistributionTypeWASM`
71
+ - `TokenTradeModeWASM`
72
+ - `GroupStateTransitionInfoWASM`
42
73
  - `DocumentsTransition`
43
74
  - `PrefundedVotingBalance`
75
+ - `PrivateEncryptedNoteWASM`
76
+ - `SharedEncryptedNoteWASM`
44
77
  - DocumentsTransitions:
45
78
  - `DocuemntCreateTransition`
46
79
  - `DocuemntDeleteTransition`
@@ -48,6 +81,18 @@ ___
48
81
  - `DocuemntReplaceTransition`
49
82
  - `DocumentTransferTransition`
50
83
  - `DocumentUpdatePriceTransition`
84
+ - Tokens Transitions:
85
+ - `TokenConfigUpdateTransitionWASM`
86
+ - `TokenDirectPurchaseTransitionWASM`
87
+ - `TokenSetPriceForDirectPurchaseTransitionWASM`
88
+ - `TokenBurnTransitionWASM`
89
+ - `TokenClaimTransitionWASM`
90
+ - `TokenDestroyFrozenFundsTransitionWASM`
91
+ - `TokenEmergencyActionTransitionWASM`
92
+ - `TokenFreezeTransitionWASM`
93
+ - `TokenMintTransitionWASM`
94
+ - `TokenTransferTransitionWASM`
95
+ - `TokenUnFreezeTransitionWASM`
51
96
  - `IdentityPublicKey`
52
97
  - IdentityTransitions:
53
98
  - `IdentityCreateTransition`
@@ -1,6 +1,10 @@
1
1
  import * as DPP from './pshenmic_dpp';
2
2
 
3
- export * from './pshenmic_dpp';
3
+ export * from './pshenmic_dpp'
4
+
5
+ export default dpp;
6
+
7
+ declare const dpp: DashPlatformProtocolWASM;
4
8
 
5
9
  export class DashPlatformProtocolWASM {
6
10
  // CLASSES
@@ -0,0 +1,14 @@
1
+ import * as DPP from './pshenmic_dpp.js';
2
+ import {default as wasmBytes} from "./pshenmic_dpp_bg.js";
3
+
4
+ export * from './pshenmic_dpp.js'
5
+
6
+ const binaryString = atob(wasmBytes);
7
+ const bytes = new Uint8Array(binaryString.length);
8
+ for (let i = 0; i < binaryString.length; i++) {
9
+ bytes[i] = binaryString.charCodeAt(i);
10
+ }
11
+
12
+ const dppInstance = DPP.initSync({ module: bytes.buffer });
13
+
14
+ export default DPP;