pshenmic-dpp 1.1.2-dev.4 → 1.1.2-dev.6
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/wasm/pshenmic_dpp.d.ts +71 -58
- package/dist/wasm/pshenmic_dpp.js +93 -22
- package/dist/wasm/pshenmic_dpp_bg.js +1 -1
- package/dist/wasm/pshenmic_dpp_bg.wasm.d.ts +50 -46
- package/dist/wasm/pshenmic_dpp_zipped.js +1 -1
- package/package.json +1 -1
- package/tests/AsyncImportTest.spec.cjs +2 -2
- package/tests/DataContract.spec.cjs +1 -1
- package/tests/DataContractCreateStateTransition.spec.cjs +9 -10
- package/tests/DataContractUpdateStateTransition.spec.cjs +9 -9
- package/tests/IdentityCreateTransition.spec.cjs +0 -1
- package/tests/IdentityPublicKey.spec.cjs +40 -0
- package/tests/mocks/DataContract/DataContract.json +16 -5
- package/tests/mocks/DataContract/index.js +1 -1
|
@@ -682,6 +682,7 @@ export class DataContractWASM {
|
|
|
682
682
|
set ownerId(value: any);
|
|
683
683
|
get description(): string | undefined;
|
|
684
684
|
set description(value: string | null | undefined);
|
|
685
|
+
systemVersion: number;
|
|
685
686
|
get id(): IdentifierWASM;
|
|
686
687
|
set id(value: any);
|
|
687
688
|
readonly __type: string;
|
|
@@ -1497,11 +1498,11 @@ export class IdentityPublicKeyInCreationWASM {
|
|
|
1497
1498
|
free(): void;
|
|
1498
1499
|
[Symbol.dispose](): void;
|
|
1499
1500
|
/**
|
|
1500
|
-
* @param {
|
|
1501
|
+
* @param {any} js_private_key
|
|
1501
1502
|
* @param {any} js_network
|
|
1502
1503
|
* @returns {boolean}
|
|
1503
1504
|
*/
|
|
1504
|
-
validatePrivateKey(
|
|
1505
|
+
validatePrivateKey(js_private_key: any, js_network: any): boolean;
|
|
1505
1506
|
/** @returns {IdentityPublicKeyWASM} */
|
|
1506
1507
|
toIdentityPublicKey(): IdentityPublicKeyWASM;
|
|
1507
1508
|
/**
|
|
@@ -1554,17 +1555,17 @@ export class IdentityPublicKeyWASM {
|
|
|
1554
1555
|
/** */
|
|
1555
1556
|
removeDisabledAt(): void;
|
|
1556
1557
|
/**
|
|
1557
|
-
* @param {
|
|
1558
|
+
* @param {any} js_private_key
|
|
1558
1559
|
* @param {any} js_network
|
|
1559
1560
|
* @returns {boolean}
|
|
1560
1561
|
*/
|
|
1561
|
-
validatePrivateKey(
|
|
1562
|
+
validatePrivateKey(js_private_key: any, js_network: any): boolean;
|
|
1562
1563
|
/**
|
|
1563
|
-
* @param {
|
|
1564
|
+
* @param {Uint8Array<ArrayBufferLike>} js_private_key_bytes
|
|
1564
1565
|
* @param {any} js_network
|
|
1565
1566
|
* @returns {boolean}
|
|
1566
1567
|
*/
|
|
1567
|
-
validatePrivateKeyBytes(
|
|
1568
|
+
validatePrivateKeyBytes(js_private_key_bytes: Uint8Array, js_network: any): boolean;
|
|
1568
1569
|
/**
|
|
1569
1570
|
* @param {number} id
|
|
1570
1571
|
* @param {any} js_purpose
|
|
@@ -1984,8 +1985,6 @@ export class PrivateEncryptedNoteWASM {
|
|
|
1984
1985
|
readonly __type: string;
|
|
1985
1986
|
}
|
|
1986
1987
|
export class PrivateKeyWASM {
|
|
1987
|
-
/** @returns {PrivateKeyWASM} */
|
|
1988
|
-
private constructor();
|
|
1989
1988
|
/** @ignore */
|
|
1990
1989
|
free(): void;
|
|
1991
1990
|
[Symbol.dispose](): void;
|
|
@@ -1995,10 +1994,18 @@ export class PrivateKeyWASM {
|
|
|
1995
1994
|
* @returns {PrivateKeyWASM}
|
|
1996
1995
|
*/
|
|
1997
1996
|
static fromBytes(bytes: Uint8Array, js_network: any): PrivateKeyWASM;
|
|
1997
|
+
/** @returns {string} */
|
|
1998
|
+
getNetwork(): string;
|
|
1998
1999
|
/** @returns {PublicKeyWASM} */
|
|
1999
2000
|
getPublicKey(): PublicKeyWASM;
|
|
2000
2001
|
/** @returns {string} */
|
|
2001
2002
|
getPublicKeyHash(): string;
|
|
2003
|
+
/**
|
|
2004
|
+
* @param {any} value
|
|
2005
|
+
* @param {any} js_network
|
|
2006
|
+
* @returns {PrivateKeyWASM}
|
|
2007
|
+
*/
|
|
2008
|
+
constructor(value: any, js_network: any);
|
|
2002
2009
|
/**
|
|
2003
2010
|
* @param {Uint8Array<ArrayBufferLike>} data
|
|
2004
2011
|
* @returns {Uint8Array<ArrayBufferLike>}
|
|
@@ -2158,12 +2165,13 @@ export class StateTransitionWASM {
|
|
|
2158
2165
|
/** @param {bigint} nonce */
|
|
2159
2166
|
setIdentityNonce(nonce: bigint): void;
|
|
2160
2167
|
/**
|
|
2161
|
-
* @param {
|
|
2168
|
+
* @param {any} js_private_key
|
|
2162
2169
|
* @param {number} key_id
|
|
2163
2170
|
* @param {any} js_key_type
|
|
2171
|
+
* @param {any} js_network
|
|
2164
2172
|
* @returns {Uint8Array<ArrayBufferLike>}
|
|
2165
2173
|
*/
|
|
2166
|
-
signByPrivateKey(
|
|
2174
|
+
signByPrivateKey(js_private_key: any, key_id: number | null | undefined, js_key_type: any, js_network: any): Uint8Array;
|
|
2167
2175
|
/** @returns {number} */
|
|
2168
2176
|
getActionTypeNumber(): number;
|
|
2169
2177
|
/** @returns {string[]} */
|
|
@@ -2178,11 +2186,12 @@ export class StateTransitionWASM {
|
|
|
2178
2186
|
/** @param {bigint} nonce */
|
|
2179
2187
|
setIdentityContractNonce(nonce: bigint): void;
|
|
2180
2188
|
/**
|
|
2181
|
-
* @param {
|
|
2189
|
+
* @param {any} js_private_key
|
|
2182
2190
|
* @param {IdentityPublicKeyWASM} public_key
|
|
2191
|
+
* @param {any} js_network
|
|
2183
2192
|
* @returns {Uint8Array<ArrayBufferLike>}
|
|
2184
2193
|
*/
|
|
2185
|
-
sign(
|
|
2194
|
+
sign(js_private_key: any, public_key: IdentityPublicKeyWASM, js_network: any): Uint8Array;
|
|
2186
2195
|
/** @returns {any} */
|
|
2187
2196
|
hex(): any;
|
|
2188
2197
|
/**
|
|
@@ -3426,22 +3435,22 @@ export interface InitOutput {
|
|
|
3426
3435
|
readonly verifyTokensBalancesForIdentityProof: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
3427
3436
|
readonly verifyTotalCreditsProof: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
3428
3437
|
readonly verifyVotePollVoteStateProof: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => void;
|
|
3429
|
-
readonly
|
|
3438
|
+
readonly __wbg_verifiedtokentotalsupplywasm_free: (a: number, b: number) => void;
|
|
3430
3439
|
readonly __wbg_verifiedidentitynoncewasm_free: (a: number, b: number) => void;
|
|
3431
3440
|
readonly __wbg_verifiedidentitycontractnoncewasm_free: (a: number, b: number) => void;
|
|
3432
|
-
readonly
|
|
3441
|
+
readonly __wbg_verifiedtotalcreditswasm_free: (a: number, b: number) => void;
|
|
3433
3442
|
readonly __wbg_tokenstatuswasm_free: (a: number, b: number) => void;
|
|
3434
3443
|
readonly __wbg_verifiedtokensbalancesforidentitywasm_free: (a: number, b: number) => void;
|
|
3435
3444
|
readonly __wbg_verifiedidentitybyuniquekeyhashwasm_free: (a: number, b: number) => void;
|
|
3436
|
-
readonly verifiedidentitybyuniquekeyhashwasm_root_hash: (a: number) => number;
|
|
3437
|
-
readonly verifiedidentitybyuniquekeyhashwasm_identity: (a: number) => number;
|
|
3438
|
-
readonly tokenstatuswasm_paused: (a: number) => number;
|
|
3439
|
-
readonly verifiedtokensbalancesforidentitywasm_root_hash: (a: number) => number;
|
|
3440
|
-
readonly verifiedtokensbalancesforidentitywasm_balances: (a: number) => number;
|
|
3441
3445
|
readonly verifiedidentitycontractnoncewasm_root_hash: (a: number) => number;
|
|
3442
3446
|
readonly verifiedidentitycontractnoncewasm_contract_nonce: (a: number, b: number) => void;
|
|
3447
|
+
readonly verifiedidentitybyuniquekeyhashwasm_root_hash: (a: number) => number;
|
|
3448
|
+
readonly verifiedidentitybyuniquekeyhashwasm_identity: (a: number) => number;
|
|
3443
3449
|
readonly verifiedidentitynoncewasm_root_hash: (a: number) => number;
|
|
3444
3450
|
readonly verifiedidentitynoncewasm_nonce: (a: number, b: number) => void;
|
|
3451
|
+
readonly verifiedtokensbalancesforidentitywasm_root_hash: (a: number) => number;
|
|
3452
|
+
readonly verifiedtokensbalancesforidentitywasm_balances: (a: number) => number;
|
|
3453
|
+
readonly tokenstatuswasm_paused: (a: number) => number;
|
|
3445
3454
|
readonly __wbg_partialidentitywasm_free: (a: number, b: number) => void;
|
|
3446
3455
|
readonly partialidentitywasm_balance: (a: number, b: number) => void;
|
|
3447
3456
|
readonly partialidentitywasm_id: (a: number) => number;
|
|
@@ -4119,20 +4128,20 @@ export interface InitOutput {
|
|
|
4119
4128
|
readonly tokenunfreezetransitionwasm_new: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
4120
4129
|
readonly tokenfreezetransitionwasm_new: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
4121
4130
|
readonly documentupdatepricetransitionwasm_new: (a: number, b: number, c: bigint, d: bigint, e: number) => void;
|
|
4122
|
-
readonly __wbg_tokenemergencyactiontransitionwasm_free: (a: number, b: number) => void;
|
|
4123
|
-
readonly __wbg_documentupdatepricetransitionwasm_free: (a: number, b: number) => void;
|
|
4124
|
-
readonly __wbg_documentdeletetransitionwasm_free: (a: number, b: number) => void;
|
|
4125
4131
|
readonly __wbg_tokenfreezetransitionwasm_free: (a: number, b: number) => void;
|
|
4132
|
+
readonly __wbg_documentupdatepricetransitionwasm_free: (a: number, b: number) => void;
|
|
4133
|
+
readonly __wbg_tokenemergencyactiontransitionwasm_free: (a: number, b: number) => void;
|
|
4126
4134
|
readonly __wbg_tokenunfreezetransitionwasm_free: (a: number, b: number) => void;
|
|
4135
|
+
readonly __wbg_documentdeletetransitionwasm_free: (a: number, b: number) => void;
|
|
4136
|
+
readonly tokenunfreezetransitionwasm_get_base: (a: number) => number;
|
|
4137
|
+
readonly tokenfreezetransitionwasm_get_base: (a: number) => number;
|
|
4127
4138
|
readonly documentupdatepricetransitionwasm_get_price: (a: number) => bigint;
|
|
4128
4139
|
readonly documentupdatepricetransitionwasm_get_base: (a: number) => number;
|
|
4129
4140
|
readonly tokenemergencyactiontransitionwasm_get_base: (a: number) => number;
|
|
4130
|
-
readonly tokenunfreezetransitionwasm_get_base: (a: number) => number;
|
|
4131
|
-
readonly tokenfreezetransitionwasm_get_base: (a: number) => number;
|
|
4132
|
-
readonly tokenunfreezetransitionwasm_set_base: (a: number, b: number) => void;
|
|
4133
|
-
readonly tokenfreezetransitionwasm_set_base: (a: number, b: number) => void;
|
|
4134
4141
|
readonly tokenemergencyactiontransitionwasm_set_base: (a: number, b: number) => void;
|
|
4142
|
+
readonly tokenfreezetransitionwasm_set_base: (a: number, b: number) => void;
|
|
4135
4143
|
readonly documentupdatepricetransitionwasm_set_price: (a: number, b: bigint) => void;
|
|
4144
|
+
readonly tokenunfreezetransitionwasm_set_base: (a: number, b: number) => void;
|
|
4136
4145
|
readonly __wbg_privateencryptednotewasm_free: (a: number, b: number) => void;
|
|
4137
4146
|
readonly privateencryptednotewasm_derivation_encryption_key_index: (a: number) => number;
|
|
4138
4147
|
readonly privateencryptednotewasm_new: (a: number, b: number, c: number, d: number) => number;
|
|
@@ -4145,9 +4154,9 @@ export interface InitOutput {
|
|
|
4145
4154
|
readonly privateencryptednotewasm_value: (a: number, b: number) => void;
|
|
4146
4155
|
readonly sharedencryptednotewasm_struct_name: (a: number) => void;
|
|
4147
4156
|
readonly sharedencryptednotewasm_type_name: (a: number, b: number) => void;
|
|
4148
|
-
readonly sharedencryptednotewasm_value: (a: number, b: number) => void;
|
|
4149
4157
|
readonly sharedencryptednotewasm_new: (a: number, b: number, c: number, d: number) => number;
|
|
4150
4158
|
readonly __wbg_sharedencryptednotewasm_free: (a: number, b: number) => void;
|
|
4159
|
+
readonly sharedencryptednotewasm_value: (a: number, b: number) => void;
|
|
4151
4160
|
readonly sharedencryptednotewasm_sender_key_index: (a: number) => number;
|
|
4152
4161
|
readonly sharedencryptednotewasm_recipient_key_index: (a: number) => number;
|
|
4153
4162
|
readonly sharedencryptednotewasm_set_value: (a: number, b: number, c: number) => void;
|
|
@@ -4248,6 +4257,7 @@ export interface InitOutput {
|
|
|
4248
4257
|
readonly __wbg_datacontractwasm_free: (a: number, b: number) => void;
|
|
4249
4258
|
readonly datacontractwasm_base64: (a: number, b: number, c: number) => void;
|
|
4250
4259
|
readonly datacontractwasm_bytes: (a: number, b: number, c: number) => void;
|
|
4260
|
+
readonly datacontractwasm_data_contract_protocol_version: (a: number) => number;
|
|
4251
4261
|
readonly datacontractwasm_fromBase64: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
4252
4262
|
readonly datacontractwasm_fromBytes: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
4253
4263
|
readonly datacontractwasm_fromHex: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
@@ -4266,6 +4276,7 @@ export interface InitOutput {
|
|
|
4266
4276
|
readonly datacontractwasm_hex: (a: number, b: number, c: number) => void;
|
|
4267
4277
|
readonly datacontractwasm_setConfig: (a: number, b: number, c: number, d: number) => void;
|
|
4268
4278
|
readonly datacontractwasm_setSchemas: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
4279
|
+
readonly datacontractwasm_set_data_contract_protocol_version: (a: number, b: number, c: number) => void;
|
|
4269
4280
|
readonly datacontractwasm_set_description: (a: number, b: number, c: number) => void;
|
|
4270
4281
|
readonly datacontractwasm_set_groups: (a: number, b: number, c: number) => void;
|
|
4271
4282
|
readonly datacontractwasm_set_id: (a: number, b: number, c: number) => void;
|
|
@@ -4545,17 +4556,22 @@ export interface InitOutput {
|
|
|
4545
4556
|
readonly __wbg_set_distributionpolynomialwasm_n: (a: number, b: bigint) => void;
|
|
4546
4557
|
readonly __wbg_set_distributionpolynomialwasm_o: (a: number, b: bigint) => void;
|
|
4547
4558
|
readonly __wbg_set_timebaseddistributionwasm_interval: (a: number, b: bigint) => void;
|
|
4548
|
-
readonly __wbg_set_distributioninvertedlogarithmicwasm_startMoment: (a: number, b: number, c: bigint) => void;
|
|
4549
|
-
readonly __wbg_distributioninvertedlogarithmicwasm_free: (a: number, b: number) => void;
|
|
4550
|
-
readonly __wbg_set_distributionstepdecreasingamountwasm_startDecreasingOffset: (a: number, b: number, c: bigint) => void;
|
|
4551
|
-
readonly __wbg_set_distributionlinearwasm_startStep: (a: number, b: number, c: bigint) => void;
|
|
4552
4559
|
readonly __wbg_set_distributionpolynomialwasm_startMoment: (a: number, b: number, c: bigint) => void;
|
|
4553
4560
|
readonly __wbg_distributionpolynomialwasm_free: (a: number, b: number) => void;
|
|
4561
|
+
readonly __wbg_set_distributionstepdecreasingamountwasm_startDecreasingOffset: (a: number, b: number, c: bigint) => void;
|
|
4562
|
+
readonly __wbg_set_distributionrandomwasm_min: (a: number, b: bigint) => void;
|
|
4563
|
+
readonly __wbg_get_distributionrandomwasm_min: (a: number) => bigint;
|
|
4564
|
+
readonly __wbg_set_distributionlinearwasm_startStep: (a: number, b: number, c: bigint) => void;
|
|
4565
|
+
readonly __wbg_set_distributioninvertedlogarithmicwasm_startMoment: (a: number, b: number, c: bigint) => void;
|
|
4566
|
+
readonly __wbg_distributioninvertedlogarithmicwasm_free: (a: number, b: number) => void;
|
|
4554
4567
|
readonly __wbg_set_distributionlogarithmicwasm_startMoment: (a: number, b: number, c: bigint) => void;
|
|
4555
4568
|
readonly __wbg_distributionlogarithmicwasm_free: (a: number, b: number) => void;
|
|
4556
|
-
readonly
|
|
4557
|
-
readonly
|
|
4558
|
-
readonly
|
|
4569
|
+
readonly __wbg_get_distributionlinearwasm_startStep: (a: number, b: number) => void;
|
|
4570
|
+
readonly __wbg_get_distributionlinearwasm_minValue: (a: number, b: number) => void;
|
|
4571
|
+
readonly __wbg_get_distributionlinearwasm_maxValue: (a: number, b: number) => void;
|
|
4572
|
+
readonly __wbg_get_distributionlinearwasm_startingAmount: (a: number) => bigint;
|
|
4573
|
+
readonly __wbg_get_distributionlinearwasm_d: (a: number) => bigint;
|
|
4574
|
+
readonly __wbg_get_distributionlinearwasm_a: (a: number) => bigint;
|
|
4559
4575
|
readonly __wbg_get_distributionlogarithmicwasm_startMoment: (a: number, b: number) => void;
|
|
4560
4576
|
readonly __wbg_get_distributionlogarithmicwasm_o: (a: number) => bigint;
|
|
4561
4577
|
readonly __wbg_get_distributionlogarithmicwasm_n: (a: number) => bigint;
|
|
@@ -4565,15 +4581,8 @@ export interface InitOutput {
|
|
|
4565
4581
|
readonly __wbg_get_distributionlogarithmicwasm_d: (a: number) => bigint;
|
|
4566
4582
|
readonly __wbg_get_distributionlogarithmicwasm_b: (a: number) => bigint;
|
|
4567
4583
|
readonly __wbg_get_distributionlogarithmicwasm_a: (a: number) => bigint;
|
|
4568
|
-
readonly
|
|
4569
|
-
readonly
|
|
4570
|
-
readonly __wbg_get_distributioninvertedlogarithmicwasm_n: (a: number) => bigint;
|
|
4571
|
-
readonly __wbg_get_distributioninvertedlogarithmicwasm_minValue: (a: number, b: number) => void;
|
|
4572
|
-
readonly __wbg_get_distributioninvertedlogarithmicwasm_maxValue: (a: number, b: number) => void;
|
|
4573
|
-
readonly __wbg_get_distributioninvertedlogarithmicwasm_m: (a: number) => bigint;
|
|
4574
|
-
readonly __wbg_get_distributioninvertedlogarithmicwasm_d: (a: number) => bigint;
|
|
4575
|
-
readonly __wbg_get_distributioninvertedlogarithmicwasm_b: (a: number) => bigint;
|
|
4576
|
-
readonly __wbg_get_distributioninvertedlogarithmicwasm_a: (a: number) => bigint;
|
|
4584
|
+
readonly __wbg_get_distributionstepdecreasingamountwasm_startDecreasingOffset: (a: number, b: number) => void;
|
|
4585
|
+
readonly __wbg_get_distributionstepdecreasingamountwasm_minValue: (a: number, b: number) => void;
|
|
4577
4586
|
readonly __wbg_get_distributionpolynomialwasm_startMoment: (a: number, b: number) => void;
|
|
4578
4587
|
readonly __wbg_get_distributionpolynomialwasm_o: (a: number) => bigint;
|
|
4579
4588
|
readonly __wbg_get_distributionpolynomialwasm_n: (a: number) => bigint;
|
|
@@ -4583,29 +4592,31 @@ export interface InitOutput {
|
|
|
4583
4592
|
readonly __wbg_get_distributionpolynomialwasm_d: (a: number) => bigint;
|
|
4584
4593
|
readonly __wbg_get_distributionpolynomialwasm_b: (a: number) => bigint;
|
|
4585
4594
|
readonly __wbg_get_distributionpolynomialwasm_a: (a: number) => bigint;
|
|
4595
|
+
readonly __wbg_get_distributioninvertedlogarithmicwasm_startMoment: (a: number, b: number) => void;
|
|
4596
|
+
readonly __wbg_get_distributioninvertedlogarithmicwasm_o: (a: number) => bigint;
|
|
4597
|
+
readonly __wbg_get_distributioninvertedlogarithmicwasm_n: (a: number) => bigint;
|
|
4598
|
+
readonly __wbg_get_distributioninvertedlogarithmicwasm_minValue: (a: number, b: number) => void;
|
|
4599
|
+
readonly __wbg_get_distributioninvertedlogarithmicwasm_maxValue: (a: number, b: number) => void;
|
|
4600
|
+
readonly __wbg_get_distributioninvertedlogarithmicwasm_m: (a: number) => bigint;
|
|
4601
|
+
readonly __wbg_get_distributioninvertedlogarithmicwasm_d: (a: number) => bigint;
|
|
4602
|
+
readonly __wbg_get_distributioninvertedlogarithmicwasm_b: (a: number) => bigint;
|
|
4603
|
+
readonly __wbg_get_distributioninvertedlogarithmicwasm_a: (a: number) => bigint;
|
|
4586
4604
|
readonly __wbg_get_timebaseddistributionwasm_interval: (a: number) => bigint;
|
|
4587
|
-
readonly
|
|
4588
|
-
readonly
|
|
4589
|
-
readonly __wbg_get_distributionlinearwasm_minValue: (a: number, b: number) => void;
|
|
4590
|
-
readonly __wbg_get_distributionlinearwasm_maxValue: (a: number, b: number) => void;
|
|
4591
|
-
readonly __wbg_get_distributionlinearwasm_d: (a: number) => bigint;
|
|
4592
|
-
readonly __wbg_get_distributionlinearwasm_a: (a: number) => bigint;
|
|
4605
|
+
readonly __wbg_set_distributionlinearwasm_minValue: (a: number, b: number, c: bigint) => void;
|
|
4606
|
+
readonly __wbg_set_distributionlinearwasm_maxValue: (a: number, b: number, c: bigint) => void;
|
|
4593
4607
|
readonly __wbg_set_distributionpolynomialwasm_minValue: (a: number, b: number, c: bigint) => void;
|
|
4594
4608
|
readonly __wbg_set_distributionpolynomialwasm_maxValue: (a: number, b: number, c: bigint) => void;
|
|
4609
|
+
readonly __wbg_set_distributionstepdecreasingamountwasm_minValue: (a: number, b: number, c: bigint) => void;
|
|
4595
4610
|
readonly __wbg_set_distributionlogarithmicwasm_minValue: (a: number, b: number, c: bigint) => void;
|
|
4596
4611
|
readonly __wbg_set_distributionlogarithmicwasm_maxValue: (a: number, b: number, c: bigint) => void;
|
|
4597
|
-
readonly __wbg_set_distributionrandomwasm_min: (a: number, b: bigint) => void;
|
|
4598
4612
|
readonly __wbg_set_distributioninvertedlogarithmicwasm_minValue: (a: number, b: number, c: bigint) => void;
|
|
4599
4613
|
readonly __wbg_set_distributioninvertedlogarithmicwasm_maxValue: (a: number, b: number, c: bigint) => void;
|
|
4600
|
-
readonly __wbg_set_distributionlinearwasm_minValue: (a: number, b: number, c: bigint) => void;
|
|
4601
|
-
readonly __wbg_set_distributionlinearwasm_maxValue: (a: number, b: number, c: bigint) => void;
|
|
4602
|
-
readonly __wbg_set_distributionstepdecreasingamountwasm_minValue: (a: number, b: number, c: bigint) => void;
|
|
4603
4614
|
readonly __wbg_tokenmarketplaceruleswasm_free: (a: number, b: number) => void;
|
|
4604
4615
|
readonly __wbg_timebaseddistributionwasm_free: (a: number, b: number) => void;
|
|
4605
4616
|
readonly epochbaseddistributionwasm_set_function: (a: number, b: number) => void;
|
|
4606
4617
|
readonly __wbg_epochbaseddistributionwasm_free: (a: number, b: number) => void;
|
|
4607
|
-
readonly timebaseddistributionwasm_set_function: (a: number, b: number) => void;
|
|
4608
4618
|
readonly epochbaseddistributionwasm_get_function: (a: number) => number;
|
|
4619
|
+
readonly timebaseddistributionwasm_set_function: (a: number, b: number) => void;
|
|
4609
4620
|
readonly timebaseddistributionwasm_get_function: (a: number) => number;
|
|
4610
4621
|
readonly __wbg_statetransitionwasm_free: (a: number, b: number) => void;
|
|
4611
4622
|
readonly statetransitionwasm_base64: (a: number, b: number) => void;
|
|
@@ -4632,8 +4643,8 @@ export interface InitOutput {
|
|
|
4632
4643
|
readonly statetransitionwasm_set_signature: (a: number, b: number, c: number) => void;
|
|
4633
4644
|
readonly statetransitionwasm_set_signature_public_key_id: (a: number, b: number) => void;
|
|
4634
4645
|
readonly statetransitionwasm_set_user_fee_increase: (a: number, b: number) => void;
|
|
4635
|
-
readonly statetransitionwasm_sign: (a: number, b: number, c: number, d: number) => void;
|
|
4636
|
-
readonly statetransitionwasm_signByPrivateKey: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
4646
|
+
readonly statetransitionwasm_sign: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
4647
|
+
readonly statetransitionwasm_signByPrivateKey: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
4637
4648
|
readonly statetransitionwasm_struct_name: (a: number) => void;
|
|
4638
4649
|
readonly statetransitionwasm_type_name: (a: number, b: number) => void;
|
|
4639
4650
|
readonly statetransitionwasm_verifyPublicKey: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
@@ -4691,8 +4702,8 @@ export interface InitOutput {
|
|
|
4691
4702
|
readonly identitypublickeywasm_set_security_level: (a: number, b: number, c: number) => void;
|
|
4692
4703
|
readonly identitypublickeywasm_struct_name: (a: number) => void;
|
|
4693
4704
|
readonly identitypublickeywasm_type_name: (a: number, b: number) => void;
|
|
4694
|
-
readonly identitypublickeywasm_validatePrivateKey: (a: number, b: number, c: number, d: number
|
|
4695
|
-
readonly identitypublickeywasm_validatePrivateKeyBytes: (a: number, b: number, c: number, d: number) => void;
|
|
4705
|
+
readonly identitypublickeywasm_validatePrivateKey: (a: number, b: number, c: number, d: number) => void;
|
|
4706
|
+
readonly identitypublickeywasm_validatePrivateKeyBytes: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
4696
4707
|
readonly identitypublickeywasm_set_key_type_number: (a: number, b: number, c: number) => void;
|
|
4697
4708
|
readonly identitypublickeywasm_set_purpose_number: (a: number, b: number, c: number) => void;
|
|
4698
4709
|
readonly identitypublickeywasm_set_security_level_number: (a: number, b: number, c: number) => void;
|
|
@@ -4702,9 +4713,11 @@ export interface InitOutput {
|
|
|
4702
4713
|
readonly privatekeywasm_fromBytes: (a: number, b: number, c: number, d: number) => void;
|
|
4703
4714
|
readonly privatekeywasm_fromHex: (a: number, b: number, c: number, d: number) => void;
|
|
4704
4715
|
readonly privatekeywasm_fromWIF: (a: number, b: number, c: number) => void;
|
|
4716
|
+
readonly privatekeywasm_getNetwork: (a: number, b: number) => void;
|
|
4705
4717
|
readonly privatekeywasm_getPublicKey: (a: number) => number;
|
|
4706
4718
|
readonly privatekeywasm_getPublicKeyHash: (a: number, b: number) => void;
|
|
4707
4719
|
readonly privatekeywasm_hex: (a: number, b: number) => void;
|
|
4720
|
+
readonly privatekeywasm_new: (a: number, b: number, c: number) => void;
|
|
4708
4721
|
readonly privatekeywasm_sign: (a: number, b: number, c: number, d: number) => void;
|
|
4709
4722
|
readonly privatekeywasm_signHash: (a: number, b: number, c: number, d: number) => void;
|
|
4710
4723
|
readonly privatekeywasm_struct_name: (a: number) => void;
|
|
@@ -4341,6 +4341,29 @@ export class DataContractWASM {
|
|
|
4341
4341
|
var len0 = WASM_VECTOR_LEN;
|
|
4342
4342
|
wasm.datacontractwasm_set_description(this.__wbg_ptr, ptr0, len0);
|
|
4343
4343
|
}
|
|
4344
|
+
/**
|
|
4345
|
+
* @returns {number}
|
|
4346
|
+
*/
|
|
4347
|
+
get systemVersion() {
|
|
4348
|
+
const ret = wasm.datacontractwasm_data_contract_protocol_version(this.__wbg_ptr);
|
|
4349
|
+
return ret;
|
|
4350
|
+
}
|
|
4351
|
+
/**
|
|
4352
|
+
* @param {number} version
|
|
4353
|
+
*/
|
|
4354
|
+
set systemVersion(version) {
|
|
4355
|
+
try {
|
|
4356
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4357
|
+
wasm.datacontractwasm_set_data_contract_protocol_version(retptr, this.__wbg_ptr, version);
|
|
4358
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4359
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4360
|
+
if (r1) {
|
|
4361
|
+
throw takeObject(r0);
|
|
4362
|
+
}
|
|
4363
|
+
} finally {
|
|
4364
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4365
|
+
}
|
|
4366
|
+
}
|
|
4344
4367
|
/**
|
|
4345
4368
|
* @returns {IdentifierWASM}
|
|
4346
4369
|
*/
|
|
@@ -10224,15 +10247,14 @@ export class IdentityPublicKeyInCreationWASM {
|
|
|
10224
10247
|
}
|
|
10225
10248
|
}
|
|
10226
10249
|
/**
|
|
10227
|
-
* @param {
|
|
10250
|
+
* @param {any} js_private_key
|
|
10228
10251
|
* @param {any} js_network
|
|
10229
10252
|
* @returns {boolean}
|
|
10230
10253
|
*/
|
|
10231
|
-
validatePrivateKey(
|
|
10254
|
+
validatePrivateKey(js_private_key, js_network) {
|
|
10232
10255
|
try {
|
|
10233
10256
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
10234
|
-
|
|
10235
|
-
wasm.identitypublickeyincreationwasm_validatePrivateKey(retptr, this.__wbg_ptr, private_key.__wbg_ptr, addHeapObject(js_network));
|
|
10257
|
+
wasm.identitypublickeyincreationwasm_validatePrivateKey(retptr, this.__wbg_ptr, addBorrowedObject(js_private_key), addBorrowedObject(js_network));
|
|
10236
10258
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
10237
10259
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
10238
10260
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -10242,6 +10264,8 @@ export class IdentityPublicKeyInCreationWASM {
|
|
|
10242
10264
|
return r0 !== 0;
|
|
10243
10265
|
} finally {
|
|
10244
10266
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
10267
|
+
heap[stack_pointer++] = undefined;
|
|
10268
|
+
heap[stack_pointer++] = undefined;
|
|
10245
10269
|
}
|
|
10246
10270
|
}
|
|
10247
10271
|
/**
|
|
@@ -10693,16 +10717,14 @@ export class IdentityPublicKeyWASM {
|
|
|
10693
10717
|
}
|
|
10694
10718
|
}
|
|
10695
10719
|
/**
|
|
10696
|
-
* @param {
|
|
10720
|
+
* @param {any} js_private_key
|
|
10697
10721
|
* @param {any} js_network
|
|
10698
10722
|
* @returns {boolean}
|
|
10699
10723
|
*/
|
|
10700
|
-
validatePrivateKey(
|
|
10724
|
+
validatePrivateKey(js_private_key, js_network) {
|
|
10701
10725
|
try {
|
|
10702
10726
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
10703
|
-
|
|
10704
|
-
const len0 = WASM_VECTOR_LEN;
|
|
10705
|
-
wasm.identitypublickeywasm_validatePrivateKey(retptr, this.__wbg_ptr, ptr0, len0, addBorrowedObject(js_network));
|
|
10727
|
+
wasm.identitypublickeywasm_validatePrivateKey(retptr, this.__wbg_ptr, addBorrowedObject(js_private_key), addBorrowedObject(js_network));
|
|
10706
10728
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
10707
10729
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
10708
10730
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -10713,6 +10735,7 @@ export class IdentityPublicKeyWASM {
|
|
|
10713
10735
|
} finally {
|
|
10714
10736
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
10715
10737
|
heap[stack_pointer++] = undefined;
|
|
10738
|
+
heap[stack_pointer++] = undefined;
|
|
10716
10739
|
}
|
|
10717
10740
|
}
|
|
10718
10741
|
/**
|
|
@@ -10740,15 +10763,16 @@ export class IdentityPublicKeyWASM {
|
|
|
10740
10763
|
}
|
|
10741
10764
|
}
|
|
10742
10765
|
/**
|
|
10743
|
-
* @param {
|
|
10766
|
+
* @param {Uint8Array} js_private_key_bytes
|
|
10744
10767
|
* @param {any} js_network
|
|
10745
10768
|
* @returns {boolean}
|
|
10746
10769
|
*/
|
|
10747
|
-
validatePrivateKeyBytes(
|
|
10770
|
+
validatePrivateKeyBytes(js_private_key_bytes, js_network) {
|
|
10748
10771
|
try {
|
|
10749
10772
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
10750
|
-
|
|
10751
|
-
|
|
10773
|
+
const ptr0 = passArray8ToWasm0(js_private_key_bytes, wasm.__wbindgen_export2);
|
|
10774
|
+
const len0 = WASM_VECTOR_LEN;
|
|
10775
|
+
wasm.identitypublickeywasm_validatePrivateKeyBytes(retptr, this.__wbg_ptr, ptr0, len0, addBorrowedObject(js_network));
|
|
10752
10776
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
10753
10777
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
10754
10778
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -10758,6 +10782,7 @@ export class IdentityPublicKeyWASM {
|
|
|
10758
10782
|
return r0 !== 0;
|
|
10759
10783
|
} finally {
|
|
10760
10784
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
10785
|
+
heap[stack_pointer++] = undefined;
|
|
10761
10786
|
}
|
|
10762
10787
|
}
|
|
10763
10788
|
/**
|
|
@@ -13716,6 +13741,25 @@ export class PrivateKeyWASM {
|
|
|
13716
13741
|
heap[stack_pointer++] = undefined;
|
|
13717
13742
|
}
|
|
13718
13743
|
}
|
|
13744
|
+
/**
|
|
13745
|
+
* @returns {string}
|
|
13746
|
+
*/
|
|
13747
|
+
getNetwork() {
|
|
13748
|
+
let deferred1_0;
|
|
13749
|
+
let deferred1_1;
|
|
13750
|
+
try {
|
|
13751
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
13752
|
+
wasm.privatekeywasm_getNetwork(retptr, this.__wbg_ptr);
|
|
13753
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
13754
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
13755
|
+
deferred1_0 = r0;
|
|
13756
|
+
deferred1_1 = r1;
|
|
13757
|
+
return getStringFromWasm0(r0, r1);
|
|
13758
|
+
} finally {
|
|
13759
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
13760
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
13761
|
+
}
|
|
13762
|
+
}
|
|
13719
13763
|
/**
|
|
13720
13764
|
* @returns {string}
|
|
13721
13765
|
*/
|
|
@@ -13761,6 +13805,29 @@ export class PrivateKeyWASM {
|
|
|
13761
13805
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
13762
13806
|
}
|
|
13763
13807
|
}
|
|
13808
|
+
/**
|
|
13809
|
+
* @param {any} value
|
|
13810
|
+
* @param {any} js_network
|
|
13811
|
+
*/
|
|
13812
|
+
constructor(value, js_network) {
|
|
13813
|
+
try {
|
|
13814
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
13815
|
+
wasm.privatekeywasm_new(retptr, addBorrowedObject(value), addBorrowedObject(js_network));
|
|
13816
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
13817
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
13818
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
13819
|
+
if (r2) {
|
|
13820
|
+
throw takeObject(r1);
|
|
13821
|
+
}
|
|
13822
|
+
this.__wbg_ptr = r0 >>> 0;
|
|
13823
|
+
PrivateKeyWASMFinalization.register(this, this.__wbg_ptr, this);
|
|
13824
|
+
return this;
|
|
13825
|
+
} finally {
|
|
13826
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
13827
|
+
heap[stack_pointer++] = undefined;
|
|
13828
|
+
heap[stack_pointer++] = undefined;
|
|
13829
|
+
}
|
|
13830
|
+
}
|
|
13764
13831
|
/**
|
|
13765
13832
|
* @param {Uint8Array} data
|
|
13766
13833
|
* @returns {Uint8Array}
|
|
@@ -14463,7 +14530,7 @@ export class SharedEncryptedNoteWASM {
|
|
|
14463
14530
|
get value() {
|
|
14464
14531
|
try {
|
|
14465
14532
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
14466
|
-
wasm.
|
|
14533
|
+
wasm.privateencryptednotewasm_value(retptr, this.__wbg_ptr);
|
|
14467
14534
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
14468
14535
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
14469
14536
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
@@ -14727,16 +14794,16 @@ export class StateTransitionWASM {
|
|
|
14727
14794
|
}
|
|
14728
14795
|
}
|
|
14729
14796
|
/**
|
|
14730
|
-
* @param {
|
|
14797
|
+
* @param {any} js_private_key
|
|
14731
14798
|
* @param {number | null | undefined} key_id
|
|
14732
14799
|
* @param {any} js_key_type
|
|
14800
|
+
* @param {any} js_network
|
|
14733
14801
|
* @returns {Uint8Array}
|
|
14734
14802
|
*/
|
|
14735
|
-
signByPrivateKey(
|
|
14803
|
+
signByPrivateKey(js_private_key, key_id, js_key_type, js_network) {
|
|
14736
14804
|
try {
|
|
14737
14805
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
14738
|
-
|
|
14739
|
-
wasm.statetransitionwasm_signByPrivateKey(retptr, this.__wbg_ptr, private_key.__wbg_ptr, isLikeNone(key_id) ? 0x100000001 : (key_id) >>> 0, addBorrowedObject(js_key_type));
|
|
14806
|
+
wasm.statetransitionwasm_signByPrivateKey(retptr, this.__wbg_ptr, addBorrowedObject(js_private_key), isLikeNone(key_id) ? 0x100000001 : (key_id) >>> 0, addBorrowedObject(js_key_type), addBorrowedObject(js_network));
|
|
14740
14807
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
14741
14808
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
14742
14809
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -14750,6 +14817,8 @@ export class StateTransitionWASM {
|
|
|
14750
14817
|
} finally {
|
|
14751
14818
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
14752
14819
|
heap[stack_pointer++] = undefined;
|
|
14820
|
+
heap[stack_pointer++] = undefined;
|
|
14821
|
+
heap[stack_pointer++] = undefined;
|
|
14753
14822
|
}
|
|
14754
14823
|
}
|
|
14755
14824
|
/**
|
|
@@ -14861,16 +14930,16 @@ export class StateTransitionWASM {
|
|
|
14861
14930
|
wasm.statetransitionwasm_set_signature_public_key_id(this.__wbg_ptr, key_id);
|
|
14862
14931
|
}
|
|
14863
14932
|
/**
|
|
14864
|
-
* @param {
|
|
14933
|
+
* @param {any} js_private_key
|
|
14865
14934
|
* @param {IdentityPublicKeyWASM} public_key
|
|
14935
|
+
* @param {any} js_network
|
|
14866
14936
|
* @returns {Uint8Array}
|
|
14867
14937
|
*/
|
|
14868
|
-
sign(
|
|
14938
|
+
sign(js_private_key, public_key, js_network) {
|
|
14869
14939
|
try {
|
|
14870
14940
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
14871
|
-
_assertClass(private_key, PrivateKeyWASM);
|
|
14872
14941
|
_assertClass(public_key, IdentityPublicKeyWASM);
|
|
14873
|
-
wasm.statetransitionwasm_sign(retptr, this.__wbg_ptr,
|
|
14942
|
+
wasm.statetransitionwasm_sign(retptr, this.__wbg_ptr, addBorrowedObject(js_private_key), public_key.__wbg_ptr, addBorrowedObject(js_network));
|
|
14874
14943
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
14875
14944
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
14876
14945
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -14883,6 +14952,8 @@ export class StateTransitionWASM {
|
|
|
14883
14952
|
return v1;
|
|
14884
14953
|
} finally {
|
|
14885
14954
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
14955
|
+
heap[stack_pointer++] = undefined;
|
|
14956
|
+
heap[stack_pointer++] = undefined;
|
|
14886
14957
|
}
|
|
14887
14958
|
}
|
|
14888
14959
|
/**
|