@dashevo/wasm-dpp2 4.2.0-beta.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.
- package/dist/dpp.compressed.js +1 -1
- package/dist/dpp.d.ts +1890 -1624
- package/dist/dpp.js +1 -1
- package/dist/raw/wasm_dpp2.d.ts +1890 -1624
- package/dist/raw/wasm_dpp2.js +501 -0
- package/dist/raw/wasm_dpp2.no_url.js +501 -0
- package/dist/raw/wasm_dpp2_bg.wasm +0 -0
- package/dist/raw/wasm_dpp2_bg.wasm.d.ts +1830 -1787
- package/package.json +1 -1
|
@@ -2519,6 +2519,15 @@ export class ConsensusError {
|
|
|
2519
2519
|
}
|
|
2520
2520
|
return ConsensusError.__wrap(ret[0]);
|
|
2521
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
|
+
}
|
|
2522
2531
|
/**
|
|
2523
2532
|
* The reference-validation error this is, or `undefined` when it is
|
|
2524
2533
|
* not one of codes 40120-40125.
|
|
@@ -3292,6 +3301,32 @@ export class DataContract {
|
|
|
3292
3301
|
DataContractFinalization.register(this, this.__wbg_ptr, this);
|
|
3293
3302
|
return this;
|
|
3294
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
|
+
}
|
|
3295
3330
|
/**
|
|
3296
3331
|
* All `refersTo` declarations of one document type, in schema property
|
|
3297
3332
|
* order.
|
|
@@ -3318,6 +3353,21 @@ export class DataContract {
|
|
|
3318
3353
|
}
|
|
3319
3354
|
return takeFromExternrefTable0(ret[0]);
|
|
3320
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
|
+
}
|
|
3321
3371
|
/**
|
|
3322
3372
|
* Every document type that declares at least one reference, keyed by
|
|
3323
3373
|
* document type name.
|
|
@@ -6253,6 +6303,32 @@ export class DocumentDeleteTransition {
|
|
|
6253
6303
|
}
|
|
6254
6304
|
if (Symbol.dispose) DocumentDeleteTransition.prototype[Symbol.dispose] = DocumentDeleteTransition.prototype.free;
|
|
6255
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
|
+
|
|
6256
6332
|
export class DocumentPurchaseTransition {
|
|
6257
6333
|
static __wrap(ptr) {
|
|
6258
6334
|
ptr = ptr >>> 0;
|
|
@@ -10652,6 +10728,352 @@ export class IdentityCreditWithdrawalTransition {
|
|
|
10652
10728
|
}
|
|
10653
10729
|
if (Symbol.dispose) IdentityCreditWithdrawalTransition.prototype[Symbol.dispose] = IdentityCreditWithdrawalTransition.prototype.free;
|
|
10654
10730
|
|
|
10731
|
+
export class IdentityKeyLimitsUpdate {
|
|
10732
|
+
static __wrap(ptr) {
|
|
10733
|
+
ptr = ptr >>> 0;
|
|
10734
|
+
const obj = Object.create(IdentityKeyLimitsUpdate.prototype);
|
|
10735
|
+
obj.__wbg_ptr = ptr;
|
|
10736
|
+
IdentityKeyLimitsUpdateFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
10737
|
+
return obj;
|
|
10738
|
+
}
|
|
10739
|
+
__destroy_into_raw() {
|
|
10740
|
+
const ptr = this.__wbg_ptr;
|
|
10741
|
+
this.__wbg_ptr = 0;
|
|
10742
|
+
IdentityKeyLimitsUpdateFinalization.unregister(this);
|
|
10743
|
+
return ptr;
|
|
10744
|
+
}
|
|
10745
|
+
free() {
|
|
10746
|
+
const ptr = this.__destroy_into_raw();
|
|
10747
|
+
wasm.__wbg_identitykeylimitsupdate_free(ptr, 0);
|
|
10748
|
+
}
|
|
10749
|
+
/**
|
|
10750
|
+
* @param {IdentityKeyLimitsUpdateTransitionOptions} options
|
|
10751
|
+
*/
|
|
10752
|
+
constructor(options) {
|
|
10753
|
+
const ret = wasm.identitykeylimitsupdate_constructor(options);
|
|
10754
|
+
if (ret[2]) {
|
|
10755
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
10756
|
+
}
|
|
10757
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
10758
|
+
IdentityKeyLimitsUpdateFinalization.register(this, this.__wbg_ptr, this);
|
|
10759
|
+
return this;
|
|
10760
|
+
}
|
|
10761
|
+
/**
|
|
10762
|
+
* @returns {bigint | undefined}
|
|
10763
|
+
*/
|
|
10764
|
+
get expiresAt() {
|
|
10765
|
+
const ret = wasm.identitykeylimitsupdate_expires_at(this.__wbg_ptr);
|
|
10766
|
+
return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
|
|
10767
|
+
}
|
|
10768
|
+
/**
|
|
10769
|
+
* @param {string} base64
|
|
10770
|
+
* @returns {IdentityKeyLimitsUpdate}
|
|
10771
|
+
*/
|
|
10772
|
+
static fromBase64(base64) {
|
|
10773
|
+
const ptr0 = passStringToWasm0(base64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
10774
|
+
const len0 = WASM_VECTOR_LEN;
|
|
10775
|
+
const ret = wasm.identitykeylimitsupdate_fromBase64(ptr0, len0);
|
|
10776
|
+
if (ret[2]) {
|
|
10777
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
10778
|
+
}
|
|
10779
|
+
return IdentityKeyLimitsUpdate.__wrap(ret[0]);
|
|
10780
|
+
}
|
|
10781
|
+
/**
|
|
10782
|
+
* @param {Uint8Array} bytes
|
|
10783
|
+
* @returns {IdentityKeyLimitsUpdate}
|
|
10784
|
+
*/
|
|
10785
|
+
static fromBytes(bytes) {
|
|
10786
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
10787
|
+
const len0 = WASM_VECTOR_LEN;
|
|
10788
|
+
const ret = wasm.identitykeylimitsupdate_fromBytes(ptr0, len0);
|
|
10789
|
+
if (ret[2]) {
|
|
10790
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
10791
|
+
}
|
|
10792
|
+
return IdentityKeyLimitsUpdate.__wrap(ret[0]);
|
|
10793
|
+
}
|
|
10794
|
+
/**
|
|
10795
|
+
* @param {string} hex
|
|
10796
|
+
* @returns {IdentityKeyLimitsUpdate}
|
|
10797
|
+
*/
|
|
10798
|
+
static fromHex(hex) {
|
|
10799
|
+
const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
10800
|
+
const len0 = WASM_VECTOR_LEN;
|
|
10801
|
+
const ret = wasm.identitykeylimitsupdate_fromHex(ptr0, len0);
|
|
10802
|
+
if (ret[2]) {
|
|
10803
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
10804
|
+
}
|
|
10805
|
+
return IdentityKeyLimitsUpdate.__wrap(ret[0]);
|
|
10806
|
+
}
|
|
10807
|
+
/**
|
|
10808
|
+
* @param {IdentityKeyLimitsUpdateJSON} js
|
|
10809
|
+
* @returns {IdentityKeyLimitsUpdate}
|
|
10810
|
+
*/
|
|
10811
|
+
static fromJSON(js) {
|
|
10812
|
+
const ret = wasm.identitykeylimitsupdate_fromJSON(js);
|
|
10813
|
+
if (ret[2]) {
|
|
10814
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
10815
|
+
}
|
|
10816
|
+
return IdentityKeyLimitsUpdate.__wrap(ret[0]);
|
|
10817
|
+
}
|
|
10818
|
+
/**
|
|
10819
|
+
* @param {IdentityKeyLimitsUpdateObject} obj
|
|
10820
|
+
* @returns {IdentityKeyLimitsUpdate}
|
|
10821
|
+
*/
|
|
10822
|
+
static fromObject(obj) {
|
|
10823
|
+
const ret = wasm.identitykeylimitsupdate_fromObject(obj);
|
|
10824
|
+
if (ret[2]) {
|
|
10825
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
10826
|
+
}
|
|
10827
|
+
return IdentityKeyLimitsUpdate.__wrap(ret[0]);
|
|
10828
|
+
}
|
|
10829
|
+
/**
|
|
10830
|
+
* @param {StateTransition} st
|
|
10831
|
+
* @returns {IdentityKeyLimitsUpdate}
|
|
10832
|
+
*/
|
|
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]);
|
|
10838
|
+
}
|
|
10839
|
+
return IdentityKeyLimitsUpdate.__wrap(ret[0]);
|
|
10840
|
+
}
|
|
10841
|
+
/**
|
|
10842
|
+
* @returns {Identifier}
|
|
10843
|
+
*/
|
|
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
|
+
|
|
10655
11077
|
export class IdentityPublicKey {
|
|
10656
11078
|
static __wrap(ptr) {
|
|
10657
11079
|
ptr = ptr >>> 0;
|
|
@@ -10732,6 +11154,15 @@ export class IdentityPublicKey {
|
|
|
10732
11154
|
const ret = wasm.identitypublickey_disabled_at(this.__wbg_ptr);
|
|
10733
11155
|
return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
|
|
10734
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
|
+
}
|
|
10735
11166
|
/**
|
|
10736
11167
|
* @param {string} hex
|
|
10737
11168
|
* @returns {IdentityPublicKey}
|
|
@@ -10957,6 +11388,16 @@ export class IdentityPublicKey {
|
|
|
10957
11388
|
throw takeFromExternrefTable0(ret[0]);
|
|
10958
11389
|
}
|
|
10959
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
|
+
}
|
|
10960
11401
|
/**
|
|
10961
11402
|
* @param {boolean} isReadOnly
|
|
10962
11403
|
*/
|
|
@@ -10999,6 +11440,16 @@ export class IdentityPublicKey {
|
|
|
10999
11440
|
throw takeFromExternrefTable0(ret[0]);
|
|
11000
11441
|
}
|
|
11001
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
|
+
}
|
|
11002
11453
|
/**
|
|
11003
11454
|
* @returns {string}
|
|
11004
11455
|
*/
|
|
@@ -11057,6 +11508,14 @@ export class IdentityPublicKey {
|
|
|
11057
11508
|
}
|
|
11058
11509
|
return takeFromExternrefTable0(ret[0]);
|
|
11059
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
|
+
}
|
|
11060
11519
|
/**
|
|
11061
11520
|
* @returns {string}
|
|
11062
11521
|
*/
|
|
@@ -11135,6 +11594,15 @@ export class IdentityPublicKeyInCreation {
|
|
|
11135
11594
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
11136
11595
|
return v1;
|
|
11137
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
|
+
}
|
|
11138
11606
|
/**
|
|
11139
11607
|
* @param {IdentityPublicKeyInCreationJSON} js
|
|
11140
11608
|
* @returns {IdentityPublicKeyInCreation}
|
|
@@ -11247,6 +11715,17 @@ export class IdentityPublicKeyInCreation {
|
|
|
11247
11715
|
const len0 = WASM_VECTOR_LEN;
|
|
11248
11716
|
wasm.identitypublickeyincreation_set_data(this.__wbg_ptr, ptr0, len0);
|
|
11249
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
|
+
}
|
|
11250
11729
|
/**
|
|
11251
11730
|
* @param {boolean} isReadOnly
|
|
11252
11731
|
*/
|
|
@@ -11297,6 +11776,17 @@ export class IdentityPublicKeyInCreation {
|
|
|
11297
11776
|
const len0 = WASM_VECTOR_LEN;
|
|
11298
11777
|
wasm.identitypublickeyincreation_set_signature(this.__wbg_ptr, ptr0, len0);
|
|
11299
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
|
+
}
|
|
11300
11790
|
/**
|
|
11301
11791
|
* @returns {Uint8Array}
|
|
11302
11792
|
*/
|
|
@@ -11348,6 +11838,14 @@ export class IdentityPublicKeyInCreation {
|
|
|
11348
11838
|
}
|
|
11349
11839
|
return takeFromExternrefTable0(ret[0]);
|
|
11350
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
|
+
}
|
|
11351
11849
|
/**
|
|
11352
11850
|
* @returns {string}
|
|
11353
11851
|
*/
|
|
@@ -25849,6 +26347,9 @@ const IdentityCreditTransferToAddressesFinalization = (typeof FinalizationRegist
|
|
|
25849
26347
|
const IdentityCreditWithdrawalTransitionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25850
26348
|
? { register: () => {}, unregister: () => {} }
|
|
25851
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));
|
|
25852
26353
|
const IdentityPublicKeyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25853
26354
|
? { register: () => {}, unregister: () => {} }
|
|
25854
26355
|
: new FinalizationRegistry(ptr => wasm.__wbg_identitypublickey_free(ptr >>> 0, 1));
|
|
Binary file
|