@dashevo/wasm-dpp2 4.1.1 → 4.2.0-beta.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.
@@ -1859,7 +1859,7 @@ export class BatchTransition {
1859
1859
  if (Symbol.dispose) BatchTransition.prototype[Symbol.dispose] = BatchTransition.prototype.free;
1860
1860
 
1861
1861
  /**
1862
- * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6}
1862
+ * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7}
1863
1863
  */
1864
1864
  export const BatchType = Object.freeze({
1865
1865
  Create: 0, "0": "Create",
@@ -1869,6 +1869,7 @@ export const BatchType = Object.freeze({
1869
1869
  Purchase: 4, "4": "Purchase",
1870
1870
  UpdatePrice: 5, "5": "UpdatePrice",
1871
1871
  IgnoreWhileBumpingRevision: 6, "6": "IgnoreWhileBumpingRevision",
1872
+ IndexOnlyDelete: 7, "7": "IndexOnlyDelete",
1872
1873
  });
1873
1874
 
1874
1875
  export class BatchedTransition {
@@ -2493,6 +2494,18 @@ export class ConsensusError {
2493
2494
  const ptr = this.__destroy_into_raw();
2494
2495
  wasm.__wbg_consensuserror_free(ptr, 0);
2495
2496
  }
2497
+ /**
2498
+ * The consensus error code.
2499
+ *
2500
+ * This is the same number that reaches JS as `WasmSdkError.code` when
2501
+ * a state transition is rejected. See [`DocumentReferenceErrorCodeWasm`]
2502
+ * for the reference-validation range.
2503
+ * @returns {number}
2504
+ */
2505
+ get code() {
2506
+ const ret = wasm.consensuserror_code(this.__wbg_ptr);
2507
+ return ret >>> 0;
2508
+ }
2496
2509
  /**
2497
2510
  * @param {Uint8Array} error
2498
2511
  * @returns {ConsensusError}
@@ -2506,6 +2519,24 @@ export class ConsensusError {
2506
2519
  }
2507
2520
  return ConsensusError.__wrap(ret[0]);
2508
2521
  }
2522
+ /**
2523
+ * The immutable-property error this is, or `undefined` when it is not
2524
+ * code 40128.
2525
+ * @returns {DocumentImmutabilityErrorCode | undefined}
2526
+ */
2527
+ get documentImmutabilityErrorCode() {
2528
+ const ret = wasm.consensuserror_document_immutability_error_code(this.__wbg_ptr);
2529
+ return ret === 0 ? undefined : ret;
2530
+ }
2531
+ /**
2532
+ * The reference-validation error this is, or `undefined` when it is
2533
+ * not one of codes 40120-40125.
2534
+ * @returns {DocumentReferenceErrorCode | undefined}
2535
+ */
2536
+ get documentReferenceErrorCode() {
2537
+ const ret = wasm.consensuserror_document_reference_error_code(this.__wbg_ptr);
2538
+ return ret === 0 ? undefined : ret;
2539
+ }
2509
2540
  /**
2510
2541
  * @returns {string}
2511
2542
  */
@@ -2858,6 +2889,18 @@ export class ContractBounds {
2858
2889
  const ptr = this.__destroy_into_raw();
2859
2890
  wasm.__wbg_contractbounds_free(ptr, 0);
2860
2891
  }
2892
+ /**
2893
+ * Bounds to every member of a contract group. Only authentication keys may carry them.
2894
+ * @param {IdentifierLike} contractGroupId
2895
+ * @returns {ContractBounds}
2896
+ */
2897
+ static ContractGroup(contractGroupId) {
2898
+ const ret = wasm.contractbounds_ContractGroup(contractGroupId);
2899
+ if (ret[2]) {
2900
+ throw takeFromExternrefTable0(ret[1]);
2901
+ }
2902
+ return ContractBounds.__wrap(ret[0]);
2903
+ }
2861
2904
  /**
2862
2905
  * @param {IdentifierLike} contractId
2863
2906
  * @returns {ContractBounds}
@@ -2920,6 +2963,14 @@ export class ContractBounds {
2920
2963
  const ret = wasm.contractbounds_contract_bounds_type_number(this.__wbg_ptr);
2921
2964
  return ret;
2922
2965
  }
2966
+ /**
2967
+ * The contract group id, for `contractGroup` bounds only.
2968
+ * @returns {Identifier | undefined}
2969
+ */
2970
+ get contractGroupId() {
2971
+ const ret = wasm.contractbounds_contract_group_id(this.__wbg_ptr);
2972
+ return ret === 0 ? undefined : Identifier.__wrap(ret);
2973
+ }
2923
2974
  /**
2924
2975
  * @returns {string | undefined}
2925
2976
  */
@@ -2955,6 +3006,7 @@ export class ContractBounds {
2955
3006
  return ContractBounds.__wrap(ret[0]);
2956
3007
  }
2957
3008
  /**
3009
+ * The contract id, or the contract group id for `contractGroup` bounds.
2958
3010
  * @returns {Identifier}
2959
3011
  */
2960
3012
  get identifier() {
@@ -3249,6 +3301,88 @@ export class DataContract {
3249
3301
  DataContractFinalization.register(this, this.__wbg_ptr, this);
3250
3302
  return this;
3251
3303
  }
3304
+ /**
3305
+ * The `immutable` / `immutableAllowSetting` declarations of one
3306
+ * document type: `{ immutable: string[], immutableAllowSetting:
3307
+ * string[] }`, both sorted by property name.
3308
+ *
3309
+ * Both arrays are empty when the document type declares nothing (the
3310
+ * normal case, and the only case for a type whose documents are not
3311
+ * mutable). Throws when the contract has no document type by that
3312
+ * name, so "no such type" and "nothing frozen" stay distinguishable.
3313
+ *
3314
+ * The keywords are only parsed from protocol version 14 onward. A
3315
+ * contract deserialized against an earlier platform version reports
3316
+ * empty lists, which is exactly what consensus enforced at that
3317
+ * version, while `toJSON()` still shows the raw keywords either way.
3318
+ * @param {string} documentTypeName
3319
+ * @returns {DocumentTypeImmutableProperties}
3320
+ */
3321
+ documentTypeImmutableProperties(documentTypeName) {
3322
+ const ptr0 = passStringToWasm0(documentTypeName, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3323
+ const len0 = WASM_VECTOR_LEN;
3324
+ const ret = wasm.datacontract_documentTypeImmutableProperties(this.__wbg_ptr, ptr0, len0);
3325
+ if (ret[2]) {
3326
+ throw takeFromExternrefTable0(ret[1]);
3327
+ }
3328
+ return takeFromExternrefTable0(ret[0]);
3329
+ }
3330
+ /**
3331
+ * All `refersTo` declarations of one document type, in schema property
3332
+ * order.
3333
+ *
3334
+ * Returns an empty array when the document type declares none. Throws
3335
+ * when the contract has no document type by that name — an empty array
3336
+ * would conflate "no such type" with "no references".
3337
+ *
3338
+ * Reference declarations are only parsed from protocol version 14
3339
+ * onward. A contract deserialized against an earlier platform version
3340
+ * reports none, which is exactly what consensus enforced at that
3341
+ * version — but note the trap: `DataContract.fromBytes(bytes, false, 1)`
3342
+ * yields `[]` even for a contract whose raw schema does carry
3343
+ * `refersTo`, and `toJSON()` still shows the raw keyword either way.
3344
+ * @param {string} documentTypeName
3345
+ * @returns {Array<DocumentPropertyReference>}
3346
+ */
3347
+ documentTypeReferences(documentTypeName) {
3348
+ const ptr0 = passStringToWasm0(documentTypeName, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3349
+ const len0 = WASM_VECTOR_LEN;
3350
+ const ret = wasm.datacontract_documentTypeReferences(this.__wbg_ptr, ptr0, len0);
3351
+ if (ret[2]) {
3352
+ throw takeFromExternrefTable0(ret[1]);
3353
+ }
3354
+ return takeFromExternrefTable0(ret[0]);
3355
+ }
3356
+ /**
3357
+ * Every document type that freezes at least one property, keyed by
3358
+ * document type name.
3359
+ *
3360
+ * Document types with an empty `immutable` list are omitted, so an
3361
+ * empty `Map` means "nothing in this contract is frozen per property".
3362
+ * @returns {Map<string, DocumentTypeImmutableProperties>}
3363
+ */
3364
+ get documentImmutableProperties() {
3365
+ const ret = wasm.datacontract_document_immutable_properties(this.__wbg_ptr);
3366
+ if (ret[2]) {
3367
+ throw takeFromExternrefTable0(ret[1]);
3368
+ }
3369
+ return takeFromExternrefTable0(ret[0]);
3370
+ }
3371
+ /**
3372
+ * Every document type that declares at least one reference, keyed by
3373
+ * document type name.
3374
+ *
3375
+ * Document types with no declarations are omitted, so an empty `Map`
3376
+ * means "this contract declares no references at all".
3377
+ * @returns {Map<string, Array<DocumentPropertyReference>>}
3378
+ */
3379
+ get documentReferences() {
3380
+ const ret = wasm.datacontract_document_references(this.__wbg_ptr);
3381
+ if (ret[2]) {
3382
+ throw takeFromExternrefTable0(ret[1]);
3383
+ }
3384
+ return takeFromExternrefTable0(ret[0]);
3385
+ }
3252
3386
  /**
3253
3387
  * @param {string} base64
3254
3388
  * @param {boolean} full_validation
@@ -3595,6 +3729,30 @@ export class DataContractCreateTransition {
3595
3729
  DataContractCreateTransitionFinalization.register(this, this.__wbg_ptr, this);
3596
3730
  return this;
3597
3731
  }
3732
+ /**
3733
+ * The contract group this transition registers, as a `ContractGroupRegistrationObject`,
3734
+ * or `undefined` when it registers none (a version 0 transition never does).
3735
+ * @returns {any}
3736
+ */
3737
+ get contractGroup() {
3738
+ const ret = wasm.datacontractcreatetransition_contract_group(this.__wbg_ptr);
3739
+ if (ret[2]) {
3740
+ throw takeFromExternrefTable0(ret[1]);
3741
+ }
3742
+ return takeFromExternrefTable0(ret[0]);
3743
+ }
3744
+ /**
3745
+ * The contract group memberships the created contract declares, as
3746
+ * `ContractGroupMembershipObject[]`; empty on a version 0 transition.
3747
+ * @returns {any}
3748
+ */
3749
+ get contractGroupMemberships() {
3750
+ const ret = wasm.datacontractcreatetransition_contract_group_memberships(this.__wbg_ptr);
3751
+ if (ret[2]) {
3752
+ throw takeFromExternrefTable0(ret[1]);
3753
+ }
3754
+ return takeFromExternrefTable0(ret[0]);
3755
+ }
3598
3756
  /**
3599
3757
  * @returns {number}
3600
3758
  */
@@ -3694,6 +3852,28 @@ export class DataContractCreateTransition {
3694
3852
  const ret = wasm.datacontractcreatetransition_identity_nonce(this.__wbg_ptr);
3695
3853
  return BigInt.asUintN(64, ret);
3696
3854
  }
3855
+ /**
3856
+ * Registers a contract group with this transition, or clears the registration with
3857
+ * `undefined`. Needs a version 1 transition (protocol version 14).
3858
+ * @param {any} registration
3859
+ */
3860
+ setContractGroup(registration) {
3861
+ const ret = wasm.datacontractcreatetransition_setContractGroup(this.__wbg_ptr, registration);
3862
+ if (ret[1]) {
3863
+ throw takeFromExternrefTable0(ret[0]);
3864
+ }
3865
+ }
3866
+ /**
3867
+ * Declares which contract groups the created contract, its document types or its tokens
3868
+ * join. Needs a version 1 transition (protocol version 14).
3869
+ * @param {any} memberships
3870
+ */
3871
+ setContractGroupMemberships(memberships) {
3872
+ const ret = wasm.datacontractcreatetransition_setContractGroupMemberships(this.__wbg_ptr, memberships);
3873
+ if (ret[1]) {
3874
+ throw takeFromExternrefTable0(ret[0]);
3875
+ }
3876
+ }
3697
3877
  /**
3698
3878
  * @param {DataContract} dataContract
3699
3879
  * @param {PlatformVersionLike} platformVersion
@@ -6123,6 +6303,32 @@ export class DocumentDeleteTransition {
6123
6303
  }
6124
6304
  if (Symbol.dispose) DocumentDeleteTransition.prototype[Symbol.dispose] = DocumentDeleteTransition.prototype.free;
6125
6305
 
6306
+ /**
6307
+ * Consensus error codes emitted by the immutable-property check on document
6308
+ * replaces (`immutable` / `immutableAllowSetting`, protocol version 14+).
6309
+ *
6310
+ * Branch on an error's `code` against this instead of matching its message:
6311
+ *
6312
+ * ```js
6313
+ * try {
6314
+ * await sdk.documents.replace({ document, identityKey, signer });
6315
+ * } catch (e) {
6316
+ * if (e.code === DocumentImmutabilityErrorCode.DocumentImmutablePropertyChanged) {
6317
+ * // the replace touched a property the document type freezes
6318
+ * }
6319
+ * }
6320
+ * ```
6321
+ * @enum {40128}
6322
+ */
6323
+ export const DocumentImmutabilityErrorCode = Object.freeze({
6324
+ /**
6325
+ * The replace changed, added or removed a property the document type
6326
+ * lists under `immutable`, and the change was not the one first-time
6327
+ * set `immutableAllowSetting` permits.
6328
+ */
6329
+ DocumentImmutablePropertyChanged: 40128, "40128": "DocumentImmutablePropertyChanged",
6330
+ });
6331
+
6126
6332
  export class DocumentPurchaseTransition {
6127
6333
  static __wrap(ptr) {
6128
6334
  ptr = ptr >>> 0;
@@ -6251,6 +6457,60 @@ export class DocumentPurchaseTransition {
6251
6457
  }
6252
6458
  if (Symbol.dispose) DocumentPurchaseTransition.prototype[Symbol.dispose] = DocumentPurchaseTransition.prototype.free;
6253
6459
 
6460
+ /**
6461
+ * Consensus error codes emitted by `refersTo` reference validation, which
6462
+ * runs from protocol version 14 onward.
6463
+ *
6464
+ * Branch on an error's `code` against these instead of matching its
6465
+ * message. Both directions work — `DocumentReferenceErrorCode[40123]` is
6466
+ * `"ReferencedIdentityKeyNotFound"`.
6467
+ *
6468
+ * These reach JS on the state-transition broadcast path, where the
6469
+ * consensus code is carried through to `WasmSdkError.code`:
6470
+ *
6471
+ * ```js
6472
+ * try {
6473
+ * await sdk.documents.create({ document, identityKey, signer });
6474
+ * } catch (e) {
6475
+ * if (e.code === DocumentReferenceErrorCode.ReferencedIdentityKeyDisabled) {
6476
+ * // the referenced key exists but was disabled
6477
+ * }
6478
+ * }
6479
+ * ```
6480
+ * @enum {40120 | 40121 | 40122 | 40123 | 40124 | 40125}
6481
+ */
6482
+ export const DocumentReferenceErrorCode = Object.freeze({
6483
+ /**
6484
+ * The referenced identity, contract, token or permanent document does
6485
+ * not exist.
6486
+ */
6487
+ ReferencedEntityNotFound: 40120, "40120": "ReferencedEntityNotFound",
6488
+ /**
6489
+ * A `permanentDocument` reference names a document type the referenced
6490
+ * contract does not define, or the contract itself is missing.
6491
+ */
6492
+ ReferencedDocumentTypeNotFound: 40121, "40121": "ReferencedDocumentTypeNotFound",
6493
+ /**
6494
+ * The referenced document type allows deletion. Only types declaring
6495
+ * `canBeDeleted: false` may be the target of a `permanentDocument`
6496
+ * reference — otherwise the reference could be left dangling.
6497
+ */
6498
+ ReferencedDocumentTypeDeletable: 40122, "40122": "ReferencedDocumentTypeDeletable",
6499
+ /**
6500
+ * The referenced identity public key does not exist.
6501
+ */
6502
+ ReferencedIdentityKeyNotFound: 40123, "40123": "ReferencedIdentityKeyNotFound",
6503
+ /**
6504
+ * The referenced identity public key exists but is disabled.
6505
+ */
6506
+ ReferencedIdentityKeyDisabled: 40124, "40124": "ReferencedIdentityKeyDisabled",
6507
+ /**
6508
+ * The declaration's `keyIdProperty` is missing from the document type,
6509
+ * or names a property that is not an integer.
6510
+ */
6511
+ ReferencedKeyIdPropertyInvalid: 40125, "40125": "ReferencedKeyIdPropertyInvalid",
6512
+ });
6513
+
6254
6514
  export class DocumentReplaceTransition {
6255
6515
  static __wrap(ptr) {
6256
6516
  ptr = ptr >>> 0;
@@ -10468,199 +10728,554 @@ export class IdentityCreditWithdrawalTransition {
10468
10728
  }
10469
10729
  if (Symbol.dispose) IdentityCreditWithdrawalTransition.prototype[Symbol.dispose] = IdentityCreditWithdrawalTransition.prototype.free;
10470
10730
 
10471
- export class IdentityPublicKey {
10731
+ export class IdentityKeyLimitsUpdate {
10472
10732
  static __wrap(ptr) {
10473
10733
  ptr = ptr >>> 0;
10474
- const obj = Object.create(IdentityPublicKey.prototype);
10734
+ const obj = Object.create(IdentityKeyLimitsUpdate.prototype);
10475
10735
  obj.__wbg_ptr = ptr;
10476
- IdentityPublicKeyFinalization.register(obj, obj.__wbg_ptr, obj);
10736
+ IdentityKeyLimitsUpdateFinalization.register(obj, obj.__wbg_ptr, obj);
10477
10737
  return obj;
10478
10738
  }
10479
10739
  __destroy_into_raw() {
10480
10740
  const ptr = this.__wbg_ptr;
10481
10741
  this.__wbg_ptr = 0;
10482
- IdentityPublicKeyFinalization.unregister(this);
10742
+ IdentityKeyLimitsUpdateFinalization.unregister(this);
10483
10743
  return ptr;
10484
10744
  }
10485
10745
  free() {
10486
10746
  const ptr = this.__destroy_into_raw();
10487
- wasm.__wbg_identitypublickey_free(ptr, 0);
10488
- }
10489
- /**
10490
- * @returns {string}
10491
- */
10492
- base64() {
10493
- let deferred2_0;
10494
- let deferred2_1;
10495
- try {
10496
- const ret = wasm.identitypublickey_base64(this.__wbg_ptr);
10497
- var ptr1 = ret[0];
10498
- var len1 = ret[1];
10499
- if (ret[3]) {
10500
- ptr1 = 0; len1 = 0;
10501
- throw takeFromExternrefTable0(ret[2]);
10502
- }
10503
- deferred2_0 = ptr1;
10504
- deferred2_1 = len1;
10505
- return getStringFromWasm0(ptr1, len1);
10506
- } finally {
10507
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
10508
- }
10747
+ wasm.__wbg_identitykeylimitsupdate_free(ptr, 0);
10509
10748
  }
10510
10749
  /**
10511
- * @param {IdentityPublicKeyOptions} options
10750
+ * @param {IdentityKeyLimitsUpdateTransitionOptions} options
10512
10751
  */
10513
10752
  constructor(options) {
10514
- const ret = wasm.identitypublickey_constructor(options);
10753
+ const ret = wasm.identitykeylimitsupdate_constructor(options);
10515
10754
  if (ret[2]) {
10516
10755
  throw takeFromExternrefTable0(ret[1]);
10517
10756
  }
10518
10757
  this.__wbg_ptr = ret[0] >>> 0;
10519
- IdentityPublicKeyFinalization.register(this, this.__wbg_ptr, this);
10758
+ IdentityKeyLimitsUpdateFinalization.register(this, this.__wbg_ptr, this);
10520
10759
  return this;
10521
10760
  }
10522
- /**
10523
- * @returns {ContractBounds | undefined}
10524
- */
10525
- get contractBounds() {
10526
- const ret = wasm.identitypublickey_contract_bounds(this.__wbg_ptr);
10527
- return ret === 0 ? undefined : ContractBounds.__wrap(ret);
10528
- }
10529
- /**
10530
- * @returns {string}
10531
- */
10532
- get data() {
10533
- let deferred1_0;
10534
- let deferred1_1;
10535
- try {
10536
- const ret = wasm.identitypublickey_data(this.__wbg_ptr);
10537
- deferred1_0 = ret[0];
10538
- deferred1_1 = ret[1];
10539
- return getStringFromWasm0(ret[0], ret[1]);
10540
- } finally {
10541
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
10542
- }
10543
- }
10544
10761
  /**
10545
10762
  * @returns {bigint | undefined}
10546
10763
  */
10547
- get disabledAt() {
10548
- const ret = wasm.identitypublickey_disabled_at(this.__wbg_ptr);
10764
+ get expiresAt() {
10765
+ const ret = wasm.identitykeylimitsupdate_expires_at(this.__wbg_ptr);
10549
10766
  return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
10550
10767
  }
10551
10768
  /**
10552
- * @param {string} hex
10553
- * @returns {IdentityPublicKey}
10769
+ * @param {string} base64
10770
+ * @returns {IdentityKeyLimitsUpdate}
10554
10771
  */
10555
- static fromBase64(hex) {
10556
- const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
10772
+ static fromBase64(base64) {
10773
+ const ptr0 = passStringToWasm0(base64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
10557
10774
  const len0 = WASM_VECTOR_LEN;
10558
- const ret = wasm.identitypublickey_fromBase64(ptr0, len0);
10775
+ const ret = wasm.identitykeylimitsupdate_fromBase64(ptr0, len0);
10559
10776
  if (ret[2]) {
10560
10777
  throw takeFromExternrefTable0(ret[1]);
10561
10778
  }
10562
- return IdentityPublicKey.__wrap(ret[0]);
10779
+ return IdentityKeyLimitsUpdate.__wrap(ret[0]);
10563
10780
  }
10564
10781
  /**
10565
10782
  * @param {Uint8Array} bytes
10566
- * @returns {IdentityPublicKey}
10783
+ * @returns {IdentityKeyLimitsUpdate}
10567
10784
  */
10568
10785
  static fromBytes(bytes) {
10569
10786
  const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
10570
10787
  const len0 = WASM_VECTOR_LEN;
10571
- const ret = wasm.identitypublickey_fromBytes(ptr0, len0);
10788
+ const ret = wasm.identitykeylimitsupdate_fromBytes(ptr0, len0);
10572
10789
  if (ret[2]) {
10573
10790
  throw takeFromExternrefTable0(ret[1]);
10574
10791
  }
10575
- return IdentityPublicKey.__wrap(ret[0]);
10792
+ return IdentityKeyLimitsUpdate.__wrap(ret[0]);
10576
10793
  }
10577
10794
  /**
10578
10795
  * @param {string} hex
10579
- * @returns {IdentityPublicKey}
10796
+ * @returns {IdentityKeyLimitsUpdate}
10580
10797
  */
10581
10798
  static fromHex(hex) {
10582
10799
  const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
10583
10800
  const len0 = WASM_VECTOR_LEN;
10584
- const ret = wasm.identitypublickey_fromHex(ptr0, len0);
10801
+ const ret = wasm.identitykeylimitsupdate_fromHex(ptr0, len0);
10585
10802
  if (ret[2]) {
10586
10803
  throw takeFromExternrefTable0(ret[1]);
10587
10804
  }
10588
- return IdentityPublicKey.__wrap(ret[0]);
10805
+ return IdentityKeyLimitsUpdate.__wrap(ret[0]);
10589
10806
  }
10590
10807
  /**
10591
- * Deserialize from JSON-compatible JS object (canonical wire shape).
10592
- *
10593
- * Expects base64 strings for binary fields, base58 strings for
10594
- * identifiers — the canonical shape produced by `toJSON`.
10595
- * `platform_version` is accepted for SDK API consistency but not
10596
- * load-bearing today (canonical tag-driven dispatch handles V0).
10597
- * @param {IdentityPublicKeyJSON} value
10598
- * @param {PlatformVersionLike} _platform_version
10599
- * @returns {IdentityPublicKey}
10808
+ * @param {IdentityKeyLimitsUpdateJSON} js
10809
+ * @returns {IdentityKeyLimitsUpdate}
10600
10810
  */
10601
- static fromJSON(value, _platform_version) {
10602
- const ret = wasm.identitypublickey_fromJSON(value, _platform_version);
10811
+ static fromJSON(js) {
10812
+ const ret = wasm.identitykeylimitsupdate_fromJSON(js);
10603
10813
  if (ret[2]) {
10604
10814
  throw takeFromExternrefTable0(ret[1]);
10605
10815
  }
10606
- return IdentityPublicKey.__wrap(ret[0]);
10816
+ return IdentityKeyLimitsUpdate.__wrap(ret[0]);
10607
10817
  }
10608
10818
  /**
10609
- * Deserialize from JS object (non-human-readable).
10610
- *
10611
- * Uses platform_value conversion which properly handles the tagged enum.
10612
- * `platform_version` is accepted for SDK API consistency but not
10613
- * load-bearing today — canonical `ValueConvertible::from_object`
10614
- * dispatches on the value's `$formatVersion` tag, which produces
10615
- * identical output for the only currently-defined V0.
10616
- * @param {IdentityPublicKeyObject} value
10617
- * @param {PlatformVersionLike} _platform_version
10618
- * @returns {IdentityPublicKey}
10819
+ * @param {IdentityKeyLimitsUpdateObject} obj
10820
+ * @returns {IdentityKeyLimitsUpdate}
10619
10821
  */
10620
- static fromObject(value, _platform_version) {
10621
- const ret = wasm.identitypublickey_fromObject(value, _platform_version);
10822
+ static fromObject(obj) {
10823
+ const ret = wasm.identitykeylimitsupdate_fromObject(obj);
10622
10824
  if (ret[2]) {
10623
10825
  throw takeFromExternrefTable0(ret[1]);
10624
10826
  }
10625
- return IdentityPublicKey.__wrap(ret[0]);
10827
+ return IdentityKeyLimitsUpdate.__wrap(ret[0]);
10626
10828
  }
10627
10829
  /**
10628
- * @returns {string}
10830
+ * @param {StateTransition} st
10831
+ * @returns {IdentityKeyLimitsUpdate}
10629
10832
  */
10630
- getPublicKeyHash() {
10631
- let deferred2_0;
10632
- let deferred2_1;
10633
- try {
10634
- const ret = wasm.identitypublickey_getPublicKeyHash(this.__wbg_ptr);
10635
- var ptr1 = ret[0];
10636
- var len1 = ret[1];
10637
- if (ret[3]) {
10638
- ptr1 = 0; len1 = 0;
10639
- throw takeFromExternrefTable0(ret[2]);
10640
- }
10641
- deferred2_0 = ptr1;
10642
- deferred2_1 = len1;
10643
- return getStringFromWasm0(ptr1, len1);
10644
- } finally {
10645
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
10833
+ static fromStateTransition(st) {
10834
+ _assertClass(st, StateTransition);
10835
+ const ret = wasm.identitykeylimitsupdate_fromStateTransition(st.__wbg_ptr);
10836
+ if (ret[2]) {
10837
+ throw takeFromExternrefTable0(ret[1]);
10646
10838
  }
10839
+ return IdentityKeyLimitsUpdate.__wrap(ret[0]);
10647
10840
  }
10648
10841
  /**
10649
- * @returns {string}
10842
+ * @returns {Identifier}
10650
10843
  */
10651
- hex() {
10652
- let deferred2_0;
10653
- let deferred2_1;
10654
- try {
10655
- const ret = wasm.identitypublickey_hex(this.__wbg_ptr);
10656
- var ptr1 = ret[0];
10657
- var len1 = ret[1];
10658
- if (ret[3]) {
10659
- ptr1 = 0; len1 = 0;
10660
- throw takeFromExternrefTable0(ret[2]);
10661
- }
10662
- deferred2_0 = ptr1;
10663
- deferred2_1 = len1;
10844
+ get identityId() {
10845
+ const ret = wasm.identitykeylimitsupdate_identity_id(this.__wbg_ptr);
10846
+ return Identifier.__wrap(ret);
10847
+ }
10848
+ /**
10849
+ * @returns {number}
10850
+ */
10851
+ get keyId() {
10852
+ const ret = wasm.identitykeylimitsupdate_key_id(this.__wbg_ptr);
10853
+ return ret >>> 0;
10854
+ }
10855
+ /**
10856
+ * @returns {bigint}
10857
+ */
10858
+ get nonce() {
10859
+ const ret = wasm.identitykeylimitsupdate_nonce(this.__wbg_ptr);
10860
+ return BigInt.asUintN(64, ret);
10861
+ }
10862
+ /**
10863
+ * @param {bigint | null} [expires_at]
10864
+ */
10865
+ set expiresAt(expires_at) {
10866
+ const ret = wasm.identitykeylimitsupdate_set_expires_at(this.__wbg_ptr, isLikeNone(expires_at) ? 0 : addToExternrefTable0(expires_at));
10867
+ if (ret[1]) {
10868
+ throw takeFromExternrefTable0(ret[0]);
10869
+ }
10870
+ }
10871
+ /**
10872
+ * @param {IdentifierLike} identity_id
10873
+ */
10874
+ set identityId(identity_id) {
10875
+ const ret = wasm.identitykeylimitsupdate_set_identity_id(this.__wbg_ptr, identity_id);
10876
+ if (ret[1]) {
10877
+ throw takeFromExternrefTable0(ret[0]);
10878
+ }
10879
+ }
10880
+ /**
10881
+ * @param {number} key_id
10882
+ */
10883
+ set keyId(key_id) {
10884
+ const ret = wasm.identitykeylimitsupdate_set_key_id(this.__wbg_ptr, key_id);
10885
+ if (ret[1]) {
10886
+ throw takeFromExternrefTable0(ret[0]);
10887
+ }
10888
+ }
10889
+ /**
10890
+ * @param {bigint} nonce
10891
+ */
10892
+ set nonce(nonce) {
10893
+ const ret = wasm.identitykeylimitsupdate_set_nonce(this.__wbg_ptr, nonce);
10894
+ if (ret[1]) {
10895
+ throw takeFromExternrefTable0(ret[0]);
10896
+ }
10897
+ }
10898
+ /**
10899
+ * @param {Uint8Array} signature
10900
+ */
10901
+ set signature(signature) {
10902
+ const ptr0 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
10903
+ const len0 = WASM_VECTOR_LEN;
10904
+ wasm.identitykeylimitsupdate_set_signature(this.__wbg_ptr, ptr0, len0);
10905
+ }
10906
+ /**
10907
+ * @param {number} publicKeyId
10908
+ */
10909
+ set signaturePublicKeyId(publicKeyId) {
10910
+ const ret = wasm.identitykeylimitsupdate_set_signature_public_key_id(this.__wbg_ptr, publicKeyId);
10911
+ if (ret[1]) {
10912
+ throw takeFromExternrefTable0(ret[0]);
10913
+ }
10914
+ }
10915
+ /**
10916
+ * @param {bigint | null} [total_budget]
10917
+ */
10918
+ set totalBudget(total_budget) {
10919
+ const ret = wasm.identitykeylimitsupdate_set_total_budget(this.__wbg_ptr, isLikeNone(total_budget) ? 0 : addToExternrefTable0(total_budget));
10920
+ if (ret[1]) {
10921
+ throw takeFromExternrefTable0(ret[0]);
10922
+ }
10923
+ }
10924
+ /**
10925
+ * @param {number} amount
10926
+ */
10927
+ set userFeeIncrease(amount) {
10928
+ const ret = wasm.identitykeylimitsupdate_set_user_fee_increase(this.__wbg_ptr, amount);
10929
+ if (ret[1]) {
10930
+ throw takeFromExternrefTable0(ret[0]);
10931
+ }
10932
+ }
10933
+ /**
10934
+ * @returns {Uint8Array}
10935
+ */
10936
+ get signature() {
10937
+ const ret = wasm.identitykeylimitsupdate_signature(this.__wbg_ptr);
10938
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
10939
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
10940
+ return v1;
10941
+ }
10942
+ /**
10943
+ * @returns {number}
10944
+ */
10945
+ get signaturePublicKeyId() {
10946
+ const ret = wasm.identitykeylimitsupdate_signature_public_key_id(this.__wbg_ptr);
10947
+ return ret >>> 0;
10948
+ }
10949
+ /**
10950
+ * @returns {string}
10951
+ */
10952
+ static get __struct() {
10953
+ let deferred1_0;
10954
+ let deferred1_1;
10955
+ try {
10956
+ const ret = wasm.identitykeylimitsupdate_struct_name();
10957
+ deferred1_0 = ret[0];
10958
+ deferred1_1 = ret[1];
10959
+ return getStringFromWasm0(ret[0], ret[1]);
10960
+ } finally {
10961
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
10962
+ }
10963
+ }
10964
+ /**
10965
+ * @returns {string}
10966
+ */
10967
+ toBase64() {
10968
+ let deferred2_0;
10969
+ let deferred2_1;
10970
+ try {
10971
+ const ret = wasm.identitykeylimitsupdate_toBase64(this.__wbg_ptr);
10972
+ var ptr1 = ret[0];
10973
+ var len1 = ret[1];
10974
+ if (ret[3]) {
10975
+ ptr1 = 0; len1 = 0;
10976
+ throw takeFromExternrefTable0(ret[2]);
10977
+ }
10978
+ deferred2_0 = ptr1;
10979
+ deferred2_1 = len1;
10980
+ return getStringFromWasm0(ptr1, len1);
10981
+ } finally {
10982
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
10983
+ }
10984
+ }
10985
+ /**
10986
+ * @returns {Uint8Array}
10987
+ */
10988
+ toBytes() {
10989
+ const ret = wasm.identitykeylimitsupdate_toBytes(this.__wbg_ptr);
10990
+ if (ret[3]) {
10991
+ throw takeFromExternrefTable0(ret[2]);
10992
+ }
10993
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
10994
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
10995
+ return v1;
10996
+ }
10997
+ /**
10998
+ * @returns {string}
10999
+ */
11000
+ toHex() {
11001
+ let deferred2_0;
11002
+ let deferred2_1;
11003
+ try {
11004
+ const ret = wasm.identitykeylimitsupdate_toHex(this.__wbg_ptr);
11005
+ var ptr1 = ret[0];
11006
+ var len1 = ret[1];
11007
+ if (ret[3]) {
11008
+ ptr1 = 0; len1 = 0;
11009
+ throw takeFromExternrefTable0(ret[2]);
11010
+ }
11011
+ deferred2_0 = ptr1;
11012
+ deferred2_1 = len1;
11013
+ return getStringFromWasm0(ptr1, len1);
11014
+ } finally {
11015
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
11016
+ }
11017
+ }
11018
+ /**
11019
+ * @returns {IdentityKeyLimitsUpdateJSON}
11020
+ */
11021
+ toJSON() {
11022
+ const ret = wasm.identitykeylimitsupdate_toJSON(this.__wbg_ptr);
11023
+ if (ret[2]) {
11024
+ throw takeFromExternrefTable0(ret[1]);
11025
+ }
11026
+ return takeFromExternrefTable0(ret[0]);
11027
+ }
11028
+ /**
11029
+ * @returns {IdentityKeyLimitsUpdateObject}
11030
+ */
11031
+ toObject() {
11032
+ const ret = wasm.identitykeylimitsupdate_toObject(this.__wbg_ptr);
11033
+ if (ret[2]) {
11034
+ throw takeFromExternrefTable0(ret[1]);
11035
+ }
11036
+ return takeFromExternrefTable0(ret[0]);
11037
+ }
11038
+ /**
11039
+ * @returns {StateTransition}
11040
+ */
11041
+ toStateTransition() {
11042
+ const ret = wasm.identitykeylimitsupdate_toStateTransition(this.__wbg_ptr);
11043
+ return StateTransition.__wrap(ret);
11044
+ }
11045
+ /**
11046
+ * @returns {bigint | undefined}
11047
+ */
11048
+ get totalBudget() {
11049
+ const ret = wasm.identitykeylimitsupdate_total_budget(this.__wbg_ptr);
11050
+ return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
11051
+ }
11052
+ /**
11053
+ * @returns {string}
11054
+ */
11055
+ get __type() {
11056
+ let deferred1_0;
11057
+ let deferred1_1;
11058
+ try {
11059
+ const ret = wasm.identitykeylimitsupdate_type_name(this.__wbg_ptr);
11060
+ deferred1_0 = ret[0];
11061
+ deferred1_1 = ret[1];
11062
+ return getStringFromWasm0(ret[0], ret[1]);
11063
+ } finally {
11064
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
11065
+ }
11066
+ }
11067
+ /**
11068
+ * @returns {number}
11069
+ */
11070
+ get userFeeIncrease() {
11071
+ const ret = wasm.identitykeylimitsupdate_user_fee_increase(this.__wbg_ptr);
11072
+ return ret;
11073
+ }
11074
+ }
11075
+ if (Symbol.dispose) IdentityKeyLimitsUpdate.prototype[Symbol.dispose] = IdentityKeyLimitsUpdate.prototype.free;
11076
+
11077
+ export class IdentityPublicKey {
11078
+ static __wrap(ptr) {
11079
+ ptr = ptr >>> 0;
11080
+ const obj = Object.create(IdentityPublicKey.prototype);
11081
+ obj.__wbg_ptr = ptr;
11082
+ IdentityPublicKeyFinalization.register(obj, obj.__wbg_ptr, obj);
11083
+ return obj;
11084
+ }
11085
+ __destroy_into_raw() {
11086
+ const ptr = this.__wbg_ptr;
11087
+ this.__wbg_ptr = 0;
11088
+ IdentityPublicKeyFinalization.unregister(this);
11089
+ return ptr;
11090
+ }
11091
+ free() {
11092
+ const ptr = this.__destroy_into_raw();
11093
+ wasm.__wbg_identitypublickey_free(ptr, 0);
11094
+ }
11095
+ /**
11096
+ * @returns {string}
11097
+ */
11098
+ base64() {
11099
+ let deferred2_0;
11100
+ let deferred2_1;
11101
+ try {
11102
+ const ret = wasm.identitypublickey_base64(this.__wbg_ptr);
11103
+ var ptr1 = ret[0];
11104
+ var len1 = ret[1];
11105
+ if (ret[3]) {
11106
+ ptr1 = 0; len1 = 0;
11107
+ throw takeFromExternrefTable0(ret[2]);
11108
+ }
11109
+ deferred2_0 = ptr1;
11110
+ deferred2_1 = len1;
11111
+ return getStringFromWasm0(ptr1, len1);
11112
+ } finally {
11113
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
11114
+ }
11115
+ }
11116
+ /**
11117
+ * @param {IdentityPublicKeyOptions} options
11118
+ */
11119
+ constructor(options) {
11120
+ const ret = wasm.identitypublickey_constructor(options);
11121
+ if (ret[2]) {
11122
+ throw takeFromExternrefTable0(ret[1]);
11123
+ }
11124
+ this.__wbg_ptr = ret[0] >>> 0;
11125
+ IdentityPublicKeyFinalization.register(this, this.__wbg_ptr, this);
11126
+ return this;
11127
+ }
11128
+ /**
11129
+ * @returns {ContractBounds | undefined}
11130
+ */
11131
+ get contractBounds() {
11132
+ const ret = wasm.identitypublickey_contract_bounds(this.__wbg_ptr);
11133
+ return ret === 0 ? undefined : ContractBounds.__wrap(ret);
11134
+ }
11135
+ /**
11136
+ * @returns {string}
11137
+ */
11138
+ get data() {
11139
+ let deferred1_0;
11140
+ let deferred1_1;
11141
+ try {
11142
+ const ret = wasm.identitypublickey_data(this.__wbg_ptr);
11143
+ deferred1_0 = ret[0];
11144
+ deferred1_1 = ret[1];
11145
+ return getStringFromWasm0(ret[0], ret[1]);
11146
+ } finally {
11147
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
11148
+ }
11149
+ }
11150
+ /**
11151
+ * @returns {bigint | undefined}
11152
+ */
11153
+ get disabledAt() {
11154
+ const ret = wasm.identitypublickey_disabled_at(this.__wbg_ptr);
11155
+ return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
11156
+ }
11157
+ /**
11158
+ * The block time in milliseconds from which the key can no longer sign, `undefined` when
11159
+ * it does not expire
11160
+ * @returns {bigint | undefined}
11161
+ */
11162
+ get expiresAt() {
11163
+ const ret = wasm.identitypublickey_expires_at(this.__wbg_ptr);
11164
+ return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
11165
+ }
11166
+ /**
11167
+ * @param {string} hex
11168
+ * @returns {IdentityPublicKey}
11169
+ */
11170
+ static fromBase64(hex) {
11171
+ const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
11172
+ const len0 = WASM_VECTOR_LEN;
11173
+ const ret = wasm.identitypublickey_fromBase64(ptr0, len0);
11174
+ if (ret[2]) {
11175
+ throw takeFromExternrefTable0(ret[1]);
11176
+ }
11177
+ return IdentityPublicKey.__wrap(ret[0]);
11178
+ }
11179
+ /**
11180
+ * @param {Uint8Array} bytes
11181
+ * @returns {IdentityPublicKey}
11182
+ */
11183
+ static fromBytes(bytes) {
11184
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
11185
+ const len0 = WASM_VECTOR_LEN;
11186
+ const ret = wasm.identitypublickey_fromBytes(ptr0, len0);
11187
+ if (ret[2]) {
11188
+ throw takeFromExternrefTable0(ret[1]);
11189
+ }
11190
+ return IdentityPublicKey.__wrap(ret[0]);
11191
+ }
11192
+ /**
11193
+ * @param {string} hex
11194
+ * @returns {IdentityPublicKey}
11195
+ */
11196
+ static fromHex(hex) {
11197
+ const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
11198
+ const len0 = WASM_VECTOR_LEN;
11199
+ const ret = wasm.identitypublickey_fromHex(ptr0, len0);
11200
+ if (ret[2]) {
11201
+ throw takeFromExternrefTable0(ret[1]);
11202
+ }
11203
+ return IdentityPublicKey.__wrap(ret[0]);
11204
+ }
11205
+ /**
11206
+ * Deserialize from JSON-compatible JS object (canonical wire shape).
11207
+ *
11208
+ * Expects base64 strings for binary fields, base58 strings for
11209
+ * identifiers — the canonical shape produced by `toJSON`.
11210
+ * `platform_version` is accepted for SDK API consistency but not
11211
+ * load-bearing today (canonical tag-driven dispatch handles V0).
11212
+ * @param {IdentityPublicKeyJSON} value
11213
+ * @param {PlatformVersionLike} _platform_version
11214
+ * @returns {IdentityPublicKey}
11215
+ */
11216
+ static fromJSON(value, _platform_version) {
11217
+ const ret = wasm.identitypublickey_fromJSON(value, _platform_version);
11218
+ if (ret[2]) {
11219
+ throw takeFromExternrefTable0(ret[1]);
11220
+ }
11221
+ return IdentityPublicKey.__wrap(ret[0]);
11222
+ }
11223
+ /**
11224
+ * Deserialize from JS object (non-human-readable).
11225
+ *
11226
+ * Uses platform_value conversion which properly handles the tagged enum.
11227
+ * `platform_version` is accepted for SDK API consistency but not
11228
+ * load-bearing today — canonical `ValueConvertible::from_object`
11229
+ * dispatches on the value's `$formatVersion` tag, which produces
11230
+ * identical output for the only currently-defined V0.
11231
+ * @param {IdentityPublicKeyObject} value
11232
+ * @param {PlatformVersionLike} _platform_version
11233
+ * @returns {IdentityPublicKey}
11234
+ */
11235
+ static fromObject(value, _platform_version) {
11236
+ const ret = wasm.identitypublickey_fromObject(value, _platform_version);
11237
+ if (ret[2]) {
11238
+ throw takeFromExternrefTable0(ret[1]);
11239
+ }
11240
+ return IdentityPublicKey.__wrap(ret[0]);
11241
+ }
11242
+ /**
11243
+ * @returns {string}
11244
+ */
11245
+ getPublicKeyHash() {
11246
+ let deferred2_0;
11247
+ let deferred2_1;
11248
+ try {
11249
+ const ret = wasm.identitypublickey_getPublicKeyHash(this.__wbg_ptr);
11250
+ var ptr1 = ret[0];
11251
+ var len1 = ret[1];
11252
+ if (ret[3]) {
11253
+ ptr1 = 0; len1 = 0;
11254
+ throw takeFromExternrefTable0(ret[2]);
11255
+ }
11256
+ deferred2_0 = ptr1;
11257
+ deferred2_1 = len1;
11258
+ return getStringFromWasm0(ptr1, len1);
11259
+ } finally {
11260
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
11261
+ }
11262
+ }
11263
+ /**
11264
+ * @returns {string}
11265
+ */
11266
+ hex() {
11267
+ let deferred2_0;
11268
+ let deferred2_1;
11269
+ try {
11270
+ const ret = wasm.identitypublickey_hex(this.__wbg_ptr);
11271
+ var ptr1 = ret[0];
11272
+ var len1 = ret[1];
11273
+ if (ret[3]) {
11274
+ ptr1 = 0; len1 = 0;
11275
+ throw takeFromExternrefTable0(ret[2]);
11276
+ }
11277
+ deferred2_0 = ptr1;
11278
+ deferred2_1 = len1;
10664
11279
  return getStringFromWasm0(ptr1, len1);
10665
11280
  } finally {
10666
11281
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
@@ -10773,6 +11388,16 @@ export class IdentityPublicKey {
10773
11388
  throw takeFromExternrefTable0(ret[0]);
10774
11389
  }
10775
11390
  }
11391
+ /**
11392
+ * Setting an expiry on a version 0 key makes it a version 1 key
11393
+ * @param {bigint | null} [expiresAt]
11394
+ */
11395
+ set expiresAt(expiresAt) {
11396
+ const ret = wasm.identitypublickey_set_expires_at(this.__wbg_ptr, isLikeNone(expiresAt) ? 0 : addToExternrefTable0(expiresAt));
11397
+ if (ret[1]) {
11398
+ throw takeFromExternrefTable0(ret[0]);
11399
+ }
11400
+ }
10776
11401
  /**
10777
11402
  * @param {boolean} isReadOnly
10778
11403
  */
@@ -10815,6 +11440,16 @@ export class IdentityPublicKey {
10815
11440
  throw takeFromExternrefTable0(ret[0]);
10816
11441
  }
10817
11442
  }
11443
+ /**
11444
+ * Setting a budget on a version 0 key makes it a version 1 key
11445
+ * @param {bigint | null} [totalBudget]
11446
+ */
11447
+ set totalBudget(totalBudget) {
11448
+ const ret = wasm.identitypublickey_set_total_budget(this.__wbg_ptr, isLikeNone(totalBudget) ? 0 : addToExternrefTable0(totalBudget));
11449
+ if (ret[1]) {
11450
+ throw takeFromExternrefTable0(ret[0]);
11451
+ }
11452
+ }
10818
11453
  /**
10819
11454
  * @returns {string}
10820
11455
  */
@@ -10873,6 +11508,14 @@ export class IdentityPublicKey {
10873
11508
  }
10874
11509
  return takeFromExternrefTable0(ret[0]);
10875
11510
  }
11511
+ /**
11512
+ * The total credits the key may spend over its lifetime, `undefined` when it has no budget
11513
+ * @returns {bigint | undefined}
11514
+ */
11515
+ get totalBudget() {
11516
+ const ret = wasm.identitypublickey_total_budget(this.__wbg_ptr);
11517
+ return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
11518
+ }
10876
11519
  /**
10877
11520
  * @returns {string}
10878
11521
  */
@@ -10951,6 +11594,15 @@ export class IdentityPublicKeyInCreation {
10951
11594
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
10952
11595
  return v1;
10953
11596
  }
11597
+ /**
11598
+ * The block time in milliseconds from which the key can no longer sign, `undefined` when
11599
+ * it does not expire
11600
+ * @returns {bigint | undefined}
11601
+ */
11602
+ get expiresAt() {
11603
+ const ret = wasm.identitypublickeyincreation_expires_at(this.__wbg_ptr);
11604
+ return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
11605
+ }
10954
11606
  /**
10955
11607
  * @param {IdentityPublicKeyInCreationJSON} js
10956
11608
  * @returns {IdentityPublicKeyInCreation}
@@ -11063,6 +11715,17 @@ export class IdentityPublicKeyInCreation {
11063
11715
  const len0 = WASM_VECTOR_LEN;
11064
11716
  wasm.identitypublickeyincreation_set_data(this.__wbg_ptr, ptr0, len0);
11065
11717
  }
11718
+ /**
11719
+ * Setting an expiry on a version 0 key makes it a version 1 key. The key's own signature
11720
+ * no longer covers it afterwards: sign again.
11721
+ * @param {bigint | null} [expiresAt]
11722
+ */
11723
+ set expiresAt(expiresAt) {
11724
+ const ret = wasm.identitypublickeyincreation_set_expires_at(this.__wbg_ptr, isLikeNone(expiresAt) ? 0 : addToExternrefTable0(expiresAt));
11725
+ if (ret[1]) {
11726
+ throw takeFromExternrefTable0(ret[0]);
11727
+ }
11728
+ }
11066
11729
  /**
11067
11730
  * @param {boolean} isReadOnly
11068
11731
  */
@@ -11113,6 +11776,17 @@ export class IdentityPublicKeyInCreation {
11113
11776
  const len0 = WASM_VECTOR_LEN;
11114
11777
  wasm.identitypublickeyincreation_set_signature(this.__wbg_ptr, ptr0, len0);
11115
11778
  }
11779
+ /**
11780
+ * Setting a budget on a version 0 key makes it a version 1 key. The key's own signature
11781
+ * no longer covers it afterwards: sign again.
11782
+ * @param {bigint | null} [totalBudget]
11783
+ */
11784
+ set totalBudget(totalBudget) {
11785
+ const ret = wasm.identitypublickeyincreation_set_total_budget(this.__wbg_ptr, isLikeNone(totalBudget) ? 0 : addToExternrefTable0(totalBudget));
11786
+ if (ret[1]) {
11787
+ throw takeFromExternrefTable0(ret[0]);
11788
+ }
11789
+ }
11116
11790
  /**
11117
11791
  * @returns {Uint8Array}
11118
11792
  */
@@ -11164,6 +11838,14 @@ export class IdentityPublicKeyInCreation {
11164
11838
  }
11165
11839
  return takeFromExternrefTable0(ret[0]);
11166
11840
  }
11841
+ /**
11842
+ * The credits the key may spend over its lifetime, `undefined` when it has no budget
11843
+ * @returns {bigint | undefined}
11844
+ */
11845
+ get totalBudget() {
11846
+ const ret = wasm.identitypublickeyincreation_total_budget(this.__wbg_ptr);
11847
+ return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
11848
+ }
11167
11849
  /**
11168
11850
  * @returns {string}
11169
11851
  */
@@ -11456,54 +12138,334 @@ export class IdentityTopUpFromAddressesTransition {
11456
12138
  return v1;
11457
12139
  }
11458
12140
  /**
11459
- * @returns {PlatformAddressOutput | undefined}
12141
+ * @returns {PlatformAddressOutput | undefined}
12142
+ */
12143
+ get output() {
12144
+ const ret = wasm.identitytopupfromaddressestransition_output(this.__wbg_ptr);
12145
+ return ret === 0 ? undefined : PlatformAddressOutput.__wrap(ret);
12146
+ }
12147
+ /**
12148
+ * @param {IdentifierLike} identityId
12149
+ */
12150
+ set identityId(identityId) {
12151
+ const ret = wasm.identitytopupfromaddressestransition_set_identity_id(this.__wbg_ptr, identityId);
12152
+ if (ret[1]) {
12153
+ throw takeFromExternrefTable0(ret[0]);
12154
+ }
12155
+ }
12156
+ /**
12157
+ * @param {PlatformAddressInput[]} inputs
12158
+ */
12159
+ set inputs(inputs) {
12160
+ const ptr0 = passArrayJsValueToWasm0(inputs, wasm.__wbindgen_malloc);
12161
+ const len0 = WASM_VECTOR_LEN;
12162
+ const ret = wasm.identitytopupfromaddressestransition_set_inputs(this.__wbg_ptr, ptr0, len0);
12163
+ if (ret[1]) {
12164
+ throw takeFromExternrefTable0(ret[0]);
12165
+ }
12166
+ }
12167
+ /**
12168
+ * @param {PlatformAddressOutput | null} [output]
12169
+ */
12170
+ set output(output) {
12171
+ let ptr0 = 0;
12172
+ if (!isLikeNone(output)) {
12173
+ _assertClass(output, PlatformAddressOutput);
12174
+ ptr0 = output.__destroy_into_raw();
12175
+ }
12176
+ const ret = wasm.identitytopupfromaddressestransition_set_output(this.__wbg_ptr, ptr0);
12177
+ if (ret[1]) {
12178
+ throw takeFromExternrefTable0(ret[0]);
12179
+ }
12180
+ }
12181
+ /**
12182
+ * @param {number} userFeeIncrease
12183
+ */
12184
+ set userFeeIncrease(userFeeIncrease) {
12185
+ const ret = wasm.identitytopupfromaddressestransition_set_user_fee_increase(this.__wbg_ptr, userFeeIncrease);
12186
+ if (ret[1]) {
12187
+ throw takeFromExternrefTable0(ret[0]);
12188
+ }
12189
+ }
12190
+ /**
12191
+ * @returns {string}
12192
+ */
12193
+ static get __struct() {
12194
+ let deferred1_0;
12195
+ let deferred1_1;
12196
+ try {
12197
+ const ret = wasm.identitytopupfromaddressestransition_struct_name();
12198
+ deferred1_0 = ret[0];
12199
+ deferred1_1 = ret[1];
12200
+ return getStringFromWasm0(ret[0], ret[1]);
12201
+ } finally {
12202
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
12203
+ }
12204
+ }
12205
+ /**
12206
+ * @returns {string}
12207
+ */
12208
+ toBase64() {
12209
+ let deferred2_0;
12210
+ let deferred2_1;
12211
+ try {
12212
+ const ret = wasm.identitytopupfromaddressestransition_toBase64(this.__wbg_ptr);
12213
+ var ptr1 = ret[0];
12214
+ var len1 = ret[1];
12215
+ if (ret[3]) {
12216
+ ptr1 = 0; len1 = 0;
12217
+ throw takeFromExternrefTable0(ret[2]);
12218
+ }
12219
+ deferred2_0 = ptr1;
12220
+ deferred2_1 = len1;
12221
+ return getStringFromWasm0(ptr1, len1);
12222
+ } finally {
12223
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
12224
+ }
12225
+ }
12226
+ /**
12227
+ * @returns {Uint8Array}
12228
+ */
12229
+ toBytes() {
12230
+ const ret = wasm.identitytopupfromaddressestransition_toBytes(this.__wbg_ptr);
12231
+ if (ret[3]) {
12232
+ throw takeFromExternrefTable0(ret[2]);
12233
+ }
12234
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
12235
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
12236
+ return v1;
12237
+ }
12238
+ /**
12239
+ * @returns {string}
12240
+ */
12241
+ toHex() {
12242
+ let deferred2_0;
12243
+ let deferred2_1;
12244
+ try {
12245
+ const ret = wasm.identitytopupfromaddressestransition_toHex(this.__wbg_ptr);
12246
+ var ptr1 = ret[0];
12247
+ var len1 = ret[1];
12248
+ if (ret[3]) {
12249
+ ptr1 = 0; len1 = 0;
12250
+ throw takeFromExternrefTable0(ret[2]);
12251
+ }
12252
+ deferred2_0 = ptr1;
12253
+ deferred2_1 = len1;
12254
+ return getStringFromWasm0(ptr1, len1);
12255
+ } finally {
12256
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
12257
+ }
12258
+ }
12259
+ /**
12260
+ * @returns {IdentityTopUpFromAddressesTransitionJSON}
12261
+ */
12262
+ toJSON() {
12263
+ const ret = wasm.identitytopupfromaddressestransition_toJSON(this.__wbg_ptr);
12264
+ if (ret[2]) {
12265
+ throw takeFromExternrefTable0(ret[1]);
12266
+ }
12267
+ return takeFromExternrefTable0(ret[0]);
12268
+ }
12269
+ /**
12270
+ * @returns {IdentityTopUpFromAddressesTransitionObject}
12271
+ */
12272
+ toObject() {
12273
+ const ret = wasm.identitytopupfromaddressestransition_toObject(this.__wbg_ptr);
12274
+ if (ret[2]) {
12275
+ throw takeFromExternrefTable0(ret[1]);
12276
+ }
12277
+ return takeFromExternrefTable0(ret[0]);
12278
+ }
12279
+ /**
12280
+ * @returns {StateTransition}
12281
+ */
12282
+ toStateTransition() {
12283
+ const ret = wasm.identitytopupfromaddressestransition_toStateTransition(this.__wbg_ptr);
12284
+ return StateTransition.__wrap(ret);
12285
+ }
12286
+ /**
12287
+ * @returns {string}
12288
+ */
12289
+ get __type() {
12290
+ let deferred1_0;
12291
+ let deferred1_1;
12292
+ try {
12293
+ const ret = wasm.identitytopupfromaddressestransition_type_name(this.__wbg_ptr);
12294
+ deferred1_0 = ret[0];
12295
+ deferred1_1 = ret[1];
12296
+ return getStringFromWasm0(ret[0], ret[1]);
12297
+ } finally {
12298
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
12299
+ }
12300
+ }
12301
+ /**
12302
+ * @returns {number}
12303
+ */
12304
+ get userFeeIncrease() {
12305
+ const ret = wasm.identitytopupfromaddressestransition_user_fee_increase(this.__wbg_ptr);
12306
+ return ret;
12307
+ }
12308
+ }
12309
+ if (Symbol.dispose) IdentityTopUpFromAddressesTransition.prototype[Symbol.dispose] = IdentityTopUpFromAddressesTransition.prototype.free;
12310
+
12311
+ export class IdentityTopUpFromShieldedPoolTransition {
12312
+ static __wrap(ptr) {
12313
+ ptr = ptr >>> 0;
12314
+ const obj = Object.create(IdentityTopUpFromShieldedPoolTransition.prototype);
12315
+ obj.__wbg_ptr = ptr;
12316
+ IdentityTopUpFromShieldedPoolTransitionFinalization.register(obj, obj.__wbg_ptr, obj);
12317
+ return obj;
12318
+ }
12319
+ __destroy_into_raw() {
12320
+ const ptr = this.__wbg_ptr;
12321
+ this.__wbg_ptr = 0;
12322
+ IdentityTopUpFromShieldedPoolTransitionFinalization.unregister(this);
12323
+ return ptr;
12324
+ }
12325
+ free() {
12326
+ const ptr = this.__destroy_into_raw();
12327
+ wasm.__wbg_identitytopupfromshieldedpooltransition_free(ptr, 0);
12328
+ }
12329
+ /**
12330
+ * Returns the serialized Orchard actions.
12331
+ * @returns {SerializedOrchardAction[]}
12332
+ */
12333
+ get actions() {
12334
+ const ret = wasm.identitytopupfromshieldedpooltransition_actions(this.__wbg_ptr);
12335
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
12336
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
12337
+ return v1;
12338
+ }
12339
+ /**
12340
+ * @returns {Uint8Array}
12341
+ */
12342
+ get anchor() {
12343
+ const ret = wasm.identitytopupfromshieldedpooltransition_anchor(this.__wbg_ptr);
12344
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
12345
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
12346
+ return v1;
12347
+ }
12348
+ /**
12349
+ * @returns {Uint8Array}
12350
+ */
12351
+ get bindingSignature() {
12352
+ const ret = wasm.identitytopupfromshieldedpooltransition_binding_signature(this.__wbg_ptr);
12353
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
12354
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
12355
+ return v1;
12356
+ }
12357
+ /**
12358
+ * @param {string} base64
12359
+ * @returns {IdentityTopUpFromShieldedPoolTransition}
12360
+ */
12361
+ static fromBase64(base64) {
12362
+ const ptr0 = passStringToWasm0(base64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
12363
+ const len0 = WASM_VECTOR_LEN;
12364
+ const ret = wasm.identitytopupfromshieldedpooltransition_fromBase64(ptr0, len0);
12365
+ if (ret[2]) {
12366
+ throw takeFromExternrefTable0(ret[1]);
12367
+ }
12368
+ return IdentityTopUpFromShieldedPoolTransition.__wrap(ret[0]);
12369
+ }
12370
+ /**
12371
+ * @param {Uint8Array} bytes
12372
+ * @returns {IdentityTopUpFromShieldedPoolTransition}
12373
+ */
12374
+ static fromBytes(bytes) {
12375
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
12376
+ const len0 = WASM_VECTOR_LEN;
12377
+ const ret = wasm.identitytopupfromshieldedpooltransition_fromBytes(ptr0, len0);
12378
+ if (ret[2]) {
12379
+ throw takeFromExternrefTable0(ret[1]);
12380
+ }
12381
+ return IdentityTopUpFromShieldedPoolTransition.__wrap(ret[0]);
12382
+ }
12383
+ /**
12384
+ * @param {string} hex
12385
+ * @returns {IdentityTopUpFromShieldedPoolTransition}
12386
+ */
12387
+ static fromHex(hex) {
12388
+ const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
12389
+ const len0 = WASM_VECTOR_LEN;
12390
+ const ret = wasm.identitytopupfromshieldedpooltransition_fromHex(ptr0, len0);
12391
+ if (ret[2]) {
12392
+ throw takeFromExternrefTable0(ret[1]);
12393
+ }
12394
+ return IdentityTopUpFromShieldedPoolTransition.__wrap(ret[0]);
12395
+ }
12396
+ /**
12397
+ * @param {IdentityTopUpFromShieldedPoolTransitionJSON} js
12398
+ * @returns {IdentityTopUpFromShieldedPoolTransition}
12399
+ */
12400
+ static fromJSON(js) {
12401
+ const ret = wasm.identitytopupfromshieldedpooltransition_fromJSON(js);
12402
+ if (ret[2]) {
12403
+ throw takeFromExternrefTable0(ret[1]);
12404
+ }
12405
+ return IdentityTopUpFromShieldedPoolTransition.__wrap(ret[0]);
12406
+ }
12407
+ /**
12408
+ * @param {IdentityTopUpFromShieldedPoolTransitionObject} obj
12409
+ * @returns {IdentityTopUpFromShieldedPoolTransition}
12410
+ */
12411
+ static fromObject(obj) {
12412
+ const ret = wasm.identitytopupfromshieldedpooltransition_fromObject(obj);
12413
+ if (ret[2]) {
12414
+ throw takeFromExternrefTable0(ret[1]);
12415
+ }
12416
+ return IdentityTopUpFromShieldedPoolTransition.__wrap(ret[0]);
12417
+ }
12418
+ /**
12419
+ * @param {StateTransition} st
12420
+ * @returns {IdentityTopUpFromShieldedPoolTransition}
11460
12421
  */
11461
- get output() {
11462
- const ret = wasm.identitytopupfromaddressestransition_output(this.__wbg_ptr);
11463
- return ret === 0 ? undefined : PlatformAddressOutput.__wrap(ret);
12422
+ static fromStateTransition(st) {
12423
+ _assertClass(st, StateTransition);
12424
+ const ret = wasm.identitytopupfromshieldedpooltransition_fromStateTransition(st.__wbg_ptr);
12425
+ if (ret[2]) {
12426
+ throw takeFromExternrefTable0(ret[1]);
12427
+ }
12428
+ return IdentityTopUpFromShieldedPoolTransition.__wrap(ret[0]);
11464
12429
  }
11465
12430
  /**
11466
- * @param {IdentifierLike} identityId
12431
+ * @returns {Identifier[]}
11467
12432
  */
11468
- set identityId(identityId) {
11469
- const ret = wasm.identitytopupfromaddressestransition_set_identity_id(this.__wbg_ptr, identityId);
11470
- if (ret[1]) {
11471
- throw takeFromExternrefTable0(ret[0]);
11472
- }
12433
+ getModifiedDataIds() {
12434
+ const ret = wasm.identitytopupfromshieldedpooltransition_getModifiedDataIds(this.__wbg_ptr);
12435
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
12436
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
12437
+ return v1;
11473
12438
  }
11474
12439
  /**
11475
- * @param {PlatformAddressInput[]} inputs
12440
+ * The identity whose balance receives the top-up. Read-only: the identity id
12441
+ * and the gross amount are committed into the Orchard binding signature, so a
12442
+ * wrapper that changed them would produce a transition consensus must reject.
12443
+ * @returns {Identifier}
11476
12444
  */
11477
- set inputs(inputs) {
11478
- const ptr0 = passArrayJsValueToWasm0(inputs, wasm.__wbindgen_malloc);
11479
- const len0 = WASM_VECTOR_LEN;
11480
- const ret = wasm.identitytopupfromaddressestransition_set_inputs(this.__wbg_ptr, ptr0, len0);
11481
- if (ret[1]) {
11482
- throw takeFromExternrefTable0(ret[0]);
11483
- }
12445
+ get identityId() {
12446
+ const ret = wasm.identitytopupfromshieldedpooltransition_identity_id(this.__wbg_ptr);
12447
+ return Identifier.__wrap(ret);
11484
12448
  }
11485
12449
  /**
11486
- * @param {PlatformAddressOutput | null} [output]
12450
+ * @param {IdentityTopUpFromShieldedPoolTransitionOptions} options
11487
12451
  */
11488
- set output(output) {
11489
- let ptr0 = 0;
11490
- if (!isLikeNone(output)) {
11491
- _assertClass(output, PlatformAddressOutput);
11492
- ptr0 = output.__destroy_into_raw();
11493
- }
11494
- const ret = wasm.identitytopupfromaddressestransition_set_output(this.__wbg_ptr, ptr0);
11495
- if (ret[1]) {
11496
- throw takeFromExternrefTable0(ret[0]);
12452
+ constructor(options) {
12453
+ const ret = wasm.identitytopupfromshieldedpooltransition_new(options);
12454
+ if (ret[2]) {
12455
+ throw takeFromExternrefTable0(ret[1]);
11497
12456
  }
12457
+ this.__wbg_ptr = ret[0] >>> 0;
12458
+ IdentityTopUpFromShieldedPoolTransitionFinalization.register(this, this.__wbg_ptr, this);
12459
+ return this;
11498
12460
  }
11499
12461
  /**
11500
- * @param {number} userFeeIncrease
12462
+ * @returns {Uint8Array}
11501
12463
  */
11502
- set userFeeIncrease(userFeeIncrease) {
11503
- const ret = wasm.identitytopupfromaddressestransition_set_user_fee_increase(this.__wbg_ptr, userFeeIncrease);
11504
- if (ret[1]) {
11505
- throw takeFromExternrefTable0(ret[0]);
11506
- }
12464
+ get proof() {
12465
+ const ret = wasm.identitytopupfromshieldedpooltransition_proof(this.__wbg_ptr);
12466
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
12467
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
12468
+ return v1;
11507
12469
  }
11508
12470
  /**
11509
12471
  * @returns {string}
@@ -11512,7 +12474,7 @@ export class IdentityTopUpFromAddressesTransition {
11512
12474
  let deferred1_0;
11513
12475
  let deferred1_1;
11514
12476
  try {
11515
- const ret = wasm.identitytopupfromaddressestransition_struct_name();
12477
+ const ret = wasm.identitytopupfromshieldedpooltransition_struct_name();
11516
12478
  deferred1_0 = ret[0];
11517
12479
  deferred1_1 = ret[1];
11518
12480
  return getStringFromWasm0(ret[0], ret[1]);
@@ -11527,7 +12489,7 @@ export class IdentityTopUpFromAddressesTransition {
11527
12489
  let deferred2_0;
11528
12490
  let deferred2_1;
11529
12491
  try {
11530
- const ret = wasm.identitytopupfromaddressestransition_toBase64(this.__wbg_ptr);
12492
+ const ret = wasm.identitytopupfromshieldedpooltransition_toBase64(this.__wbg_ptr);
11531
12493
  var ptr1 = ret[0];
11532
12494
  var len1 = ret[1];
11533
12495
  if (ret[3]) {
@@ -11545,7 +12507,7 @@ export class IdentityTopUpFromAddressesTransition {
11545
12507
  * @returns {Uint8Array}
11546
12508
  */
11547
12509
  toBytes() {
11548
- const ret = wasm.identitytopupfromaddressestransition_toBytes(this.__wbg_ptr);
12510
+ const ret = wasm.identitytopupfromshieldedpooltransition_toBytes(this.__wbg_ptr);
11549
12511
  if (ret[3]) {
11550
12512
  throw takeFromExternrefTable0(ret[2]);
11551
12513
  }
@@ -11560,7 +12522,7 @@ export class IdentityTopUpFromAddressesTransition {
11560
12522
  let deferred2_0;
11561
12523
  let deferred2_1;
11562
12524
  try {
11563
- const ret = wasm.identitytopupfromaddressestransition_toHex(this.__wbg_ptr);
12525
+ const ret = wasm.identitytopupfromshieldedpooltransition_toHex(this.__wbg_ptr);
11564
12526
  var ptr1 = ret[0];
11565
12527
  var len1 = ret[1];
11566
12528
  if (ret[3]) {
@@ -11575,20 +12537,20 @@ export class IdentityTopUpFromAddressesTransition {
11575
12537
  }
11576
12538
  }
11577
12539
  /**
11578
- * @returns {IdentityTopUpFromAddressesTransitionJSON}
12540
+ * @returns {IdentityTopUpFromShieldedPoolTransitionJSON}
11579
12541
  */
11580
12542
  toJSON() {
11581
- const ret = wasm.identitytopupfromaddressestransition_toJSON(this.__wbg_ptr);
12543
+ const ret = wasm.identitytopupfromshieldedpooltransition_toJSON(this.__wbg_ptr);
11582
12544
  if (ret[2]) {
11583
12545
  throw takeFromExternrefTable0(ret[1]);
11584
12546
  }
11585
12547
  return takeFromExternrefTable0(ret[0]);
11586
12548
  }
11587
12549
  /**
11588
- * @returns {IdentityTopUpFromAddressesTransitionObject}
12550
+ * @returns {IdentityTopUpFromShieldedPoolTransitionObject}
11589
12551
  */
11590
12552
  toObject() {
11591
- const ret = wasm.identitytopupfromaddressestransition_toObject(this.__wbg_ptr);
12553
+ const ret = wasm.identitytopupfromshieldedpooltransition_toObject(this.__wbg_ptr);
11592
12554
  if (ret[2]) {
11593
12555
  throw takeFromExternrefTable0(ret[1]);
11594
12556
  }
@@ -11598,9 +12560,17 @@ export class IdentityTopUpFromAddressesTransition {
11598
12560
  * @returns {StateTransition}
11599
12561
  */
11600
12562
  toStateTransition() {
11601
- const ret = wasm.identitytopupfromaddressestransition_toStateTransition(this.__wbg_ptr);
12563
+ const ret = wasm.identitytopupfromshieldedpooltransition_toStateTransition(this.__wbg_ptr);
11602
12564
  return StateTransition.__wrap(ret);
11603
12565
  }
12566
+ /**
12567
+ * Gross credits leaving the pool; the identity receives this minus the flat fee.
12568
+ * @returns {bigint}
12569
+ */
12570
+ get topUpAmount() {
12571
+ const ret = wasm.identitytopupfromshieldedpooltransition_top_up_amount(this.__wbg_ptr);
12572
+ return BigInt.asUintN(64, ret);
12573
+ }
11604
12574
  /**
11605
12575
  * @returns {string}
11606
12576
  */
@@ -11608,7 +12578,7 @@ export class IdentityTopUpFromAddressesTransition {
11608
12578
  let deferred1_0;
11609
12579
  let deferred1_1;
11610
12580
  try {
11611
- const ret = wasm.identitytopupfromaddressestransition_type_name(this.__wbg_ptr);
12581
+ const ret = wasm.identitytopupfromshieldedpooltransition_type_name(this.__wbg_ptr);
11612
12582
  deferred1_0 = ret[0];
11613
12583
  deferred1_1 = ret[1];
11614
12584
  return getStringFromWasm0(ret[0], ret[1]);
@@ -11616,15 +12586,8 @@ export class IdentityTopUpFromAddressesTransition {
11616
12586
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
11617
12587
  }
11618
12588
  }
11619
- /**
11620
- * @returns {number}
11621
- */
11622
- get userFeeIncrease() {
11623
- const ret = wasm.identitytopupfromaddressestransition_user_fee_increase(this.__wbg_ptr);
11624
- return ret;
11625
- }
11626
12589
  }
11627
- if (Symbol.dispose) IdentityTopUpFromAddressesTransition.prototype[Symbol.dispose] = IdentityTopUpFromAddressesTransition.prototype.free;
12590
+ if (Symbol.dispose) IdentityTopUpFromShieldedPoolTransition.prototype[Symbol.dispose] = IdentityTopUpFromShieldedPoolTransition.prototype.free;
11628
12591
 
11629
12592
  export class IdentityTopUpTransition {
11630
12593
  static __wrap(ptr) {
@@ -14957,7 +15920,7 @@ export class SharedEncryptedNote {
14957
15920
  constructor(senderKeyIndex, recipientKeyIndex, value) {
14958
15921
  const ptr0 = passArray8ToWasm0(value, wasm.__wbindgen_malloc);
14959
15922
  const len0 = WASM_VECTOR_LEN;
14960
- const ret = wasm.privateencryptednote_constructor(senderKeyIndex, recipientKeyIndex, ptr0, len0);
15923
+ const ret = wasm.sharedencryptednote_constructor(senderKeyIndex, recipientKeyIndex, ptr0, len0);
14961
15924
  this.__wbg_ptr = ret >>> 0;
14962
15925
  SharedEncryptedNoteFinalization.register(this, this.__wbg_ptr, this);
14963
15926
  return this;
@@ -15003,7 +15966,181 @@ export class SharedEncryptedNote {
15003
15966
  let deferred1_0;
15004
15967
  let deferred1_1;
15005
15968
  try {
15006
- const ret = wasm.sharedencryptednote_struct_name();
15969
+ const ret = wasm.sharedencryptednote_struct_name();
15970
+ deferred1_0 = ret[0];
15971
+ deferred1_1 = ret[1];
15972
+ return getStringFromWasm0(ret[0], ret[1]);
15973
+ } finally {
15974
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
15975
+ }
15976
+ }
15977
+ /**
15978
+ * @returns {string}
15979
+ */
15980
+ get __type() {
15981
+ let deferred1_0;
15982
+ let deferred1_1;
15983
+ try {
15984
+ const ret = wasm.sharedencryptednote_type_name(this.__wbg_ptr);
15985
+ deferred1_0 = ret[0];
15986
+ deferred1_1 = ret[1];
15987
+ return getStringFromWasm0(ret[0], ret[1]);
15988
+ } finally {
15989
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
15990
+ }
15991
+ }
15992
+ /**
15993
+ * @returns {Uint8Array}
15994
+ */
15995
+ get value() {
15996
+ const ret = wasm.sharedencryptednote_value(this.__wbg_ptr);
15997
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15998
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15999
+ return v1;
16000
+ }
16001
+ }
16002
+ if (Symbol.dispose) SharedEncryptedNote.prototype[Symbol.dispose] = SharedEncryptedNote.prototype.free;
16003
+
16004
+ export class ShieldFromAssetLockTransition {
16005
+ static __wrap(ptr) {
16006
+ ptr = ptr >>> 0;
16007
+ const obj = Object.create(ShieldFromAssetLockTransition.prototype);
16008
+ obj.__wbg_ptr = ptr;
16009
+ ShieldFromAssetLockTransitionFinalization.register(obj, obj.__wbg_ptr, obj);
16010
+ return obj;
16011
+ }
16012
+ __destroy_into_raw() {
16013
+ const ptr = this.__wbg_ptr;
16014
+ this.__wbg_ptr = 0;
16015
+ ShieldFromAssetLockTransitionFinalization.unregister(this);
16016
+ return ptr;
16017
+ }
16018
+ free() {
16019
+ const ptr = this.__destroy_into_raw();
16020
+ wasm.__wbg_shieldfromassetlocktransition_free(ptr, 0);
16021
+ }
16022
+ /**
16023
+ * Returns the serialized Orchard actions.
16024
+ * @returns {SerializedOrchardAction[]}
16025
+ */
16026
+ get actions() {
16027
+ const ret = wasm.shieldfromassetlocktransition_actions(this.__wbg_ptr);
16028
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
16029
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
16030
+ return v1;
16031
+ }
16032
+ /**
16033
+ * Returns the anchor (32-byte Merkle root).
16034
+ * @returns {Uint8Array}
16035
+ */
16036
+ get anchor() {
16037
+ const ret = wasm.shieldfromassetlocktransition_anchor(this.__wbg_ptr);
16038
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
16039
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
16040
+ return v1;
16041
+ }
16042
+ /**
16043
+ * Returns the asset lock proof.
16044
+ * @returns {AssetLockProof}
16045
+ */
16046
+ get assetLockProof() {
16047
+ const ret = wasm.shieldfromassetlocktransition_asset_lock_proof(this.__wbg_ptr);
16048
+ return AssetLockProof.__wrap(ret);
16049
+ }
16050
+ /**
16051
+ * Returns the RedPallas binding signature (64 bytes).
16052
+ * @returns {Uint8Array}
16053
+ */
16054
+ get bindingSignature() {
16055
+ const ret = wasm.shieldfromassetlocktransition_binding_signature(this.__wbg_ptr);
16056
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
16057
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
16058
+ return v1;
16059
+ }
16060
+ /**
16061
+ * @param {Uint8Array} bytes
16062
+ * @returns {ShieldFromAssetLockTransition}
16063
+ */
16064
+ static fromBytes(bytes) {
16065
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
16066
+ const len0 = WASM_VECTOR_LEN;
16067
+ const ret = wasm.shieldfromassetlocktransition_fromBytes(ptr0, len0);
16068
+ if (ret[2]) {
16069
+ throw takeFromExternrefTable0(ret[1]);
16070
+ }
16071
+ return ShieldFromAssetLockTransition.__wrap(ret[0]);
16072
+ }
16073
+ /**
16074
+ * @param {ShieldFromAssetLockTransitionJSON} js
16075
+ * @returns {ShieldFromAssetLockTransition}
16076
+ */
16077
+ static fromJSON(js) {
16078
+ const ret = wasm.shieldfromassetlocktransition_fromJSON(js);
16079
+ if (ret[2]) {
16080
+ throw takeFromExternrefTable0(ret[1]);
16081
+ }
16082
+ return ShieldFromAssetLockTransition.__wrap(ret[0]);
16083
+ }
16084
+ /**
16085
+ * @param {ShieldFromAssetLockTransitionObject} obj
16086
+ * @returns {ShieldFromAssetLockTransition}
16087
+ */
16088
+ static fromObject(obj) {
16089
+ const ret = wasm.shieldfromassetlocktransition_fromObject(obj);
16090
+ if (ret[2]) {
16091
+ throw takeFromExternrefTable0(ret[1]);
16092
+ }
16093
+ return ShieldFromAssetLockTransition.__wrap(ret[0]);
16094
+ }
16095
+ /**
16096
+ * @returns {Identifier[]}
16097
+ */
16098
+ getModifiedDataIds() {
16099
+ const ret = wasm.shieldfromassetlocktransition_getModifiedDataIds(this.__wbg_ptr);
16100
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
16101
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
16102
+ return v1;
16103
+ }
16104
+ /**
16105
+ * @param {ShieldFromAssetLockTransitionOptions} options
16106
+ */
16107
+ constructor(options) {
16108
+ const ret = wasm.shieldfromassetlocktransition_new(options);
16109
+ if (ret[2]) {
16110
+ throw takeFromExternrefTable0(ret[1]);
16111
+ }
16112
+ this.__wbg_ptr = ret[0] >>> 0;
16113
+ ShieldFromAssetLockTransitionFinalization.register(this, this.__wbg_ptr, this);
16114
+ return this;
16115
+ }
16116
+ /**
16117
+ * Returns the Halo2 proof bytes.
16118
+ * @returns {Uint8Array}
16119
+ */
16120
+ get proof() {
16121
+ const ret = wasm.shieldfromassetlocktransition_proof(this.__wbg_ptr);
16122
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
16123
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
16124
+ return v1;
16125
+ }
16126
+ /**
16127
+ * Returns the ECDSA signature.
16128
+ * @returns {Uint8Array}
16129
+ */
16130
+ get signature() {
16131
+ const ret = wasm.shieldfromassetlocktransition_signature(this.__wbg_ptr);
16132
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
16133
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
16134
+ return v1;
16135
+ }
16136
+ /**
16137
+ * @returns {string}
16138
+ */
16139
+ static get __struct() {
16140
+ let deferred1_0;
16141
+ let deferred1_1;
16142
+ try {
16143
+ const ret = wasm.shieldfromassetlocktransition_struct_name();
15007
16144
  deferred1_0 = ret[0];
15008
16145
  deferred1_1 = ret[1];
15009
16146
  return getStringFromWasm0(ret[0], ret[1]);
@@ -15011,6 +16148,54 @@ export class SharedEncryptedNote {
15011
16148
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
15012
16149
  }
15013
16150
  }
16151
+ /**
16152
+ * Returns the optional surplus-output platform address, or
16153
+ * `undefined` when the surplus folds into the fee pools.
16154
+ * @returns {PlatformAddress | undefined}
16155
+ */
16156
+ get surplusOutput() {
16157
+ const ret = wasm.shieldfromassetlocktransition_surplus_output(this.__wbg_ptr);
16158
+ return ret === 0 ? undefined : PlatformAddress.__wrap(ret);
16159
+ }
16160
+ /**
16161
+ * @returns {Uint8Array}
16162
+ */
16163
+ toBytes() {
16164
+ const ret = wasm.shieldfromassetlocktransition_toBytes(this.__wbg_ptr);
16165
+ if (ret[3]) {
16166
+ throw takeFromExternrefTable0(ret[2]);
16167
+ }
16168
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
16169
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
16170
+ return v1;
16171
+ }
16172
+ /**
16173
+ * @returns {ShieldFromAssetLockTransitionJSON}
16174
+ */
16175
+ toJSON() {
16176
+ const ret = wasm.shieldfromassetlocktransition_toJSON(this.__wbg_ptr);
16177
+ if (ret[2]) {
16178
+ throw takeFromExternrefTable0(ret[1]);
16179
+ }
16180
+ return takeFromExternrefTable0(ret[0]);
16181
+ }
16182
+ /**
16183
+ * @returns {ShieldFromAssetLockTransitionObject}
16184
+ */
16185
+ toObject() {
16186
+ const ret = wasm.shieldfromassetlocktransition_toObject(this.__wbg_ptr);
16187
+ if (ret[2]) {
16188
+ throw takeFromExternrefTable0(ret[1]);
16189
+ }
16190
+ return takeFromExternrefTable0(ret[0]);
16191
+ }
16192
+ /**
16193
+ * @returns {StateTransition}
16194
+ */
16195
+ toStateTransition() {
16196
+ const ret = wasm.shieldfromassetlocktransition_toStateTransition(this.__wbg_ptr);
16197
+ return StateTransition.__wrap(ret);
16198
+ }
15014
16199
  /**
15015
16200
  * @returns {string}
15016
16201
  */
@@ -15018,7 +16203,7 @@ export class SharedEncryptedNote {
15018
16203
  let deferred1_0;
15019
16204
  let deferred1_1;
15020
16205
  try {
15021
- const ret = wasm.sharedencryptednote_type_name(this.__wbg_ptr);
16206
+ const ret = wasm.shieldfromassetlocktransition_type_name(this.__wbg_ptr);
15022
16207
  deferred1_0 = ret[0];
15023
16208
  deferred1_1 = ret[1];
15024
16209
  return getStringFromWasm0(ret[0], ret[1]);
@@ -15027,149 +16212,251 @@ export class SharedEncryptedNote {
15027
16212
  }
15028
16213
  }
15029
16214
  /**
15030
- * @returns {Uint8Array}
16215
+ * Returns the net value balance.
16216
+ * @returns {bigint}
15031
16217
  */
15032
- get value() {
15033
- const ret = wasm.sharedencryptednote_value(this.__wbg_ptr);
15034
- var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15035
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15036
- return v1;
16218
+ get valueBalance() {
16219
+ const ret = wasm.shieldfromassetlocktransition_value_balance(this.__wbg_ptr);
16220
+ return BigInt.asUintN(64, ret);
15037
16221
  }
15038
16222
  }
15039
- if (Symbol.dispose) SharedEncryptedNote.prototype[Symbol.dispose] = SharedEncryptedNote.prototype.free;
16223
+ if (Symbol.dispose) ShieldFromAssetLockTransition.prototype[Symbol.dispose] = ShieldFromAssetLockTransition.prototype.free;
15040
16224
 
15041
- export class ShieldFromAssetLockTransition {
16225
+ export class ShieldFromIdentityTransition {
15042
16226
  static __wrap(ptr) {
15043
16227
  ptr = ptr >>> 0;
15044
- const obj = Object.create(ShieldFromAssetLockTransition.prototype);
16228
+ const obj = Object.create(ShieldFromIdentityTransition.prototype);
15045
16229
  obj.__wbg_ptr = ptr;
15046
- ShieldFromAssetLockTransitionFinalization.register(obj, obj.__wbg_ptr, obj);
16230
+ ShieldFromIdentityTransitionFinalization.register(obj, obj.__wbg_ptr, obj);
15047
16231
  return obj;
15048
16232
  }
15049
16233
  __destroy_into_raw() {
15050
16234
  const ptr = this.__wbg_ptr;
15051
16235
  this.__wbg_ptr = 0;
15052
- ShieldFromAssetLockTransitionFinalization.unregister(this);
16236
+ ShieldFromIdentityTransitionFinalization.unregister(this);
15053
16237
  return ptr;
15054
16238
  }
15055
16239
  free() {
15056
16240
  const ptr = this.__destroy_into_raw();
15057
- wasm.__wbg_shieldfromassetlocktransition_free(ptr, 0);
16241
+ wasm.__wbg_shieldfromidentitytransition_free(ptr, 0);
15058
16242
  }
15059
16243
  /**
15060
16244
  * Returns the serialized Orchard actions.
15061
16245
  * @returns {SerializedOrchardAction[]}
15062
16246
  */
15063
16247
  get actions() {
15064
- const ret = wasm.shieldfromassetlocktransition_actions(this.__wbg_ptr);
16248
+ const ret = wasm.shieldfromidentitytransition_actions(this.__wbg_ptr);
15065
16249
  var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
15066
16250
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
15067
16251
  return v1;
15068
16252
  }
16253
+ /**
16254
+ * Credits leaving the identity balance and entering the pool.
16255
+ * @returns {bigint}
16256
+ */
16257
+ get amount() {
16258
+ const ret = wasm.shieldfromidentitytransition_amount(this.__wbg_ptr);
16259
+ return BigInt.asUintN(64, ret);
16260
+ }
15069
16261
  /**
15070
16262
  * Returns the anchor (32-byte Merkle root).
15071
16263
  * @returns {Uint8Array}
15072
16264
  */
15073
16265
  get anchor() {
15074
- const ret = wasm.shieldfromassetlocktransition_anchor(this.__wbg_ptr);
16266
+ const ret = wasm.shieldfromidentitytransition_anchor(this.__wbg_ptr);
15075
16267
  var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15076
16268
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15077
16269
  return v1;
15078
16270
  }
15079
- /**
15080
- * Returns the asset lock proof.
15081
- * @returns {AssetLockProof}
15082
- */
15083
- get assetLockProof() {
15084
- const ret = wasm.shieldfromassetlocktransition_asset_lock_proof(this.__wbg_ptr);
15085
- return AssetLockProof.__wrap(ret);
15086
- }
15087
16271
  /**
15088
16272
  * Returns the RedPallas binding signature (64 bytes).
15089
16273
  * @returns {Uint8Array}
15090
16274
  */
15091
16275
  get bindingSignature() {
15092
- const ret = wasm.shieldfromassetlocktransition_binding_signature(this.__wbg_ptr);
16276
+ const ret = wasm.shieldfromidentitytransition_binding_signature(this.__wbg_ptr);
15093
16277
  var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15094
16278
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15095
16279
  return v1;
15096
16280
  }
16281
+ /**
16282
+ * @param {string} base64
16283
+ * @returns {ShieldFromIdentityTransition}
16284
+ */
16285
+ static fromBase64(base64) {
16286
+ const ptr0 = passStringToWasm0(base64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
16287
+ const len0 = WASM_VECTOR_LEN;
16288
+ const ret = wasm.shieldfromidentitytransition_fromBase64(ptr0, len0);
16289
+ if (ret[2]) {
16290
+ throw takeFromExternrefTable0(ret[1]);
16291
+ }
16292
+ return ShieldFromIdentityTransition.__wrap(ret[0]);
16293
+ }
15097
16294
  /**
15098
16295
  * @param {Uint8Array} bytes
15099
- * @returns {ShieldFromAssetLockTransition}
16296
+ * @returns {ShieldFromIdentityTransition}
15100
16297
  */
15101
16298
  static fromBytes(bytes) {
15102
16299
  const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
15103
16300
  const len0 = WASM_VECTOR_LEN;
15104
- const ret = wasm.shieldfromassetlocktransition_fromBytes(ptr0, len0);
16301
+ const ret = wasm.shieldfromidentitytransition_fromBytes(ptr0, len0);
15105
16302
  if (ret[2]) {
15106
16303
  throw takeFromExternrefTable0(ret[1]);
15107
16304
  }
15108
- return ShieldFromAssetLockTransition.__wrap(ret[0]);
16305
+ return ShieldFromIdentityTransition.__wrap(ret[0]);
15109
16306
  }
15110
16307
  /**
15111
- * @param {ShieldFromAssetLockTransitionJSON} js
15112
- * @returns {ShieldFromAssetLockTransition}
16308
+ * @param {string} hex
16309
+ * @returns {ShieldFromIdentityTransition}
16310
+ */
16311
+ static fromHex(hex) {
16312
+ const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
16313
+ const len0 = WASM_VECTOR_LEN;
16314
+ const ret = wasm.shieldfromidentitytransition_fromHex(ptr0, len0);
16315
+ if (ret[2]) {
16316
+ throw takeFromExternrefTable0(ret[1]);
16317
+ }
16318
+ return ShieldFromIdentityTransition.__wrap(ret[0]);
16319
+ }
16320
+ /**
16321
+ * @param {ShieldFromIdentityTransitionJSON} js
16322
+ * @returns {ShieldFromIdentityTransition}
15113
16323
  */
15114
16324
  static fromJSON(js) {
15115
- const ret = wasm.shieldfromassetlocktransition_fromJSON(js);
16325
+ const ret = wasm.shieldfromidentitytransition_fromJSON(js);
15116
16326
  if (ret[2]) {
15117
16327
  throw takeFromExternrefTable0(ret[1]);
15118
16328
  }
15119
- return ShieldFromAssetLockTransition.__wrap(ret[0]);
16329
+ return ShieldFromIdentityTransition.__wrap(ret[0]);
15120
16330
  }
15121
16331
  /**
15122
- * @param {ShieldFromAssetLockTransitionObject} obj
15123
- * @returns {ShieldFromAssetLockTransition}
16332
+ * @param {ShieldFromIdentityTransitionObject} obj
16333
+ * @returns {ShieldFromIdentityTransition}
15124
16334
  */
15125
16335
  static fromObject(obj) {
15126
- const ret = wasm.shieldfromassetlocktransition_fromObject(obj);
16336
+ const ret = wasm.shieldfromidentitytransition_fromObject(obj);
15127
16337
  if (ret[2]) {
15128
16338
  throw takeFromExternrefTable0(ret[1]);
15129
16339
  }
15130
- return ShieldFromAssetLockTransition.__wrap(ret[0]);
16340
+ return ShieldFromIdentityTransition.__wrap(ret[0]);
16341
+ }
16342
+ /**
16343
+ * @param {StateTransition} st
16344
+ * @returns {ShieldFromIdentityTransition}
16345
+ */
16346
+ static fromStateTransition(st) {
16347
+ _assertClass(st, StateTransition);
16348
+ const ret = wasm.shieldfromidentitytransition_fromStateTransition(st.__wbg_ptr);
16349
+ if (ret[2]) {
16350
+ throw takeFromExternrefTable0(ret[1]);
16351
+ }
16352
+ return ShieldFromIdentityTransition.__wrap(ret[0]);
15131
16353
  }
15132
16354
  /**
15133
16355
  * @returns {Identifier[]}
15134
16356
  */
15135
16357
  getModifiedDataIds() {
15136
- const ret = wasm.shieldfromassetlocktransition_getModifiedDataIds(this.__wbg_ptr);
16358
+ const ret = wasm.shieldfromidentitytransition_getModifiedDataIds(this.__wbg_ptr);
15137
16359
  var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
15138
16360
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
15139
16361
  return v1;
15140
16362
  }
15141
16363
  /**
15142
- * @param {ShieldFromAssetLockTransitionOptions} options
16364
+ * The identity whose balance funds the shield.
16365
+ * @returns {Identifier}
16366
+ */
16367
+ get identityId() {
16368
+ const ret = wasm.shieldfromidentitytransition_identity_id(this.__wbg_ptr);
16369
+ return Identifier.__wrap(ret);
16370
+ }
16371
+ /**
16372
+ * @param {ShieldFromIdentityTransitionOptions} options
15143
16373
  */
15144
16374
  constructor(options) {
15145
- const ret = wasm.shieldfromassetlocktransition_new(options);
16375
+ const ret = wasm.shieldfromidentitytransition_new(options);
15146
16376
  if (ret[2]) {
15147
16377
  throw takeFromExternrefTable0(ret[1]);
15148
16378
  }
15149
16379
  this.__wbg_ptr = ret[0] >>> 0;
15150
- ShieldFromAssetLockTransitionFinalization.register(this, this.__wbg_ptr, this);
16380
+ ShieldFromIdentityTransitionFinalization.register(this, this.__wbg_ptr, this);
15151
16381
  return this;
15152
16382
  }
16383
+ /**
16384
+ * @returns {bigint}
16385
+ */
16386
+ get nonce() {
16387
+ const ret = wasm.shieldfromidentitytransition_nonce(this.__wbg_ptr);
16388
+ return BigInt.asUintN(64, ret);
16389
+ }
15153
16390
  /**
15154
16391
  * Returns the Halo2 proof bytes.
15155
16392
  * @returns {Uint8Array}
15156
16393
  */
15157
16394
  get proof() {
15158
- const ret = wasm.shieldfromassetlocktransition_proof(this.__wbg_ptr);
16395
+ const ret = wasm.shieldfromidentitytransition_proof(this.__wbg_ptr);
15159
16396
  var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15160
16397
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15161
16398
  return v1;
15162
16399
  }
15163
16400
  /**
15164
- * Returns the ECDSA signature.
16401
+ * @param {IdentifierLike} identity_id
16402
+ */
16403
+ set identityId(identity_id) {
16404
+ const ret = wasm.shieldfromidentitytransition_set_identity_id(this.__wbg_ptr, identity_id);
16405
+ if (ret[1]) {
16406
+ throw takeFromExternrefTable0(ret[0]);
16407
+ }
16408
+ }
16409
+ /**
16410
+ * @param {bigint} nonce
16411
+ */
16412
+ set nonce(nonce) {
16413
+ const ret = wasm.shieldfromidentitytransition_set_nonce(this.__wbg_ptr, nonce);
16414
+ if (ret[1]) {
16415
+ throw takeFromExternrefTable0(ret[0]);
16416
+ }
16417
+ }
16418
+ /**
16419
+ * @param {Uint8Array} signature
16420
+ */
16421
+ set signature(signature) {
16422
+ const ptr0 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
16423
+ const len0 = WASM_VECTOR_LEN;
16424
+ wasm.shieldfromidentitytransition_set_signature(this.__wbg_ptr, ptr0, len0);
16425
+ }
16426
+ /**
16427
+ * @param {number} publicKeyId
16428
+ */
16429
+ set signaturePublicKeyId(publicKeyId) {
16430
+ const ret = wasm.shieldfromidentitytransition_set_signature_public_key_id(this.__wbg_ptr, publicKeyId);
16431
+ if (ret[1]) {
16432
+ throw takeFromExternrefTable0(ret[0]);
16433
+ }
16434
+ }
16435
+ /**
16436
+ * @param {number} amount
16437
+ */
16438
+ set userFeeIncrease(amount) {
16439
+ const ret = wasm.shieldfromidentitytransition_set_user_fee_increase(this.__wbg_ptr, amount);
16440
+ if (ret[1]) {
16441
+ throw takeFromExternrefTable0(ret[0]);
16442
+ }
16443
+ }
16444
+ /**
15165
16445
  * @returns {Uint8Array}
15166
16446
  */
15167
16447
  get signature() {
15168
- const ret = wasm.shieldfromassetlocktransition_signature(this.__wbg_ptr);
16448
+ const ret = wasm.shieldfromidentitytransition_signature(this.__wbg_ptr);
15169
16449
  var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15170
16450
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15171
16451
  return v1;
15172
16452
  }
16453
+ /**
16454
+ * @returns {number}
16455
+ */
16456
+ get signaturePublicKeyId() {
16457
+ const ret = wasm.shieldfromidentitytransition_signature_public_key_id(this.__wbg_ptr);
16458
+ return ret >>> 0;
16459
+ }
15173
16460
  /**
15174
16461
  * @returns {string}
15175
16462
  */
@@ -15177,7 +16464,7 @@ export class ShieldFromAssetLockTransition {
15177
16464
  let deferred1_0;
15178
16465
  let deferred1_1;
15179
16466
  try {
15180
- const ret = wasm.shieldfromassetlocktransition_struct_name();
16467
+ const ret = wasm.shieldfromidentitytransition_struct_name();
15181
16468
  deferred1_0 = ret[0];
15182
16469
  deferred1_1 = ret[1];
15183
16470
  return getStringFromWasm0(ret[0], ret[1]);
@@ -15186,19 +16473,31 @@ export class ShieldFromAssetLockTransition {
15186
16473
  }
15187
16474
  }
15188
16475
  /**
15189
- * Returns the optional surplus-output platform address, or
15190
- * `undefined` when the surplus folds into the fee pools.
15191
- * @returns {PlatformAddress | undefined}
16476
+ * @returns {string}
15192
16477
  */
15193
- get surplusOutput() {
15194
- const ret = wasm.shieldfromassetlocktransition_surplus_output(this.__wbg_ptr);
15195
- return ret === 0 ? undefined : PlatformAddress.__wrap(ret);
16478
+ toBase64() {
16479
+ let deferred2_0;
16480
+ let deferred2_1;
16481
+ try {
16482
+ const ret = wasm.shieldfromidentitytransition_toBase64(this.__wbg_ptr);
16483
+ var ptr1 = ret[0];
16484
+ var len1 = ret[1];
16485
+ if (ret[3]) {
16486
+ ptr1 = 0; len1 = 0;
16487
+ throw takeFromExternrefTable0(ret[2]);
16488
+ }
16489
+ deferred2_0 = ptr1;
16490
+ deferred2_1 = len1;
16491
+ return getStringFromWasm0(ptr1, len1);
16492
+ } finally {
16493
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
16494
+ }
15196
16495
  }
15197
16496
  /**
15198
16497
  * @returns {Uint8Array}
15199
16498
  */
15200
16499
  toBytes() {
15201
- const ret = wasm.shieldfromassetlocktransition_toBytes(this.__wbg_ptr);
16500
+ const ret = wasm.shieldfromidentitytransition_toBytes(this.__wbg_ptr);
15202
16501
  if (ret[3]) {
15203
16502
  throw takeFromExternrefTable0(ret[2]);
15204
16503
  }
@@ -15207,20 +16506,41 @@ export class ShieldFromAssetLockTransition {
15207
16506
  return v1;
15208
16507
  }
15209
16508
  /**
15210
- * @returns {ShieldFromAssetLockTransitionJSON}
16509
+ * @returns {string}
16510
+ */
16511
+ toHex() {
16512
+ let deferred2_0;
16513
+ let deferred2_1;
16514
+ try {
16515
+ const ret = wasm.shieldfromidentitytransition_toHex(this.__wbg_ptr);
16516
+ var ptr1 = ret[0];
16517
+ var len1 = ret[1];
16518
+ if (ret[3]) {
16519
+ ptr1 = 0; len1 = 0;
16520
+ throw takeFromExternrefTable0(ret[2]);
16521
+ }
16522
+ deferred2_0 = ptr1;
16523
+ deferred2_1 = len1;
16524
+ return getStringFromWasm0(ptr1, len1);
16525
+ } finally {
16526
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
16527
+ }
16528
+ }
16529
+ /**
16530
+ * @returns {ShieldFromIdentityTransitionJSON}
15211
16531
  */
15212
16532
  toJSON() {
15213
- const ret = wasm.shieldfromassetlocktransition_toJSON(this.__wbg_ptr);
16533
+ const ret = wasm.shieldfromidentitytransition_toJSON(this.__wbg_ptr);
15214
16534
  if (ret[2]) {
15215
16535
  throw takeFromExternrefTable0(ret[1]);
15216
16536
  }
15217
16537
  return takeFromExternrefTable0(ret[0]);
15218
16538
  }
15219
16539
  /**
15220
- * @returns {ShieldFromAssetLockTransitionObject}
16540
+ * @returns {ShieldFromIdentityTransitionObject}
15221
16541
  */
15222
16542
  toObject() {
15223
- const ret = wasm.shieldfromassetlocktransition_toObject(this.__wbg_ptr);
16543
+ const ret = wasm.shieldfromidentitytransition_toObject(this.__wbg_ptr);
15224
16544
  if (ret[2]) {
15225
16545
  throw takeFromExternrefTable0(ret[1]);
15226
16546
  }
@@ -15230,7 +16550,7 @@ export class ShieldFromAssetLockTransition {
15230
16550
  * @returns {StateTransition}
15231
16551
  */
15232
16552
  toStateTransition() {
15233
- const ret = wasm.shieldfromassetlocktransition_toStateTransition(this.__wbg_ptr);
16553
+ const ret = wasm.shieldfromidentitytransition_toStateTransition(this.__wbg_ptr);
15234
16554
  return StateTransition.__wrap(ret);
15235
16555
  }
15236
16556
  /**
@@ -15240,7 +16560,7 @@ export class ShieldFromAssetLockTransition {
15240
16560
  let deferred1_0;
15241
16561
  let deferred1_1;
15242
16562
  try {
15243
- const ret = wasm.shieldfromassetlocktransition_type_name(this.__wbg_ptr);
16563
+ const ret = wasm.shieldfromidentitytransition_type_name(this.__wbg_ptr);
15244
16564
  deferred1_0 = ret[0];
15245
16565
  deferred1_1 = ret[1];
15246
16566
  return getStringFromWasm0(ret[0], ret[1]);
@@ -15249,15 +16569,14 @@ export class ShieldFromAssetLockTransition {
15249
16569
  }
15250
16570
  }
15251
16571
  /**
15252
- * Returns the net value balance.
15253
- * @returns {bigint}
16572
+ * @returns {number}
15254
16573
  */
15255
- get valueBalance() {
15256
- const ret = wasm.shieldfromassetlocktransition_value_balance(this.__wbg_ptr);
15257
- return BigInt.asUintN(64, ret);
16574
+ get userFeeIncrease() {
16575
+ const ret = wasm.shieldfromidentitytransition_user_fee_increase(this.__wbg_ptr);
16576
+ return ret;
15258
16577
  }
15259
16578
  }
15260
- if (Symbol.dispose) ShieldFromAssetLockTransition.prototype[Symbol.dispose] = ShieldFromAssetLockTransition.prototype.free;
16579
+ if (Symbol.dispose) ShieldFromIdentityTransition.prototype[Symbol.dispose] = ShieldFromIdentityTransition.prototype.free;
15261
16580
 
15262
16581
  export class ShieldTransition {
15263
16582
  static __wrap(ptr) {
@@ -18169,7 +19488,7 @@ export class TokenDistributionRecipient {
18169
19488
  * @returns {TokenDistributionRecipient}
18170
19489
  */
18171
19490
  static ContractOwner() {
18172
- const ret = wasm.authorizedactiontakers_NoOne();
19491
+ const ret = wasm.tokendistributionrecipient_ContractOwner();
18173
19492
  return TokenDistributionRecipient.__wrap(ret);
18174
19493
  }
18175
19494
  /**
@@ -21380,7 +22699,7 @@ export class VerifiedIdentityFullWithAddressInfos {
21380
22699
  set identity(arg0) {
21381
22700
  _assertClass(arg0, Identity);
21382
22701
  var ptr0 = arg0.__destroy_into_raw();
21383
- wasm.__wbg_set_verifiedidentityfullwithaddressinfos_identity(this.__wbg_ptr, ptr0);
22702
+ wasm.__wbg_set_verifiedidentity_identity(this.__wbg_ptr, ptr0);
21384
22703
  }
21385
22704
  /**
21386
22705
  * @returns {Map<any, any>}
@@ -21497,7 +22816,7 @@ export class VerifiedIdentityWithAddressInfos {
21497
22816
  set partialIdentity(arg0) {
21498
22817
  _assertClass(arg0, PartialIdentity);
21499
22818
  var ptr0 = arg0.__destroy_into_raw();
21500
- wasm.__wbg_set_verifiedidentitywithaddressinfos_partialIdentity(this.__wbg_ptr, ptr0);
22819
+ wasm.__wbg_set_verifiedbalancetransfer_sender(this.__wbg_ptr, ptr0);
21501
22820
  }
21502
22821
  /**
21503
22822
  * @returns {Map<any, any>}
@@ -24459,7 +25778,7 @@ function __wbg_get_imports() {
24459
25778
  const a = state0.a;
24460
25779
  state0.a = 0;
24461
25780
  try {
24462
- return wasm_bindgen__convert__closures_____invoke__h9f47b8974001e8c8(a, state0.b, arg0, arg1);
25781
+ return wasm_bindgen_208f8721039e7b97___convert__closures_____invoke___wasm_bindgen_208f8721039e7b97___JsValue__wasm_bindgen_208f8721039e7b97___JsValue_____(a, state0.b, arg0, arg1);
24463
25782
  } finally {
24464
25783
  state0.a = a;
24465
25784
  }
@@ -24856,8 +26175,8 @@ function __wbg_get_imports() {
24856
26175
  };
24857
26176
  }
24858
26177
 
24859
- function wasm_bindgen__convert__closures_____invoke__h9f47b8974001e8c8(arg0, arg1, arg2, arg3) {
24860
- wasm.wasm_bindgen__convert__closures_____invoke__h9f47b8974001e8c8(arg0, arg1, arg2, arg3);
26178
+ function wasm_bindgen_208f8721039e7b97___convert__closures_____invoke___wasm_bindgen_208f8721039e7b97___JsValue__wasm_bindgen_208f8721039e7b97___JsValue_____(arg0, arg1, arg2, arg3) {
26179
+ wasm.wasm_bindgen_208f8721039e7b97___convert__closures_____invoke___wasm_bindgen_208f8721039e7b97___JsValue__wasm_bindgen_208f8721039e7b97___JsValue_____(arg0, arg1, arg2, arg3);
24861
26180
  }
24862
26181
 
24863
26182
  const ActionTakerFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -25028,6 +26347,9 @@ const IdentityCreditTransferToAddressesFinalization = (typeof FinalizationRegist
25028
26347
  const IdentityCreditWithdrawalTransitionFinalization = (typeof FinalizationRegistry === 'undefined')
25029
26348
  ? { register: () => {}, unregister: () => {} }
25030
26349
  : new FinalizationRegistry(ptr => wasm.__wbg_identitycreditwithdrawaltransition_free(ptr >>> 0, 1));
26350
+ const IdentityKeyLimitsUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
26351
+ ? { register: () => {}, unregister: () => {} }
26352
+ : new FinalizationRegistry(ptr => wasm.__wbg_identitykeylimitsupdate_free(ptr >>> 0, 1));
25031
26353
  const IdentityPublicKeyFinalization = (typeof FinalizationRegistry === 'undefined')
25032
26354
  ? { register: () => {}, unregister: () => {} }
25033
26355
  : new FinalizationRegistry(ptr => wasm.__wbg_identitypublickey_free(ptr >>> 0, 1));
@@ -25043,6 +26365,9 @@ const IdentityTokenInfoFinalization = (typeof FinalizationRegistry === 'undefine
25043
26365
  const IdentityTopUpFromAddressesTransitionFinalization = (typeof FinalizationRegistry === 'undefined')
25044
26366
  ? { register: () => {}, unregister: () => {} }
25045
26367
  : new FinalizationRegistry(ptr => wasm.__wbg_identitytopupfromaddressestransition_free(ptr >>> 0, 1));
26368
+ const IdentityTopUpFromShieldedPoolTransitionFinalization = (typeof FinalizationRegistry === 'undefined')
26369
+ ? { register: () => {}, unregister: () => {} }
26370
+ : new FinalizationRegistry(ptr => wasm.__wbg_identitytopupfromshieldedpooltransition_free(ptr >>> 0, 1));
25046
26371
  const IdentityTopUpTransitionFinalization = (typeof FinalizationRegistry === 'undefined')
25047
26372
  ? { register: () => {}, unregister: () => {} }
25048
26373
  : new FinalizationRegistry(ptr => wasm.__wbg_identitytopuptransition_free(ptr >>> 0, 1));
@@ -25109,6 +26434,9 @@ const SharedEncryptedNoteFinalization = (typeof FinalizationRegistry === 'undefi
25109
26434
  const ShieldFromAssetLockTransitionFinalization = (typeof FinalizationRegistry === 'undefined')
25110
26435
  ? { register: () => {}, unregister: () => {} }
25111
26436
  : new FinalizationRegistry(ptr => wasm.__wbg_shieldfromassetlocktransition_free(ptr >>> 0, 1));
26437
+ const ShieldFromIdentityTransitionFinalization = (typeof FinalizationRegistry === 'undefined')
26438
+ ? { register: () => {}, unregister: () => {} }
26439
+ : new FinalizationRegistry(ptr => wasm.__wbg_shieldfromidentitytransition_free(ptr >>> 0, 1));
25112
26440
  const ShieldTransitionFinalization = (typeof FinalizationRegistry === 'undefined')
25113
26441
  ? { register: () => {}, unregister: () => {} }
25114
26442
  : new FinalizationRegistry(ptr => wasm.__wbg_shieldtransition_free(ptr >>> 0, 1));