@dashevo/wasm-dpp2 3.0.0-dev.9 → 3.0.0-rc.1

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.
@@ -7327,6 +7327,135 @@ export class GroupStateTransitionInfo {
7327
7327
  }
7328
7328
  }
7329
7329
 
7330
+ const GroupStateTransitionInfoStatusFinalization = (typeof FinalizationRegistry === 'undefined')
7331
+ ? { register: () => {}, unregister: () => {} }
7332
+ : new FinalizationRegistry(ptr => wasm.__wbg_groupstatetransitioninfostatus_free(ptr >>> 0, 1));
7333
+ /**
7334
+ * Wrapper for GroupStateTransitionInfoStatus enum.
7335
+ *
7336
+ * This represents the group action context for a state transition:
7337
+ * - Proposer: The identity proposing a new group action
7338
+ * - OtherSigner: The identity signing/voting on an existing group action
7339
+ */
7340
+ export class GroupStateTransitionInfoStatus {
7341
+
7342
+ static __wrap(ptr) {
7343
+ ptr = ptr >>> 0;
7344
+ const obj = Object.create(GroupStateTransitionInfoStatus.prototype);
7345
+ obj.__wbg_ptr = ptr;
7346
+ GroupStateTransitionInfoStatusFinalization.register(obj, obj.__wbg_ptr, obj);
7347
+ return obj;
7348
+ }
7349
+
7350
+ __destroy_into_raw() {
7351
+ const ptr = this.__wbg_ptr;
7352
+ this.__wbg_ptr = 0;
7353
+ GroupStateTransitionInfoStatusFinalization.unregister(this);
7354
+ return ptr;
7355
+ }
7356
+
7357
+ free() {
7358
+ const ptr = this.__destroy_into_raw();
7359
+ wasm.__wbg_groupstatetransitioninfostatus_free(ptr, 0);
7360
+ }
7361
+ /**
7362
+ * Check if this is a proposer status.
7363
+ * @returns {boolean}
7364
+ */
7365
+ get isProposer() {
7366
+ const ret = wasm.groupstatetransitioninfostatus_is_proposer(this.__wbg_ptr);
7367
+ return ret !== 0;
7368
+ }
7369
+ /**
7370
+ * @returns {string}
7371
+ */
7372
+ static get __struct() {
7373
+ let deferred1_0;
7374
+ let deferred1_1;
7375
+ try {
7376
+ const ret = wasm.groupstatetransitioninfostatus_struct_name();
7377
+ deferred1_0 = ret[0];
7378
+ deferred1_1 = ret[1];
7379
+ return getStringFromWasm0(ret[0], ret[1]);
7380
+ } finally {
7381
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
7382
+ }
7383
+ }
7384
+ /**
7385
+ * Create a new other signer status for voting on an existing group action.
7386
+ *
7387
+ * Use this when the identity is signing/voting on an action proposed by someone else.
7388
+ *
7389
+ * @param groupContractPosition - The position of the group in the contract
7390
+ * @param actionId - The ID of the action being voted on
7391
+ * @returns GroupStateTransitionInfoStatus for an other signer
7392
+ * @param {number} group_contract_position
7393
+ * @param {Identifier | Uint8Array | string} action_id
7394
+ * @returns {GroupStateTransitionInfoStatus}
7395
+ */
7396
+ static otherSigner(group_contract_position, action_id) {
7397
+ const ret = wasm.groupstatetransitioninfostatus_otherSigner(group_contract_position, action_id);
7398
+ if (ret[2]) {
7399
+ throw takeFromExternrefTable0(ret[1]);
7400
+ }
7401
+ return GroupStateTransitionInfoStatus.__wrap(ret[0]);
7402
+ }
7403
+ /**
7404
+ * Get the group contract position.
7405
+ * @returns {number}
7406
+ */
7407
+ get groupContractPosition() {
7408
+ const ret = wasm.groupstatetransitioninfostatus_group_contract_position(this.__wbg_ptr);
7409
+ return ret;
7410
+ }
7411
+ /**
7412
+ * Convert to GroupStateTransitionInfo.
7413
+ * @returns {GroupStateTransitionInfo}
7414
+ */
7415
+ toInfo() {
7416
+ const ret = wasm.groupstatetransitioninfostatus_toInfo(this.__wbg_ptr);
7417
+ return GroupStateTransitionInfo.__wrap(ret);
7418
+ }
7419
+ /**
7420
+ * Create a new proposer status for initiating a group action.
7421
+ *
7422
+ * Use this when the identity is proposing a new group action.
7423
+ *
7424
+ * @param groupContractPosition - The position of the group in the contract
7425
+ * @returns GroupStateTransitionInfoStatus for a proposer
7426
+ * @param {number} group_contract_position
7427
+ * @returns {GroupStateTransitionInfoStatus}
7428
+ */
7429
+ static proposer(group_contract_position) {
7430
+ const ret = wasm.groupstatetransitioninfostatus_proposer(group_contract_position);
7431
+ return GroupStateTransitionInfoStatus.__wrap(ret);
7432
+ }
7433
+ /**
7434
+ * Get the action ID (only available for other signer status).
7435
+ * Returns null for proposer status.
7436
+ * @returns {Identifier | undefined}
7437
+ */
7438
+ get actionId() {
7439
+ const ret = wasm.groupstatetransitioninfostatus_action_id(this.__wbg_ptr);
7440
+ return ret === 0 ? undefined : Identifier.__wrap(ret);
7441
+ }
7442
+ /**
7443
+ * @returns {string}
7444
+ */
7445
+ get __type() {
7446
+ let deferred1_0;
7447
+ let deferred1_1;
7448
+ try {
7449
+ const ret = wasm.groupstatetransitioninfostatus_type_name(this.__wbg_ptr);
7450
+ deferred1_0 = ret[0];
7451
+ deferred1_1 = ret[1];
7452
+ return getStringFromWasm0(ret[0], ret[1]);
7453
+ } finally {
7454
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
7455
+ }
7456
+ }
7457
+ }
7458
+
7330
7459
  const IdentifierFinalization = (typeof FinalizationRegistry === 'undefined')
7331
7460
  ? { register: () => {}, unregister: () => {} }
7332
7461
  : new FinalizationRegistry(ptr => wasm.__wbg_identifier_free(ptr >>> 0, 1));
@@ -9654,8 +9783,8 @@ const IdentitySignerFinalization = (typeof FinalizationRegistry === 'undefined')
9654
9783
  /**
9655
9784
  * A signer for identity-based state transitions.
9656
9785
  *
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.
9786
+ * Private keys are stored by their public key hash (20 bytes).
9787
+ * Both ECDSA_HASH160 and ECDSA_SECP256K1 keys are looked up by hash160.
9659
9788
  */
9660
9789
  export class IdentitySigner {
9661
9790
 
@@ -9711,8 +9840,7 @@ export class IdentitySigner {
9711
9840
  /**
9712
9841
  * Adds a private key to the signer.
9713
9842
  *
9714
- * The public key hash is derived automatically from the private key using
9715
- * Hash160(compressed_public_key) where Hash160 = RIPEMD160(SHA256(x)).
9843
+ * The key is stored by public key hash (20 bytes): Hash160(compressed_public_key)
9716
9844
  *
9717
9845
  * @param privateKey - The PrivateKey object
9718
9846
  * @param {PrivateKey} private_key
@@ -9732,6 +9860,21 @@ export class IdentitySigner {
9732
9860
  const ret = wasm.identitysigner_key_count(this.__wbg_ptr);
9733
9861
  return ret >>> 0;
9734
9862
  }
9863
+ /**
9864
+ * @returns {string}
9865
+ */
9866
+ get __type() {
9867
+ let deferred1_0;
9868
+ let deferred1_1;
9869
+ try {
9870
+ const ret = wasm.identitysigner_type_name(this.__wbg_ptr);
9871
+ deferred1_0 = ret[0];
9872
+ deferred1_1 = ret[1];
9873
+ return getStringFromWasm0(ret[0], ret[1]);
9874
+ } finally {
9875
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
9876
+ }
9877
+ }
9735
9878
  }
9736
9879
 
9737
9880
  const IdentityTokenInfoFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -11750,7 +11893,7 @@ export class PlatformAddressSigner {
11750
11893
  * Creates a new empty PlatformAddressSigner.
11751
11894
  */
11752
11895
  constructor() {
11753
- const ret = wasm.identitysigner_new();
11896
+ const ret = wasm.platformaddresssigner_new();
11754
11897
  this.__wbg_ptr = ret >>> 0;
11755
11898
  PlatformAddressSignerFinalization.register(this, this.__wbg_ptr, this);
11756
11899
  return this;
@@ -11793,6 +11936,22 @@ export class PlatformAddressSigner {
11793
11936
  const ret = wasm.platformaddresssigner_key_count(this.__wbg_ptr);
11794
11937
  return ret >>> 0;
11795
11938
  }
11939
+ /**
11940
+ * Returns the type name for WASM object identification (instance getter).
11941
+ * @returns {string}
11942
+ */
11943
+ get __type() {
11944
+ let deferred1_0;
11945
+ let deferred1_1;
11946
+ try {
11947
+ const ret = wasm.platformaddresssigner_type_name(this.__wbg_ptr);
11948
+ deferred1_0 = ret[0];
11949
+ deferred1_1 = ret[1];
11950
+ return getStringFromWasm0(ret[0], ret[1]);
11951
+ } finally {
11952
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
11953
+ }
11954
+ }
11796
11955
  }
11797
11956
 
11798
11957
  const PrefundedVotingBalanceFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -14143,6 +14302,66 @@ export class TokenConfigurationChangeItem {
14143
14302
  const ptr = this.__destroy_into_raw();
14144
14303
  wasm.__wbg_tokenconfigurationchangeitem_free(ptr, 0);
14145
14304
  }
14305
+ /**
14306
+ * @returns {string}
14307
+ */
14308
+ static get __struct() {
14309
+ let deferred1_0;
14310
+ let deferred1_1;
14311
+ try {
14312
+ const ret = wasm.tokenconfigurationchangeitem_struct_name();
14313
+ deferred1_0 = ret[0];
14314
+ deferred1_1 = ret[1];
14315
+ return getStringFromWasm0(ret[0], ret[1]);
14316
+ } finally {
14317
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
14318
+ }
14319
+ }
14320
+ /**
14321
+ * @returns {string}
14322
+ */
14323
+ getItemName() {
14324
+ let deferred1_0;
14325
+ let deferred1_1;
14326
+ try {
14327
+ const ret = wasm.tokenconfigurationchangeitem_getItemName(this.__wbg_ptr);
14328
+ deferred1_0 = ret[0];
14329
+ deferred1_1 = ret[1];
14330
+ return getStringFromWasm0(ret[0], ret[1]);
14331
+ } finally {
14332
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
14333
+ }
14334
+ }
14335
+ /**
14336
+ * @returns {any}
14337
+ */
14338
+ getItem() {
14339
+ const ret = wasm.tokenconfigurationchangeitem_getItem(this.__wbg_ptr);
14340
+ return ret;
14341
+ }
14342
+ /**
14343
+ * @returns {string}
14344
+ */
14345
+ get __type() {
14346
+ let deferred1_0;
14347
+ let deferred1_1;
14348
+ try {
14349
+ const ret = wasm.tokenconfigurationchangeitem_type_name(this.__wbg_ptr);
14350
+ deferred1_0 = ret[0];
14351
+ deferred1_1 = ret[1];
14352
+ return getStringFromWasm0(ret[0], ret[1]);
14353
+ } finally {
14354
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
14355
+ }
14356
+ }
14357
+ /**
14358
+ * @param {number | null} [group_contract_position]
14359
+ * @returns {TokenConfigurationChangeItem}
14360
+ */
14361
+ static MainControlGroupItem(group_contract_position) {
14362
+ const ret = wasm.tokenconfigurationchangeitem_MainControlGroupItem(isLikeNone(group_contract_position) ? 0xFFFFFF : group_contract_position);
14363
+ return TokenConfigurationChangeItem.__wrap(ret);
14364
+ }
14146
14365
  /**
14147
14366
  * @param {bigint | null} [supply]
14148
14367
  * @returns {TokenConfigurationChangeItem}
@@ -14268,33 +14487,6 @@ export class TokenConfigurationChangeItem {
14268
14487
  const ret = wasm.tokenconfigurationchangeitem_DestroyFrozenFundsAdminGroupItem(action_taker.__wbg_ptr);
14269
14488
  return TokenConfigurationChangeItem.__wrap(ret);
14270
14489
  }
14271
- /**
14272
- * @param {TokenTradeMode} trade_mode
14273
- * @returns {TokenConfigurationChangeItem}
14274
- */
14275
- static MarketplaceTradeModeItem(trade_mode) {
14276
- _assertClass(trade_mode, TokenTradeMode);
14277
- const ret = wasm.tokenconfigurationchangeitem_MarketplaceTradeModeItem(trade_mode.__wbg_ptr);
14278
- return TokenConfigurationChangeItem.__wrap(ret);
14279
- }
14280
- /**
14281
- * @param {AuthorizedActionTakers} action_taker
14282
- * @returns {TokenConfigurationChangeItem}
14283
- */
14284
- static MarketplaceTradeModeAdminGroupItem(action_taker) {
14285
- _assertClass(action_taker, AuthorizedActionTakers);
14286
- const ret = wasm.tokenconfigurationchangeitem_MarketplaceTradeModeAdminGroupItem(action_taker.__wbg_ptr);
14287
- return TokenConfigurationChangeItem.__wrap(ret);
14288
- }
14289
- /**
14290
- * @param {AuthorizedActionTakers} action_taker
14291
- * @returns {TokenConfigurationChangeItem}
14292
- */
14293
- static MarketplaceTradeModeControlGroupItem(action_taker) {
14294
- _assertClass(action_taker, AuthorizedActionTakers);
14295
- const ret = wasm.tokenconfigurationchangeitem_MarketplaceTradeModeControlGroupItem(action_taker.__wbg_ptr);
14296
- return TokenConfigurationChangeItem.__wrap(ret);
14297
- }
14298
14490
  /**
14299
14491
  * @param {any} js_perpetual_distribution_value
14300
14492
  * @returns {TokenConfigurationChangeItem}
@@ -14384,99 +14576,66 @@ export class TokenConfigurationChangeItem {
14384
14576
  return TokenConfigurationChangeItem.__wrap(ret);
14385
14577
  }
14386
14578
  /**
14387
- * @param {Identifier | Uint8Array | string} js_identity_id
14388
14579
  * @returns {TokenConfigurationChangeItem}
14389
14580
  */
14390
- static NewTokensDestinationIdentityItem(js_identity_id) {
14391
- const ret = wasm.tokenconfigurationchangeitem_NewTokensDestinationIdentityItem(js_identity_id);
14392
- if (ret[2]) {
14393
- throw takeFromExternrefTable0(ret[1]);
14394
- }
14395
- return TokenConfigurationChangeItem.__wrap(ret[0]);
14581
+ static noChangeItem() {
14582
+ const ret = wasm.tokenconfigurationchangeitem_noChangeItem();
14583
+ return TokenConfigurationChangeItem.__wrap(ret);
14396
14584
  }
14397
14585
  /**
14398
- * @param {AuthorizedActionTakers} action_taker
14586
+ * @param {TokenTradeMode} trade_mode
14399
14587
  * @returns {TokenConfigurationChangeItem}
14400
14588
  */
14401
- static NewTokensDestinationIdentityAdminGroupItem(action_taker) {
14402
- _assertClass(action_taker, AuthorizedActionTakers);
14403
- const ret = wasm.tokenconfigurationchangeitem_NewTokensDestinationIdentityAdminGroupItem(action_taker.__wbg_ptr);
14589
+ static MarketplaceTradeModeItem(trade_mode) {
14590
+ _assertClass(trade_mode, TokenTradeMode);
14591
+ const ret = wasm.tokenconfigurationchangeitem_MarketplaceTradeModeItem(trade_mode.__wbg_ptr);
14404
14592
  return TokenConfigurationChangeItem.__wrap(ret);
14405
14593
  }
14406
14594
  /**
14407
14595
  * @param {AuthorizedActionTakers} action_taker
14408
14596
  * @returns {TokenConfigurationChangeItem}
14409
14597
  */
14410
- static NewTokensDestinationIdentityControlGroupItem(action_taker) {
14598
+ static MarketplaceTradeModeAdminGroupItem(action_taker) {
14411
14599
  _assertClass(action_taker, AuthorizedActionTakers);
14412
- const ret = wasm.tokenconfigurationchangeitem_NewTokensDestinationIdentityControlGroupItem(action_taker.__wbg_ptr);
14600
+ const ret = wasm.tokenconfigurationchangeitem_MarketplaceTradeModeAdminGroupItem(action_taker.__wbg_ptr);
14413
14601
  return TokenConfigurationChangeItem.__wrap(ret);
14414
14602
  }
14415
14603
  /**
14604
+ * @param {AuthorizedActionTakers} action_taker
14416
14605
  * @returns {TokenConfigurationChangeItem}
14417
14606
  */
14418
- static noChangeItem() {
14419
- const ret = wasm.tokenconfigurationchangeitem_noChangeItem();
14607
+ static MarketplaceTradeModeControlGroupItem(action_taker) {
14608
+ _assertClass(action_taker, AuthorizedActionTakers);
14609
+ const ret = wasm.tokenconfigurationchangeitem_MarketplaceTradeModeControlGroupItem(action_taker.__wbg_ptr);
14420
14610
  return TokenConfigurationChangeItem.__wrap(ret);
14421
14611
  }
14422
14612
  /**
14423
- * @returns {string}
14424
- */
14425
- static get __struct() {
14426
- let deferred1_0;
14427
- let deferred1_1;
14428
- try {
14429
- const ret = wasm.tokenconfigurationchangeitem_struct_name();
14430
- deferred1_0 = ret[0];
14431
- deferred1_1 = ret[1];
14432
- return getStringFromWasm0(ret[0], ret[1]);
14433
- } finally {
14434
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
14435
- }
14436
- }
14437
- /**
14438
- * @returns {string}
14613
+ * @param {Identifier | Uint8Array | string} js_identity_id
14614
+ * @returns {TokenConfigurationChangeItem}
14439
14615
  */
14440
- getItemName() {
14441
- let deferred1_0;
14442
- let deferred1_1;
14443
- try {
14444
- const ret = wasm.tokenconfigurationchangeitem_getItemName(this.__wbg_ptr);
14445
- deferred1_0 = ret[0];
14446
- deferred1_1 = ret[1];
14447
- return getStringFromWasm0(ret[0], ret[1]);
14448
- } finally {
14449
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
14616
+ static NewTokensDestinationIdentityItem(js_identity_id) {
14617
+ const ret = wasm.tokenconfigurationchangeitem_NewTokensDestinationIdentityItem(js_identity_id);
14618
+ if (ret[2]) {
14619
+ throw takeFromExternrefTable0(ret[1]);
14450
14620
  }
14621
+ return TokenConfigurationChangeItem.__wrap(ret[0]);
14451
14622
  }
14452
14623
  /**
14453
- * @returns {any}
14454
- */
14455
- getItem() {
14456
- const ret = wasm.tokenconfigurationchangeitem_getItem(this.__wbg_ptr);
14457
- return ret;
14458
- }
14459
- /**
14460
- * @returns {string}
14624
+ * @param {AuthorizedActionTakers} action_taker
14625
+ * @returns {TokenConfigurationChangeItem}
14461
14626
  */
14462
- get __type() {
14463
- let deferred1_0;
14464
- let deferred1_1;
14465
- try {
14466
- const ret = wasm.tokenconfigurationchangeitem_type_name(this.__wbg_ptr);
14467
- deferred1_0 = ret[0];
14468
- deferred1_1 = ret[1];
14469
- return getStringFromWasm0(ret[0], ret[1]);
14470
- } finally {
14471
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
14472
- }
14627
+ static NewTokensDestinationIdentityAdminGroupItem(action_taker) {
14628
+ _assertClass(action_taker, AuthorizedActionTakers);
14629
+ const ret = wasm.tokenconfigurationchangeitem_NewTokensDestinationIdentityAdminGroupItem(action_taker.__wbg_ptr);
14630
+ return TokenConfigurationChangeItem.__wrap(ret);
14473
14631
  }
14474
14632
  /**
14475
- * @param {number | null} [group_contract_position]
14633
+ * @param {AuthorizedActionTakers} action_taker
14476
14634
  * @returns {TokenConfigurationChangeItem}
14477
14635
  */
14478
- static MainControlGroupItem(group_contract_position) {
14479
- const ret = wasm.tokenconfigurationchangeitem_MainControlGroupItem(isLikeNone(group_contract_position) ? 0xFFFFFF : group_contract_position);
14636
+ static NewTokensDestinationIdentityControlGroupItem(action_taker) {
14637
+ _assertClass(action_taker, AuthorizedActionTakers);
14638
+ const ret = wasm.tokenconfigurationchangeitem_NewTokensDestinationIdentityControlGroupItem(action_taker.__wbg_ptr);
14480
14639
  return TokenConfigurationChangeItem.__wrap(ret);
14481
14640
  }
14482
14641
  }