pshenmic-dpp 1.0.22 → 1.0.23-rc.2
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.
|
@@ -19,6 +19,11 @@ export enum BatchType {
|
|
|
19
19
|
UpdatePrice = 5,
|
|
20
20
|
IgnoreWhileBumpingRevision = 6,
|
|
21
21
|
}
|
|
22
|
+
export enum GasFeesPaidByWASM {
|
|
23
|
+
DocumentOwner = 0,
|
|
24
|
+
ContractOwner = 1,
|
|
25
|
+
PreferContractOwner = 2,
|
|
26
|
+
}
|
|
22
27
|
export enum KeyType {
|
|
23
28
|
ECDSA_SECP256K1 = 0,
|
|
24
29
|
BLS12_381 = 1,
|
|
@@ -813,9 +818,10 @@ export class DocumentBaseTransitionWASM {
|
|
|
813
818
|
* @param {bigint} identity_contract_nonce
|
|
814
819
|
* @param {string} document_type_name
|
|
815
820
|
* @param {any} js_data_contract_id
|
|
821
|
+
* @param {any} js_token_payment_info
|
|
816
822
|
* @returns {DocumentBaseTransitionWASM}
|
|
817
823
|
*/
|
|
818
|
-
constructor(js_document_id: any, identity_contract_nonce: bigint, document_type_name: string, js_data_contract_id: any);
|
|
824
|
+
constructor(js_document_id: any, identity_contract_nonce: bigint, document_type_name: string, js_data_contract_id: any, js_token_payment_info: any);
|
|
819
825
|
readonly __type: string;
|
|
820
826
|
static readonly __struct: string;
|
|
821
827
|
get id(): IdentifierWASM;
|
|
@@ -824,6 +830,8 @@ export class DocumentBaseTransitionWASM {
|
|
|
824
830
|
get dataContractId(): IdentifierWASM;
|
|
825
831
|
set dataContractId(value: any);
|
|
826
832
|
documentTypeName: string;
|
|
833
|
+
get tokenPaymentInfo(): TokenPaymentInfoWASM | undefined;
|
|
834
|
+
set tokenPaymentInfo(value: TokenPaymentInfoWASM);
|
|
827
835
|
}
|
|
828
836
|
export class DocumentCreateTransitionWASM {
|
|
829
837
|
/** @ignore */
|
|
@@ -831,9 +839,10 @@ export class DocumentCreateTransitionWASM {
|
|
|
831
839
|
/**
|
|
832
840
|
* @param {DocumentWASM} document
|
|
833
841
|
* @param {bigint} identity_contract_nonce
|
|
842
|
+
* @param {any} js_prefunded_voting_balance
|
|
834
843
|
* @returns {DocumentCreateTransitionWASM}
|
|
835
844
|
*/
|
|
836
|
-
constructor(document: DocumentWASM, identity_contract_nonce: bigint);
|
|
845
|
+
constructor(document: DocumentWASM, identity_contract_nonce: bigint, js_prefunded_voting_balance: any);
|
|
837
846
|
/** */
|
|
838
847
|
clearPrefundedVotingBalance(): void;
|
|
839
848
|
/** @returns {DocumentTransitionWASM} */
|
|
@@ -1908,7 +1917,7 @@ export class StateTransitionWASM {
|
|
|
1908
1917
|
* @param {any} js_key_type
|
|
1909
1918
|
* @returns {Uint8Array<ArrayBufferLike>}
|
|
1910
1919
|
*/
|
|
1911
|
-
signByPrivateKey(private_key: PrivateKeyWASM, key_id: number, js_key_type: any): Uint8Array;
|
|
1920
|
+
signByPrivateKey(private_key: PrivateKeyWASM, key_id: number | null | undefined, js_key_type: any): Uint8Array;
|
|
1912
1921
|
/**
|
|
1913
1922
|
* @param {IdentityPublicKeyWASM} public_key
|
|
1914
1923
|
* @param {boolean} js_allow_signing_with_any_security_level
|
|
@@ -2495,6 +2504,30 @@ export class TokenMintTransitionWASM {
|
|
|
2495
2504
|
get publicNote(): string | undefined;
|
|
2496
2505
|
set publicNote(value: string | null | undefined);
|
|
2497
2506
|
}
|
|
2507
|
+
export class TokenPaymentInfoWASM {
|
|
2508
|
+
/** @ignore */
|
|
2509
|
+
free(): void;
|
|
2510
|
+
/**
|
|
2511
|
+
* @param {any} js_payment_token_contract_id
|
|
2512
|
+
* @param {number} token_contract_position
|
|
2513
|
+
* @param {bigint} minimum_token_cost
|
|
2514
|
+
* @param {bigint} maximum_token_cost
|
|
2515
|
+
* @param {any} js_gas_fees_paid_by
|
|
2516
|
+
* @returns {TokenPaymentInfoWASM}
|
|
2517
|
+
*/
|
|
2518
|
+
constructor(js_payment_token_contract_id: any, token_contract_position: number, minimum_token_cost: bigint | null | undefined, maximum_token_cost: bigint | null | undefined, js_gas_fees_paid_by: any);
|
|
2519
|
+
readonly __type: string;
|
|
2520
|
+
static readonly __struct: string;
|
|
2521
|
+
get paymentTokenContractId(): IdentifierWASM | undefined;
|
|
2522
|
+
set paymentTokenContractId(value: any);
|
|
2523
|
+
tokenContractPosition: number;
|
|
2524
|
+
get minimumTokenCost(): bigint | undefined;
|
|
2525
|
+
set minimumTokenCost(value: bigint | null | undefined);
|
|
2526
|
+
get maximumTokenCost(): bigint | undefined;
|
|
2527
|
+
set maximumTokenCost(value: bigint | null | undefined);
|
|
2528
|
+
get gasFeesPaidBy(): string;
|
|
2529
|
+
set gasFeesPaidBy(value: any);
|
|
2530
|
+
}
|
|
2498
2531
|
export class TokenPerpetualDistributionWASM {
|
|
2499
2532
|
/** @ignore */
|
|
2500
2533
|
free(): void;
|
|
@@ -3073,15 +3106,17 @@ export interface InitOutput {
|
|
|
3073
3106
|
readonly __wbg_documentbasetransitionwasm_free: (a: number, b: number) => void;
|
|
3074
3107
|
readonly documentbasetransitionwasm_type_name: (a: number, b: number) => void;
|
|
3075
3108
|
readonly documentbasetransitionwasm_struct_name: (a: number) => void;
|
|
3076
|
-
readonly documentbasetransitionwasm_new: (a: number, b: number, c: bigint, d: number, e: number, f: number) => void;
|
|
3109
|
+
readonly documentbasetransitionwasm_new: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
|
|
3077
3110
|
readonly documentbasetransitionwasm_get_id: (a: number) => number;
|
|
3078
3111
|
readonly documentbasetransitionwasm_get_identity_contract_nonce: (a: number) => bigint;
|
|
3079
3112
|
readonly documentbasetransitionwasm_get_data_contract_id: (a: number) => number;
|
|
3080
3113
|
readonly documentbasetransitionwasm_get_document_type_name: (a: number, b: number) => void;
|
|
3114
|
+
readonly documentbasetransitionwasm_get_token_payment_info: (a: number) => number;
|
|
3081
3115
|
readonly documentbasetransitionwasm_set_id: (a: number, b: number, c: number) => void;
|
|
3082
3116
|
readonly documentbasetransitionwasm_set_identity_contract_nonce: (a: number, b: bigint) => void;
|
|
3083
3117
|
readonly documentbasetransitionwasm_set_data_contract_id: (a: number, b: number, c: number) => void;
|
|
3084
3118
|
readonly documentbasetransitionwasm_set_document_type_name: (a: number, b: number, c: number) => void;
|
|
3119
|
+
readonly documentbasetransitionwasm_set_token_payment_info: (a: number, b: number) => void;
|
|
3085
3120
|
readonly __wbg_documenttransitionwasm_free: (a: number, b: number) => void;
|
|
3086
3121
|
readonly documenttransitionwasm_type_name: (a: number, b: number) => void;
|
|
3087
3122
|
readonly documenttransitionwasm_struct_name: (a: number) => void;
|
|
@@ -3105,7 +3140,7 @@ export interface InitOutput {
|
|
|
3105
3140
|
readonly __wbg_documentcreatetransitionwasm_free: (a: number, b: number) => void;
|
|
3106
3141
|
readonly documentcreatetransitionwasm_type_name: (a: number, b: number) => void;
|
|
3107
3142
|
readonly documentcreatetransitionwasm_struct_name: (a: number) => void;
|
|
3108
|
-
readonly documentcreatetransitionwasm_new: (a: number, b: number, c: bigint) => void;
|
|
3143
|
+
readonly documentcreatetransitionwasm_new: (a: number, b: number, c: bigint, d: number) => void;
|
|
3109
3144
|
readonly documentcreatetransitionwasm_get_data: (a: number, b: number) => void;
|
|
3110
3145
|
readonly documentcreatetransitionwasm_get_base: (a: number) => number;
|
|
3111
3146
|
readonly documentcreatetransitionwasm_get_entropy: (a: number, b: number) => void;
|
|
@@ -3184,6 +3219,19 @@ export interface InitOutput {
|
|
|
3184
3219
|
readonly tokenbasetransitionwasm_set_data_contract_id: (a: number, b: number, c: number) => void;
|
|
3185
3220
|
readonly tokenbasetransitionwasm_set_token_id: (a: number, b: number, c: number) => void;
|
|
3186
3221
|
readonly tokenbasetransitionwasm_set_using_group_info: (a: number, b: number, c: number) => void;
|
|
3222
|
+
readonly __wbg_tokenpaymentinfowasm_free: (a: number, b: number) => void;
|
|
3223
|
+
readonly tokenpaymentinfowasm_type_name: (a: number, b: number) => void;
|
|
3224
|
+
readonly tokenpaymentinfowasm_struct_name: (a: number) => void;
|
|
3225
|
+
readonly tokenpaymentinfowasm_new: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: bigint, h: number) => void;
|
|
3226
|
+
readonly tokenpaymentinfowasm_payment_token_contract_id: (a: number) => number;
|
|
3227
|
+
readonly tokenpaymentinfowasm_token_contract_position: (a: number) => number;
|
|
3228
|
+
readonly tokenpaymentinfowasm_minimum_token_cost: (a: number, b: number) => void;
|
|
3229
|
+
readonly tokenpaymentinfowasm_maximum_token_cost: (a: number, b: number) => void;
|
|
3230
|
+
readonly tokenpaymentinfowasm_gas_fees_paid_by: (a: number, b: number) => void;
|
|
3231
|
+
readonly tokenpaymentinfowasm_set_payment_token_contract_id: (a: number, b: number, c: number) => void;
|
|
3232
|
+
readonly tokenpaymentinfowasm_set_token_contract_position: (a: number, b: number) => void;
|
|
3233
|
+
readonly tokenpaymentinfowasm_set_maximum_token_cost: (a: number, b: number, c: bigint) => void;
|
|
3234
|
+
readonly tokenpaymentinfowasm_set_gas_fees_paid_by: (a: number, b: number, c: number) => void;
|
|
3187
3235
|
readonly __wbg_tokenpricingschedulewasm_free: (a: number, b: number) => void;
|
|
3188
3236
|
readonly tokenpricingschedulewasm_type_name: (a: number, b: number) => void;
|
|
3189
3237
|
readonly tokenpricingschedulewasm_struct_name: (a: number) => void;
|
|
@@ -3338,6 +3386,7 @@ export interface InitOutput {
|
|
|
3338
3386
|
readonly batchtransitionwasm_fromBytes: (a: number, b: number, c: number) => void;
|
|
3339
3387
|
readonly batchtransitionwasm_fromBase64: (a: number, b: number, c: number) => void;
|
|
3340
3388
|
readonly batchtransitionwasm_fromHex: (a: number, b: number, c: number) => void;
|
|
3389
|
+
readonly tokenpaymentinfowasm_set_minimum_token_cost: (a: number, b: number, c: bigint) => void;
|
|
3341
3390
|
readonly tokenfreezetransitionwasm_new: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
3342
3391
|
readonly tokenunfreezetransitionwasm_new: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
3343
3392
|
readonly __wbg_tokenunfreezetransitionwasm_free: (a: number, b: number) => void;
|
|
@@ -304,6 +304,14 @@ export const BatchType = Object.freeze({
|
|
|
304
304
|
UpdatePrice: 5, "5": "UpdatePrice",
|
|
305
305
|
IgnoreWhileBumpingRevision: 6, "6": "IgnoreWhileBumpingRevision",
|
|
306
306
|
});
|
|
307
|
+
/**
|
|
308
|
+
* @enum {0 | 1 | 2}
|
|
309
|
+
*/
|
|
310
|
+
export const GasFeesPaidByWASM = Object.freeze({
|
|
311
|
+
DocumentOwner: 0, "0": "DocumentOwner",
|
|
312
|
+
ContractOwner: 1, "1": "ContractOwner",
|
|
313
|
+
PreferContractOwner: 2, "2": "PreferContractOwner",
|
|
314
|
+
});
|
|
307
315
|
/**
|
|
308
316
|
* @enum {0 | 1 | 2 | 3 | 4}
|
|
309
317
|
*/
|
|
@@ -4819,13 +4827,14 @@ export class DocumentBaseTransitionWASM {
|
|
|
4819
4827
|
* @param {bigint} identity_contract_nonce
|
|
4820
4828
|
* @param {string} document_type_name
|
|
4821
4829
|
* @param {any} js_data_contract_id
|
|
4830
|
+
* @param {any} js_token_payment_info
|
|
4822
4831
|
*/
|
|
4823
|
-
constructor(js_document_id, identity_contract_nonce, document_type_name, js_data_contract_id) {
|
|
4832
|
+
constructor(js_document_id, identity_contract_nonce, document_type_name, js_data_contract_id, js_token_payment_info) {
|
|
4824
4833
|
try {
|
|
4825
4834
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4826
4835
|
const ptr0 = passStringToWasm0(document_type_name, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
4827
4836
|
const len0 = WASM_VECTOR_LEN;
|
|
4828
|
-
wasm.documentbasetransitionwasm_new(retptr, addBorrowedObject(js_document_id), identity_contract_nonce, ptr0, len0, addBorrowedObject(js_data_contract_id));
|
|
4837
|
+
wasm.documentbasetransitionwasm_new(retptr, addBorrowedObject(js_document_id), identity_contract_nonce, ptr0, len0, addBorrowedObject(js_data_contract_id), addBorrowedObject(js_token_payment_info));
|
|
4829
4838
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4830
4839
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4831
4840
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -4839,6 +4848,7 @@ export class DocumentBaseTransitionWASM {
|
|
|
4839
4848
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4840
4849
|
heap[stack_pointer++] = undefined;
|
|
4841
4850
|
heap[stack_pointer++] = undefined;
|
|
4851
|
+
heap[stack_pointer++] = undefined;
|
|
4842
4852
|
}
|
|
4843
4853
|
}
|
|
4844
4854
|
/**
|
|
@@ -4881,6 +4891,13 @@ export class DocumentBaseTransitionWASM {
|
|
|
4881
4891
|
wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
|
|
4882
4892
|
}
|
|
4883
4893
|
}
|
|
4894
|
+
/**
|
|
4895
|
+
* @returns {TokenPaymentInfoWASM | undefined}
|
|
4896
|
+
*/
|
|
4897
|
+
get tokenPaymentInfo() {
|
|
4898
|
+
const ret = wasm.documentbasetransitionwasm_get_token_payment_info(this.__wbg_ptr);
|
|
4899
|
+
return ret === 0 ? undefined : TokenPaymentInfoWASM.__wrap(ret);
|
|
4900
|
+
}
|
|
4884
4901
|
/**
|
|
4885
4902
|
* @param {any} js_id
|
|
4886
4903
|
*/
|
|
@@ -4929,6 +4946,13 @@ export class DocumentBaseTransitionWASM {
|
|
|
4929
4946
|
const len0 = WASM_VECTOR_LEN;
|
|
4930
4947
|
wasm.documentbasetransitionwasm_set_document_type_name(this.__wbg_ptr, ptr0, len0);
|
|
4931
4948
|
}
|
|
4949
|
+
/**
|
|
4950
|
+
* @param {TokenPaymentInfoWASM} token_payment_info
|
|
4951
|
+
*/
|
|
4952
|
+
set tokenPaymentInfo(token_payment_info) {
|
|
4953
|
+
_assertClass(token_payment_info, TokenPaymentInfoWASM);
|
|
4954
|
+
wasm.documentbasetransitionwasm_set_token_payment_info(this.__wbg_ptr, token_payment_info.__wbg_ptr);
|
|
4955
|
+
}
|
|
4932
4956
|
}
|
|
4933
4957
|
|
|
4934
4958
|
const DocumentCreateTransitionWASMFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -4999,12 +5023,13 @@ export class DocumentCreateTransitionWASM {
|
|
|
4999
5023
|
/**
|
|
5000
5024
|
* @param {DocumentWASM} document
|
|
5001
5025
|
* @param {bigint} identity_contract_nonce
|
|
5026
|
+
* @param {any} js_prefunded_voting_balance
|
|
5002
5027
|
*/
|
|
5003
|
-
constructor(document, identity_contract_nonce) {
|
|
5028
|
+
constructor(document, identity_contract_nonce, js_prefunded_voting_balance) {
|
|
5004
5029
|
try {
|
|
5005
5030
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
5006
5031
|
_assertClass(document, DocumentWASM);
|
|
5007
|
-
wasm.documentcreatetransitionwasm_new(retptr, document.__wbg_ptr, identity_contract_nonce);
|
|
5032
|
+
wasm.documentcreatetransitionwasm_new(retptr, document.__wbg_ptr, identity_contract_nonce, addBorrowedObject(js_prefunded_voting_balance));
|
|
5008
5033
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
5009
5034
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
5010
5035
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -5016,6 +5041,7 @@ export class DocumentCreateTransitionWASM {
|
|
|
5016
5041
|
return this;
|
|
5017
5042
|
} finally {
|
|
5018
5043
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5044
|
+
heap[stack_pointer++] = undefined;
|
|
5019
5045
|
}
|
|
5020
5046
|
}
|
|
5021
5047
|
/**
|
|
@@ -12916,7 +12942,7 @@ export class StateTransitionWASM {
|
|
|
12916
12942
|
}
|
|
12917
12943
|
/**
|
|
12918
12944
|
* @param {PrivateKeyWASM} private_key
|
|
12919
|
-
* @param {number} key_id
|
|
12945
|
+
* @param {number | null | undefined} key_id
|
|
12920
12946
|
* @param {any} js_key_type
|
|
12921
12947
|
* @returns {Uint8Array}
|
|
12922
12948
|
*/
|
|
@@ -12924,7 +12950,7 @@ export class StateTransitionWASM {
|
|
|
12924
12950
|
try {
|
|
12925
12951
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
12926
12952
|
_assertClass(private_key, PrivateKeyWASM);
|
|
12927
|
-
wasm.statetransitionwasm_signByPrivateKey(retptr, this.__wbg_ptr, private_key.__wbg_ptr, key_id, addHeapObject(js_key_type));
|
|
12953
|
+
wasm.statetransitionwasm_signByPrivateKey(retptr, this.__wbg_ptr, private_key.__wbg_ptr, isLikeNone(key_id) ? 0x100000001 : (key_id) >>> 0, addHeapObject(js_key_type));
|
|
12928
12954
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
12929
12955
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
12930
12956
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -16578,6 +16604,212 @@ export class TokenMintTransitionWASM {
|
|
|
16578
16604
|
}
|
|
16579
16605
|
}
|
|
16580
16606
|
|
|
16607
|
+
const TokenPaymentInfoWASMFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
16608
|
+
? { register: () => {}, unregister: () => {} }
|
|
16609
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_tokenpaymentinfowasm_free(ptr >>> 0, 1));
|
|
16610
|
+
|
|
16611
|
+
export class TokenPaymentInfoWASM {
|
|
16612
|
+
|
|
16613
|
+
static __wrap(ptr) {
|
|
16614
|
+
ptr = ptr >>> 0;
|
|
16615
|
+
const obj = Object.create(TokenPaymentInfoWASM.prototype);
|
|
16616
|
+
obj.__wbg_ptr = ptr;
|
|
16617
|
+
TokenPaymentInfoWASMFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
16618
|
+
return obj;
|
|
16619
|
+
}
|
|
16620
|
+
|
|
16621
|
+
__destroy_into_raw() {
|
|
16622
|
+
const ptr = this.__wbg_ptr;
|
|
16623
|
+
this.__wbg_ptr = 0;
|
|
16624
|
+
TokenPaymentInfoWASMFinalization.unregister(this);
|
|
16625
|
+
return ptr;
|
|
16626
|
+
}
|
|
16627
|
+
|
|
16628
|
+
/** @ignore */
|
|
16629
|
+
/** */
|
|
16630
|
+
free() {
|
|
16631
|
+
const ptr = this.__destroy_into_raw();
|
|
16632
|
+
wasm.__wbg_tokenpaymentinfowasm_free(ptr, 0);
|
|
16633
|
+
}
|
|
16634
|
+
/**
|
|
16635
|
+
* @returns {string}
|
|
16636
|
+
*/
|
|
16637
|
+
get __type() {
|
|
16638
|
+
let deferred1_0;
|
|
16639
|
+
let deferred1_1;
|
|
16640
|
+
try {
|
|
16641
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
16642
|
+
wasm.tokenpaymentinfowasm_type_name(retptr, this.__wbg_ptr);
|
|
16643
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
16644
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
16645
|
+
deferred1_0 = r0;
|
|
16646
|
+
deferred1_1 = r1;
|
|
16647
|
+
return getStringFromWasm0(r0, r1);
|
|
16648
|
+
} finally {
|
|
16649
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
16650
|
+
wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
|
|
16651
|
+
}
|
|
16652
|
+
}
|
|
16653
|
+
/**
|
|
16654
|
+
* @returns {string}
|
|
16655
|
+
*/
|
|
16656
|
+
static get __struct() {
|
|
16657
|
+
let deferred1_0;
|
|
16658
|
+
let deferred1_1;
|
|
16659
|
+
try {
|
|
16660
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
16661
|
+
wasm.tokenpaymentinfowasm_struct_name(retptr);
|
|
16662
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
16663
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
16664
|
+
deferred1_0 = r0;
|
|
16665
|
+
deferred1_1 = r1;
|
|
16666
|
+
return getStringFromWasm0(r0, r1);
|
|
16667
|
+
} finally {
|
|
16668
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
16669
|
+
wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
|
|
16670
|
+
}
|
|
16671
|
+
}
|
|
16672
|
+
/**
|
|
16673
|
+
* @param {any} js_payment_token_contract_id
|
|
16674
|
+
* @param {number} token_contract_position
|
|
16675
|
+
* @param {bigint | null | undefined} minimum_token_cost
|
|
16676
|
+
* @param {bigint | null | undefined} maximum_token_cost
|
|
16677
|
+
* @param {any} js_gas_fees_paid_by
|
|
16678
|
+
*/
|
|
16679
|
+
constructor(js_payment_token_contract_id, token_contract_position, minimum_token_cost, maximum_token_cost, js_gas_fees_paid_by) {
|
|
16680
|
+
try {
|
|
16681
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
16682
|
+
wasm.tokenpaymentinfowasm_new(retptr, addBorrowedObject(js_payment_token_contract_id), token_contract_position, !isLikeNone(minimum_token_cost), isLikeNone(minimum_token_cost) ? BigInt(0) : minimum_token_cost, !isLikeNone(maximum_token_cost), isLikeNone(maximum_token_cost) ? BigInt(0) : maximum_token_cost, addBorrowedObject(js_gas_fees_paid_by));
|
|
16683
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
16684
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
16685
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
16686
|
+
if (r2) {
|
|
16687
|
+
throw takeObject(r1);
|
|
16688
|
+
}
|
|
16689
|
+
this.__wbg_ptr = r0 >>> 0;
|
|
16690
|
+
TokenPaymentInfoWASMFinalization.register(this, this.__wbg_ptr, this);
|
|
16691
|
+
return this;
|
|
16692
|
+
} finally {
|
|
16693
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
16694
|
+
heap[stack_pointer++] = undefined;
|
|
16695
|
+
heap[stack_pointer++] = undefined;
|
|
16696
|
+
}
|
|
16697
|
+
}
|
|
16698
|
+
/**
|
|
16699
|
+
* @returns {IdentifierWASM | undefined}
|
|
16700
|
+
*/
|
|
16701
|
+
get paymentTokenContractId() {
|
|
16702
|
+
const ret = wasm.tokenpaymentinfowasm_payment_token_contract_id(this.__wbg_ptr);
|
|
16703
|
+
return ret === 0 ? undefined : IdentifierWASM.__wrap(ret);
|
|
16704
|
+
}
|
|
16705
|
+
/**
|
|
16706
|
+
* @returns {number}
|
|
16707
|
+
*/
|
|
16708
|
+
get tokenContractPosition() {
|
|
16709
|
+
const ret = wasm.tokenpaymentinfowasm_token_contract_position(this.__wbg_ptr);
|
|
16710
|
+
return ret;
|
|
16711
|
+
}
|
|
16712
|
+
/**
|
|
16713
|
+
* @returns {bigint | undefined}
|
|
16714
|
+
*/
|
|
16715
|
+
get minimumTokenCost() {
|
|
16716
|
+
try {
|
|
16717
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
16718
|
+
wasm.tokenpaymentinfowasm_minimum_token_cost(retptr, this.__wbg_ptr);
|
|
16719
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
16720
|
+
var r2 = getDataViewMemory0().getBigInt64(retptr + 8 * 1, true);
|
|
16721
|
+
return r0 === 0 ? undefined : BigInt.asUintN(64, r2);
|
|
16722
|
+
} finally {
|
|
16723
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
16724
|
+
}
|
|
16725
|
+
}
|
|
16726
|
+
/**
|
|
16727
|
+
* @returns {bigint | undefined}
|
|
16728
|
+
*/
|
|
16729
|
+
get maximumTokenCost() {
|
|
16730
|
+
try {
|
|
16731
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
16732
|
+
wasm.tokenpaymentinfowasm_maximum_token_cost(retptr, this.__wbg_ptr);
|
|
16733
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
16734
|
+
var r2 = getDataViewMemory0().getBigInt64(retptr + 8 * 1, true);
|
|
16735
|
+
return r0 === 0 ? undefined : BigInt.asUintN(64, r2);
|
|
16736
|
+
} finally {
|
|
16737
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
16738
|
+
}
|
|
16739
|
+
}
|
|
16740
|
+
/**
|
|
16741
|
+
* @returns {string}
|
|
16742
|
+
*/
|
|
16743
|
+
get gasFeesPaidBy() {
|
|
16744
|
+
let deferred1_0;
|
|
16745
|
+
let deferred1_1;
|
|
16746
|
+
try {
|
|
16747
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
16748
|
+
wasm.tokenpaymentinfowasm_gas_fees_paid_by(retptr, this.__wbg_ptr);
|
|
16749
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
16750
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
16751
|
+
deferred1_0 = r0;
|
|
16752
|
+
deferred1_1 = r1;
|
|
16753
|
+
return getStringFromWasm0(r0, r1);
|
|
16754
|
+
} finally {
|
|
16755
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
16756
|
+
wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
|
|
16757
|
+
}
|
|
16758
|
+
}
|
|
16759
|
+
/**
|
|
16760
|
+
* @param {any} js_payment_token_contract_id
|
|
16761
|
+
*/
|
|
16762
|
+
set paymentTokenContractId(js_payment_token_contract_id) {
|
|
16763
|
+
try {
|
|
16764
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
16765
|
+
wasm.tokenpaymentinfowasm_set_payment_token_contract_id(retptr, this.__wbg_ptr, addBorrowedObject(js_payment_token_contract_id));
|
|
16766
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
16767
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
16768
|
+
if (r1) {
|
|
16769
|
+
throw takeObject(r0);
|
|
16770
|
+
}
|
|
16771
|
+
} finally {
|
|
16772
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
16773
|
+
heap[stack_pointer++] = undefined;
|
|
16774
|
+
}
|
|
16775
|
+
}
|
|
16776
|
+
/**
|
|
16777
|
+
* @param {number} token_contract_position
|
|
16778
|
+
*/
|
|
16779
|
+
set tokenContractPosition(token_contract_position) {
|
|
16780
|
+
wasm.tokenpaymentinfowasm_set_token_contract_position(this.__wbg_ptr, token_contract_position);
|
|
16781
|
+
}
|
|
16782
|
+
/**
|
|
16783
|
+
* @param {bigint | null} [minimum_cost]
|
|
16784
|
+
*/
|
|
16785
|
+
set minimumTokenCost(minimum_cost) {
|
|
16786
|
+
wasm.tokenpaymentinfowasm_set_maximum_token_cost(this.__wbg_ptr, !isLikeNone(minimum_cost), isLikeNone(minimum_cost) ? BigInt(0) : minimum_cost);
|
|
16787
|
+
}
|
|
16788
|
+
/**
|
|
16789
|
+
* @param {bigint | null} [maximum_cost]
|
|
16790
|
+
*/
|
|
16791
|
+
set maximumTokenCost(maximum_cost) {
|
|
16792
|
+
wasm.tokenpaymentinfowasm_set_maximum_token_cost(this.__wbg_ptr, !isLikeNone(maximum_cost), isLikeNone(maximum_cost) ? BigInt(0) : maximum_cost);
|
|
16793
|
+
}
|
|
16794
|
+
/**
|
|
16795
|
+
* @param {any} js_gas_fees_paid_by
|
|
16796
|
+
*/
|
|
16797
|
+
set gasFeesPaidBy(js_gas_fees_paid_by) {
|
|
16798
|
+
try {
|
|
16799
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
16800
|
+
wasm.tokenpaymentinfowasm_set_gas_fees_paid_by(retptr, this.__wbg_ptr, addBorrowedObject(js_gas_fees_paid_by));
|
|
16801
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
16802
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
16803
|
+
if (r1) {
|
|
16804
|
+
throw takeObject(r0);
|
|
16805
|
+
}
|
|
16806
|
+
} finally {
|
|
16807
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
16808
|
+
heap[stack_pointer++] = undefined;
|
|
16809
|
+
}
|
|
16810
|
+
}
|
|
16811
|
+
}
|
|
16812
|
+
|
|
16581
16813
|
const TokenPerpetualDistributionWASMFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
16582
16814
|
? { register: () => {}, unregister: () => {} }
|
|
16583
16815
|
: new FinalizationRegistry(ptr => wasm.__wbg_tokenperpetualdistributionwasm_free(ptr >>> 0, 1));
|