pshenmic-dpp 2.0.0-dev.3 → 2.0.0-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/binaries/bindingsTypes.d.ts +2 -1
- package/dist/binaries/pshenmic_dpp.android.node/x86_64/libpshenmic_dpp.so +0 -0
- package/dist/binaries/wasm/wasmBytes.js +1 -1
- package/dist/src/dpp/structs/Address/PlatformAddress.js +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.js +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.js +2 -2
- package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.js +2 -2
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.js +1 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.js +1 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.js +1 -1
- package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.js +1 -1
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.js +1 -1
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.js +1 -1
- package/dist/src/dpp/structs/AssetLockProof/AssetLockProof.js +1 -1
- package/dist/src/dpp/structs/AssetLockProof/ChainAssetLockProof.js +1 -1
- package/dist/src/dpp/structs/AssetLockProof/InstantAssetLockProof.js +1 -1
- package/dist/src/dpp/structs/AssetLockProof/OutPoint.js +1 -1
- package/dist/src/dpp/structs/AssetLockProof/Transaction.js +1 -1
- package/dist/src/dpp/structs/AssetLockProof/TxIn.js +1 -1
- package/dist/src/dpp/structs/AssetLockProof/TxOut.js +1 -1
- package/dist/src/dpp/structs/AssetLockProof/Witness.js +1 -1
- package/dist/src/dpp/structs/Batch/BatchTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/BatchedTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/DocumentBaseTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransition.d.ts +1 -0
- package/dist/src/dpp/structs/Batch/DocumentTransition.js +4 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentDeleteTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentPurchaseTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentTransferTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentUpdatePriceTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/PrefundedVotingBalance.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenBaseTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenPaymentInfo.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenPricingSchedule.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransition.d.ts +1 -0
- package/dist/src/dpp/structs/Batch/TokenTransition.js +4 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenBurnTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenClaimTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenConfigUpdateTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDestroyFrozenFundsTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDirectPurchaseTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenEmergencyActionTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenFreezeTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenMintTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenSetPriceForDirectPurchaseTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.d.ts +3 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.js +8 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenUnFreezeTransition.js +1 -1
- package/dist/src/dpp/structs/ContractBounds.js +1 -1
- package/dist/src/dpp/structs/CoreScript.js +1 -1
- package/dist/src/dpp/structs/DataContract.d.ts +2 -0
- package/dist/src/dpp/structs/DataContract.js +7 -1
- package/dist/src/dpp/structs/DataContractTransitions/DataContractCreateTransition.js +1 -1
- package/dist/src/dpp/structs/DataContractTransitions/DataContractUpdateTransition.js +1 -1
- package/dist/src/dpp/structs/EncryptedNote/PrivateEncryptedNote.js +1 -1
- package/dist/src/dpp/structs/EncryptedNote/SharedEncryptedNote.js +1 -1
- package/dist/src/dpp/structs/GroupStateTransitionInfo.js +1 -1
- package/dist/src/dpp/structs/Identifier.js +1 -1
- package/dist/src/dpp/structs/Identity.js +1 -1
- package/dist/src/dpp/structs/IdentityPublicKey.js +1 -1
- package/dist/src/dpp/structs/IdentityPublicKeyInCreation.js +1 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreateTransition.js +1 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditTransfer.js +1 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditWithdrawalTransition.js +1 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityTopUpTransition.js +1 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityUpdateTransition.js +1 -1
- package/dist/src/dpp/structs/InstantLock.js +1 -1
- package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.js +1 -1
- package/dist/src/dpp/structs/MasternodeVote/Vote.js +1 -1
- package/dist/src/dpp/structs/MasternodeVote/VotePoll.d.ts +1 -1
- package/dist/src/dpp/structs/MasternodeVote/VotePoll.js +3 -3
- package/dist/src/dpp/structs/PartialIdentity.js +1 -1
- package/dist/src/dpp/structs/PrivateKey.js +1 -1
- package/dist/src/dpp/structs/PublicKey.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/ActionTaker.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/ChangeControlRules.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/Group.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfiguration.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationConvention.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationLocalization.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRules.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenKeepsHistoryRules.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenMarketplaceRules.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenPerpetualDistribution.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenPreProgrammedDistribution.js +1 -1
- package/package.json +1 -1
- package/tests/unit/DynamicValue.spec.ts +27 -0
|
@@ -40,7 +40,7 @@ export class IdentifierWASM {
|
|
|
40
40
|
return this.createFromRawInstance(dppProvider.dpp.IdentifierNAPI.fromBytes(id));
|
|
41
41
|
}
|
|
42
42
|
static createFromRawInstance(rawInstance) {
|
|
43
|
-
const instance = Object.create(
|
|
43
|
+
const instance = Object.create(IdentifierWASM.prototype);
|
|
44
44
|
instance._rawIdentifier = rawInstance;
|
|
45
45
|
return instance;
|
|
46
46
|
}
|
|
@@ -63,7 +63,7 @@ export class IdentityWASM {
|
|
|
63
63
|
return this._rawIdentity.base64();
|
|
64
64
|
}
|
|
65
65
|
static createFromRawInstance(rawInstance) {
|
|
66
|
-
const instance = Object.create(
|
|
66
|
+
const instance = Object.create(IdentityWASM.prototype);
|
|
67
67
|
instance._rawIdentity = rawInstance;
|
|
68
68
|
return instance;
|
|
69
69
|
}
|
|
@@ -119,7 +119,7 @@ export class IdentityPublicKeyWASM {
|
|
|
119
119
|
return this.createFromRawInstance(rawInstance);
|
|
120
120
|
}
|
|
121
121
|
static createFromRawInstance(rawInstance) {
|
|
122
|
-
const instance = Object.create(
|
|
122
|
+
const instance = Object.create(IdentityPublicKeyWASM.prototype);
|
|
123
123
|
instance._rawIdentityPublicKey = rawInstance;
|
|
124
124
|
return instance;
|
|
125
125
|
}
|
|
@@ -70,7 +70,7 @@ export class IdentityPublicKeyInCreationWASM {
|
|
|
70
70
|
this._rawKeyInCreation.signature = value;
|
|
71
71
|
}
|
|
72
72
|
static createFromRawInstance(rawInstance) {
|
|
73
|
-
const instance = Object.create(
|
|
73
|
+
const instance = Object.create(IdentityPublicKeyInCreationWASM.prototype);
|
|
74
74
|
instance._rawKeyInCreation = rawInstance;
|
|
75
75
|
return instance;
|
|
76
76
|
}
|
|
@@ -62,7 +62,7 @@ export class IdentityCreateTransitionWASM {
|
|
|
62
62
|
return IdentityCreateTransitionWASM.createFromRawInstance(dppProvider.dpp.IdentityCreateTransitionNAPI.fromStateTransition(stateTransition._rawStateTransition));
|
|
63
63
|
}
|
|
64
64
|
static createFromRawInstance(rawInstance) {
|
|
65
|
-
const instance = Object.create(
|
|
65
|
+
const instance = Object.create(IdentityCreateTransitionWASM.prototype);
|
|
66
66
|
instance._rawIdentityCreateTransition = rawInstance;
|
|
67
67
|
return instance;
|
|
68
68
|
}
|
|
@@ -78,7 +78,7 @@ export class IdentityCreditTransferWASM {
|
|
|
78
78
|
return IdentityCreditTransferWASM.createFromRawInstance(dppProvider.dpp.IdentityCreditTransferNAPI.fromStateTransition(stateTransition._rawStateTransition));
|
|
79
79
|
}
|
|
80
80
|
static createFromRawInstance(rawInstance) {
|
|
81
|
-
const instance = Object.create(
|
|
81
|
+
const instance = Object.create(IdentityCreditTransferWASM.prototype);
|
|
82
82
|
instance._rawIdentityCreditTransfer = rawInstance;
|
|
83
83
|
return instance;
|
|
84
84
|
}
|
|
@@ -107,7 +107,7 @@ export class IdentityCreditWithdrawalTransitionWASM {
|
|
|
107
107
|
return IdentityCreditWithdrawalTransitionWASM.createFromRawInstance(dppProvider.dpp.IdentityCreditWithdrawalTransitionNAPI.fromStateTransition(stateTransition._rawStateTransition));
|
|
108
108
|
}
|
|
109
109
|
static createFromRawInstance(rawInstance) {
|
|
110
|
-
const instance = Object.create(
|
|
110
|
+
const instance = Object.create(IdentityCreditWithdrawalTransitionWASM.prototype);
|
|
111
111
|
instance._rawIdentityCreditWithdrawalTransition = rawInstance;
|
|
112
112
|
return instance;
|
|
113
113
|
}
|
|
@@ -68,7 +68,7 @@ export class IdentityTopUpTransitionWASM {
|
|
|
68
68
|
return IdentityTopUpTransitionWASM.createFromRawInstance(dppProvider.dpp.IdentityTopUpTransitionNAPI.fromStateTransition(stateTransition._rawStateTransition));
|
|
69
69
|
}
|
|
70
70
|
static createFromRawInstance(rawInstance) {
|
|
71
|
-
const instance = Object.create(
|
|
71
|
+
const instance = Object.create(IdentityTopUpTransitionWASM.prototype);
|
|
72
72
|
instance._rawIdentityTopUpTransition = rawInstance;
|
|
73
73
|
return instance;
|
|
74
74
|
}
|
|
@@ -101,7 +101,7 @@ export class IdentityUpdateTransitionWASM {
|
|
|
101
101
|
return IdentityUpdateTransitionWASM.createFromRawInstance(dppProvider.dpp.IdentityUpdateTransitionNAPI.fromStateTransition(stateTransition._rawStateTransition));
|
|
102
102
|
}
|
|
103
103
|
static createFromRawInstance(rawInstance) {
|
|
104
|
-
const instance = Object.create(
|
|
104
|
+
const instance = Object.create(IdentityUpdateTransitionWASM.prototype);
|
|
105
105
|
instance._rawIdentityUpdateTransition = rawInstance;
|
|
106
106
|
return instance;
|
|
107
107
|
}
|
|
@@ -36,7 +36,7 @@ export class InstantLockWASM {
|
|
|
36
36
|
this._rawInstantLock.blsSignature = sig;
|
|
37
37
|
}
|
|
38
38
|
static createFromRawInstance(rawInstance) {
|
|
39
|
-
const instance = Object.create(
|
|
39
|
+
const instance = Object.create(InstantLockWASM.prototype);
|
|
40
40
|
instance._rawInstantLock = rawInstance;
|
|
41
41
|
return instance;
|
|
42
42
|
}
|
|
@@ -89,7 +89,7 @@ export class MasternodeVoteTransitionWASM {
|
|
|
89
89
|
return MasternodeVoteTransitionWASM.createFromRawInstance(dppProvider.dpp.MasternodeVoteTransitionNAPI.fromStateTransition(stateTransition._rawStateTransition));
|
|
90
90
|
}
|
|
91
91
|
static createFromRawInstance(rawInstance) {
|
|
92
|
-
const instance = Object.create(
|
|
92
|
+
const instance = Object.create(MasternodeVoteTransitionWASM.prototype);
|
|
93
93
|
instance._rawMasternodeVoteTransition = rawInstance;
|
|
94
94
|
return instance;
|
|
95
95
|
}
|
|
@@ -20,7 +20,7 @@ export class VoteWASM {
|
|
|
20
20
|
this._rawVote.resourceVoteChoice = resourceVoteChoice._rawResourceVoteChoice;
|
|
21
21
|
}
|
|
22
22
|
static createFromRawInstance(rawInstance) {
|
|
23
|
-
const instance = Object.create(
|
|
23
|
+
const instance = Object.create(VoteWASM.prototype);
|
|
24
24
|
instance._rawVote = rawInstance;
|
|
25
25
|
return instance;
|
|
26
26
|
}
|
|
@@ -11,7 +11,7 @@ export declare class VotePollWASM {
|
|
|
11
11
|
set documentTypeName(value: string);
|
|
12
12
|
get indexName(): string;
|
|
13
13
|
set indexName(value: string);
|
|
14
|
-
get indexValues():
|
|
14
|
+
get indexValues(): string[];
|
|
15
15
|
set indexValues(values: string[]);
|
|
16
16
|
toString(): string;
|
|
17
17
|
static createFromRawInstance(rawInstance: VotePollNAPI): VotePollWASM;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { dppProvider } from '../../provider.js';
|
|
2
|
-
import { prepareIdentifierValue,
|
|
2
|
+
import { prepareIdentifierValue, valueToDynamicValue } from '../../utils.js';
|
|
3
3
|
import { IdentifierWASM } from '../Identifier.js';
|
|
4
4
|
export class VotePollWASM {
|
|
5
5
|
/** @private **/
|
|
@@ -26,7 +26,7 @@ export class VotePollWASM {
|
|
|
26
26
|
this._rawVotePollWASM.indexName = value;
|
|
27
27
|
}
|
|
28
28
|
get indexValues() {
|
|
29
|
-
return
|
|
29
|
+
return this._rawVotePollWASM.indexValues;
|
|
30
30
|
}
|
|
31
31
|
set indexValues(values) {
|
|
32
32
|
this._rawVotePollWASM.indexValues = valueToDynamicValue(values);
|
|
@@ -35,7 +35,7 @@ export class VotePollWASM {
|
|
|
35
35
|
return this._rawVotePollWASM.toString();
|
|
36
36
|
}
|
|
37
37
|
static createFromRawInstance(rawInstance) {
|
|
38
|
-
const instance = Object.create(
|
|
38
|
+
const instance = Object.create(VotePollWASM.prototype);
|
|
39
39
|
instance._rawVotePollWASM = rawInstance;
|
|
40
40
|
return instance;
|
|
41
41
|
}
|
|
@@ -62,7 +62,7 @@ export class PartialIdentityWASM {
|
|
|
62
62
|
this._rawPartialIdentity.notFoundPublicKeys = keys;
|
|
63
63
|
}
|
|
64
64
|
static createFromRawInstance(rawInstance) {
|
|
65
|
-
const instance = Object.create(
|
|
65
|
+
const instance = Object.create(PartialIdentityWASM.prototype);
|
|
66
66
|
instance._rawPartialIdentity = rawInstance;
|
|
67
67
|
return instance;
|
|
68
68
|
}
|
|
@@ -41,7 +41,7 @@ export class PrivateKeyWASM {
|
|
|
41
41
|
return PrivateKeyWASM.createFromRawInstance(dppProvider.dpp.PrivateKeyNAPI.fromHex(hex, valueToDynamicValue(network)));
|
|
42
42
|
}
|
|
43
43
|
static createFromRawInstance(rawInstance) {
|
|
44
|
-
const instance = Object.create(
|
|
44
|
+
const instance = Object.create(PrivateKeyWASM.prototype);
|
|
45
45
|
instance._rawPrivateKey = rawInstance;
|
|
46
46
|
return instance;
|
|
47
47
|
}
|
|
@@ -30,7 +30,7 @@ export class PublicKeyWASM {
|
|
|
30
30
|
return PublicKeyWASM.createFromRawInstance(dppProvider.dpp.PublicKeyNAPI.fromBytes(bytes));
|
|
31
31
|
}
|
|
32
32
|
static createFromRawInstance(rawInstance) {
|
|
33
|
-
const instance = Object.create(
|
|
33
|
+
const instance = Object.create(PublicKeyWASM.prototype);
|
|
34
34
|
instance._rawPublicKey = rawInstance;
|
|
35
35
|
return instance;
|
|
36
36
|
}
|
|
@@ -37,7 +37,7 @@ export class ActionTakerWASM {
|
|
|
37
37
|
this._rawActionTaker.value = normalValue;
|
|
38
38
|
}
|
|
39
39
|
static createFromRawInstance(rawInstance) {
|
|
40
|
-
const instance = Object.create(
|
|
40
|
+
const instance = Object.create(ActionTakerWASM.prototype);
|
|
41
41
|
instance._rawActionTaker = rawInstance;
|
|
42
42
|
return instance;
|
|
43
43
|
}
|
|
@@ -45,7 +45,7 @@ export class ChangeControlRulesWASM {
|
|
|
45
45
|
return this._rawChangeControlRules.canChangeAdminActionTakers(adminActionTakers._rawAuthorizedActionTakers, prepareIdentifierValue(contractOwnerId), mainGroup, normalGroups, actionTaker._rawActionTaker, valueToDynamicValue(goal));
|
|
46
46
|
}
|
|
47
47
|
static createFromRawInstance(rawInstance) {
|
|
48
|
-
const instance = Object.create(
|
|
48
|
+
const instance = Object.create(ChangeControlRulesWASM.prototype);
|
|
49
49
|
instance._rawChangeControlRules = rawInstance;
|
|
50
50
|
return instance;
|
|
51
51
|
}
|
|
@@ -37,7 +37,7 @@ export class GroupWASM {
|
|
|
37
37
|
this._rawGroup.setMemberRequiredPower(prepareIdentifierValue(member), power);
|
|
38
38
|
}
|
|
39
39
|
static createFromRawInstance(rawInstance) {
|
|
40
|
-
const instance = Object.create(
|
|
40
|
+
const instance = Object.create(GroupWASM.prototype);
|
|
41
41
|
instance._rawGroup = rawInstance;
|
|
42
42
|
return instance;
|
|
43
43
|
}
|
|
@@ -132,7 +132,7 @@ export class TokenConfigurationWASM {
|
|
|
132
132
|
return IdentifierWASM.createFromRawInstance(dppProvider.dpp.TokenConfigurationNAPI.calculateTokenId(prepareIdentifierValue(contractId), tokenPosition));
|
|
133
133
|
}
|
|
134
134
|
static createFromRawInstance(rawInstance) {
|
|
135
|
-
const instance = Object.create(
|
|
135
|
+
const instance = Object.create(TokenConfigurationWASM.prototype);
|
|
136
136
|
instance._rawTokenConfiguration = rawInstance;
|
|
137
137
|
return instance;
|
|
138
138
|
}
|
|
@@ -40,7 +40,7 @@ export class TokenConfigurationConventionWASM {
|
|
|
40
40
|
this._rawTokenConfigurationConvention.localizations = normalLocalization;
|
|
41
41
|
}
|
|
42
42
|
static createFromRawInstance(rawInstance) {
|
|
43
|
-
const instance = Object.create(
|
|
43
|
+
const instance = Object.create(TokenConfigurationConventionWASM.prototype);
|
|
44
44
|
instance._rawTokenConfigurationConvention = rawInstance;
|
|
45
45
|
return instance;
|
|
46
46
|
}
|
|
@@ -27,7 +27,7 @@ export class TokenConfigurationLocalizationWASM {
|
|
|
27
27
|
return this._rawTokenConfigurationLocalization.toJSON();
|
|
28
28
|
}
|
|
29
29
|
static createFromRawInstance(rawInstance) {
|
|
30
|
-
const instance = Object.create(
|
|
30
|
+
const instance = Object.create(TokenConfigurationLocalizationWASM.prototype);
|
|
31
31
|
instance._rawTokenConfigurationLocalization = rawInstance;
|
|
32
32
|
return instance;
|
|
33
33
|
}
|
|
@@ -68,7 +68,7 @@ export class TokenDistributionRulesWASM {
|
|
|
68
68
|
this._rawTokenDistributionRules.changeDirectPurchasePricingRules = changeDirectPurchasePricingRules._rawChangeControlRules;
|
|
69
69
|
}
|
|
70
70
|
static createFromRawInstance(rawInstance) {
|
|
71
|
-
const instance = Object.create(
|
|
71
|
+
const instance = Object.create(TokenDistributionRulesWASM.prototype);
|
|
72
72
|
instance._rawTokenDistributionRules = rawInstance;
|
|
73
73
|
return instance;
|
|
74
74
|
}
|
|
@@ -42,7 +42,7 @@ export class TokenKeepsHistoryRulesWASM {
|
|
|
42
42
|
this._rawTokenKeepsHistoryRules.keepsDirectPurchaseHistory = keepsDirectPurchaseHistory;
|
|
43
43
|
}
|
|
44
44
|
static createFromRawInstance(rawInstance) {
|
|
45
|
-
const instance = Object.create(
|
|
45
|
+
const instance = Object.create(TokenKeepsHistoryRulesWASM.prototype);
|
|
46
46
|
instance._rawTokenKeepsHistoryRules = rawInstance;
|
|
47
47
|
return instance;
|
|
48
48
|
}
|
|
@@ -20,7 +20,7 @@ export class TokenMarketplaceRulesWASM {
|
|
|
20
20
|
this._rawTokenMarketplaceRules.tradeModeChangeRules = value._rawChangeControlRules;
|
|
21
21
|
}
|
|
22
22
|
static createFromRawInstance(rawInstance) {
|
|
23
|
-
const instance = Object.create(
|
|
23
|
+
const instance = Object.create(TokenMarketplaceRulesWASM.prototype);
|
|
24
24
|
instance._rawTokenMarketplaceRules = rawInstance;
|
|
25
25
|
return instance;
|
|
26
26
|
}
|
|
@@ -20,7 +20,7 @@ export class TokenPerpetualDistributionWASM {
|
|
|
20
20
|
this._rawTokenPerpetualDistribution.distributionRecipient = value._rawTokenDistributionRecipient;
|
|
21
21
|
}
|
|
22
22
|
static createFromRawInstance(rawInstance) {
|
|
23
|
-
const instance = Object.create(
|
|
23
|
+
const instance = Object.create(TokenPerpetualDistributionWASM.prototype);
|
|
24
24
|
instance._rawTokenPerpetualDistribution = rawInstance;
|
|
25
25
|
return instance;
|
|
26
26
|
}
|
|
@@ -35,7 +35,7 @@ export class TokenPreProgrammedDistributionWASM {
|
|
|
35
35
|
this._rawTokenPreProgrammedDistribution.distributions = objectToDistributionArray(distributions);
|
|
36
36
|
}
|
|
37
37
|
static createFromRawInstance(rawInstance) {
|
|
38
|
-
const instance = Object.create(
|
|
38
|
+
const instance = Object.create(TokenPreProgrammedDistributionWASM.prototype);
|
|
39
39
|
instance._rawTokenPreProgrammedDistribution = rawInstance;
|
|
40
40
|
return instance;
|
|
41
41
|
}
|
package/package.json
CHANGED
|
@@ -83,4 +83,31 @@ describe('DynamicValue', () => {
|
|
|
83
83
|
expect(valueFromDynamicValue(extendedArrayDynamicValue)).toStrictEqual(extendedArrayValue)
|
|
84
84
|
})
|
|
85
85
|
})
|
|
86
|
+
|
|
87
|
+
describe('number values in object', function () {
|
|
88
|
+
const mock = {
|
|
89
|
+
uint: 1999,
|
|
90
|
+
int: -293,
|
|
91
|
+
float: 2222.11231,
|
|
92
|
+
smallBigInt: BigInt(2),
|
|
93
|
+
bigBigInt: BigInt(2000000000000),
|
|
94
|
+
stringUint: '11',
|
|
95
|
+
stringInt: '-11',
|
|
96
|
+
stringFloat: '11.2',
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const dynValue = valueToDynamicValue(mock)
|
|
100
|
+
|
|
101
|
+
const result = valueFromDynamicValue(dynValue)
|
|
102
|
+
|
|
103
|
+
expect(valueFromDynamicValue(dynValue)).toStrictEqual(mock)
|
|
104
|
+
expect(dynValue.value.uint.getType()).toStrictEqual('u32')
|
|
105
|
+
expect(dynValue.value.int.getType()).toStrictEqual('i64')
|
|
106
|
+
expect(dynValue.value.float.getType()).toStrictEqual('f64')
|
|
107
|
+
expect(dynValue.value.smallBigInt.getType()).toStrictEqual('BigIntString')
|
|
108
|
+
expect(dynValue.value.bigBigInt.getType()).toStrictEqual('BigIntString')
|
|
109
|
+
expect(dynValue.value.stringUint.getType()).toStrictEqual('String')
|
|
110
|
+
expect(dynValue.value.stringInt.getType()).toStrictEqual('String')
|
|
111
|
+
expect(dynValue.value.stringFloat.getType()).toStrictEqual('String')
|
|
112
|
+
})
|
|
86
113
|
})
|