pshenmic-dpp 2.0.0-dev.18 → 2.0.0-dev.19
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 +146 -4
- package/dist/binaries/bindingsTypes.js +1 -0
- 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/pshenmic_dpp.android.node/arm64-v8a/libpshenmic_dpp.so +0 -0
- package/dist/binaries/pshenmic_dpp.apple.node/ios-arm64-simulator/libpshenmic_dpp.framework/libpshenmic_dpp +0 -0
- package/dist/binaries/pshenmic_dpp.d.ts +9 -0
- package/dist/binaries/pshenmic_dpp.js +1 -1
- package/dist/binaries/wasm/wasmBytes.cjs +1 -1
- package/dist/binaries/wasm/wasmBytes.d.cts +1 -1
- package/dist/binaries/wasm.d.ts +9 -0
- package/dist/binaries/wasm.js +1 -1
- package/dist/src/dpp/dpp.d.ts +7 -0
- package/dist/src/dpp/dpp.js +7 -0
- package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.d.ts +0 -2
- package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.js +0 -6
- 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/types.d.ts +30 -2
- package/dist/src/dpp/verify/StateTransition/utils.js +76 -11
- package/package.json +1 -1
- package/tests/unit/ShieldedTransitions.spec.ts +709 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { SerializedActionWASM } from './SerializedAction.js';
|
|
2
|
+
import { CoreScriptWASM } from '../CoreScript.js';
|
|
3
|
+
import { dppProvider } from '../../provider.js';
|
|
4
|
+
import { valueToDynamicValue } from '../../utils.js';
|
|
5
|
+
import { StateTransitionWASM } from '../StateTransition.js';
|
|
6
|
+
export class ShieldedWithdrawalTransitionWASM {
|
|
7
|
+
/** @private **/
|
|
8
|
+
_rawShieldedWithdrawalTransition;
|
|
9
|
+
constructor(actions, unshieldingAmount, anchor, proof, bindingsSignature, coreFeePerByte, pooling, outputScript) {
|
|
10
|
+
this._rawShieldedWithdrawalTransition = new dppProvider.dpp.ShieldedWithdrawalTransitionNAPI(actions.map(a => a._rawSerializedAction), unshieldingAmount.toString(), anchor, proof, bindingsSignature, coreFeePerByte, valueToDynamicValue(pooling), outputScript._rawCoreScript);
|
|
11
|
+
}
|
|
12
|
+
get actions() {
|
|
13
|
+
return this._rawShieldedWithdrawalTransition.actions.map(SerializedActionWASM.createFromRawInstance);
|
|
14
|
+
}
|
|
15
|
+
set actions(value) {
|
|
16
|
+
this._rawShieldedWithdrawalTransition.actions = value.map(a => a._rawSerializedAction);
|
|
17
|
+
}
|
|
18
|
+
get unshieldingAmount() {
|
|
19
|
+
return BigInt(this._rawShieldedWithdrawalTransition.unshieldingAmount);
|
|
20
|
+
}
|
|
21
|
+
set unshieldingAmount(value) {
|
|
22
|
+
this._rawShieldedWithdrawalTransition.unshieldingAmount = value.toString();
|
|
23
|
+
}
|
|
24
|
+
get anchor() {
|
|
25
|
+
return this._rawShieldedWithdrawalTransition.anchor;
|
|
26
|
+
}
|
|
27
|
+
set anchor(value) {
|
|
28
|
+
this._rawShieldedWithdrawalTransition.anchor = value;
|
|
29
|
+
}
|
|
30
|
+
get proof() {
|
|
31
|
+
return this._rawShieldedWithdrawalTransition.proof;
|
|
32
|
+
}
|
|
33
|
+
set proof(value) {
|
|
34
|
+
this._rawShieldedWithdrawalTransition.proof = value;
|
|
35
|
+
}
|
|
36
|
+
get bindingsSignature() {
|
|
37
|
+
return this._rawShieldedWithdrawalTransition.bindingsSignature;
|
|
38
|
+
}
|
|
39
|
+
set bindingsSignature(value) {
|
|
40
|
+
this._rawShieldedWithdrawalTransition.bindingsSignature = value;
|
|
41
|
+
}
|
|
42
|
+
get coreFeePerByte() {
|
|
43
|
+
return this._rawShieldedWithdrawalTransition.coreFeePerByte;
|
|
44
|
+
}
|
|
45
|
+
set coreFeePerByte(value) {
|
|
46
|
+
this._rawShieldedWithdrawalTransition.coreFeePerByte = value;
|
|
47
|
+
}
|
|
48
|
+
get pooling() {
|
|
49
|
+
return this._rawShieldedWithdrawalTransition.pooling;
|
|
50
|
+
}
|
|
51
|
+
set pooling(value) {
|
|
52
|
+
this._rawShieldedWithdrawalTransition.pooling = valueToDynamicValue(value);
|
|
53
|
+
}
|
|
54
|
+
get outputScript() {
|
|
55
|
+
return CoreScriptWASM.createFromRawInstance(this._rawShieldedWithdrawalTransition.outputScript);
|
|
56
|
+
}
|
|
57
|
+
set outputScript(value) {
|
|
58
|
+
this._rawShieldedWithdrawalTransition.outputScript = value._rawCoreScript;
|
|
59
|
+
}
|
|
60
|
+
toStateTransition() {
|
|
61
|
+
return StateTransitionWASM.createFromRawInstance(this._rawShieldedWithdrawalTransition.toStateTransition());
|
|
62
|
+
}
|
|
63
|
+
static fromStateTransition(st) {
|
|
64
|
+
return ShieldedWithdrawalTransitionWASM.createFromRawInstance(dppProvider.dpp.ShieldedWithdrawalTransitionNAPI.fromStateTransition(st._rawStateTransition));
|
|
65
|
+
}
|
|
66
|
+
static createFromRawInstance(rawInstance) {
|
|
67
|
+
const instance = Object.create(ShieldedWithdrawalTransitionWASM.prototype);
|
|
68
|
+
instance._rawShieldedWithdrawalTransition = rawInstance;
|
|
69
|
+
return instance;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { UnshieldTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { SerializedActionWASM } from './SerializedAction.js';
|
|
3
|
+
import { PlatformAddressWASM } from '../PlatformAddress/PlatformAddress.js';
|
|
4
|
+
import { PlatformAddressLike } from '../../types.js';
|
|
5
|
+
import { StateTransitionWASM } from '../StateTransition.js';
|
|
6
|
+
export declare class UnshieldTransitionWASM {
|
|
7
|
+
/** @private **/
|
|
8
|
+
_rawUnshieldTransition: UnshieldTransitionNAPI;
|
|
9
|
+
constructor(outputAddress: PlatformAddressLike, actions: SerializedActionWASM[], unshieldingAmount: bigint, anchor: Uint8Array, proof: Uint8Array, bindingsSignature: Uint8Array);
|
|
10
|
+
get outputAddress(): PlatformAddressWASM;
|
|
11
|
+
set outputAddress(value: PlatformAddressLike);
|
|
12
|
+
get actions(): SerializedActionWASM[];
|
|
13
|
+
set actions(value: SerializedActionWASM[]);
|
|
14
|
+
get unshieldingAmount(): bigint;
|
|
15
|
+
set unshieldingAmount(value: bigint);
|
|
16
|
+
get anchor(): Uint8Array;
|
|
17
|
+
set anchor(value: Uint8Array);
|
|
18
|
+
get proof(): Uint8Array;
|
|
19
|
+
set proof(value: Uint8Array);
|
|
20
|
+
get bindingsSignature(): Uint8Array;
|
|
21
|
+
set bindingsSignature(value: Uint8Array);
|
|
22
|
+
toStateTransition(): StateTransitionWASM;
|
|
23
|
+
static fromStateTransition(st: StateTransitionWASM): UnshieldTransitionWASM;
|
|
24
|
+
static createFromRawInstance(rawInstance: UnshieldTransitionNAPI): UnshieldTransitionWASM;
|
|
25
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { SerializedActionWASM } from './SerializedAction.js';
|
|
2
|
+
import { PlatformAddressWASM } from '../PlatformAddress/PlatformAddress.js';
|
|
3
|
+
import { dppProvider } from '../../provider.js';
|
|
4
|
+
import { preparePlatformAddressValue } from '../../utils.js';
|
|
5
|
+
import { StateTransitionWASM } from '../StateTransition.js';
|
|
6
|
+
export class UnshieldTransitionWASM {
|
|
7
|
+
/** @private **/
|
|
8
|
+
_rawUnshieldTransition;
|
|
9
|
+
constructor(outputAddress, actions, unshieldingAmount, anchor, proof, bindingsSignature) {
|
|
10
|
+
this._rawUnshieldTransition = new dppProvider.dpp.UnshieldTransitionNAPI(preparePlatformAddressValue(outputAddress), actions.map(a => a._rawSerializedAction), unshieldingAmount.toString(), anchor, proof, bindingsSignature);
|
|
11
|
+
}
|
|
12
|
+
get outputAddress() {
|
|
13
|
+
return PlatformAddressWASM.createFromRawInstance(this._rawUnshieldTransition.outputAddress);
|
|
14
|
+
}
|
|
15
|
+
set outputAddress(value) {
|
|
16
|
+
this._rawUnshieldTransition.outputAddress = preparePlatformAddressValue(value);
|
|
17
|
+
}
|
|
18
|
+
get actions() {
|
|
19
|
+
return this._rawUnshieldTransition.actions.map(SerializedActionWASM.createFromRawInstance);
|
|
20
|
+
}
|
|
21
|
+
set actions(value) {
|
|
22
|
+
this._rawUnshieldTransition.actions = value.map(a => a._rawSerializedAction);
|
|
23
|
+
}
|
|
24
|
+
get unshieldingAmount() {
|
|
25
|
+
return BigInt(this._rawUnshieldTransition.unshieldingAmount);
|
|
26
|
+
}
|
|
27
|
+
set unshieldingAmount(value) {
|
|
28
|
+
this._rawUnshieldTransition.unshieldingAmount = value.toString();
|
|
29
|
+
}
|
|
30
|
+
get anchor() {
|
|
31
|
+
return this._rawUnshieldTransition.anchor;
|
|
32
|
+
}
|
|
33
|
+
set anchor(value) {
|
|
34
|
+
this._rawUnshieldTransition.anchor = value;
|
|
35
|
+
}
|
|
36
|
+
get proof() {
|
|
37
|
+
return this._rawUnshieldTransition.proof;
|
|
38
|
+
}
|
|
39
|
+
set proof(value) {
|
|
40
|
+
this._rawUnshieldTransition.proof = value;
|
|
41
|
+
}
|
|
42
|
+
get bindingsSignature() {
|
|
43
|
+
return this._rawUnshieldTransition.bindingsSignature;
|
|
44
|
+
}
|
|
45
|
+
set bindingsSignature(value) {
|
|
46
|
+
this._rawUnshieldTransition.bindingsSignature = value;
|
|
47
|
+
}
|
|
48
|
+
toStateTransition() {
|
|
49
|
+
return StateTransitionWASM.createFromRawInstance(this._rawUnshieldTransition.toStateTransition());
|
|
50
|
+
}
|
|
51
|
+
static fromStateTransition(st) {
|
|
52
|
+
return UnshieldTransitionWASM.createFromRawInstance(dppProvider.dpp.UnshieldTransitionNAPI.fromStateTransition(st._rawStateTransition));
|
|
53
|
+
}
|
|
54
|
+
static createFromRawInstance(rawInstance) {
|
|
55
|
+
const instance = Object.create(UnshieldTransitionWASM.prototype);
|
|
56
|
+
instance._rawUnshieldTransition = rawInstance;
|
|
57
|
+
return instance;
|
|
58
|
+
}
|
|
59
|
+
}
|
package/dist/src/dpp/types.d.ts
CHANGED
|
@@ -195,8 +195,36 @@ export interface VerifiedIdentityWithAddressInfos {
|
|
|
195
195
|
identity: PartialIdentityWASM;
|
|
196
196
|
infos: VerifiedPlatformAddressInfo[];
|
|
197
197
|
}
|
|
198
|
-
export
|
|
199
|
-
|
|
198
|
+
export interface AssetLockValue {
|
|
199
|
+
initialCreditValue: bigint;
|
|
200
|
+
txOutScript: Uint8Array;
|
|
201
|
+
remainingCreditValue: bigint;
|
|
202
|
+
usedTags: Uint8Array[];
|
|
203
|
+
}
|
|
204
|
+
export type StoredAssetLockInfoType = 'FullyConsumed' | 'PartiallyConsumed' | 'NotPresent';
|
|
205
|
+
export interface StoredAssetLockInfo {
|
|
206
|
+
type: StoredAssetLockInfoType;
|
|
207
|
+
value?: AssetLockValue;
|
|
208
|
+
}
|
|
209
|
+
export type ShieldedNullifier = [Uint8Array, boolean];
|
|
210
|
+
export interface VerifiedShieldedNullifiersWithAddressInfos {
|
|
211
|
+
nullifiers: ShieldedNullifier[];
|
|
212
|
+
infos: VerifiedPlatformAddressInfo[];
|
|
213
|
+
}
|
|
214
|
+
export interface VerifiedShieldedNullifiersWithWithdrawalDocument {
|
|
215
|
+
nullifiers: ShieldedNullifier[];
|
|
216
|
+
documents: VerifiedDocument[];
|
|
217
|
+
}
|
|
218
|
+
export interface VerifiedAssetLockConsumedWithAddressInfos {
|
|
219
|
+
storedAssetLockInfo: StoredAssetLockInfo;
|
|
220
|
+
infos: VerifiedPlatformAddressInfo[];
|
|
221
|
+
}
|
|
222
|
+
export interface VerifiedIdentityWithShieldedNullifiers {
|
|
223
|
+
identity: IdentityWASM;
|
|
224
|
+
nullifiers: ShieldedNullifier[];
|
|
225
|
+
}
|
|
226
|
+
export type VerifiedStateTransitionResultVariants = DataContractWASM | IdentityWASM | IdentifierWASM | VerifiedIdentityBalance | VerifiedIdentityTokenInfo | VerifiedTokenPricingSchedule | TokenStatus | VerifiedIdentityBalance[] | PartialIdentityWASM | VerifiedBalanceTransfer | VerifiedDocument[] | DocumentWASM | VerifiedTokenGroupActionWithDocument | VerifiedTokenGroupActionWithTokenBalance | VerifiedTokenGroupActionWithTokenIdentityInfo | VerifiedTokenGroupActionWithTokenPricingSchedule | VoteWASM | VerifiedPlatformAddressInfo[] | VerifiedIdentityFullWithAddressInfos | VerifiedIdentityWithAddressInfos | StoredAssetLockInfo | ShieldedNullifier[] | VerifiedShieldedNullifiersWithAddressInfos | VerifiedShieldedNullifiersWithWithdrawalDocument | VerifiedAssetLockConsumedWithAddressInfos | VerifiedIdentityWithShieldedNullifiers;
|
|
227
|
+
export type VerifiedStateTransitionResultVariantsRAW = protocol.DataContractNAPI | protocol.IdentityNAPI | protocol.IdentifierNAPI | protocol.VerifiedIdentityBalanceNAPI | protocol.VerifiedIdentityTokenInfoNAPI | protocol.VerifiedTokenPricingScheduleNAPI | protocol.TokenStatusNAPI | protocol.VerifiedIdentityBalanceNAPI[] | protocol.PartialIdentityNAPI | protocol.VerifiedBalanceTransferNAPI | protocol.VerifiedDocumentNAPI[] | protocol.DocumentNAPI | protocol.VerifiedTokenGroupActionWithDocumentNAPI | protocol.VerifiedTokenGroupActionWithTokenBalanceNAPI | protocol.VerifiedTokenGroupActionWithTokenIdentityInfoNAPI | protocol.VerifiedTokenGroupActionWithTokenPricingScheduleNAPI | protocol.VoteNAPI | protocol.PlatformAddressInfoNAPI[] | protocol.VerifiedIdentityFullWithAddressInfosNAPI | protocol.VerifiedIdentityWithAddressInfosNAPI | protocol.StoredAssetLockInfoNAPI | Array<[Uint8Array, boolean]> | [Array<[Uint8Array, boolean]>, protocol.PlatformAddressInfoNAPI[]] | [Array<[Uint8Array, boolean]>, protocol.VerifiedDocumentNAPI[]] | [protocol.StoredAssetLockInfoNAPI, protocol.PlatformAddressInfoNAPI[]] | [protocol.IdentityNAPI, Array<[Uint8Array, boolean]>];
|
|
200
228
|
export interface VerifiedStateTransitionResult {
|
|
201
229
|
rootHash: Uint8Array;
|
|
202
230
|
result: VerifiedStateTransitionResultVariants;
|
|
@@ -75,6 +75,35 @@ const converters = () => {
|
|
|
75
75
|
})]
|
|
76
76
|
]);
|
|
77
77
|
};
|
|
78
|
+
function convertPlatformAddressInfos(infos) {
|
|
79
|
+
return infos.map(info => ({
|
|
80
|
+
nonce: info.nonce,
|
|
81
|
+
address: PlatformAddressWASM.createFromRawInstance(info.address),
|
|
82
|
+
balance: info.credits != null ? BigInt(info.credits) : undefined
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
function convertVerifiedDocuments(docs) {
|
|
86
|
+
return docs.map(item => ({
|
|
87
|
+
id: IdentifierWASM.createFromRawInstance(item.id),
|
|
88
|
+
document: item.document != null
|
|
89
|
+
? DocumentWASM.createFromRawInstance(item.document)
|
|
90
|
+
: undefined
|
|
91
|
+
}));
|
|
92
|
+
}
|
|
93
|
+
function convertAssetLockValue(v) {
|
|
94
|
+
return {
|
|
95
|
+
initialCreditValue: BigInt(v.initialCreditValue),
|
|
96
|
+
txOutScript: v.txOutScript,
|
|
97
|
+
remainingCreditValue: BigInt(v.remainingCreditValue),
|
|
98
|
+
usedTags: v.usedTags
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function convertStoredAssetLockInfo(v) {
|
|
102
|
+
return {
|
|
103
|
+
type: v.type,
|
|
104
|
+
value: v.value != null ? convertAssetLockValue(v.value) : undefined
|
|
105
|
+
};
|
|
106
|
+
}
|
|
78
107
|
function convertArray(result) {
|
|
79
108
|
const [first] = result;
|
|
80
109
|
if (first == null)
|
|
@@ -86,26 +115,62 @@ function convertArray(result) {
|
|
|
86
115
|
}));
|
|
87
116
|
}
|
|
88
117
|
if (first instanceof dppProvider.dpp.VerifiedDocumentNAPI) {
|
|
89
|
-
return result
|
|
90
|
-
id: IdentifierWASM.createFromRawInstance(item.id),
|
|
91
|
-
document: item.document != null
|
|
92
|
-
? DocumentWASM.createFromRawInstance(item.document)
|
|
93
|
-
: undefined
|
|
94
|
-
}));
|
|
118
|
+
return convertVerifiedDocuments(result);
|
|
95
119
|
}
|
|
96
120
|
if (first instanceof dppProvider.dpp.PlatformAddressInfoNAPI) {
|
|
97
|
-
return result
|
|
98
|
-
nonce: item.nonce,
|
|
99
|
-
address: PlatformAddressWASM.createFromRawInstance(item.address),
|
|
100
|
-
balance: item.credits != null ? BigInt(item.credits) : undefined
|
|
101
|
-
}));
|
|
121
|
+
return convertPlatformAddressInfos(result);
|
|
102
122
|
}
|
|
103
123
|
throw new Error('Unknown array type');
|
|
104
124
|
}
|
|
125
|
+
function convertTuple(result) {
|
|
126
|
+
const [first, second] = result;
|
|
127
|
+
if (first instanceof dppProvider.dpp.StoredAssetLockInfoNAPI) {
|
|
128
|
+
return {
|
|
129
|
+
storedAssetLockInfo: convertStoredAssetLockInfo(first),
|
|
130
|
+
infos: convertPlatformAddressInfos(second)
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
if (first instanceof dppProvider.dpp.IdentityNAPI) {
|
|
134
|
+
return {
|
|
135
|
+
identity: IdentityWASM.createFromRawInstance(first),
|
|
136
|
+
nullifiers: second
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
if (Array.isArray(first) && Array.isArray(second)) {
|
|
140
|
+
const secondFirst = second[0];
|
|
141
|
+
if (secondFirst != null && secondFirst instanceof dppProvider.dpp.VerifiedDocumentNAPI) {
|
|
142
|
+
return {
|
|
143
|
+
nullifiers: first,
|
|
144
|
+
documents: convertVerifiedDocuments(second)
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
nullifiers: first,
|
|
149
|
+
infos: secondFirst != null ? convertPlatformAddressInfos(second) : []
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
throw new Error('Unknown tuple type');
|
|
153
|
+
}
|
|
105
154
|
export function convertResult(result) {
|
|
106
155
|
if (Array.isArray(result)) {
|
|
156
|
+
if (result.length === 2) {
|
|
157
|
+
const [first] = result;
|
|
158
|
+
if (first instanceof dppProvider.dpp.StoredAssetLockInfoNAPI || first instanceof dppProvider.dpp.IdentityNAPI) {
|
|
159
|
+
return convertTuple(result);
|
|
160
|
+
}
|
|
161
|
+
if (Array.isArray(first) && (first.length === 0 || Array.isArray(first[0]))) {
|
|
162
|
+
return convertTuple(result);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const [first] = result;
|
|
166
|
+
if (first != null && Array.isArray(first) && first[0] instanceof Uint8Array) {
|
|
167
|
+
return result;
|
|
168
|
+
}
|
|
107
169
|
return convertArray(result);
|
|
108
170
|
}
|
|
171
|
+
if (result instanceof dppProvider.dpp.StoredAssetLockInfoNAPI) {
|
|
172
|
+
return convertStoredAssetLockInfo(result);
|
|
173
|
+
}
|
|
109
174
|
for (const [Type, handler] of converters()) {
|
|
110
175
|
if (result instanceof Type) {
|
|
111
176
|
return handler(result);
|