pshenmic-dpp 2.0.0-dev.2 → 2.0.0-dev.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.
- package/dist/binaries/bindingsTypes.d.ts +200 -37
- package/dist/binaries/bindingsTypes.js +4 -3
- package/dist/binaries/native/aarch64-apple-darwin/pshenmic_dpp.node +0 -0
- package/dist/binaries/native/x86_64-apple-darwin/pshenmic_dpp.node +0 -0
- package/dist/binaries/native/x86_64-unknown-linux-gnu/pshenmic_dpp.node +0 -0
- package/dist/binaries/native/x86_64-unknown-linux-musl/pshenmic_dpp.node +0 -0
- package/dist/binaries/node.cjs +50 -0
- package/dist/binaries/node.d.cts +2 -0
- package/dist/binaries/pshenmic_dpp.android.node/arm64-v8a/libpshenmic_dpp.so +0 -0
- package/dist/binaries/pshenmic_dpp.apple.node/Info.plist +29 -0
- package/dist/binaries/pshenmic_dpp.apple.node/ios-arm64-simulator/libpshenmic_dpp.framework/Info.plist +24 -0
- package/dist/binaries/pshenmic_dpp.apple.node/ios-arm64-simulator/libpshenmic_dpp.framework/libpshenmic_dpp +0 -0
- package/dist/binaries/pshenmic_dpp.apple.node/react-native-node-api-module +0 -0
- package/dist/binaries/pshenmic_dpp.d.ts +15 -1
- package/dist/binaries/pshenmic_dpp.js +1 -1
- package/dist/binaries/wasm/wasmBytes.cjs +3 -0
- package/dist/binaries/wasm/wasmBytes.d.cts +1 -0
- package/dist/binaries/wasm.d.ts +15 -1
- package/dist/binaries/wasm.js +2 -44
- package/dist/binaries/wasmCreation.cjs +46 -0
- package/dist/binaries/wasmCreation.d.cts +2 -0
- package/dist/src/dpp/dpp.d.ts +11 -2
- package/dist/src/dpp/dpp.js +11 -2
- package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.js +2 -2
- package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.js +3 -3
- package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.js +3 -3
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.js +2 -2
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.js +1 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.js +2 -2
- package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.d.ts +4 -3
- package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.js +5 -4
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.d.ts +4 -3
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.js +5 -4
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.d.ts +4 -3
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.js +5 -4
- package/dist/src/dpp/structs/AssetLockProof/AssetLockProof.js +1 -1
- package/dist/src/dpp/structs/AssetLockProof/ChainAssetLockProof.js +2 -2
- 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.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.js +2 -2
- 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.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.js +2 -2
- 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 +6 -4
- package/dist/src/dpp/structs/DataContract.js +8 -2
- 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/Document.d.ts +1 -1
- package/dist/src/dpp/structs/Document.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.d.ts +1 -0
- package/dist/src/dpp/structs/IdentityPublicKey.js +6 -1
- package/dist/src/dpp/structs/IdentityPublicKeyInCreation.d.ts +1 -0
- package/dist/src/dpp/structs/IdentityPublicKeyInCreation.js +6 -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.d.ts +0 -2
- package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.js +1 -7
- 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/{Address → PlatformAddress}/AddressWitness.d.ts +2 -2
- package/dist/src/dpp/structs/{Address → PlatformAddress}/AddressWitness.js +2 -2
- package/dist/src/dpp/structs/{Address → PlatformAddress}/PlatformAddress.d.ts +4 -2
- package/dist/src/dpp/structs/{Address → PlatformAddress}/PlatformAddress.js +9 -3
- package/dist/src/dpp/structs/PrivateKey.js +1 -1
- package/dist/src/dpp/structs/PublicKey.js +1 -1
- package/dist/src/dpp/structs/ShieldedTransitions/IdentityCreateFromShieldedPoolTransition.d.ts +31 -0
- package/dist/src/dpp/structs/ShieldedTransitions/IdentityCreateFromShieldedPoolTransition.js +73 -0
- package/dist/src/dpp/structs/ShieldedTransitions/SerializedAction.d.ts +19 -0
- package/dist/src/dpp/structs/ShieldedTransitions/SerializedAction.js +49 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldFromAssetLockTransition.d.ts +30 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldFromAssetLockTransition.js +77 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldTransition.d.ts +32 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldTransition.js +78 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldedTransferTransition.d.ts +21 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldedTransferTransition.js +51 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldedWithdrawalTransition.d.ts +29 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldedWithdrawalTransition.js +71 -0
- package/dist/src/dpp/structs/ShieldedTransitions/UnshieldTransition.d.ts +25 -0
- package/dist/src/dpp/structs/ShieldedTransitions/UnshieldTransition.js +59 -0
- package/dist/src/dpp/structs/StateTransition.d.ts +1 -0
- package/dist/src/dpp/structs/StateTransition.js +3 -0
- 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/dist/src/dpp/types.d.ts +50 -11
- package/dist/src/dpp/utils.d.ts +4 -3
- package/dist/src/dpp/utils.js +24 -6
- package/dist/src/dpp/verify/Contested/verifyVotePollVoteStateProof.d.ts +1 -1
- package/dist/src/dpp/verify/Contested/verifyVotePollVoteStateProof.js +1 -1
- package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressInfo.d.ts +2 -0
- package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressInfo.js +12 -0
- package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressesInfos.d.ts +2 -0
- package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressesInfos.js +14 -0
- package/dist/src/dpp/verify/StateTransition/utils.js +80 -15
- package/dist/src/dpp/verify/System/verifyEpochsInfoProof.js +1 -1
- package/dist/src/dpp/verify/Tokens/verifyTokenBalancesForIdentitiesProof.js +1 -1
- package/dist/src/dpp/verify/Tokens/verifyTokensBalancesForIdentityProof.js +1 -1
- package/dist/src/native.d.ts +3 -0
- package/dist/src/native.js +8 -0
- package/dist/utils/{base122.js → base122.cjs} +3 -1
- package/package.json +18 -28
- package/tests/unit/DataContract.spec.ts +281 -0
- package/tests/unit/DynamicValue.spec.ts +42 -2
- package/tests/unit/Identifier.spec.ts +1 -1
- package/tests/unit/Identity.spec.ts +1 -1
- package/tests/unit/IdentityPublicKey.spec.ts +1 -1
- package/tests/unit/NodeApi.spec.ts +49 -0
- package/tests/unit/ShieldedTransitions.spec.ts +709 -0
- package/tests/unit/TokenConfiguration.spec.ts +114 -0
- package/tests/unit/WebAssembly.spec.ts +49 -0
- package/tests/unit/utils/buildTokenConfiguration.ts +66 -0
- package/dist/binaries/pshenmic_dpp.android.node/x86_64/libpshenmic_dpp.so +0 -0
- package/dist/binaries/wasm/wasmBytes.d.ts +0 -2
- package/dist/binaries/wasm/wasmBytes.js +0 -2
- /package/dist/utils/{base122.d.ts → base122.d.cts} +0 -0
|
@@ -27,7 +27,7 @@ export class TxOutWASM {
|
|
|
27
27
|
return this._rawTxOut.getScriptPubKeyASM();
|
|
28
28
|
}
|
|
29
29
|
static createFromRawInstance(rawInstance) {
|
|
30
|
-
const instance = Object.create(
|
|
30
|
+
const instance = Object.create(TxOutWASM.prototype);
|
|
31
31
|
instance._rawTxOut = rawInstance;
|
|
32
32
|
return instance;
|
|
33
33
|
}
|
|
@@ -18,7 +18,7 @@ export class WitnessWASM {
|
|
|
18
18
|
this._rawWitness.push(value);
|
|
19
19
|
}
|
|
20
20
|
static createFromRawInstance(rawInstance) {
|
|
21
|
-
const instance = Object.create(
|
|
21
|
+
const instance = Object.create(WitnessWASM.prototype);
|
|
22
22
|
instance._rawWitness = rawInstance;
|
|
23
23
|
return instance;
|
|
24
24
|
}
|
|
@@ -88,7 +88,7 @@ export class BatchTransitionWASM {
|
|
|
88
88
|
return BatchTransitionWASM.createFromRawInstance(dppProvider.dpp.BatchTransitionNAPI.fromStateTransition(stateTransition._rawStateTransition));
|
|
89
89
|
}
|
|
90
90
|
static createFromRawInstance(rawInstance) {
|
|
91
|
-
const instance = Object.create(
|
|
91
|
+
const instance = Object.create(BatchTransitionWASM.prototype);
|
|
92
92
|
instance._rawBatchTransition = rawInstance;
|
|
93
93
|
return instance;
|
|
94
94
|
}
|
|
@@ -32,7 +32,7 @@ export class BatchedTransitionWASM {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
static createFromRawInstance(rawInstance) {
|
|
35
|
-
const instance = Object.create(
|
|
35
|
+
const instance = Object.create(BatchedTransitionWASM.prototype);
|
|
36
36
|
instance._rawTransition = rawInstance;
|
|
37
37
|
return instance;
|
|
38
38
|
}
|
|
@@ -47,7 +47,7 @@ export class DocumentBaseTransitionWASM {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
static createFromRawInstance(rawInstance) {
|
|
50
|
-
const instance = Object.create(
|
|
50
|
+
const instance = Object.create(DocumentBaseTransitionWASM.prototype);
|
|
51
51
|
instance._rawDocumentBaseTransition = rawInstance;
|
|
52
52
|
return instance;
|
|
53
53
|
}
|
|
@@ -28,5 +28,6 @@ export declare class DocumentTransitionWASM {
|
|
|
28
28
|
get replaceTransition(): DocumentReplaceTransitionWASM;
|
|
29
29
|
get transferTransition(): DocumentTransferTransitionWASM;
|
|
30
30
|
get updatePriceTransition(): DocumentUpdatePriceTransitionWASM;
|
|
31
|
+
idDocumentTransition(): boolean;
|
|
31
32
|
static createFromRawInstance(rawInstance: DocumentTransitionNAPI): DocumentTransitionWASM;
|
|
32
33
|
}
|
|
@@ -66,8 +66,11 @@ export class DocumentTransitionWASM {
|
|
|
66
66
|
get updatePriceTransition() {
|
|
67
67
|
return DocumentUpdatePriceTransitionWASM.createFromRawInstance(this._rawTransition.updatePriceTransition);
|
|
68
68
|
}
|
|
69
|
+
idDocumentTransition() {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
69
72
|
static createFromRawInstance(rawInstance) {
|
|
70
|
-
const instance = Object.create(
|
|
73
|
+
const instance = Object.create(DocumentTransitionWASM.prototype);
|
|
71
74
|
instance._rawTransition = rawInstance;
|
|
72
75
|
return instance;
|
|
73
76
|
}
|
|
@@ -8,7 +8,7 @@ export declare class DocumentCreateTransitionWASM {
|
|
|
8
8
|
/** @private **/
|
|
9
9
|
_rawDocumentCreateTransition: DocumentCreateTransitionNAPI;
|
|
10
10
|
constructor(document: DocumentWASM, identityContractNonce: bigint, prefundedVotingBalance?: PrefundedVotingBalanceWASM, tokenPaymentInfo?: TokenPaymentInfoWASM);
|
|
11
|
-
get data():
|
|
11
|
+
get data(): any;
|
|
12
12
|
set data(value: object);
|
|
13
13
|
get base(): DocumentBaseTransitionWASM;
|
|
14
14
|
set base(value: DocumentBaseTransitionWASM);
|
|
@@ -10,7 +10,7 @@ export class DocumentCreateTransitionWASM {
|
|
|
10
10
|
this._rawDocumentCreateTransition = new dppProvider.dpp.DocumentCreateTransitionNAPI(document._rawDocument, identityContractNonce.toString(), prefundedVotingBalance?._rawPrefundedVotingBalance, tokenPaymentInfo?._rawTokenPaymentInfo);
|
|
11
11
|
}
|
|
12
12
|
get data() {
|
|
13
|
-
return valueFromDynamicValue(this._rawDocumentCreateTransition.data);
|
|
13
|
+
return valueFromDynamicValue(this._rawDocumentCreateTransition.data, true);
|
|
14
14
|
}
|
|
15
15
|
set data(value) {
|
|
16
16
|
this._rawDocumentCreateTransition.data = valueToDynamicValue(value);
|
|
@@ -51,7 +51,7 @@ export class DocumentCreateTransitionWASM {
|
|
|
51
51
|
return DocumentCreateTransitionWASM.createFromRawInstance(dppProvider.dpp.DocumentCreateTransitionNAPI.fromDocumentTransition(transition._rawTransition));
|
|
52
52
|
}
|
|
53
53
|
static createFromRawInstance(rawInstance) {
|
|
54
|
-
const instance = Object.create(
|
|
54
|
+
const instance = Object.create(DocumentCreateTransitionWASM.prototype);
|
|
55
55
|
instance._rawDocumentCreateTransition = rawInstance;
|
|
56
56
|
return instance;
|
|
57
57
|
}
|
|
@@ -19,7 +19,7 @@ export class DocumentDeleteTransitionWASM {
|
|
|
19
19
|
return DocumentDeleteTransitionWASM.createFromRawInstance(dppProvider.dpp.DocumentDeleteTransitionNAPI.fromDocumentTransition(transition._rawTransition));
|
|
20
20
|
}
|
|
21
21
|
static createFromRawInstance(rawInstance) {
|
|
22
|
-
const instance = Object.create(
|
|
22
|
+
const instance = Object.create(DocumentDeleteTransitionWASM.prototype);
|
|
23
23
|
instance._rawDocumentDeleteTransition = rawInstance;
|
|
24
24
|
return instance;
|
|
25
25
|
}
|
|
@@ -32,7 +32,7 @@ export class DocumentPurchaseTransitionWASM {
|
|
|
32
32
|
return DocumentPurchaseTransitionWASM.createFromRawInstance(dppProvider.dpp.DocumentPurchaseTransitionNAPI.fromDocumentTransition(transition._rawTransition));
|
|
33
33
|
}
|
|
34
34
|
static createFromRawInstance(rawInstance) {
|
|
35
|
-
const instance = Object.create(
|
|
35
|
+
const instance = Object.create(DocumentPurchaseTransitionWASM.prototype);
|
|
36
36
|
instance._rawDocumentPurchaseTransition = rawInstance;
|
|
37
37
|
return instance;
|
|
38
38
|
}
|
|
@@ -7,7 +7,7 @@ export declare class DocumentReplaceTransitionWASM {
|
|
|
7
7
|
/** @private **/
|
|
8
8
|
_rawDocumentReplaceTransition: DocumentReplaceTransitionNAPI;
|
|
9
9
|
constructor(document: DocumentWASM, identityContractNonce: bigint, tokenPaymentInfo?: TokenPaymentInfoWASM);
|
|
10
|
-
get data():
|
|
10
|
+
get data(): any;
|
|
11
11
|
set data(value: object);
|
|
12
12
|
get base(): DocumentBaseTransitionWASM;
|
|
13
13
|
set base(value: DocumentBaseTransitionWASM);
|
|
@@ -9,7 +9,7 @@ export class DocumentReplaceTransitionWASM {
|
|
|
9
9
|
this._rawDocumentReplaceTransition = new dppProvider.dpp.DocumentReplaceTransitionNAPI(document._rawDocument, identityContractNonce.toString(), tokenPaymentInfo?._rawTokenPaymentInfo);
|
|
10
10
|
}
|
|
11
11
|
get data() {
|
|
12
|
-
return valueFromDynamicValue(this._rawDocumentReplaceTransition.data);
|
|
12
|
+
return valueFromDynamicValue(this._rawDocumentReplaceTransition.data, true);
|
|
13
13
|
}
|
|
14
14
|
set data(value) {
|
|
15
15
|
this._rawDocumentReplaceTransition.data = valueToDynamicValue(value);
|
|
@@ -33,7 +33,7 @@ export class DocumentReplaceTransitionWASM {
|
|
|
33
33
|
return DocumentReplaceTransitionWASM.createFromRawInstance(dppProvider.dpp.DocumentReplaceTransitionNAPI.fromDocumentTransition(transition._rawTransition));
|
|
34
34
|
}
|
|
35
35
|
static createFromRawInstance(rawInstance) {
|
|
36
|
-
const instance = Object.create(
|
|
36
|
+
const instance = Object.create(DocumentReplaceTransitionWASM.prototype);
|
|
37
37
|
instance._rawDocumentReplaceTransition = rawInstance;
|
|
38
38
|
return instance;
|
|
39
39
|
}
|
|
@@ -28,7 +28,7 @@ export class DocumentTransferTransitionWASM {
|
|
|
28
28
|
return DocumentTransferTransitionWASM.createFromRawInstance(dppProvider.dpp.DocumentTransferTransitionNAPI.fromDocumentTransition(transition._rawTransition));
|
|
29
29
|
}
|
|
30
30
|
static createFromRawInstance(rawInstance) {
|
|
31
|
-
const instance = Object.create(
|
|
31
|
+
const instance = Object.create(DocumentTransferTransitionWASM.prototype);
|
|
32
32
|
instance._rawDocumentTransferTransition = rawInstance;
|
|
33
33
|
return instance;
|
|
34
34
|
}
|
|
@@ -26,7 +26,7 @@ export class DocumentUpdatePriceTransitionWASM {
|
|
|
26
26
|
return DocumentUpdatePriceTransitionWASM.createFromRawInstance(dppProvider.dpp.DocumentUpdatePriceTransitionNAPI.fromDocumentTransition(transition._rawTransition));
|
|
27
27
|
}
|
|
28
28
|
static createFromRawInstance(rawInstance) {
|
|
29
|
-
const instance = Object.create(
|
|
29
|
+
const instance = Object.create(DocumentUpdatePriceTransitionWASM.prototype);
|
|
30
30
|
instance._rawDocumentUpdatePriceTransition = rawInstance;
|
|
31
31
|
return instance;
|
|
32
32
|
}
|
|
@@ -12,7 +12,7 @@ export class PrefundedVotingBalanceWASM {
|
|
|
12
12
|
return BigInt(this._rawPrefundedVotingBalance.credits);
|
|
13
13
|
}
|
|
14
14
|
static createFromRawInstance(rawInstance) {
|
|
15
|
-
const instance = Object.create(
|
|
15
|
+
const instance = Object.create(PrefundedVotingBalanceWASM.prototype);
|
|
16
16
|
instance._rawPrefundedVotingBalance = rawInstance;
|
|
17
17
|
return instance;
|
|
18
18
|
}
|
|
@@ -42,7 +42,7 @@ export class TokenBaseTransitionWASM {
|
|
|
42
42
|
this._rawTokenBaseTransition.usingGroupInfo = value?._rawGroupStateTransitionInfo;
|
|
43
43
|
}
|
|
44
44
|
static createFromRawInstance(rawInstance) {
|
|
45
|
-
const instance = Object.create(
|
|
45
|
+
const instance = Object.create(TokenBaseTransitionWASM.prototype);
|
|
46
46
|
instance._rawTokenBaseTransition = rawInstance;
|
|
47
47
|
return instance;
|
|
48
48
|
}
|
|
@@ -47,7 +47,7 @@ export class TokenPaymentInfoWASM {
|
|
|
47
47
|
this._rawTokenPaymentInfo.gasFeesPaidBy = valueToDynamicValue(value);
|
|
48
48
|
}
|
|
49
49
|
static crateFromRawInstance(rawInstance) {
|
|
50
|
-
const instance = Object.create(
|
|
50
|
+
const instance = Object.create(TokenPaymentInfoWASM.prototype);
|
|
51
51
|
instance._rawTokenPaymentInfo = rawInstance;
|
|
52
52
|
return instance;
|
|
53
53
|
}
|
|
@@ -34,7 +34,7 @@ export class TokenPricingScheduleWASM {
|
|
|
34
34
|
return TokenPricingScheduleWASM.createFromRawInstance(dppProvider.dpp.TokenPricingScheduleNAPI.SetPrices(valueToDynamicValue(prices)));
|
|
35
35
|
}
|
|
36
36
|
static createFromRawInstance(rawInstance) {
|
|
37
|
-
const instance = Object.create(
|
|
37
|
+
const instance = Object.create(TokenPricingScheduleWASM.prototype);
|
|
38
38
|
instance._rawTokenPricingSchedule = rawInstance;
|
|
39
39
|
return instance;
|
|
40
40
|
}
|
|
@@ -16,5 +16,6 @@ export declare class TokenTransitionWASM {
|
|
|
16
16
|
getTransitionType(): string;
|
|
17
17
|
getHistoricalDocumentTypeName(): string;
|
|
18
18
|
getHistoricalDocumentId(ownerId: IdentifierLike): IdentifierWASM;
|
|
19
|
+
idDocumentTransition(): boolean;
|
|
19
20
|
static createFromRawInstance(rawInstance: TokenTransitionNAPI): TokenTransitionWASM;
|
|
20
21
|
}
|
|
@@ -84,8 +84,11 @@ export class TokenTransitionWASM {
|
|
|
84
84
|
getHistoricalDocumentId(ownerId) {
|
|
85
85
|
return IdentifierWASM.createFromRawInstance(this._rawTokenTransition.getHistoricalDocumentId(prepareIdentifierValue(ownerId)));
|
|
86
86
|
}
|
|
87
|
+
idDocumentTransition() {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
87
90
|
static createFromRawInstance(rawInstance) {
|
|
88
|
-
const instance = Object.create(
|
|
91
|
+
const instance = Object.create(TokenTransitionWASM.prototype);
|
|
89
92
|
instance._rawTokenTransition = rawInstance;
|
|
90
93
|
return instance;
|
|
91
94
|
}
|
|
@@ -25,7 +25,7 @@ export class TokenBurnTransitionWASM {
|
|
|
25
25
|
this._rawTransition.publicNote = value;
|
|
26
26
|
}
|
|
27
27
|
static createFromRawInstance(rawInstance) {
|
|
28
|
-
const instance = Object.create(
|
|
28
|
+
const instance = Object.create(TokenBurnTransitionWASM.prototype);
|
|
29
29
|
instance._rawTransition = rawInstance;
|
|
30
30
|
return instance;
|
|
31
31
|
}
|
|
@@ -26,7 +26,7 @@ export class TokenClaimTransitionWASM {
|
|
|
26
26
|
this._rawTransition.publicNote = value;
|
|
27
27
|
}
|
|
28
28
|
static createFromRawInstance(rawInstance) {
|
|
29
|
-
const instance = Object.create(
|
|
29
|
+
const instance = Object.create(TokenClaimTransitionWASM.prototype);
|
|
30
30
|
instance._rawTransition = rawInstance;
|
|
31
31
|
return instance;
|
|
32
32
|
}
|
|
@@ -26,7 +26,7 @@ export class TokenConfigUpdateTransitionWASM {
|
|
|
26
26
|
this._rawTransition.updateTokenConfigurationItem = value._rawTokenConfigurationChangeItem;
|
|
27
27
|
}
|
|
28
28
|
static createFromRawInstance(rawInstance) {
|
|
29
|
-
const instance = Object.create(
|
|
29
|
+
const instance = Object.create(TokenConfigUpdateTransitionWASM.prototype);
|
|
30
30
|
instance._rawTransition = rawInstance;
|
|
31
31
|
return instance;
|
|
32
32
|
}
|
|
@@ -27,7 +27,7 @@ export class TokenDestroyFrozenFundsTransitionWASM {
|
|
|
27
27
|
this._rawTransition.publicNote = value;
|
|
28
28
|
}
|
|
29
29
|
static createFromRawInstance(rawInstance) {
|
|
30
|
-
const instance = Object.create(
|
|
30
|
+
const instance = Object.create(TokenDestroyFrozenFundsTransitionWASM.prototype);
|
|
31
31
|
instance._rawTransition = rawInstance;
|
|
32
32
|
return instance;
|
|
33
33
|
}
|
|
@@ -25,7 +25,7 @@ export class TokenDirectPurchaseTransitionWASM {
|
|
|
25
25
|
this._rawTransition.totalAgreedPrice = value.toString();
|
|
26
26
|
}
|
|
27
27
|
static createFromRawInstance(rawInstance) {
|
|
28
|
-
const instance = Object.create(
|
|
28
|
+
const instance = Object.create(TokenDirectPurchaseTransitionWASM.prototype);
|
|
29
29
|
instance._rawTransition = rawInstance;
|
|
30
30
|
return instance;
|
|
31
31
|
}
|
|
@@ -26,7 +26,7 @@ export class TokenEmergencyActionTransitionWASM {
|
|
|
26
26
|
this._rawTransition.publicNote = value;
|
|
27
27
|
}
|
|
28
28
|
static createFromRawInstance(rawInstance) {
|
|
29
|
-
const instance = Object.create(
|
|
29
|
+
const instance = Object.create(TokenEmergencyActionTransitionWASM.prototype);
|
|
30
30
|
instance._rawTransition = rawInstance;
|
|
31
31
|
return instance;
|
|
32
32
|
}
|
|
@@ -27,7 +27,7 @@ export class TokenFreezeTransitionWASM {
|
|
|
27
27
|
this._rawTransition.publicNote = value;
|
|
28
28
|
}
|
|
29
29
|
static createFromRawInstance(rawInstance) {
|
|
30
|
-
const instance = Object.create(
|
|
30
|
+
const instance = Object.create(TokenFreezeTransitionWASM.prototype);
|
|
31
31
|
instance._rawTransition = rawInstance;
|
|
32
32
|
return instance;
|
|
33
33
|
}
|
|
@@ -36,7 +36,7 @@ export class TokenMintTransitionWASM {
|
|
|
36
36
|
this._rawTransition.publicNote = value;
|
|
37
37
|
}
|
|
38
38
|
static createFromRawInstance(rawInstance) {
|
|
39
|
-
const instance = Object.create(
|
|
39
|
+
const instance = Object.create(TokenMintTransitionWASM.prototype);
|
|
40
40
|
instance._rawTransition = rawInstance;
|
|
41
41
|
return instance;
|
|
42
42
|
}
|
package/dist/src/dpp/structs/Batch/TokenTransitions/TokenSetPriceForDirectPurchaseTransition.js
CHANGED
|
@@ -29,7 +29,7 @@ export class TokenSetPriceForDirectPurchaseTransitionWASM {
|
|
|
29
29
|
this._rawTransition.publicNote = value;
|
|
30
30
|
}
|
|
31
31
|
static createFromRawInstance(rawInstance) {
|
|
32
|
-
const instance = Object.create(
|
|
32
|
+
const instance = Object.create(TokenSetPriceForDirectPurchaseTransitionWASM.prototype);
|
|
33
33
|
instance._rawTransition = rawInstance;
|
|
34
34
|
return instance;
|
|
35
35
|
}
|
|
@@ -3,10 +3,13 @@ import { TokenBaseTransitionWASM } from '../TokenBaseTransition.js';
|
|
|
3
3
|
import { IdentifierLike } from '../../../types.js';
|
|
4
4
|
import { SharedEncryptedNoteWASM } from '../../EncryptedNote/SharedEncryptedNote.js';
|
|
5
5
|
import { PrivateEncryptedNoteWASM } from '../../EncryptedNote/PrivateEncryptedNote.js';
|
|
6
|
+
import { IdentifierWASM } from '../../Identifier.js';
|
|
6
7
|
export declare class TokenTransferTransitionWASM {
|
|
7
8
|
/** @private **/
|
|
8
9
|
_rawTransition: TokenTransferTransitionNAPI;
|
|
9
10
|
constructor(base: TokenBaseTransitionWASM, recipientId: IdentifierLike, amount: bigint, publicNote?: string, sharedEncryptedNote?: SharedEncryptedNoteWASM, privateEncryptedNote?: PrivateEncryptedNoteWASM);
|
|
11
|
+
get recipientId(): IdentifierWASM;
|
|
12
|
+
set recipientId(value: IdentifierLike);
|
|
10
13
|
get base(): TokenBaseTransitionWASM;
|
|
11
14
|
set base(value: TokenBaseTransitionWASM);
|
|
12
15
|
get amount(): bigint;
|
|
@@ -3,12 +3,19 @@ import { SharedEncryptedNoteWASM } from '../../EncryptedNote/SharedEncryptedNote
|
|
|
3
3
|
import { PrivateEncryptedNoteWASM } from '../../EncryptedNote/PrivateEncryptedNote.js';
|
|
4
4
|
import { dppProvider } from '../../../provider.js';
|
|
5
5
|
import { prepareIdentifierValue } from '../../../utils.js';
|
|
6
|
+
import { IdentifierWASM } from '../../Identifier.js';
|
|
6
7
|
export class TokenTransferTransitionWASM {
|
|
7
8
|
/** @private **/
|
|
8
9
|
_rawTransition;
|
|
9
10
|
constructor(base, recipientId, amount, publicNote, sharedEncryptedNote, privateEncryptedNote) {
|
|
10
11
|
this._rawTransition = new dppProvider.dpp.TokenTransferTransitionNAPI(base._rawTokenBaseTransition, prepareIdentifierValue(recipientId), amount.toString(), publicNote, sharedEncryptedNote?._rawSharedNote, privateEncryptedNote?._rawEncryptedNote);
|
|
11
12
|
}
|
|
13
|
+
get recipientId() {
|
|
14
|
+
return IdentifierWASM.createFromRawInstance(this._rawTransition.recipientId);
|
|
15
|
+
}
|
|
16
|
+
set recipientId(value) {
|
|
17
|
+
this._rawTransition.recipientId = prepareIdentifierValue(value);
|
|
18
|
+
}
|
|
12
19
|
get base() {
|
|
13
20
|
return TokenBaseTransitionWASM.createFromRawInstance(this._rawTransition.base);
|
|
14
21
|
}
|
|
@@ -46,7 +53,7 @@ export class TokenTransferTransitionWASM {
|
|
|
46
53
|
this._rawTransition.privateEncryptedNote = value?._rawEncryptedNote;
|
|
47
54
|
}
|
|
48
55
|
static createFromRawInstance(rawInstance) {
|
|
49
|
-
const instance = Object.create(
|
|
56
|
+
const instance = Object.create(TokenTransferTransitionWASM.prototype);
|
|
50
57
|
instance._rawTransition = rawInstance;
|
|
51
58
|
return instance;
|
|
52
59
|
}
|
|
@@ -27,7 +27,7 @@ export class TokenUnFreezeTransitionWASM {
|
|
|
27
27
|
this._rawTransition.publicNote = value;
|
|
28
28
|
}
|
|
29
29
|
static createFromRawInstance(rawInstance) {
|
|
30
|
-
const instance = Object.create(
|
|
30
|
+
const instance = Object.create(TokenUnFreezeTransitionWASM.prototype);
|
|
31
31
|
instance._rawTransition = rawInstance;
|
|
32
32
|
return instance;
|
|
33
33
|
}
|
|
@@ -32,7 +32,7 @@ export class ContractBoundsWASM {
|
|
|
32
32
|
return new ContractBoundsWASM(contractId, documentTypeName);
|
|
33
33
|
}
|
|
34
34
|
static createFromRawInstance(rawInstance) {
|
|
35
|
-
const instance = Object.create(
|
|
35
|
+
const instance = Object.create(ContractBoundsWASM.prototype);
|
|
36
36
|
instance._rawContractBounds = rawInstance;
|
|
37
37
|
return instance;
|
|
38
38
|
}
|
|
@@ -30,7 +30,7 @@ export class CoreScriptWASM {
|
|
|
30
30
|
return CoreScriptWASM.createFromRawInstance(dppProvider.dpp.CoreScriptNAPI.newP2SH(scriptHash));
|
|
31
31
|
}
|
|
32
32
|
static createFromRawInstance(rawInstance) {
|
|
33
|
-
const instance = Object.create(
|
|
33
|
+
const instance = Object.create(CoreScriptWASM.prototype);
|
|
34
34
|
instance._rawCoreScript = rawInstance;
|
|
35
35
|
return instance;
|
|
36
36
|
}
|
|
@@ -11,6 +11,8 @@ export declare class DataContractWASM {
|
|
|
11
11
|
set version(value: number);
|
|
12
12
|
get id(): IdentifierWASM;
|
|
13
13
|
set id(value: IdentifierLike);
|
|
14
|
+
get ownerId(): IdentifierWASM;
|
|
15
|
+
set ownerId(value: IdentifierLike);
|
|
14
16
|
get tokens(): DataContractTokens[];
|
|
15
17
|
set tokens(tokens: DataContractTokens[]);
|
|
16
18
|
get groups(): DataContractGroups[];
|
|
@@ -19,14 +21,14 @@ export declare class DataContractWASM {
|
|
|
19
21
|
set description(value: string | undefined);
|
|
20
22
|
get keywords(): string[];
|
|
21
23
|
set keywords(value: string[]);
|
|
22
|
-
getSchemas():
|
|
23
|
-
getConfig():
|
|
24
|
+
getSchemas(): any;
|
|
25
|
+
getConfig(): any;
|
|
24
26
|
setConfig(value: object, platformVersion?: PlatformVersionLike): void;
|
|
25
27
|
bytes(platformVersion: PlatformVersionLike): Uint8Array;
|
|
26
28
|
hex(platformVersion: PlatformVersionLike): string;
|
|
27
29
|
base64(platformVersion: PlatformVersionLike): string;
|
|
28
|
-
toJSON(platformVersion: PlatformVersionLike):
|
|
29
|
-
toValue(platformVersion: PlatformVersionLike):
|
|
30
|
+
toJSON(platformVersion: PlatformVersionLike): any;
|
|
31
|
+
toValue(platformVersion: PlatformVersionLike): any;
|
|
30
32
|
static fromValue(value: object, fullValidation: boolean, platformVersion?: PlatformVersionLike): DataContractWASM;
|
|
31
33
|
static fromBytes(bytes: Uint8Array, fullValidation: boolean, platformVersion?: PlatformVersionLike): DataContractWASM;
|
|
32
34
|
static fromHex(hex: string, fullValidation: boolean, platformVersion?: PlatformVersionLike): DataContractWASM;
|
|
@@ -34,6 +34,12 @@ export class DataContractWASM {
|
|
|
34
34
|
set id(value) {
|
|
35
35
|
this._rawDataContract.id = prepareIdentifierValue(value);
|
|
36
36
|
}
|
|
37
|
+
get ownerId() {
|
|
38
|
+
return IdentifierWASM.createFromRawInstance(this._rawDataContract.ownerId);
|
|
39
|
+
}
|
|
40
|
+
set ownerId(value) {
|
|
41
|
+
this._rawDataContract.ownerId = prepareIdentifierValue(value);
|
|
42
|
+
}
|
|
37
43
|
get tokens() {
|
|
38
44
|
const tokens = this._rawDataContract.tokens;
|
|
39
45
|
return tokens.map(([position, token]) => ({
|
|
@@ -73,7 +79,7 @@ export class DataContractWASM {
|
|
|
73
79
|
this._rawDataContract.keywords = value;
|
|
74
80
|
}
|
|
75
81
|
getSchemas() {
|
|
76
|
-
return valueFromDynamicValue(this._rawDataContract.getSchemas());
|
|
82
|
+
return valueFromDynamicValue(this._rawDataContract.getSchemas(), true);
|
|
77
83
|
}
|
|
78
84
|
getConfig() {
|
|
79
85
|
return valueFromDynamicValue(this._rawDataContract.getConfig());
|
|
@@ -112,7 +118,7 @@ export class DataContractWASM {
|
|
|
112
118
|
return IdentifierWASM.createFromRawInstance(dppProvider.dpp.DataContractNAPI.generateId(prepareIdentifierValue(ownerId), identityNonce.toString()));
|
|
113
119
|
}
|
|
114
120
|
static createFromRawInstance(rawInstance) {
|
|
115
|
-
const instance = Object.create(
|
|
121
|
+
const instance = Object.create(DataContractWASM.prototype);
|
|
116
122
|
instance._rawDataContract = rawInstance;
|
|
117
123
|
return instance;
|
|
118
124
|
}
|
|
@@ -48,7 +48,7 @@ export class DataContractCreateTransitionWASM {
|
|
|
48
48
|
return DataContractCreateTransitionWASM.createFromRawInstance(dppProvider.dpp.DataContractCreateTransitionNAPI.fromStateTransition(stateTransition._rawStateTransition));
|
|
49
49
|
}
|
|
50
50
|
static createFromRawInstance(rawInstance) {
|
|
51
|
-
const instance = Object.create(
|
|
51
|
+
const instance = Object.create(DataContractCreateTransitionWASM.prototype);
|
|
52
52
|
instance._rawDataContractCreateTransition = rawInstance;
|
|
53
53
|
return instance;
|
|
54
54
|
}
|
|
@@ -48,7 +48,7 @@ export class DataContractUpdateTransitionWASM {
|
|
|
48
48
|
return DataContractUpdateTransitionWASM.createFromRawInstance(dppProvider.dpp.DataContractUpdateTransitionNAPI.fromStateTransition(stateTransition._rawStateTransition));
|
|
49
49
|
}
|
|
50
50
|
static createFromRawInstance(rawInstance) {
|
|
51
|
-
const instance = Object.create(
|
|
51
|
+
const instance = Object.create(DataContractUpdateTransitionWASM.prototype);
|
|
52
52
|
instance._rawDataContractUpdateTransition = rawInstance;
|
|
53
53
|
return instance;
|
|
54
54
|
}
|
|
@@ -14,7 +14,7 @@ export declare class DocumentWASM {
|
|
|
14
14
|
set dataContractId(value: IdentifierLike);
|
|
15
15
|
get ownerId(): IdentifierWASM;
|
|
16
16
|
set ownerId(value: IdentifierLike);
|
|
17
|
-
get properties():
|
|
17
|
+
get properties(): any;
|
|
18
18
|
set properties(value: object);
|
|
19
19
|
get revision(): bigint | undefined;
|
|
20
20
|
set revision(value: bigint | undefined);
|
|
@@ -32,7 +32,7 @@ export class DocumentWASM {
|
|
|
32
32
|
this._rawDocument.ownerId = prepareIdentifierValue(value);
|
|
33
33
|
}
|
|
34
34
|
get properties() {
|
|
35
|
-
return valueFromDynamicValue(this._rawDocument.properties);
|
|
35
|
+
return valueFromDynamicValue(this._rawDocument.properties, true);
|
|
36
36
|
}
|
|
37
37
|
set properties(value) {
|
|
38
38
|
this._rawDocument.properties = valueToDynamicValue(value);
|
|
@@ -24,7 +24,7 @@ export class PrivateEncryptedNoteWASM {
|
|
|
24
24
|
this._rawEncryptedNote.value = value;
|
|
25
25
|
}
|
|
26
26
|
static createFromRawInstance(rawInstance) {
|
|
27
|
-
const instance = Object.create(
|
|
27
|
+
const instance = Object.create(PrivateEncryptedNoteWASM.prototype);
|
|
28
28
|
instance._rawEncryptedNote = rawInstance;
|
|
29
29
|
return instance;
|
|
30
30
|
}
|
|
@@ -24,7 +24,7 @@ export class SharedEncryptedNoteWASM {
|
|
|
24
24
|
this._rawSharedNote.value = value;
|
|
25
25
|
}
|
|
26
26
|
static createFromRawInstance(rawInstance) {
|
|
27
|
-
const instance = Object.create(
|
|
27
|
+
const instance = Object.create(SharedEncryptedNoteWASM.prototype);
|
|
28
28
|
instance._rawSharedNote = rawInstance;
|
|
29
29
|
return instance;
|
|
30
30
|
}
|
|
@@ -26,7 +26,7 @@ export class GroupStateTransitionInfoWASM {
|
|
|
26
26
|
this._rawGroupStateTransitionInfo.actionIsProposer = actionIsProposer;
|
|
27
27
|
}
|
|
28
28
|
static createFromRawInstance(rawInstance) {
|
|
29
|
-
const instance = Object.create(
|
|
29
|
+
const instance = Object.create(GroupStateTransitionInfoWASM.prototype);
|
|
30
30
|
instance._rawGroupStateTransitionInfo = rawInstance;
|
|
31
31
|
return instance;
|
|
32
32
|
}
|
|
@@ -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
|
}
|
|
@@ -29,6 +29,7 @@ export declare class IdentityPublicKeyWASM {
|
|
|
29
29
|
set disabledAt(disabledAt: bigint | number);
|
|
30
30
|
get contractBounds(): ContractBoundsWASM | undefined;
|
|
31
31
|
set contractBounds(contractBounds: ContractBoundsWASM | undefined | null);
|
|
32
|
+
getContractBounds(): ContractBoundsWASM | undefined;
|
|
32
33
|
removeDisabledAt(): void;
|
|
33
34
|
getPublicKeyHash(): string;
|
|
34
35
|
isMaster(): boolean;
|
|
@@ -84,6 +84,11 @@ export class IdentityPublicKeyWASM {
|
|
|
84
84
|
set contractBounds(contractBounds) {
|
|
85
85
|
this._rawIdentityPublicKey.contractBounds = contractBounds?._rawContractBounds;
|
|
86
86
|
}
|
|
87
|
+
getContractBounds() {
|
|
88
|
+
if (this._rawIdentityPublicKey.contractBounds != null) {
|
|
89
|
+
return ContractBoundsWASM.createFromRawInstance(this._rawIdentityPublicKey.contractBounds);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
87
92
|
removeDisabledAt() {
|
|
88
93
|
this._rawIdentityPublicKey.removeDisabledAt();
|
|
89
94
|
}
|
|
@@ -119,7 +124,7 @@ export class IdentityPublicKeyWASM {
|
|
|
119
124
|
return this.createFromRawInstance(rawInstance);
|
|
120
125
|
}
|
|
121
126
|
static createFromRawInstance(rawInstance) {
|
|
122
|
-
const instance = Object.create(
|
|
127
|
+
const instance = Object.create(IdentityPublicKeyWASM.prototype);
|
|
123
128
|
instance._rawIdentityPublicKey = rawInstance;
|
|
124
129
|
return instance;
|
|
125
130
|
}
|
|
@@ -10,6 +10,7 @@ export declare class IdentityPublicKeyInCreationWASM {
|
|
|
10
10
|
toIdentityPublicKey(): IdentityPublicKeyWASM;
|
|
11
11
|
validatePrivateKey(privateKey: string | Uint8Array | PrivateKeyWASM, network: NetworkLike): boolean;
|
|
12
12
|
getHash(): Uint8Array;
|
|
13
|
+
getContractBounds(): ContractBoundsWASM | undefined;
|
|
13
14
|
get contractBounds(): ContractBoundsWASM | undefined;
|
|
14
15
|
set contractBounds(value: ContractBoundsWASM);
|
|
15
16
|
get keyId(): number;
|
|
@@ -19,6 +19,11 @@ export class IdentityPublicKeyInCreationWASM {
|
|
|
19
19
|
getHash() {
|
|
20
20
|
return this._rawKeyInCreation.getHash();
|
|
21
21
|
}
|
|
22
|
+
getContractBounds() {
|
|
23
|
+
if (this._rawKeyInCreation.contractBounds != null) {
|
|
24
|
+
return ContractBoundsWASM.createFromRawInstance(this._rawKeyInCreation.contractBounds);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
22
27
|
get contractBounds() {
|
|
23
28
|
if (this._rawKeyInCreation.contractBounds != null) {
|
|
24
29
|
return ContractBoundsWASM.createFromRawInstance(this._rawKeyInCreation.contractBounds);
|
|
@@ -70,7 +75,7 @@ export class IdentityPublicKeyInCreationWASM {
|
|
|
70
75
|
this._rawKeyInCreation.signature = value;
|
|
71
76
|
}
|
|
72
77
|
static createFromRawInstance(rawInstance) {
|
|
73
|
-
const instance = Object.create(
|
|
78
|
+
const instance = Object.create(IdentityPublicKeyInCreationWASM.prototype);
|
|
74
79
|
instance._rawKeyInCreation = rawInstance;
|
|
75
80
|
return instance;
|
|
76
81
|
}
|
|
@@ -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
|
}
|