@dashevo/wasm-dpp2 4.1.1 → 4.2.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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,15 @@ export class ConsensusError {
2506
2519
  }
2507
2520
  return ConsensusError.__wrap(ret[0]);
2508
2521
  }
2522
+ /**
2523
+ * The reference-validation error this is, or `undefined` when it is
2524
+ * not one of codes 40120-40125.
2525
+ * @returns {DocumentReferenceErrorCode | undefined}
2526
+ */
2527
+ get documentReferenceErrorCode() {
2528
+ const ret = wasm.consensuserror_document_reference_error_code(this.__wbg_ptr);
2529
+ return ret === 0 ? undefined : ret;
2530
+ }
2509
2531
  /**
2510
2532
  * @returns {string}
2511
2533
  */
@@ -2858,6 +2880,18 @@ export class ContractBounds {
2858
2880
  const ptr = this.__destroy_into_raw();
2859
2881
  wasm.__wbg_contractbounds_free(ptr, 0);
2860
2882
  }
2883
+ /**
2884
+ * Bounds to every member of a contract group. Only authentication keys may carry them.
2885
+ * @param {IdentifierLike} contractGroupId
2886
+ * @returns {ContractBounds}
2887
+ */
2888
+ static ContractGroup(contractGroupId) {
2889
+ const ret = wasm.contractbounds_ContractGroup(contractGroupId);
2890
+ if (ret[2]) {
2891
+ throw takeFromExternrefTable0(ret[1]);
2892
+ }
2893
+ return ContractBounds.__wrap(ret[0]);
2894
+ }
2861
2895
  /**
2862
2896
  * @param {IdentifierLike} contractId
2863
2897
  * @returns {ContractBounds}
@@ -2920,6 +2954,14 @@ export class ContractBounds {
2920
2954
  const ret = wasm.contractbounds_contract_bounds_type_number(this.__wbg_ptr);
2921
2955
  return ret;
2922
2956
  }
2957
+ /**
2958
+ * The contract group id, for `contractGroup` bounds only.
2959
+ * @returns {Identifier | undefined}
2960
+ */
2961
+ get contractGroupId() {
2962
+ const ret = wasm.contractbounds_contract_group_id(this.__wbg_ptr);
2963
+ return ret === 0 ? undefined : Identifier.__wrap(ret);
2964
+ }
2923
2965
  /**
2924
2966
  * @returns {string | undefined}
2925
2967
  */
@@ -2955,6 +2997,7 @@ export class ContractBounds {
2955
2997
  return ContractBounds.__wrap(ret[0]);
2956
2998
  }
2957
2999
  /**
3000
+ * The contract id, or the contract group id for `contractGroup` bounds.
2958
3001
  * @returns {Identifier}
2959
3002
  */
2960
3003
  get identifier() {
@@ -3249,6 +3292,47 @@ export class DataContract {
3249
3292
  DataContractFinalization.register(this, this.__wbg_ptr, this);
3250
3293
  return this;
3251
3294
  }
3295
+ /**
3296
+ * All `refersTo` declarations of one document type, in schema property
3297
+ * order.
3298
+ *
3299
+ * Returns an empty array when the document type declares none. Throws
3300
+ * when the contract has no document type by that name — an empty array
3301
+ * would conflate "no such type" with "no references".
3302
+ *
3303
+ * Reference declarations are only parsed from protocol version 14
3304
+ * onward. A contract deserialized against an earlier platform version
3305
+ * reports none, which is exactly what consensus enforced at that
3306
+ * version — but note the trap: `DataContract.fromBytes(bytes, false, 1)`
3307
+ * yields `[]` even for a contract whose raw schema does carry
3308
+ * `refersTo`, and `toJSON()` still shows the raw keyword either way.
3309
+ * @param {string} documentTypeName
3310
+ * @returns {Array<DocumentPropertyReference>}
3311
+ */
3312
+ documentTypeReferences(documentTypeName) {
3313
+ const ptr0 = passStringToWasm0(documentTypeName, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3314
+ const len0 = WASM_VECTOR_LEN;
3315
+ const ret = wasm.datacontract_documentTypeReferences(this.__wbg_ptr, ptr0, len0);
3316
+ if (ret[2]) {
3317
+ throw takeFromExternrefTable0(ret[1]);
3318
+ }
3319
+ return takeFromExternrefTable0(ret[0]);
3320
+ }
3321
+ /**
3322
+ * Every document type that declares at least one reference, keyed by
3323
+ * document type name.
3324
+ *
3325
+ * Document types with no declarations are omitted, so an empty `Map`
3326
+ * means "this contract declares no references at all".
3327
+ * @returns {Map<string, Array<DocumentPropertyReference>>}
3328
+ */
3329
+ get documentReferences() {
3330
+ const ret = wasm.datacontract_document_references(this.__wbg_ptr);
3331
+ if (ret[2]) {
3332
+ throw takeFromExternrefTable0(ret[1]);
3333
+ }
3334
+ return takeFromExternrefTable0(ret[0]);
3335
+ }
3252
3336
  /**
3253
3337
  * @param {string} base64
3254
3338
  * @param {boolean} full_validation
@@ -3595,6 +3679,30 @@ export class DataContractCreateTransition {
3595
3679
  DataContractCreateTransitionFinalization.register(this, this.__wbg_ptr, this);
3596
3680
  return this;
3597
3681
  }
3682
+ /**
3683
+ * The contract group this transition registers, as a `ContractGroupRegistrationObject`,
3684
+ * or `undefined` when it registers none (a version 0 transition never does).
3685
+ * @returns {any}
3686
+ */
3687
+ get contractGroup() {
3688
+ const ret = wasm.datacontractcreatetransition_contract_group(this.__wbg_ptr);
3689
+ if (ret[2]) {
3690
+ throw takeFromExternrefTable0(ret[1]);
3691
+ }
3692
+ return takeFromExternrefTable0(ret[0]);
3693
+ }
3694
+ /**
3695
+ * The contract group memberships the created contract declares, as
3696
+ * `ContractGroupMembershipObject[]`; empty on a version 0 transition.
3697
+ * @returns {any}
3698
+ */
3699
+ get contractGroupMemberships() {
3700
+ const ret = wasm.datacontractcreatetransition_contract_group_memberships(this.__wbg_ptr);
3701
+ if (ret[2]) {
3702
+ throw takeFromExternrefTable0(ret[1]);
3703
+ }
3704
+ return takeFromExternrefTable0(ret[0]);
3705
+ }
3598
3706
  /**
3599
3707
  * @returns {number}
3600
3708
  */
@@ -3694,6 +3802,28 @@ export class DataContractCreateTransition {
3694
3802
  const ret = wasm.datacontractcreatetransition_identity_nonce(this.__wbg_ptr);
3695
3803
  return BigInt.asUintN(64, ret);
3696
3804
  }
3805
+ /**
3806
+ * Registers a contract group with this transition, or clears the registration with
3807
+ * `undefined`. Needs a version 1 transition (protocol version 14).
3808
+ * @param {any} registration
3809
+ */
3810
+ setContractGroup(registration) {
3811
+ const ret = wasm.datacontractcreatetransition_setContractGroup(this.__wbg_ptr, registration);
3812
+ if (ret[1]) {
3813
+ throw takeFromExternrefTable0(ret[0]);
3814
+ }
3815
+ }
3816
+ /**
3817
+ * Declares which contract groups the created contract, its document types or its tokens
3818
+ * join. Needs a version 1 transition (protocol version 14).
3819
+ * @param {any} memberships
3820
+ */
3821
+ setContractGroupMemberships(memberships) {
3822
+ const ret = wasm.datacontractcreatetransition_setContractGroupMemberships(this.__wbg_ptr, memberships);
3823
+ if (ret[1]) {
3824
+ throw takeFromExternrefTable0(ret[0]);
3825
+ }
3826
+ }
3697
3827
  /**
3698
3828
  * @param {DataContract} dataContract
3699
3829
  * @param {PlatformVersionLike} platformVersion
@@ -6251,6 +6381,60 @@ export class DocumentPurchaseTransition {
6251
6381
  }
6252
6382
  if (Symbol.dispose) DocumentPurchaseTransition.prototype[Symbol.dispose] = DocumentPurchaseTransition.prototype.free;
6253
6383
 
6384
+ /**
6385
+ * Consensus error codes emitted by `refersTo` reference validation, which
6386
+ * runs from protocol version 14 onward.
6387
+ *
6388
+ * Branch on an error's `code` against these instead of matching its
6389
+ * message. Both directions work — `DocumentReferenceErrorCode[40123]` is
6390
+ * `"ReferencedIdentityKeyNotFound"`.
6391
+ *
6392
+ * These reach JS on the state-transition broadcast path, where the
6393
+ * consensus code is carried through to `WasmSdkError.code`:
6394
+ *
6395
+ * ```js
6396
+ * try {
6397
+ * await sdk.documents.create({ document, identityKey, signer });
6398
+ * } catch (e) {
6399
+ * if (e.code === DocumentReferenceErrorCode.ReferencedIdentityKeyDisabled) {
6400
+ * // the referenced key exists but was disabled
6401
+ * }
6402
+ * }
6403
+ * ```
6404
+ * @enum {40120 | 40121 | 40122 | 40123 | 40124 | 40125}
6405
+ */
6406
+ export const DocumentReferenceErrorCode = Object.freeze({
6407
+ /**
6408
+ * The referenced identity, contract, token or permanent document does
6409
+ * not exist.
6410
+ */
6411
+ ReferencedEntityNotFound: 40120, "40120": "ReferencedEntityNotFound",
6412
+ /**
6413
+ * A `permanentDocument` reference names a document type the referenced
6414
+ * contract does not define, or the contract itself is missing.
6415
+ */
6416
+ ReferencedDocumentTypeNotFound: 40121, "40121": "ReferencedDocumentTypeNotFound",
6417
+ /**
6418
+ * The referenced document type allows deletion. Only types declaring
6419
+ * `canBeDeleted: false` may be the target of a `permanentDocument`
6420
+ * reference — otherwise the reference could be left dangling.
6421
+ */
6422
+ ReferencedDocumentTypeDeletable: 40122, "40122": "ReferencedDocumentTypeDeletable",
6423
+ /**
6424
+ * The referenced identity public key does not exist.
6425
+ */
6426
+ ReferencedIdentityKeyNotFound: 40123, "40123": "ReferencedIdentityKeyNotFound",
6427
+ /**
6428
+ * The referenced identity public key exists but is disabled.
6429
+ */
6430
+ ReferencedIdentityKeyDisabled: 40124, "40124": "ReferencedIdentityKeyDisabled",
6431
+ /**
6432
+ * The declaration's `keyIdProperty` is missing from the document type,
6433
+ * or names a property that is not an integer.
6434
+ */
6435
+ ReferencedKeyIdPropertyInvalid: 40125, "40125": "ReferencedKeyIdPropertyInvalid",
6436
+ });
6437
+
6254
6438
  export class DocumentReplaceTransition {
6255
6439
  static __wrap(ptr) {
6256
6440
  ptr = ptr >>> 0;
@@ -11626,6 +11810,287 @@ export class IdentityTopUpFromAddressesTransition {
11626
11810
  }
11627
11811
  if (Symbol.dispose) IdentityTopUpFromAddressesTransition.prototype[Symbol.dispose] = IdentityTopUpFromAddressesTransition.prototype.free;
11628
11812
 
11813
+ export class IdentityTopUpFromShieldedPoolTransition {
11814
+ static __wrap(ptr) {
11815
+ ptr = ptr >>> 0;
11816
+ const obj = Object.create(IdentityTopUpFromShieldedPoolTransition.prototype);
11817
+ obj.__wbg_ptr = ptr;
11818
+ IdentityTopUpFromShieldedPoolTransitionFinalization.register(obj, obj.__wbg_ptr, obj);
11819
+ return obj;
11820
+ }
11821
+ __destroy_into_raw() {
11822
+ const ptr = this.__wbg_ptr;
11823
+ this.__wbg_ptr = 0;
11824
+ IdentityTopUpFromShieldedPoolTransitionFinalization.unregister(this);
11825
+ return ptr;
11826
+ }
11827
+ free() {
11828
+ const ptr = this.__destroy_into_raw();
11829
+ wasm.__wbg_identitytopupfromshieldedpooltransition_free(ptr, 0);
11830
+ }
11831
+ /**
11832
+ * Returns the serialized Orchard actions.
11833
+ * @returns {SerializedOrchardAction[]}
11834
+ */
11835
+ get actions() {
11836
+ const ret = wasm.identitytopupfromshieldedpooltransition_actions(this.__wbg_ptr);
11837
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
11838
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
11839
+ return v1;
11840
+ }
11841
+ /**
11842
+ * @returns {Uint8Array}
11843
+ */
11844
+ get anchor() {
11845
+ const ret = wasm.identitytopupfromshieldedpooltransition_anchor(this.__wbg_ptr);
11846
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
11847
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
11848
+ return v1;
11849
+ }
11850
+ /**
11851
+ * @returns {Uint8Array}
11852
+ */
11853
+ get bindingSignature() {
11854
+ const ret = wasm.identitytopupfromshieldedpooltransition_binding_signature(this.__wbg_ptr);
11855
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
11856
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
11857
+ return v1;
11858
+ }
11859
+ /**
11860
+ * @param {string} base64
11861
+ * @returns {IdentityTopUpFromShieldedPoolTransition}
11862
+ */
11863
+ static fromBase64(base64) {
11864
+ const ptr0 = passStringToWasm0(base64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
11865
+ const len0 = WASM_VECTOR_LEN;
11866
+ const ret = wasm.identitytopupfromshieldedpooltransition_fromBase64(ptr0, len0);
11867
+ if (ret[2]) {
11868
+ throw takeFromExternrefTable0(ret[1]);
11869
+ }
11870
+ return IdentityTopUpFromShieldedPoolTransition.__wrap(ret[0]);
11871
+ }
11872
+ /**
11873
+ * @param {Uint8Array} bytes
11874
+ * @returns {IdentityTopUpFromShieldedPoolTransition}
11875
+ */
11876
+ static fromBytes(bytes) {
11877
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
11878
+ const len0 = WASM_VECTOR_LEN;
11879
+ const ret = wasm.identitytopupfromshieldedpooltransition_fromBytes(ptr0, len0);
11880
+ if (ret[2]) {
11881
+ throw takeFromExternrefTable0(ret[1]);
11882
+ }
11883
+ return IdentityTopUpFromShieldedPoolTransition.__wrap(ret[0]);
11884
+ }
11885
+ /**
11886
+ * @param {string} hex
11887
+ * @returns {IdentityTopUpFromShieldedPoolTransition}
11888
+ */
11889
+ static fromHex(hex) {
11890
+ const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
11891
+ const len0 = WASM_VECTOR_LEN;
11892
+ const ret = wasm.identitytopupfromshieldedpooltransition_fromHex(ptr0, len0);
11893
+ if (ret[2]) {
11894
+ throw takeFromExternrefTable0(ret[1]);
11895
+ }
11896
+ return IdentityTopUpFromShieldedPoolTransition.__wrap(ret[0]);
11897
+ }
11898
+ /**
11899
+ * @param {IdentityTopUpFromShieldedPoolTransitionJSON} js
11900
+ * @returns {IdentityTopUpFromShieldedPoolTransition}
11901
+ */
11902
+ static fromJSON(js) {
11903
+ const ret = wasm.identitytopupfromshieldedpooltransition_fromJSON(js);
11904
+ if (ret[2]) {
11905
+ throw takeFromExternrefTable0(ret[1]);
11906
+ }
11907
+ return IdentityTopUpFromShieldedPoolTransition.__wrap(ret[0]);
11908
+ }
11909
+ /**
11910
+ * @param {IdentityTopUpFromShieldedPoolTransitionObject} obj
11911
+ * @returns {IdentityTopUpFromShieldedPoolTransition}
11912
+ */
11913
+ static fromObject(obj) {
11914
+ const ret = wasm.identitytopupfromshieldedpooltransition_fromObject(obj);
11915
+ if (ret[2]) {
11916
+ throw takeFromExternrefTable0(ret[1]);
11917
+ }
11918
+ return IdentityTopUpFromShieldedPoolTransition.__wrap(ret[0]);
11919
+ }
11920
+ /**
11921
+ * @param {StateTransition} st
11922
+ * @returns {IdentityTopUpFromShieldedPoolTransition}
11923
+ */
11924
+ static fromStateTransition(st) {
11925
+ _assertClass(st, StateTransition);
11926
+ const ret = wasm.identitytopupfromshieldedpooltransition_fromStateTransition(st.__wbg_ptr);
11927
+ if (ret[2]) {
11928
+ throw takeFromExternrefTable0(ret[1]);
11929
+ }
11930
+ return IdentityTopUpFromShieldedPoolTransition.__wrap(ret[0]);
11931
+ }
11932
+ /**
11933
+ * @returns {Identifier[]}
11934
+ */
11935
+ getModifiedDataIds() {
11936
+ const ret = wasm.identitytopupfromshieldedpooltransition_getModifiedDataIds(this.__wbg_ptr);
11937
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
11938
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
11939
+ return v1;
11940
+ }
11941
+ /**
11942
+ * The identity whose balance receives the top-up. Read-only: the identity id
11943
+ * and the gross amount are committed into the Orchard binding signature, so a
11944
+ * wrapper that changed them would produce a transition consensus must reject.
11945
+ * @returns {Identifier}
11946
+ */
11947
+ get identityId() {
11948
+ const ret = wasm.identitytopupfromshieldedpooltransition_identity_id(this.__wbg_ptr);
11949
+ return Identifier.__wrap(ret);
11950
+ }
11951
+ /**
11952
+ * @param {IdentityTopUpFromShieldedPoolTransitionOptions} options
11953
+ */
11954
+ constructor(options) {
11955
+ const ret = wasm.identitytopupfromshieldedpooltransition_new(options);
11956
+ if (ret[2]) {
11957
+ throw takeFromExternrefTable0(ret[1]);
11958
+ }
11959
+ this.__wbg_ptr = ret[0] >>> 0;
11960
+ IdentityTopUpFromShieldedPoolTransitionFinalization.register(this, this.__wbg_ptr, this);
11961
+ return this;
11962
+ }
11963
+ /**
11964
+ * @returns {Uint8Array}
11965
+ */
11966
+ get proof() {
11967
+ const ret = wasm.identitytopupfromshieldedpooltransition_proof(this.__wbg_ptr);
11968
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
11969
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
11970
+ return v1;
11971
+ }
11972
+ /**
11973
+ * @returns {string}
11974
+ */
11975
+ static get __struct() {
11976
+ let deferred1_0;
11977
+ let deferred1_1;
11978
+ try {
11979
+ const ret = wasm.identitytopupfromshieldedpooltransition_struct_name();
11980
+ deferred1_0 = ret[0];
11981
+ deferred1_1 = ret[1];
11982
+ return getStringFromWasm0(ret[0], ret[1]);
11983
+ } finally {
11984
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
11985
+ }
11986
+ }
11987
+ /**
11988
+ * @returns {string}
11989
+ */
11990
+ toBase64() {
11991
+ let deferred2_0;
11992
+ let deferred2_1;
11993
+ try {
11994
+ const ret = wasm.identitytopupfromshieldedpooltransition_toBase64(this.__wbg_ptr);
11995
+ var ptr1 = ret[0];
11996
+ var len1 = ret[1];
11997
+ if (ret[3]) {
11998
+ ptr1 = 0; len1 = 0;
11999
+ throw takeFromExternrefTable0(ret[2]);
12000
+ }
12001
+ deferred2_0 = ptr1;
12002
+ deferred2_1 = len1;
12003
+ return getStringFromWasm0(ptr1, len1);
12004
+ } finally {
12005
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
12006
+ }
12007
+ }
12008
+ /**
12009
+ * @returns {Uint8Array}
12010
+ */
12011
+ toBytes() {
12012
+ const ret = wasm.identitytopupfromshieldedpooltransition_toBytes(this.__wbg_ptr);
12013
+ if (ret[3]) {
12014
+ throw takeFromExternrefTable0(ret[2]);
12015
+ }
12016
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
12017
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
12018
+ return v1;
12019
+ }
12020
+ /**
12021
+ * @returns {string}
12022
+ */
12023
+ toHex() {
12024
+ let deferred2_0;
12025
+ let deferred2_1;
12026
+ try {
12027
+ const ret = wasm.identitytopupfromshieldedpooltransition_toHex(this.__wbg_ptr);
12028
+ var ptr1 = ret[0];
12029
+ var len1 = ret[1];
12030
+ if (ret[3]) {
12031
+ ptr1 = 0; len1 = 0;
12032
+ throw takeFromExternrefTable0(ret[2]);
12033
+ }
12034
+ deferred2_0 = ptr1;
12035
+ deferred2_1 = len1;
12036
+ return getStringFromWasm0(ptr1, len1);
12037
+ } finally {
12038
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
12039
+ }
12040
+ }
12041
+ /**
12042
+ * @returns {IdentityTopUpFromShieldedPoolTransitionJSON}
12043
+ */
12044
+ toJSON() {
12045
+ const ret = wasm.identitytopupfromshieldedpooltransition_toJSON(this.__wbg_ptr);
12046
+ if (ret[2]) {
12047
+ throw takeFromExternrefTable0(ret[1]);
12048
+ }
12049
+ return takeFromExternrefTable0(ret[0]);
12050
+ }
12051
+ /**
12052
+ * @returns {IdentityTopUpFromShieldedPoolTransitionObject}
12053
+ */
12054
+ toObject() {
12055
+ const ret = wasm.identitytopupfromshieldedpooltransition_toObject(this.__wbg_ptr);
12056
+ if (ret[2]) {
12057
+ throw takeFromExternrefTable0(ret[1]);
12058
+ }
12059
+ return takeFromExternrefTable0(ret[0]);
12060
+ }
12061
+ /**
12062
+ * @returns {StateTransition}
12063
+ */
12064
+ toStateTransition() {
12065
+ const ret = wasm.identitytopupfromshieldedpooltransition_toStateTransition(this.__wbg_ptr);
12066
+ return StateTransition.__wrap(ret);
12067
+ }
12068
+ /**
12069
+ * Gross credits leaving the pool; the identity receives this minus the flat fee.
12070
+ * @returns {bigint}
12071
+ */
12072
+ get topUpAmount() {
12073
+ const ret = wasm.identitytopupfromshieldedpooltransition_top_up_amount(this.__wbg_ptr);
12074
+ return BigInt.asUintN(64, ret);
12075
+ }
12076
+ /**
12077
+ * @returns {string}
12078
+ */
12079
+ get __type() {
12080
+ let deferred1_0;
12081
+ let deferred1_1;
12082
+ try {
12083
+ const ret = wasm.identitytopupfromshieldedpooltransition_type_name(this.__wbg_ptr);
12084
+ deferred1_0 = ret[0];
12085
+ deferred1_1 = ret[1];
12086
+ return getStringFromWasm0(ret[0], ret[1]);
12087
+ } finally {
12088
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
12089
+ }
12090
+ }
12091
+ }
12092
+ if (Symbol.dispose) IdentityTopUpFromShieldedPoolTransition.prototype[Symbol.dispose] = IdentityTopUpFromShieldedPoolTransition.prototype.free;
12093
+
11629
12094
  export class IdentityTopUpTransition {
11630
12095
  static __wrap(ptr) {
11631
12096
  ptr = ptr >>> 0;
@@ -14957,7 +15422,7 @@ export class SharedEncryptedNote {
14957
15422
  constructor(senderKeyIndex, recipientKeyIndex, value) {
14958
15423
  const ptr0 = passArray8ToWasm0(value, wasm.__wbindgen_malloc);
14959
15424
  const len0 = WASM_VECTOR_LEN;
14960
- const ret = wasm.privateencryptednote_constructor(senderKeyIndex, recipientKeyIndex, ptr0, len0);
15425
+ const ret = wasm.sharedencryptednote_constructor(senderKeyIndex, recipientKeyIndex, ptr0, len0);
14961
15426
  this.__wbg_ptr = ret >>> 0;
14962
15427
  SharedEncryptedNoteFinalization.register(this, this.__wbg_ptr, this);
14963
15428
  return this;
@@ -15003,7 +15468,181 @@ export class SharedEncryptedNote {
15003
15468
  let deferred1_0;
15004
15469
  let deferred1_1;
15005
15470
  try {
15006
- const ret = wasm.sharedencryptednote_struct_name();
15471
+ const ret = wasm.sharedencryptednote_struct_name();
15472
+ deferred1_0 = ret[0];
15473
+ deferred1_1 = ret[1];
15474
+ return getStringFromWasm0(ret[0], ret[1]);
15475
+ } finally {
15476
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
15477
+ }
15478
+ }
15479
+ /**
15480
+ * @returns {string}
15481
+ */
15482
+ get __type() {
15483
+ let deferred1_0;
15484
+ let deferred1_1;
15485
+ try {
15486
+ const ret = wasm.sharedencryptednote_type_name(this.__wbg_ptr);
15487
+ deferred1_0 = ret[0];
15488
+ deferred1_1 = ret[1];
15489
+ return getStringFromWasm0(ret[0], ret[1]);
15490
+ } finally {
15491
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
15492
+ }
15493
+ }
15494
+ /**
15495
+ * @returns {Uint8Array}
15496
+ */
15497
+ get value() {
15498
+ const ret = wasm.sharedencryptednote_value(this.__wbg_ptr);
15499
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15500
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15501
+ return v1;
15502
+ }
15503
+ }
15504
+ if (Symbol.dispose) SharedEncryptedNote.prototype[Symbol.dispose] = SharedEncryptedNote.prototype.free;
15505
+
15506
+ export class ShieldFromAssetLockTransition {
15507
+ static __wrap(ptr) {
15508
+ ptr = ptr >>> 0;
15509
+ const obj = Object.create(ShieldFromAssetLockTransition.prototype);
15510
+ obj.__wbg_ptr = ptr;
15511
+ ShieldFromAssetLockTransitionFinalization.register(obj, obj.__wbg_ptr, obj);
15512
+ return obj;
15513
+ }
15514
+ __destroy_into_raw() {
15515
+ const ptr = this.__wbg_ptr;
15516
+ this.__wbg_ptr = 0;
15517
+ ShieldFromAssetLockTransitionFinalization.unregister(this);
15518
+ return ptr;
15519
+ }
15520
+ free() {
15521
+ const ptr = this.__destroy_into_raw();
15522
+ wasm.__wbg_shieldfromassetlocktransition_free(ptr, 0);
15523
+ }
15524
+ /**
15525
+ * Returns the serialized Orchard actions.
15526
+ * @returns {SerializedOrchardAction[]}
15527
+ */
15528
+ get actions() {
15529
+ const ret = wasm.shieldfromassetlocktransition_actions(this.__wbg_ptr);
15530
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
15531
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
15532
+ return v1;
15533
+ }
15534
+ /**
15535
+ * Returns the anchor (32-byte Merkle root).
15536
+ * @returns {Uint8Array}
15537
+ */
15538
+ get anchor() {
15539
+ const ret = wasm.shieldfromassetlocktransition_anchor(this.__wbg_ptr);
15540
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15541
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15542
+ return v1;
15543
+ }
15544
+ /**
15545
+ * Returns the asset lock proof.
15546
+ * @returns {AssetLockProof}
15547
+ */
15548
+ get assetLockProof() {
15549
+ const ret = wasm.shieldfromassetlocktransition_asset_lock_proof(this.__wbg_ptr);
15550
+ return AssetLockProof.__wrap(ret);
15551
+ }
15552
+ /**
15553
+ * Returns the RedPallas binding signature (64 bytes).
15554
+ * @returns {Uint8Array}
15555
+ */
15556
+ get bindingSignature() {
15557
+ const ret = wasm.shieldfromassetlocktransition_binding_signature(this.__wbg_ptr);
15558
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15559
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15560
+ return v1;
15561
+ }
15562
+ /**
15563
+ * @param {Uint8Array} bytes
15564
+ * @returns {ShieldFromAssetLockTransition}
15565
+ */
15566
+ static fromBytes(bytes) {
15567
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
15568
+ const len0 = WASM_VECTOR_LEN;
15569
+ const ret = wasm.shieldfromassetlocktransition_fromBytes(ptr0, len0);
15570
+ if (ret[2]) {
15571
+ throw takeFromExternrefTable0(ret[1]);
15572
+ }
15573
+ return ShieldFromAssetLockTransition.__wrap(ret[0]);
15574
+ }
15575
+ /**
15576
+ * @param {ShieldFromAssetLockTransitionJSON} js
15577
+ * @returns {ShieldFromAssetLockTransition}
15578
+ */
15579
+ static fromJSON(js) {
15580
+ const ret = wasm.shieldfromassetlocktransition_fromJSON(js);
15581
+ if (ret[2]) {
15582
+ throw takeFromExternrefTable0(ret[1]);
15583
+ }
15584
+ return ShieldFromAssetLockTransition.__wrap(ret[0]);
15585
+ }
15586
+ /**
15587
+ * @param {ShieldFromAssetLockTransitionObject} obj
15588
+ * @returns {ShieldFromAssetLockTransition}
15589
+ */
15590
+ static fromObject(obj) {
15591
+ const ret = wasm.shieldfromassetlocktransition_fromObject(obj);
15592
+ if (ret[2]) {
15593
+ throw takeFromExternrefTable0(ret[1]);
15594
+ }
15595
+ return ShieldFromAssetLockTransition.__wrap(ret[0]);
15596
+ }
15597
+ /**
15598
+ * @returns {Identifier[]}
15599
+ */
15600
+ getModifiedDataIds() {
15601
+ const ret = wasm.shieldfromassetlocktransition_getModifiedDataIds(this.__wbg_ptr);
15602
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
15603
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
15604
+ return v1;
15605
+ }
15606
+ /**
15607
+ * @param {ShieldFromAssetLockTransitionOptions} options
15608
+ */
15609
+ constructor(options) {
15610
+ const ret = wasm.shieldfromassetlocktransition_new(options);
15611
+ if (ret[2]) {
15612
+ throw takeFromExternrefTable0(ret[1]);
15613
+ }
15614
+ this.__wbg_ptr = ret[0] >>> 0;
15615
+ ShieldFromAssetLockTransitionFinalization.register(this, this.__wbg_ptr, this);
15616
+ return this;
15617
+ }
15618
+ /**
15619
+ * Returns the Halo2 proof bytes.
15620
+ * @returns {Uint8Array}
15621
+ */
15622
+ get proof() {
15623
+ const ret = wasm.shieldfromassetlocktransition_proof(this.__wbg_ptr);
15624
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15625
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15626
+ return v1;
15627
+ }
15628
+ /**
15629
+ * Returns the ECDSA signature.
15630
+ * @returns {Uint8Array}
15631
+ */
15632
+ get signature() {
15633
+ const ret = wasm.shieldfromassetlocktransition_signature(this.__wbg_ptr);
15634
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15635
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15636
+ return v1;
15637
+ }
15638
+ /**
15639
+ * @returns {string}
15640
+ */
15641
+ static get __struct() {
15642
+ let deferred1_0;
15643
+ let deferred1_1;
15644
+ try {
15645
+ const ret = wasm.shieldfromassetlocktransition_struct_name();
15007
15646
  deferred1_0 = ret[0];
15008
15647
  deferred1_1 = ret[1];
15009
15648
  return getStringFromWasm0(ret[0], ret[1]);
@@ -15011,6 +15650,54 @@ export class SharedEncryptedNote {
15011
15650
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
15012
15651
  }
15013
15652
  }
15653
+ /**
15654
+ * Returns the optional surplus-output platform address, or
15655
+ * `undefined` when the surplus folds into the fee pools.
15656
+ * @returns {PlatformAddress | undefined}
15657
+ */
15658
+ get surplusOutput() {
15659
+ const ret = wasm.shieldfromassetlocktransition_surplus_output(this.__wbg_ptr);
15660
+ return ret === 0 ? undefined : PlatformAddress.__wrap(ret);
15661
+ }
15662
+ /**
15663
+ * @returns {Uint8Array}
15664
+ */
15665
+ toBytes() {
15666
+ const ret = wasm.shieldfromassetlocktransition_toBytes(this.__wbg_ptr);
15667
+ if (ret[3]) {
15668
+ throw takeFromExternrefTable0(ret[2]);
15669
+ }
15670
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15671
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15672
+ return v1;
15673
+ }
15674
+ /**
15675
+ * @returns {ShieldFromAssetLockTransitionJSON}
15676
+ */
15677
+ toJSON() {
15678
+ const ret = wasm.shieldfromassetlocktransition_toJSON(this.__wbg_ptr);
15679
+ if (ret[2]) {
15680
+ throw takeFromExternrefTable0(ret[1]);
15681
+ }
15682
+ return takeFromExternrefTable0(ret[0]);
15683
+ }
15684
+ /**
15685
+ * @returns {ShieldFromAssetLockTransitionObject}
15686
+ */
15687
+ toObject() {
15688
+ const ret = wasm.shieldfromassetlocktransition_toObject(this.__wbg_ptr);
15689
+ if (ret[2]) {
15690
+ throw takeFromExternrefTable0(ret[1]);
15691
+ }
15692
+ return takeFromExternrefTable0(ret[0]);
15693
+ }
15694
+ /**
15695
+ * @returns {StateTransition}
15696
+ */
15697
+ toStateTransition() {
15698
+ const ret = wasm.shieldfromassetlocktransition_toStateTransition(this.__wbg_ptr);
15699
+ return StateTransition.__wrap(ret);
15700
+ }
15014
15701
  /**
15015
15702
  * @returns {string}
15016
15703
  */
@@ -15018,7 +15705,7 @@ export class SharedEncryptedNote {
15018
15705
  let deferred1_0;
15019
15706
  let deferred1_1;
15020
15707
  try {
15021
- const ret = wasm.sharedencryptednote_type_name(this.__wbg_ptr);
15708
+ const ret = wasm.shieldfromassetlocktransition_type_name(this.__wbg_ptr);
15022
15709
  deferred1_0 = ret[0];
15023
15710
  deferred1_1 = ret[1];
15024
15711
  return getStringFromWasm0(ret[0], ret[1]);
@@ -15027,149 +15714,251 @@ export class SharedEncryptedNote {
15027
15714
  }
15028
15715
  }
15029
15716
  /**
15030
- * @returns {Uint8Array}
15717
+ * Returns the net value balance.
15718
+ * @returns {bigint}
15031
15719
  */
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;
15720
+ get valueBalance() {
15721
+ const ret = wasm.shieldfromassetlocktransition_value_balance(this.__wbg_ptr);
15722
+ return BigInt.asUintN(64, ret);
15037
15723
  }
15038
15724
  }
15039
- if (Symbol.dispose) SharedEncryptedNote.prototype[Symbol.dispose] = SharedEncryptedNote.prototype.free;
15725
+ if (Symbol.dispose) ShieldFromAssetLockTransition.prototype[Symbol.dispose] = ShieldFromAssetLockTransition.prototype.free;
15040
15726
 
15041
- export class ShieldFromAssetLockTransition {
15727
+ export class ShieldFromIdentityTransition {
15042
15728
  static __wrap(ptr) {
15043
15729
  ptr = ptr >>> 0;
15044
- const obj = Object.create(ShieldFromAssetLockTransition.prototype);
15730
+ const obj = Object.create(ShieldFromIdentityTransition.prototype);
15045
15731
  obj.__wbg_ptr = ptr;
15046
- ShieldFromAssetLockTransitionFinalization.register(obj, obj.__wbg_ptr, obj);
15732
+ ShieldFromIdentityTransitionFinalization.register(obj, obj.__wbg_ptr, obj);
15047
15733
  return obj;
15048
15734
  }
15049
15735
  __destroy_into_raw() {
15050
15736
  const ptr = this.__wbg_ptr;
15051
15737
  this.__wbg_ptr = 0;
15052
- ShieldFromAssetLockTransitionFinalization.unregister(this);
15738
+ ShieldFromIdentityTransitionFinalization.unregister(this);
15053
15739
  return ptr;
15054
15740
  }
15055
15741
  free() {
15056
15742
  const ptr = this.__destroy_into_raw();
15057
- wasm.__wbg_shieldfromassetlocktransition_free(ptr, 0);
15743
+ wasm.__wbg_shieldfromidentitytransition_free(ptr, 0);
15058
15744
  }
15059
15745
  /**
15060
15746
  * Returns the serialized Orchard actions.
15061
15747
  * @returns {SerializedOrchardAction[]}
15062
15748
  */
15063
15749
  get actions() {
15064
- const ret = wasm.shieldfromassetlocktransition_actions(this.__wbg_ptr);
15750
+ const ret = wasm.shieldfromidentitytransition_actions(this.__wbg_ptr);
15065
15751
  var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
15066
15752
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
15067
15753
  return v1;
15068
15754
  }
15755
+ /**
15756
+ * Credits leaving the identity balance and entering the pool.
15757
+ * @returns {bigint}
15758
+ */
15759
+ get amount() {
15760
+ const ret = wasm.shieldfromidentitytransition_amount(this.__wbg_ptr);
15761
+ return BigInt.asUintN(64, ret);
15762
+ }
15069
15763
  /**
15070
15764
  * Returns the anchor (32-byte Merkle root).
15071
15765
  * @returns {Uint8Array}
15072
15766
  */
15073
15767
  get anchor() {
15074
- const ret = wasm.shieldfromassetlocktransition_anchor(this.__wbg_ptr);
15768
+ const ret = wasm.shieldfromidentitytransition_anchor(this.__wbg_ptr);
15075
15769
  var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15076
15770
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15077
15771
  return v1;
15078
15772
  }
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
15773
  /**
15088
15774
  * Returns the RedPallas binding signature (64 bytes).
15089
15775
  * @returns {Uint8Array}
15090
15776
  */
15091
15777
  get bindingSignature() {
15092
- const ret = wasm.shieldfromassetlocktransition_binding_signature(this.__wbg_ptr);
15778
+ const ret = wasm.shieldfromidentitytransition_binding_signature(this.__wbg_ptr);
15093
15779
  var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15094
15780
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15095
15781
  return v1;
15096
15782
  }
15783
+ /**
15784
+ * @param {string} base64
15785
+ * @returns {ShieldFromIdentityTransition}
15786
+ */
15787
+ static fromBase64(base64) {
15788
+ const ptr0 = passStringToWasm0(base64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
15789
+ const len0 = WASM_VECTOR_LEN;
15790
+ const ret = wasm.shieldfromidentitytransition_fromBase64(ptr0, len0);
15791
+ if (ret[2]) {
15792
+ throw takeFromExternrefTable0(ret[1]);
15793
+ }
15794
+ return ShieldFromIdentityTransition.__wrap(ret[0]);
15795
+ }
15097
15796
  /**
15098
15797
  * @param {Uint8Array} bytes
15099
- * @returns {ShieldFromAssetLockTransition}
15798
+ * @returns {ShieldFromIdentityTransition}
15100
15799
  */
15101
15800
  static fromBytes(bytes) {
15102
15801
  const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
15103
15802
  const len0 = WASM_VECTOR_LEN;
15104
- const ret = wasm.shieldfromassetlocktransition_fromBytes(ptr0, len0);
15803
+ const ret = wasm.shieldfromidentitytransition_fromBytes(ptr0, len0);
15105
15804
  if (ret[2]) {
15106
15805
  throw takeFromExternrefTable0(ret[1]);
15107
15806
  }
15108
- return ShieldFromAssetLockTransition.__wrap(ret[0]);
15807
+ return ShieldFromIdentityTransition.__wrap(ret[0]);
15109
15808
  }
15110
15809
  /**
15111
- * @param {ShieldFromAssetLockTransitionJSON} js
15112
- * @returns {ShieldFromAssetLockTransition}
15810
+ * @param {string} hex
15811
+ * @returns {ShieldFromIdentityTransition}
15812
+ */
15813
+ static fromHex(hex) {
15814
+ const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
15815
+ const len0 = WASM_VECTOR_LEN;
15816
+ const ret = wasm.shieldfromidentitytransition_fromHex(ptr0, len0);
15817
+ if (ret[2]) {
15818
+ throw takeFromExternrefTable0(ret[1]);
15819
+ }
15820
+ return ShieldFromIdentityTransition.__wrap(ret[0]);
15821
+ }
15822
+ /**
15823
+ * @param {ShieldFromIdentityTransitionJSON} js
15824
+ * @returns {ShieldFromIdentityTransition}
15113
15825
  */
15114
15826
  static fromJSON(js) {
15115
- const ret = wasm.shieldfromassetlocktransition_fromJSON(js);
15827
+ const ret = wasm.shieldfromidentitytransition_fromJSON(js);
15116
15828
  if (ret[2]) {
15117
15829
  throw takeFromExternrefTable0(ret[1]);
15118
15830
  }
15119
- return ShieldFromAssetLockTransition.__wrap(ret[0]);
15831
+ return ShieldFromIdentityTransition.__wrap(ret[0]);
15120
15832
  }
15121
15833
  /**
15122
- * @param {ShieldFromAssetLockTransitionObject} obj
15123
- * @returns {ShieldFromAssetLockTransition}
15834
+ * @param {ShieldFromIdentityTransitionObject} obj
15835
+ * @returns {ShieldFromIdentityTransition}
15124
15836
  */
15125
15837
  static fromObject(obj) {
15126
- const ret = wasm.shieldfromassetlocktransition_fromObject(obj);
15838
+ const ret = wasm.shieldfromidentitytransition_fromObject(obj);
15127
15839
  if (ret[2]) {
15128
15840
  throw takeFromExternrefTable0(ret[1]);
15129
15841
  }
15130
- return ShieldFromAssetLockTransition.__wrap(ret[0]);
15842
+ return ShieldFromIdentityTransition.__wrap(ret[0]);
15843
+ }
15844
+ /**
15845
+ * @param {StateTransition} st
15846
+ * @returns {ShieldFromIdentityTransition}
15847
+ */
15848
+ static fromStateTransition(st) {
15849
+ _assertClass(st, StateTransition);
15850
+ const ret = wasm.shieldfromidentitytransition_fromStateTransition(st.__wbg_ptr);
15851
+ if (ret[2]) {
15852
+ throw takeFromExternrefTable0(ret[1]);
15853
+ }
15854
+ return ShieldFromIdentityTransition.__wrap(ret[0]);
15131
15855
  }
15132
15856
  /**
15133
15857
  * @returns {Identifier[]}
15134
15858
  */
15135
15859
  getModifiedDataIds() {
15136
- const ret = wasm.shieldfromassetlocktransition_getModifiedDataIds(this.__wbg_ptr);
15860
+ const ret = wasm.shieldfromidentitytransition_getModifiedDataIds(this.__wbg_ptr);
15137
15861
  var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
15138
15862
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
15139
15863
  return v1;
15140
15864
  }
15141
15865
  /**
15142
- * @param {ShieldFromAssetLockTransitionOptions} options
15866
+ * The identity whose balance funds the shield.
15867
+ * @returns {Identifier}
15868
+ */
15869
+ get identityId() {
15870
+ const ret = wasm.shieldfromidentitytransition_identity_id(this.__wbg_ptr);
15871
+ return Identifier.__wrap(ret);
15872
+ }
15873
+ /**
15874
+ * @param {ShieldFromIdentityTransitionOptions} options
15143
15875
  */
15144
15876
  constructor(options) {
15145
- const ret = wasm.shieldfromassetlocktransition_new(options);
15877
+ const ret = wasm.shieldfromidentitytransition_new(options);
15146
15878
  if (ret[2]) {
15147
15879
  throw takeFromExternrefTable0(ret[1]);
15148
15880
  }
15149
15881
  this.__wbg_ptr = ret[0] >>> 0;
15150
- ShieldFromAssetLockTransitionFinalization.register(this, this.__wbg_ptr, this);
15882
+ ShieldFromIdentityTransitionFinalization.register(this, this.__wbg_ptr, this);
15151
15883
  return this;
15152
15884
  }
15885
+ /**
15886
+ * @returns {bigint}
15887
+ */
15888
+ get nonce() {
15889
+ const ret = wasm.shieldfromidentitytransition_nonce(this.__wbg_ptr);
15890
+ return BigInt.asUintN(64, ret);
15891
+ }
15153
15892
  /**
15154
15893
  * Returns the Halo2 proof bytes.
15155
15894
  * @returns {Uint8Array}
15156
15895
  */
15157
15896
  get proof() {
15158
- const ret = wasm.shieldfromassetlocktransition_proof(this.__wbg_ptr);
15897
+ const ret = wasm.shieldfromidentitytransition_proof(this.__wbg_ptr);
15159
15898
  var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15160
15899
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15161
15900
  return v1;
15162
15901
  }
15163
15902
  /**
15164
- * Returns the ECDSA signature.
15903
+ * @param {IdentifierLike} identity_id
15904
+ */
15905
+ set identityId(identity_id) {
15906
+ const ret = wasm.shieldfromidentitytransition_set_identity_id(this.__wbg_ptr, identity_id);
15907
+ if (ret[1]) {
15908
+ throw takeFromExternrefTable0(ret[0]);
15909
+ }
15910
+ }
15911
+ /**
15912
+ * @param {bigint} nonce
15913
+ */
15914
+ set nonce(nonce) {
15915
+ const ret = wasm.shieldfromidentitytransition_set_nonce(this.__wbg_ptr, nonce);
15916
+ if (ret[1]) {
15917
+ throw takeFromExternrefTable0(ret[0]);
15918
+ }
15919
+ }
15920
+ /**
15921
+ * @param {Uint8Array} signature
15922
+ */
15923
+ set signature(signature) {
15924
+ const ptr0 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
15925
+ const len0 = WASM_VECTOR_LEN;
15926
+ wasm.shieldfromidentitytransition_set_signature(this.__wbg_ptr, ptr0, len0);
15927
+ }
15928
+ /**
15929
+ * @param {number} publicKeyId
15930
+ */
15931
+ set signaturePublicKeyId(publicKeyId) {
15932
+ const ret = wasm.shieldfromidentitytransition_set_signature_public_key_id(this.__wbg_ptr, publicKeyId);
15933
+ if (ret[1]) {
15934
+ throw takeFromExternrefTable0(ret[0]);
15935
+ }
15936
+ }
15937
+ /**
15938
+ * @param {number} amount
15939
+ */
15940
+ set userFeeIncrease(amount) {
15941
+ const ret = wasm.shieldfromidentitytransition_set_user_fee_increase(this.__wbg_ptr, amount);
15942
+ if (ret[1]) {
15943
+ throw takeFromExternrefTable0(ret[0]);
15944
+ }
15945
+ }
15946
+ /**
15165
15947
  * @returns {Uint8Array}
15166
15948
  */
15167
15949
  get signature() {
15168
- const ret = wasm.shieldfromassetlocktransition_signature(this.__wbg_ptr);
15950
+ const ret = wasm.shieldfromidentitytransition_signature(this.__wbg_ptr);
15169
15951
  var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15170
15952
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15171
15953
  return v1;
15172
15954
  }
15955
+ /**
15956
+ * @returns {number}
15957
+ */
15958
+ get signaturePublicKeyId() {
15959
+ const ret = wasm.shieldfromidentitytransition_signature_public_key_id(this.__wbg_ptr);
15960
+ return ret >>> 0;
15961
+ }
15173
15962
  /**
15174
15963
  * @returns {string}
15175
15964
  */
@@ -15177,7 +15966,7 @@ export class ShieldFromAssetLockTransition {
15177
15966
  let deferred1_0;
15178
15967
  let deferred1_1;
15179
15968
  try {
15180
- const ret = wasm.shieldfromassetlocktransition_struct_name();
15969
+ const ret = wasm.shieldfromidentitytransition_struct_name();
15181
15970
  deferred1_0 = ret[0];
15182
15971
  deferred1_1 = ret[1];
15183
15972
  return getStringFromWasm0(ret[0], ret[1]);
@@ -15186,19 +15975,31 @@ export class ShieldFromAssetLockTransition {
15186
15975
  }
15187
15976
  }
15188
15977
  /**
15189
- * Returns the optional surplus-output platform address, or
15190
- * `undefined` when the surplus folds into the fee pools.
15191
- * @returns {PlatformAddress | undefined}
15978
+ * @returns {string}
15192
15979
  */
15193
- get surplusOutput() {
15194
- const ret = wasm.shieldfromassetlocktransition_surplus_output(this.__wbg_ptr);
15195
- return ret === 0 ? undefined : PlatformAddress.__wrap(ret);
15980
+ toBase64() {
15981
+ let deferred2_0;
15982
+ let deferred2_1;
15983
+ try {
15984
+ const ret = wasm.shieldfromidentitytransition_toBase64(this.__wbg_ptr);
15985
+ var ptr1 = ret[0];
15986
+ var len1 = ret[1];
15987
+ if (ret[3]) {
15988
+ ptr1 = 0; len1 = 0;
15989
+ throw takeFromExternrefTable0(ret[2]);
15990
+ }
15991
+ deferred2_0 = ptr1;
15992
+ deferred2_1 = len1;
15993
+ return getStringFromWasm0(ptr1, len1);
15994
+ } finally {
15995
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
15996
+ }
15196
15997
  }
15197
15998
  /**
15198
15999
  * @returns {Uint8Array}
15199
16000
  */
15200
16001
  toBytes() {
15201
- const ret = wasm.shieldfromassetlocktransition_toBytes(this.__wbg_ptr);
16002
+ const ret = wasm.shieldfromidentitytransition_toBytes(this.__wbg_ptr);
15202
16003
  if (ret[3]) {
15203
16004
  throw takeFromExternrefTable0(ret[2]);
15204
16005
  }
@@ -15207,20 +16008,41 @@ export class ShieldFromAssetLockTransition {
15207
16008
  return v1;
15208
16009
  }
15209
16010
  /**
15210
- * @returns {ShieldFromAssetLockTransitionJSON}
16011
+ * @returns {string}
16012
+ */
16013
+ toHex() {
16014
+ let deferred2_0;
16015
+ let deferred2_1;
16016
+ try {
16017
+ const ret = wasm.shieldfromidentitytransition_toHex(this.__wbg_ptr);
16018
+ var ptr1 = ret[0];
16019
+ var len1 = ret[1];
16020
+ if (ret[3]) {
16021
+ ptr1 = 0; len1 = 0;
16022
+ throw takeFromExternrefTable0(ret[2]);
16023
+ }
16024
+ deferred2_0 = ptr1;
16025
+ deferred2_1 = len1;
16026
+ return getStringFromWasm0(ptr1, len1);
16027
+ } finally {
16028
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
16029
+ }
16030
+ }
16031
+ /**
16032
+ * @returns {ShieldFromIdentityTransitionJSON}
15211
16033
  */
15212
16034
  toJSON() {
15213
- const ret = wasm.shieldfromassetlocktransition_toJSON(this.__wbg_ptr);
16035
+ const ret = wasm.shieldfromidentitytransition_toJSON(this.__wbg_ptr);
15214
16036
  if (ret[2]) {
15215
16037
  throw takeFromExternrefTable0(ret[1]);
15216
16038
  }
15217
16039
  return takeFromExternrefTable0(ret[0]);
15218
16040
  }
15219
16041
  /**
15220
- * @returns {ShieldFromAssetLockTransitionObject}
16042
+ * @returns {ShieldFromIdentityTransitionObject}
15221
16043
  */
15222
16044
  toObject() {
15223
- const ret = wasm.shieldfromassetlocktransition_toObject(this.__wbg_ptr);
16045
+ const ret = wasm.shieldfromidentitytransition_toObject(this.__wbg_ptr);
15224
16046
  if (ret[2]) {
15225
16047
  throw takeFromExternrefTable0(ret[1]);
15226
16048
  }
@@ -15230,7 +16052,7 @@ export class ShieldFromAssetLockTransition {
15230
16052
  * @returns {StateTransition}
15231
16053
  */
15232
16054
  toStateTransition() {
15233
- const ret = wasm.shieldfromassetlocktransition_toStateTransition(this.__wbg_ptr);
16055
+ const ret = wasm.shieldfromidentitytransition_toStateTransition(this.__wbg_ptr);
15234
16056
  return StateTransition.__wrap(ret);
15235
16057
  }
15236
16058
  /**
@@ -15240,7 +16062,7 @@ export class ShieldFromAssetLockTransition {
15240
16062
  let deferred1_0;
15241
16063
  let deferred1_1;
15242
16064
  try {
15243
- const ret = wasm.shieldfromassetlocktransition_type_name(this.__wbg_ptr);
16065
+ const ret = wasm.shieldfromidentitytransition_type_name(this.__wbg_ptr);
15244
16066
  deferred1_0 = ret[0];
15245
16067
  deferred1_1 = ret[1];
15246
16068
  return getStringFromWasm0(ret[0], ret[1]);
@@ -15249,15 +16071,14 @@ export class ShieldFromAssetLockTransition {
15249
16071
  }
15250
16072
  }
15251
16073
  /**
15252
- * Returns the net value balance.
15253
- * @returns {bigint}
16074
+ * @returns {number}
15254
16075
  */
15255
- get valueBalance() {
15256
- const ret = wasm.shieldfromassetlocktransition_value_balance(this.__wbg_ptr);
15257
- return BigInt.asUintN(64, ret);
16076
+ get userFeeIncrease() {
16077
+ const ret = wasm.shieldfromidentitytransition_user_fee_increase(this.__wbg_ptr);
16078
+ return ret;
15258
16079
  }
15259
16080
  }
15260
- if (Symbol.dispose) ShieldFromAssetLockTransition.prototype[Symbol.dispose] = ShieldFromAssetLockTransition.prototype.free;
16081
+ if (Symbol.dispose) ShieldFromIdentityTransition.prototype[Symbol.dispose] = ShieldFromIdentityTransition.prototype.free;
15261
16082
 
15262
16083
  export class ShieldTransition {
15263
16084
  static __wrap(ptr) {
@@ -18169,7 +18990,7 @@ export class TokenDistributionRecipient {
18169
18990
  * @returns {TokenDistributionRecipient}
18170
18991
  */
18171
18992
  static ContractOwner() {
18172
- const ret = wasm.authorizedactiontakers_NoOne();
18993
+ const ret = wasm.tokendistributionrecipient_ContractOwner();
18173
18994
  return TokenDistributionRecipient.__wrap(ret);
18174
18995
  }
18175
18996
  /**
@@ -21380,7 +22201,7 @@ export class VerifiedIdentityFullWithAddressInfos {
21380
22201
  set identity(arg0) {
21381
22202
  _assertClass(arg0, Identity);
21382
22203
  var ptr0 = arg0.__destroy_into_raw();
21383
- wasm.__wbg_set_verifiedidentityfullwithaddressinfos_identity(this.__wbg_ptr, ptr0);
22204
+ wasm.__wbg_set_verifiedidentity_identity(this.__wbg_ptr, ptr0);
21384
22205
  }
21385
22206
  /**
21386
22207
  * @returns {Map<any, any>}
@@ -21497,7 +22318,7 @@ export class VerifiedIdentityWithAddressInfos {
21497
22318
  set partialIdentity(arg0) {
21498
22319
  _assertClass(arg0, PartialIdentity);
21499
22320
  var ptr0 = arg0.__destroy_into_raw();
21500
- wasm.__wbg_set_verifiedidentitywithaddressinfos_partialIdentity(this.__wbg_ptr, ptr0);
22321
+ wasm.__wbg_set_verifiedbalancetransfer_sender(this.__wbg_ptr, ptr0);
21501
22322
  }
21502
22323
  /**
21503
22324
  * @returns {Map<any, any>}
@@ -24459,7 +25280,7 @@ function __wbg_get_imports() {
24459
25280
  const a = state0.a;
24460
25281
  state0.a = 0;
24461
25282
  try {
24462
- return wasm_bindgen__convert__closures_____invoke__h9f47b8974001e8c8(a, state0.b, arg0, arg1);
25283
+ return wasm_bindgen_208f8721039e7b97___convert__closures_____invoke___wasm_bindgen_208f8721039e7b97___JsValue__wasm_bindgen_208f8721039e7b97___JsValue_____(a, state0.b, arg0, arg1);
24463
25284
  } finally {
24464
25285
  state0.a = a;
24465
25286
  }
@@ -24856,8 +25677,8 @@ function __wbg_get_imports() {
24856
25677
  };
24857
25678
  }
24858
25679
 
24859
- function wasm_bindgen__convert__closures_____invoke__h9f47b8974001e8c8(arg0, arg1, arg2, arg3) {
24860
- wasm.wasm_bindgen__convert__closures_____invoke__h9f47b8974001e8c8(arg0, arg1, arg2, arg3);
25680
+ function wasm_bindgen_208f8721039e7b97___convert__closures_____invoke___wasm_bindgen_208f8721039e7b97___JsValue__wasm_bindgen_208f8721039e7b97___JsValue_____(arg0, arg1, arg2, arg3) {
25681
+ wasm.wasm_bindgen_208f8721039e7b97___convert__closures_____invoke___wasm_bindgen_208f8721039e7b97___JsValue__wasm_bindgen_208f8721039e7b97___JsValue_____(arg0, arg1, arg2, arg3);
24861
25682
  }
24862
25683
 
24863
25684
  const ActionTakerFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -25043,6 +25864,9 @@ const IdentityTokenInfoFinalization = (typeof FinalizationRegistry === 'undefine
25043
25864
  const IdentityTopUpFromAddressesTransitionFinalization = (typeof FinalizationRegistry === 'undefined')
25044
25865
  ? { register: () => {}, unregister: () => {} }
25045
25866
  : new FinalizationRegistry(ptr => wasm.__wbg_identitytopupfromaddressestransition_free(ptr >>> 0, 1));
25867
+ const IdentityTopUpFromShieldedPoolTransitionFinalization = (typeof FinalizationRegistry === 'undefined')
25868
+ ? { register: () => {}, unregister: () => {} }
25869
+ : new FinalizationRegistry(ptr => wasm.__wbg_identitytopupfromshieldedpooltransition_free(ptr >>> 0, 1));
25046
25870
  const IdentityTopUpTransitionFinalization = (typeof FinalizationRegistry === 'undefined')
25047
25871
  ? { register: () => {}, unregister: () => {} }
25048
25872
  : new FinalizationRegistry(ptr => wasm.__wbg_identitytopuptransition_free(ptr >>> 0, 1));
@@ -25109,6 +25933,9 @@ const SharedEncryptedNoteFinalization = (typeof FinalizationRegistry === 'undefi
25109
25933
  const ShieldFromAssetLockTransitionFinalization = (typeof FinalizationRegistry === 'undefined')
25110
25934
  ? { register: () => {}, unregister: () => {} }
25111
25935
  : new FinalizationRegistry(ptr => wasm.__wbg_shieldfromassetlocktransition_free(ptr >>> 0, 1));
25936
+ const ShieldFromIdentityTransitionFinalization = (typeof FinalizationRegistry === 'undefined')
25937
+ ? { register: () => {}, unregister: () => {} }
25938
+ : new FinalizationRegistry(ptr => wasm.__wbg_shieldfromidentitytransition_free(ptr >>> 0, 1));
25112
25939
  const ShieldTransitionFinalization = (typeof FinalizationRegistry === 'undefined')
25113
25940
  ? { register: () => {}, unregister: () => {} }
25114
25941
  : new FinalizationRegistry(ptr => wasm.__wbg_shieldtransition_free(ptr >>> 0, 1));