@dashevo/wasm-dpp2 3.0.0-dev.6 → 3.0.0-dev.7

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.
@@ -184,13 +184,6 @@ function debugString(val) {
184
184
  return className;
185
185
  }
186
186
 
187
- function passArray8ToWasm0(arg, malloc) {
188
- const ptr = malloc(arg.length * 1, 1) >>> 0;
189
- getUint8ArrayMemory0().set(arg, ptr / 1);
190
- WASM_VECTOR_LEN = arg.length;
191
- return ptr;
192
- }
193
-
194
187
  function takeFromExternrefTable0(idx) {
195
188
  const value = wasm.__wbindgen_export_2.get(idx);
196
189
  wasm.__externref_table_dealloc(idx);
@@ -203,6 +196,13 @@ function _assertClass(instance, klass) {
203
196
  }
204
197
  }
205
198
 
199
+ function passArray8ToWasm0(arg, malloc) {
200
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
201
+ getUint8ArrayMemory0().set(arg, ptr / 1);
202
+ WASM_VECTOR_LEN = arg.length;
203
+ return ptr;
204
+ }
205
+
206
206
  function getArrayJsValueFromWasm0(ptr, len) {
207
207
  ptr = ptr >>> 0;
208
208
  const mem = getDataViewMemory0();
@@ -6420,6 +6420,88 @@ export class ExtendedEpochInfo {
6420
6420
  }
6421
6421
  }
6422
6422
 
6423
+ const FeeStrategyStepFinalization = (typeof FinalizationRegistry === 'undefined')
6424
+ ? { register: () => {}, unregister: () => {} }
6425
+ : new FinalizationRegistry(ptr => wasm.__wbg_feestrategystep_free(ptr >>> 0, 1));
6426
+ /**
6427
+ * Defines how fees are paid in address-based state transitions.
6428
+ *
6429
+ * Fee strategy is a sequence of steps that determine which inputs or outputs
6430
+ * should be reduced to cover the transaction fee.
6431
+ */
6432
+ export class FeeStrategyStep {
6433
+
6434
+ static __wrap(ptr) {
6435
+ ptr = ptr >>> 0;
6436
+ const obj = Object.create(FeeStrategyStep.prototype);
6437
+ obj.__wbg_ptr = ptr;
6438
+ FeeStrategyStepFinalization.register(obj, obj.__wbg_ptr, obj);
6439
+ return obj;
6440
+ }
6441
+
6442
+ __destroy_into_raw() {
6443
+ const ptr = this.__wbg_ptr;
6444
+ this.__wbg_ptr = 0;
6445
+ FeeStrategyStepFinalization.unregister(this);
6446
+ return ptr;
6447
+ }
6448
+
6449
+ free() {
6450
+ const ptr = this.__destroy_into_raw();
6451
+ wasm.__wbg_feestrategystep_free(ptr, 0);
6452
+ }
6453
+ /**
6454
+ * Creates a step that reduces the output at the given index by the fee amount.
6455
+ *
6456
+ * The output amount will be reduced to cover the fee.
6457
+ *
6458
+ * @param index - The index of the output address to reduce
6459
+ * @param {number} index
6460
+ * @returns {FeeStrategyStep}
6461
+ */
6462
+ static reduceOutput(index) {
6463
+ const ret = wasm.feestrategystep_reduceOutput(index);
6464
+ return FeeStrategyStep.__wrap(ret);
6465
+ }
6466
+ /**
6467
+ * Returns true if this step reduces an output.
6468
+ * @returns {boolean}
6469
+ */
6470
+ get isReduceOutput() {
6471
+ const ret = wasm.feestrategystep_isReduceOutput(this.__wbg_ptr);
6472
+ return ret !== 0;
6473
+ }
6474
+ /**
6475
+ * Creates a step that deducts the fee from the input at the given index.
6476
+ *
6477
+ * The input must have remaining balance after its contribution to outputs.
6478
+ *
6479
+ * @param index - The index of the input address to deduct fee from
6480
+ * @param {number} index
6481
+ * @returns {FeeStrategyStep}
6482
+ */
6483
+ static deductFromInput(index) {
6484
+ const ret = wasm.feestrategystep_deductFromInput(index);
6485
+ return FeeStrategyStep.__wrap(ret);
6486
+ }
6487
+ /**
6488
+ * Returns true if this step deducts from an input.
6489
+ * @returns {boolean}
6490
+ */
6491
+ get isDeductFromInput() {
6492
+ const ret = wasm.feestrategystep_isDeductFromInput(this.__wbg_ptr);
6493
+ return ret !== 0;
6494
+ }
6495
+ /**
6496
+ * Returns the index associated with this step.
6497
+ * @returns {number}
6498
+ */
6499
+ get index() {
6500
+ const ret = wasm.feestrategystep_index(this.__wbg_ptr);
6501
+ return ret;
6502
+ }
6503
+ }
6504
+
6423
6505
  const FinalizedEpochInfoFinalization = (typeof FinalizationRegistry === 'undefined')
6424
6506
  ? { register: () => {}, unregister: () => {} }
6425
6507
  : new FinalizationRegistry(ptr => wasm.__wbg_finalizedepochinfo_free(ptr >>> 0, 1));
@@ -7324,6 +7406,23 @@ export class Identifier {
7324
7406
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
7325
7407
  }
7326
7408
  }
7409
+ /**
7410
+ * Returns the identifier as a Base58 string.
7411
+ * This is the default string representation for JavaScript.
7412
+ * @returns {string}
7413
+ */
7414
+ toString() {
7415
+ let deferred1_0;
7416
+ let deferred1_1;
7417
+ try {
7418
+ const ret = wasm.identifier_toString(this.__wbg_ptr);
7419
+ deferred1_0 = ret[0];
7420
+ deferred1_1 = ret[1];
7421
+ return getStringFromWasm0(ret[0], ret[1]);
7422
+ } finally {
7423
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
7424
+ }
7425
+ }
7327
7426
  /**
7328
7427
  * @param {Identifier | Uint8Array | string} identifier
7329
7428
  */
@@ -7558,11 +7657,11 @@ export class Identity {
7558
7657
  }
7559
7658
  /**
7560
7659
  * @param {number} key_id
7561
- * @returns {IdentityPublicKey}
7660
+ * @returns {IdentityPublicKey | undefined}
7562
7661
  */
7563
7662
  getPublicKeyById(key_id) {
7564
7663
  const ret = wasm.identity_getPublicKeyById(this.__wbg_ptr, key_id);
7565
- return IdentityPublicKey.__wrap(ret);
7664
+ return ret === 0 ? undefined : IdentityPublicKey.__wrap(ret);
7566
7665
  }
7567
7666
  /**
7568
7667
  * @param {Identifier | Uint8Array | string} js_identifier
@@ -9549,6 +9648,92 @@ export class IdentityPublicKeyInCreation {
9549
9648
  }
9550
9649
  }
9551
9650
 
9651
+ const IdentitySignerFinalization = (typeof FinalizationRegistry === 'undefined')
9652
+ ? { register: () => {}, unregister: () => {} }
9653
+ : new FinalizationRegistry(ptr => wasm.__wbg_identitysigner_free(ptr >>> 0, 1));
9654
+ /**
9655
+ * A signer for identity-based state transitions.
9656
+ *
9657
+ * This signer holds private keys mapped by their public key hash (for ECDSA_HASH160 keys)
9658
+ * and can sign state transitions that require identity keys.
9659
+ */
9660
+ export class IdentitySigner {
9661
+
9662
+ __destroy_into_raw() {
9663
+ const ptr = this.__wbg_ptr;
9664
+ this.__wbg_ptr = 0;
9665
+ IdentitySignerFinalization.unregister(this);
9666
+ return ptr;
9667
+ }
9668
+
9669
+ free() {
9670
+ const ptr = this.__destroy_into_raw();
9671
+ wasm.__wbg_identitysigner_free(ptr, 0);
9672
+ }
9673
+ /**
9674
+ * @returns {string}
9675
+ */
9676
+ static get __struct() {
9677
+ let deferred1_0;
9678
+ let deferred1_1;
9679
+ try {
9680
+ const ret = wasm.identitysigner_struct_name();
9681
+ deferred1_0 = ret[0];
9682
+ deferred1_1 = ret[1];
9683
+ return getStringFromWasm0(ret[0], ret[1]);
9684
+ } finally {
9685
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
9686
+ }
9687
+ }
9688
+ /**
9689
+ * Adds a private key from WIF format.
9690
+ *
9691
+ * @param wif - The private key in WIF format
9692
+ * @param {string} wif
9693
+ */
9694
+ addKeyFromWif(wif) {
9695
+ const ptr0 = passStringToWasm0(wif, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
9696
+ const len0 = WASM_VECTOR_LEN;
9697
+ const ret = wasm.identitysigner_addKeyFromWif(this.__wbg_ptr, ptr0, len0);
9698
+ if (ret[1]) {
9699
+ throw takeFromExternrefTable0(ret[0]);
9700
+ }
9701
+ }
9702
+ /**
9703
+ * Creates a new empty IdentitySigner.
9704
+ */
9705
+ constructor() {
9706
+ const ret = wasm.identitysigner_new();
9707
+ this.__wbg_ptr = ret >>> 0;
9708
+ IdentitySignerFinalization.register(this, this.__wbg_ptr, this);
9709
+ return this;
9710
+ }
9711
+ /**
9712
+ * Adds a private key to the signer.
9713
+ *
9714
+ * The public key hash is derived automatically from the private key using
9715
+ * Hash160(compressed_public_key) where Hash160 = RIPEMD160(SHA256(x)).
9716
+ *
9717
+ * @param privateKey - The PrivateKey object
9718
+ * @param {PrivateKey} private_key
9719
+ */
9720
+ addKey(private_key) {
9721
+ _assertClass(private_key, PrivateKey);
9722
+ const ret = wasm.identitysigner_addKey(this.__wbg_ptr, private_key.__wbg_ptr);
9723
+ if (ret[1]) {
9724
+ throw takeFromExternrefTable0(ret[0]);
9725
+ }
9726
+ }
9727
+ /**
9728
+ * Returns the number of keys in this signer.
9729
+ * @returns {number}
9730
+ */
9731
+ get keyCount() {
9732
+ const ret = wasm.identitysigner_key_count(this.__wbg_ptr);
9733
+ return ret >>> 0;
9734
+ }
9735
+ }
9736
+
9552
9737
  const IdentityTokenInfoFinalization = (typeof FinalizationRegistry === 'undefined')
9553
9738
  ? { register: () => {}, unregister: () => {} }
9554
9739
  : new FinalizationRegistry(ptr => wasm.__wbg_identitytokeninfo_free(ptr >>> 0, 1));
@@ -11387,6 +11572,229 @@ export class PlatformAddress {
11387
11572
  }
11388
11573
  }
11389
11574
 
11575
+ const PlatformAddressInputFinalization = (typeof FinalizationRegistry === 'undefined')
11576
+ ? { register: () => {}, unregister: () => {} }
11577
+ : new FinalizationRegistry(ptr => wasm.__wbg_platformaddressinput_free(ptr >>> 0, 1));
11578
+ /**
11579
+ * Represents an input address for address-based state transitions.
11580
+ *
11581
+ * An input specifies a Platform address that will spend credits,
11582
+ * along with its current nonce and the amount to spend.
11583
+ */
11584
+ export class PlatformAddressInput {
11585
+
11586
+ __destroy_into_raw() {
11587
+ const ptr = this.__wbg_ptr;
11588
+ this.__wbg_ptr = 0;
11589
+ PlatformAddressInputFinalization.unregister(this);
11590
+ return ptr;
11591
+ }
11592
+
11593
+ free() {
11594
+ const ptr = this.__destroy_into_raw();
11595
+ wasm.__wbg_platformaddressinput_free(ptr, 0);
11596
+ }
11597
+ /**
11598
+ * Creates a new PlatformAddressInput.
11599
+ *
11600
+ * @param address - The Platform address (PlatformAddress, Uint8Array, or bech32m string)
11601
+ * @param nonce - The current nonce of the address (will be incremented for the transaction)
11602
+ * @param amount - The amount of credits to spend from this address
11603
+ * @param {PlatformAddressLike} address
11604
+ * @param {number} nonce
11605
+ * @param {bigint} amount
11606
+ */
11607
+ constructor(address, nonce, amount) {
11608
+ const ret = wasm.platformaddressinput_new(address, nonce, amount);
11609
+ if (ret[2]) {
11610
+ throw takeFromExternrefTable0(ret[1]);
11611
+ }
11612
+ this.__wbg_ptr = ret[0] >>> 0;
11613
+ PlatformAddressInputFinalization.register(this, this.__wbg_ptr, this);
11614
+ return this;
11615
+ }
11616
+ /**
11617
+ * Returns the nonce.
11618
+ * @returns {number}
11619
+ */
11620
+ get nonce() {
11621
+ const ret = wasm.platformaddressinput_nonce(this.__wbg_ptr);
11622
+ return ret >>> 0;
11623
+ }
11624
+ /**
11625
+ * Returns the amount.
11626
+ * @returns {bigint}
11627
+ */
11628
+ get amount() {
11629
+ const ret = wasm.platformaddressinput_amount(this.__wbg_ptr);
11630
+ return ret;
11631
+ }
11632
+ /**
11633
+ * Returns the Platform address.
11634
+ * @returns {PlatformAddress}
11635
+ */
11636
+ get address() {
11637
+ const ret = wasm.platformaddressinput_address(this.__wbg_ptr);
11638
+ return PlatformAddress.__wrap(ret);
11639
+ }
11640
+ }
11641
+
11642
+ const PlatformAddressOutputFinalization = (typeof FinalizationRegistry === 'undefined')
11643
+ ? { register: () => {}, unregister: () => {} }
11644
+ : new FinalizationRegistry(ptr => wasm.__wbg_platformaddressoutput_free(ptr >>> 0, 1));
11645
+ /**
11646
+ * Represents an output address for address-based state transitions.
11647
+ *
11648
+ * An output specifies a Platform address that will receive credits,
11649
+ * along with an optional amount to receive. When amount is None,
11650
+ * the system distributes funds automatically (used for asset lock funding).
11651
+ */
11652
+ export class PlatformAddressOutput {
11653
+
11654
+ __destroy_into_raw() {
11655
+ const ptr = this.__wbg_ptr;
11656
+ this.__wbg_ptr = 0;
11657
+ PlatformAddressOutputFinalization.unregister(this);
11658
+ return ptr;
11659
+ }
11660
+
11661
+ free() {
11662
+ const ptr = this.__destroy_into_raw();
11663
+ wasm.__wbg_platformaddressoutput_free(ptr, 0);
11664
+ }
11665
+ /**
11666
+ * Creates a new PlatformAddressOutput with a specific amount.
11667
+ *
11668
+ * @param address - The Platform address (PlatformAddress, Uint8Array, or bech32m string)
11669
+ * @param amount - The amount of credits to send to this address (optional for asset lock funding)
11670
+ * @param {PlatformAddressLike} address
11671
+ * @param {bigint | null} [amount]
11672
+ */
11673
+ constructor(address, amount) {
11674
+ const ret = wasm.platformaddressoutput_new(address, isLikeNone(amount) ? 0 : addToExternrefTable0(amount));
11675
+ if (ret[2]) {
11676
+ throw takeFromExternrefTable0(ret[1]);
11677
+ }
11678
+ this.__wbg_ptr = ret[0] >>> 0;
11679
+ PlatformAddressOutputFinalization.register(this, this.__wbg_ptr, this);
11680
+ return this;
11681
+ }
11682
+ /**
11683
+ * Returns the amount, or undefined if not specified.
11684
+ * @returns {bigint | undefined}
11685
+ */
11686
+ get amount() {
11687
+ const ret = wasm.platformaddressoutput_amount(this.__wbg_ptr);
11688
+ return ret;
11689
+ }
11690
+ /**
11691
+ * Returns the Platform address.
11692
+ * @returns {PlatformAddress}
11693
+ */
11694
+ get address() {
11695
+ const ret = wasm.platformaddressoutput_address(this.__wbg_ptr);
11696
+ return PlatformAddress.__wrap(ret);
11697
+ }
11698
+ }
11699
+
11700
+ const PlatformAddressSignerFinalization = (typeof FinalizationRegistry === 'undefined')
11701
+ ? { register: () => {}, unregister: () => {} }
11702
+ : new FinalizationRegistry(ptr => wasm.__wbg_platformaddresssigner_free(ptr >>> 0, 1));
11703
+ /**
11704
+ * A signer for Platform address-based state transitions.
11705
+ *
11706
+ * This signer holds private keys for Platform addresses and can sign
11707
+ * state transitions that spend from those addresses.
11708
+ */
11709
+ export class PlatformAddressSigner {
11710
+
11711
+ __destroy_into_raw() {
11712
+ const ptr = this.__wbg_ptr;
11713
+ this.__wbg_ptr = 0;
11714
+ PlatformAddressSignerFinalization.unregister(this);
11715
+ return ptr;
11716
+ }
11717
+
11718
+ free() {
11719
+ const ptr = this.__destroy_into_raw();
11720
+ wasm.__wbg_platformaddresssigner_free(ptr, 0);
11721
+ }
11722
+ /**
11723
+ * @returns {string}
11724
+ */
11725
+ static get __struct() {
11726
+ let deferred1_0;
11727
+ let deferred1_1;
11728
+ try {
11729
+ const ret = wasm.platformaddresssigner_struct_name();
11730
+ deferred1_0 = ret[0];
11731
+ deferred1_1 = ret[1];
11732
+ return getStringFromWasm0(ret[0], ret[1]);
11733
+ } finally {
11734
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
11735
+ }
11736
+ }
11737
+ /**
11738
+ * Returns all private keys as an array of {addressHash: Uint8Array, privateKey: Uint8Array}.
11739
+ * This is used internally for cross-package access.
11740
+ * @returns {Array<any>}
11741
+ */
11742
+ getPrivateKeysBytes() {
11743
+ const ret = wasm.platformaddresssigner_getPrivateKeysBytes(this.__wbg_ptr);
11744
+ if (ret[2]) {
11745
+ throw takeFromExternrefTable0(ret[1]);
11746
+ }
11747
+ return takeFromExternrefTable0(ret[0]);
11748
+ }
11749
+ /**
11750
+ * Creates a new empty PlatformAddressSigner.
11751
+ */
11752
+ constructor() {
11753
+ const ret = wasm.identitysigner_new();
11754
+ this.__wbg_ptr = ret >>> 0;
11755
+ PlatformAddressSignerFinalization.register(this, this.__wbg_ptr, this);
11756
+ return this;
11757
+ }
11758
+ /**
11759
+ * Adds a private key and derives the Platform address from it.
11760
+ *
11761
+ * The address is derived as: P2PKH(Hash160(compressed_public_key))
11762
+ *
11763
+ * @param privateKey - The PrivateKey object
11764
+ * @returns The derived Platform address
11765
+ * @param {PrivateKey} private_key
11766
+ * @returns {PlatformAddress}
11767
+ */
11768
+ addKey(private_key) {
11769
+ _assertClass(private_key, PrivateKey);
11770
+ const ret = wasm.platformaddresssigner_addKey(this.__wbg_ptr, private_key.__wbg_ptr);
11771
+ if (ret[2]) {
11772
+ throw takeFromExternrefTable0(ret[1]);
11773
+ }
11774
+ return PlatformAddress.__wrap(ret[0]);
11775
+ }
11776
+ /**
11777
+ * Returns true if this signer has a key for the given address.
11778
+ * @param {PlatformAddressLike} address
11779
+ * @returns {boolean}
11780
+ */
11781
+ hasKey(address) {
11782
+ const ret = wasm.platformaddresssigner_hasKey(this.__wbg_ptr, address);
11783
+ if (ret[2]) {
11784
+ throw takeFromExternrefTable0(ret[1]);
11785
+ }
11786
+ return ret[0] !== 0;
11787
+ }
11788
+ /**
11789
+ * Returns the number of keys in this signer.
11790
+ * @returns {number}
11791
+ */
11792
+ get keyCount() {
11793
+ const ret = wasm.platformaddresssigner_key_count(this.__wbg_ptr);
11794
+ return ret >>> 0;
11795
+ }
11796
+ }
11797
+
11390
11798
  const PrefundedVotingBalanceFinalization = (typeof FinalizationRegistry === 'undefined')
11391
11799
  ? { register: () => {}, unregister: () => {} }
11392
11800
  : new FinalizationRegistry(ptr => wasm.__wbg_prefundedvotingbalance_free(ptr >>> 0, 1));
@@ -13735,6 +14143,102 @@ export class TokenConfigurationChangeItem {
13735
14143
  const ptr = this.__destroy_into_raw();
13736
14144
  wasm.__wbg_tokenconfigurationchangeitem_free(ptr, 0);
13737
14145
  }
14146
+ /**
14147
+ * @param {Identifier | Uint8Array | string} js_identity_id
14148
+ * @returns {TokenConfigurationChangeItem}
14149
+ */
14150
+ static NewTokensDestinationIdentityItem(js_identity_id) {
14151
+ const ret = wasm.tokenconfigurationchangeitem_NewTokensDestinationIdentityItem(js_identity_id);
14152
+ if (ret[2]) {
14153
+ throw takeFromExternrefTable0(ret[1]);
14154
+ }
14155
+ return TokenConfigurationChangeItem.__wrap(ret[0]);
14156
+ }
14157
+ /**
14158
+ * @param {AuthorizedActionTakers} action_taker
14159
+ * @returns {TokenConfigurationChangeItem}
14160
+ */
14161
+ static NewTokensDestinationIdentityAdminGroupItem(action_taker) {
14162
+ _assertClass(action_taker, AuthorizedActionTakers);
14163
+ const ret = wasm.tokenconfigurationchangeitem_NewTokensDestinationIdentityAdminGroupItem(action_taker.__wbg_ptr);
14164
+ return TokenConfigurationChangeItem.__wrap(ret);
14165
+ }
14166
+ /**
14167
+ * @param {AuthorizedActionTakers} action_taker
14168
+ * @returns {TokenConfigurationChangeItem}
14169
+ */
14170
+ static NewTokensDestinationIdentityControlGroupItem(action_taker) {
14171
+ _assertClass(action_taker, AuthorizedActionTakers);
14172
+ const ret = wasm.tokenconfigurationchangeitem_NewTokensDestinationIdentityControlGroupItem(action_taker.__wbg_ptr);
14173
+ return TokenConfigurationChangeItem.__wrap(ret);
14174
+ }
14175
+ /**
14176
+ * @returns {string}
14177
+ */
14178
+ static get __struct() {
14179
+ let deferred1_0;
14180
+ let deferred1_1;
14181
+ try {
14182
+ const ret = wasm.tokenconfigurationchangeitem_struct_name();
14183
+ deferred1_0 = ret[0];
14184
+ deferred1_1 = ret[1];
14185
+ return getStringFromWasm0(ret[0], ret[1]);
14186
+ } finally {
14187
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
14188
+ }
14189
+ }
14190
+ /**
14191
+ * @returns {string}
14192
+ */
14193
+ getItemName() {
14194
+ let deferred1_0;
14195
+ let deferred1_1;
14196
+ try {
14197
+ const ret = wasm.tokenconfigurationchangeitem_getItemName(this.__wbg_ptr);
14198
+ deferred1_0 = ret[0];
14199
+ deferred1_1 = ret[1];
14200
+ return getStringFromWasm0(ret[0], ret[1]);
14201
+ } finally {
14202
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
14203
+ }
14204
+ }
14205
+ /**
14206
+ * @returns {any}
14207
+ */
14208
+ getItem() {
14209
+ const ret = wasm.tokenconfigurationchangeitem_getItem(this.__wbg_ptr);
14210
+ return ret;
14211
+ }
14212
+ /**
14213
+ * @returns {string}
14214
+ */
14215
+ get __type() {
14216
+ let deferred1_0;
14217
+ let deferred1_1;
14218
+ try {
14219
+ const ret = wasm.tokenconfigurationchangeitem_type_name(this.__wbg_ptr);
14220
+ deferred1_0 = ret[0];
14221
+ deferred1_1 = ret[1];
14222
+ return getStringFromWasm0(ret[0], ret[1]);
14223
+ } finally {
14224
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
14225
+ }
14226
+ }
14227
+ /**
14228
+ * @param {number | null} [group_contract_position]
14229
+ * @returns {TokenConfigurationChangeItem}
14230
+ */
14231
+ static MainControlGroupItem(group_contract_position) {
14232
+ const ret = wasm.tokenconfigurationchangeitem_MainControlGroupItem(isLikeNone(group_contract_position) ? 0xFFFFFF : group_contract_position);
14233
+ return TokenConfigurationChangeItem.__wrap(ret);
14234
+ }
14235
+ /**
14236
+ * @returns {TokenConfigurationChangeItem}
14237
+ */
14238
+ static noChangeItem() {
14239
+ const ret = wasm.tokenconfigurationchangeitem_noChangeItem();
14240
+ return TokenConfigurationChangeItem.__wrap(ret);
14241
+ }
13738
14242
  /**
13739
14243
  * @param {bigint | null} [supply]
13740
14244
  * @returns {TokenConfigurationChangeItem}
@@ -13913,35 +14417,6 @@ export class TokenConfigurationChangeItem {
13913
14417
  const ret = wasm.tokenconfigurationchangeitem_PerpetualDistributionControlGroupItem(action_taker.__wbg_ptr);
13914
14418
  return TokenConfigurationChangeItem.__wrap(ret);
13915
14419
  }
13916
- /**
13917
- * @param {Identifier | Uint8Array | string} js_identity_id
13918
- * @returns {TokenConfigurationChangeItem}
13919
- */
13920
- static NewTokensDestinationIdentityItem(js_identity_id) {
13921
- const ret = wasm.tokenconfigurationchangeitem_NewTokensDestinationIdentityItem(js_identity_id);
13922
- if (ret[2]) {
13923
- throw takeFromExternrefTable0(ret[1]);
13924
- }
13925
- return TokenConfigurationChangeItem.__wrap(ret[0]);
13926
- }
13927
- /**
13928
- * @param {AuthorizedActionTakers} action_taker
13929
- * @returns {TokenConfigurationChangeItem}
13930
- */
13931
- static NewTokensDestinationIdentityAdminGroupItem(action_taker) {
13932
- _assertClass(action_taker, AuthorizedActionTakers);
13933
- const ret = wasm.tokenconfigurationchangeitem_NewTokensDestinationIdentityAdminGroupItem(action_taker.__wbg_ptr);
13934
- return TokenConfigurationChangeItem.__wrap(ret);
13935
- }
13936
- /**
13937
- * @param {AuthorizedActionTakers} action_taker
13938
- * @returns {TokenConfigurationChangeItem}
13939
- */
13940
- static NewTokensDestinationIdentityControlGroupItem(action_taker) {
13941
- _assertClass(action_taker, AuthorizedActionTakers);
13942
- const ret = wasm.tokenconfigurationchangeitem_NewTokensDestinationIdentityControlGroupItem(action_taker.__wbg_ptr);
13943
- return TokenConfigurationChangeItem.__wrap(ret);
13944
- }
13945
14420
  /**
13946
14421
  * @param {boolean} flag
13947
14422
  * @returns {TokenConfigurationChangeItem}
@@ -14004,73 +14479,6 @@ export class TokenConfigurationChangeItem {
14004
14479
  const ret = wasm.tokenconfigurationchangeitem_UnfreezeAdminGroupItem(action_taker.__wbg_ptr);
14005
14480
  return TokenConfigurationChangeItem.__wrap(ret);
14006
14481
  }
14007
- /**
14008
- * @param {number | null} [group_contract_position]
14009
- * @returns {TokenConfigurationChangeItem}
14010
- */
14011
- static MainControlGroupItem(group_contract_position) {
14012
- const ret = wasm.tokenconfigurationchangeitem_MainControlGroupItem(isLikeNone(group_contract_position) ? 0xFFFFFF : group_contract_position);
14013
- return TokenConfigurationChangeItem.__wrap(ret);
14014
- }
14015
- /**
14016
- * @returns {string}
14017
- */
14018
- static get __struct() {
14019
- let deferred1_0;
14020
- let deferred1_1;
14021
- try {
14022
- const ret = wasm.tokenconfigurationchangeitem_struct_name();
14023
- deferred1_0 = ret[0];
14024
- deferred1_1 = ret[1];
14025
- return getStringFromWasm0(ret[0], ret[1]);
14026
- } finally {
14027
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
14028
- }
14029
- }
14030
- /**
14031
- * @returns {string}
14032
- */
14033
- getItemName() {
14034
- let deferred1_0;
14035
- let deferred1_1;
14036
- try {
14037
- const ret = wasm.tokenconfigurationchangeitem_getItemName(this.__wbg_ptr);
14038
- deferred1_0 = ret[0];
14039
- deferred1_1 = ret[1];
14040
- return getStringFromWasm0(ret[0], ret[1]);
14041
- } finally {
14042
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
14043
- }
14044
- }
14045
- /**
14046
- * @returns {any}
14047
- */
14048
- getItem() {
14049
- const ret = wasm.tokenconfigurationchangeitem_getItem(this.__wbg_ptr);
14050
- return ret;
14051
- }
14052
- /**
14053
- * @returns {string}
14054
- */
14055
- get __type() {
14056
- let deferred1_0;
14057
- let deferred1_1;
14058
- try {
14059
- const ret = wasm.tokenconfigurationchangeitem_type_name(this.__wbg_ptr);
14060
- deferred1_0 = ret[0];
14061
- deferred1_1 = ret[1];
14062
- return getStringFromWasm0(ret[0], ret[1]);
14063
- } finally {
14064
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
14065
- }
14066
- }
14067
- /**
14068
- * @returns {TokenConfigurationChangeItem}
14069
- */
14070
- static noChangeItem() {
14071
- const ret = wasm.tokenconfigurationchangeitem_noChangeItem();
14072
- return TokenConfigurationChangeItem.__wrap(ret);
14073
- }
14074
14482
  }
14075
14483
 
14076
14484
  const TokenConfigurationConventionFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -16886,7 +17294,7 @@ export class Vote {
16886
17294
  constructor(vote_poll, resource_vote_choice) {
16887
17295
  _assertClass(vote_poll, VotePoll);
16888
17296
  _assertClass(resource_vote_choice, ResourceVoteChoice);
16889
- const ret = wasm.vote_new(vote_poll.__wbg_ptr, resource_vote_choice.__wbg_ptr);
17297
+ const ret = wasm.resourcevote_new(vote_poll.__wbg_ptr, resource_vote_choice.__wbg_ptr);
16890
17298
  this.__wbg_ptr = ret >>> 0;
16891
17299
  VoteFinalization.register(this, this.__wbg_ptr, this);
16892
17300
  return this;
Binary file