lumina-node-wasm 0.11.0 → 0.12.0
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/lumina_node_wasm.d.ts +333 -317
- package/lumina_node_wasm_bg.js +762 -758
- package/lumina_node_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/lumina_node_wasm_bg.js
CHANGED
|
@@ -199,22 +199,11 @@ function debugString(val) {
|
|
|
199
199
|
return className;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
203
|
-
ptr = ptr >>> 0;
|
|
204
|
-
const mem = getDataViewMemory0();
|
|
205
|
-
const result = [];
|
|
206
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
207
|
-
result.push(wasm.__wbindgen_export_4.get(mem.getUint32(i, true)));
|
|
208
|
-
}
|
|
209
|
-
wasm.__externref_drop_slice(ptr, len);
|
|
210
|
-
return result;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
202
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
214
203
|
? { register: () => {}, unregister: () => {} }
|
|
215
204
|
: new FinalizationRegistry(
|
|
216
205
|
state => {
|
|
217
|
-
wasm.
|
|
206
|
+
wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b);
|
|
218
207
|
}
|
|
219
208
|
);
|
|
220
209
|
|
|
@@ -232,7 +221,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
232
221
|
return f(a, state.b, ...args);
|
|
233
222
|
} finally {
|
|
234
223
|
if (--state.cnt === 0) {
|
|
235
|
-
wasm.
|
|
224
|
+
wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
|
|
236
225
|
CLOSURE_DTORS.unregister(state);
|
|
237
226
|
} else {
|
|
238
227
|
state.a = a;
|
|
@@ -244,6 +233,17 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
244
233
|
return real;
|
|
245
234
|
}
|
|
246
235
|
|
|
236
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
237
|
+
ptr = ptr >>> 0;
|
|
238
|
+
const mem = getDataViewMemory0();
|
|
239
|
+
const result = [];
|
|
240
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
241
|
+
result.push(wasm.__wbindgen_export_4.get(mem.getUint32(i, true)));
|
|
242
|
+
}
|
|
243
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
244
|
+
return result;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
247
|
function makeClosure(arg0, arg1, dtor, f) {
|
|
248
248
|
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
249
249
|
const real = (...args) => {
|
|
@@ -256,7 +256,7 @@ function makeClosure(arg0, arg1, dtor, f) {
|
|
|
256
256
|
return f(state.a, state.b, ...args);
|
|
257
257
|
} finally {
|
|
258
258
|
if (--state.cnt === 0) {
|
|
259
|
-
wasm.
|
|
259
|
+
wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b); state.a = 0;
|
|
260
260
|
CLOSURE_DTORS.unregister(state);
|
|
261
261
|
}
|
|
262
262
|
}
|
|
@@ -305,41 +305,41 @@ export function protoEncodeSignDoc(sign_doc) {
|
|
|
305
305
|
return v1;
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
function __wbg_adapter_8(arg0, arg1) {
|
|
309
|
-
wasm.
|
|
308
|
+
function __wbg_adapter_8(arg0, arg1, arg2) {
|
|
309
|
+
wasm.closure1785_externref_shim(arg0, arg1, arg2);
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
function
|
|
313
|
-
wasm.
|
|
312
|
+
function __wbg_adapter_13(arg0, arg1) {
|
|
313
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h2abc87618de50089(arg0, arg1);
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
function
|
|
317
|
-
wasm.
|
|
316
|
+
function __wbg_adapter_16(arg0, arg1, arg2) {
|
|
317
|
+
wasm.closure2977_externref_shim(arg0, arg1, arg2);
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
function
|
|
321
|
-
wasm.
|
|
320
|
+
function __wbg_adapter_19(arg0, arg1) {
|
|
321
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hc000bd3f01dbb89a(arg0, arg1);
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
function
|
|
325
|
-
wasm.
|
|
324
|
+
function __wbg_adapter_28(arg0, arg1, arg2) {
|
|
325
|
+
wasm.closure670_externref_shim(arg0, arg1, arg2);
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
function
|
|
329
|
-
wasm.
|
|
328
|
+
function __wbg_adapter_33(arg0, arg1, arg2) {
|
|
329
|
+
wasm.closure2875_externref_shim(arg0, arg1, arg2);
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
-
function
|
|
333
|
-
const ret = wasm.
|
|
332
|
+
function __wbg_adapter_38(arg0, arg1, arg2) {
|
|
333
|
+
const ret = wasm.closure675_externref_shim(arg0, arg1, arg2);
|
|
334
334
|
return ret;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
function __wbg_adapter_47(arg0, arg1) {
|
|
338
|
-
wasm.
|
|
337
|
+
function __wbg_adapter_47(arg0, arg1, arg2) {
|
|
338
|
+
wasm.closure673_externref_shim(arg0, arg1, arg2);
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
function
|
|
342
|
-
wasm.
|
|
341
|
+
function __wbg_adapter_982(arg0, arg1, arg2, arg3) {
|
|
342
|
+
wasm.closure3002_externref_shim(arg0, arg1, arg2, arg3);
|
|
343
343
|
}
|
|
344
344
|
|
|
345
345
|
/**
|
|
@@ -714,7 +714,7 @@ export const TxPriority = Object.freeze({
|
|
|
714
714
|
});
|
|
715
715
|
/**
|
|
716
716
|
* Represents state of the transaction in the mempool
|
|
717
|
-
* @enum {0 | 1 | 2 | 3}
|
|
717
|
+
* @enum {0 | 1 | 2 | 3 | 4}
|
|
718
718
|
*/
|
|
719
719
|
export const TxStatus = Object.freeze({
|
|
720
720
|
/**
|
|
@@ -729,10 +729,14 @@ export const TxStatus = Object.freeze({
|
|
|
729
729
|
* The transaction was evicted from the mempool.
|
|
730
730
|
*/
|
|
731
731
|
Evicted: 2, "2": "Evicted",
|
|
732
|
+
/**
|
|
733
|
+
* The transaction was rejected
|
|
734
|
+
*/
|
|
735
|
+
Rejected: 3, "3": "Rejected",
|
|
732
736
|
/**
|
|
733
737
|
* The transaction was committed into the block.
|
|
734
738
|
*/
|
|
735
|
-
Committed:
|
|
739
|
+
Committed: 4, "4": "Committed",
|
|
736
740
|
});
|
|
737
741
|
/**
|
|
738
742
|
* Types of votes
|
|
@@ -887,6 +891,17 @@ export class AbciQueryResponse {
|
|
|
887
891
|
const ptr = this.__destroy_into_raw();
|
|
888
892
|
wasm.__wbg_abciqueryresponse_free(ptr, 0);
|
|
889
893
|
}
|
|
894
|
+
/**
|
|
895
|
+
* The block height from which data was derived.
|
|
896
|
+
*
|
|
897
|
+
* Note that this is the height of the block containing the application's Merkle root hash,
|
|
898
|
+
* which represents the state as it was after committing the block at height - 1.
|
|
899
|
+
* @returns {bigint}
|
|
900
|
+
*/
|
|
901
|
+
get height() {
|
|
902
|
+
const ret = wasm.abciqueryresponse_height(this.__wbg_ptr);
|
|
903
|
+
return BigInt.asUintN(64, ret);
|
|
904
|
+
}
|
|
890
905
|
/**
|
|
891
906
|
* Response code.
|
|
892
907
|
* @returns {ErrorCode}
|
|
@@ -1058,17 +1073,6 @@ export class AbciQueryResponse {
|
|
|
1058
1073
|
const len0 = WASM_VECTOR_LEN;
|
|
1059
1074
|
wasm.__wbg_set_abciqueryresponse_info(this.__wbg_ptr, ptr0, len0);
|
|
1060
1075
|
}
|
|
1061
|
-
/**
|
|
1062
|
-
* The block height from which data was derived.
|
|
1063
|
-
*
|
|
1064
|
-
* Note that this is the height of the block containing the application's Merkle root hash,
|
|
1065
|
-
* which represents the state as it was after committing the block at height - 1.
|
|
1066
|
-
* @returns {bigint}
|
|
1067
|
-
*/
|
|
1068
|
-
get height() {
|
|
1069
|
-
const ret = wasm.abciqueryresponse_height(this.__wbg_ptr);
|
|
1070
|
-
return BigInt.asUintN(64, ret);
|
|
1071
|
-
}
|
|
1072
1076
|
}
|
|
1073
1077
|
|
|
1074
1078
|
const AccAddressFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -1899,21 +1903,21 @@ export class BroadcastMode {
|
|
|
1899
1903
|
return BroadcastMode.__wrap(ret);
|
|
1900
1904
|
}
|
|
1901
1905
|
/**
|
|
1902
|
-
*
|
|
1903
|
-
*
|
|
1906
|
+
* `BroadcastMode` `Sync` defines a tx broadcasting mode where the client waits for
|
|
1907
|
+
* a CheckTx execution response only.
|
|
1904
1908
|
* @returns {BroadcastMode}
|
|
1905
1909
|
*/
|
|
1906
|
-
static get
|
|
1907
|
-
const ret = wasm.
|
|
1910
|
+
static get Sync() {
|
|
1911
|
+
const ret = wasm.broadcastmode_Sync();
|
|
1908
1912
|
return BroadcastMode.__wrap(ret);
|
|
1909
1913
|
}
|
|
1910
1914
|
/**
|
|
1911
|
-
* `BroadcastMode` `Sync`
|
|
1912
|
-
*
|
|
1915
|
+
* DEPRECATED: use `BroadcastMode` `Sync` instead,
|
|
1916
|
+
* `BroadcastMode` `Block` is not supported by the SDK from v0.47.x onwards.
|
|
1913
1917
|
* @returns {BroadcastMode}
|
|
1914
1918
|
*/
|
|
1915
|
-
static get
|
|
1916
|
-
const ret = wasm.
|
|
1919
|
+
static get Block() {
|
|
1920
|
+
const ret = wasm.broadcastmode_Block();
|
|
1917
1921
|
return BroadcastMode.__wrap(ret);
|
|
1918
1922
|
}
|
|
1919
1923
|
/**
|
|
@@ -2468,7 +2472,9 @@ export class ConflictingBlock {
|
|
|
2468
2472
|
const ConnectionCountersSnapshotFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2469
2473
|
? { register: () => {}, unregister: () => {} }
|
|
2470
2474
|
: new FinalizationRegistry(ptr => wasm.__wbg_connectioncounterssnapshot_free(ptr >>> 0, 1));
|
|
2471
|
-
|
|
2475
|
+
/**
|
|
2476
|
+
* Network connection information
|
|
2477
|
+
*/
|
|
2472
2478
|
export class ConnectionCountersSnapshot {
|
|
2473
2479
|
|
|
2474
2480
|
static __wrap(ptr) {
|
|
@@ -2792,51 +2798,59 @@ export class DataAvailabilityHeader {
|
|
|
2792
2798
|
wasm.__wbg_dataavailabilityheader_free(ptr, 0);
|
|
2793
2799
|
}
|
|
2794
2800
|
/**
|
|
2795
|
-
*
|
|
2796
|
-
* @
|
|
2801
|
+
* Get a root of the row with the given index.
|
|
2802
|
+
* @param {number} row
|
|
2803
|
+
* @returns {any}
|
|
2797
2804
|
*/
|
|
2798
|
-
|
|
2799
|
-
const ret = wasm.
|
|
2805
|
+
rowRoot(row) {
|
|
2806
|
+
const ret = wasm.dataavailabilityheader_rowRoot(this.__wbg_ptr, row);
|
|
2800
2807
|
if (ret[2]) {
|
|
2801
2808
|
throw takeFromExternrefTable0(ret[1]);
|
|
2802
2809
|
}
|
|
2803
2810
|
return takeFromExternrefTable0(ret[0]);
|
|
2804
2811
|
}
|
|
2805
2812
|
/**
|
|
2806
|
-
* Merkle roots of the [`ExtendedDataSquare`]
|
|
2813
|
+
* Merkle roots of the [`ExtendedDataSquare`] rows.
|
|
2807
2814
|
* @returns {Array<any>}
|
|
2808
2815
|
*/
|
|
2809
|
-
|
|
2810
|
-
const ret = wasm.
|
|
2816
|
+
rowRoots() {
|
|
2817
|
+
const ret = wasm.dataavailabilityheader_rowRoots(this.__wbg_ptr);
|
|
2811
2818
|
if (ret[2]) {
|
|
2812
2819
|
throw takeFromExternrefTable0(ret[1]);
|
|
2813
2820
|
}
|
|
2814
2821
|
return takeFromExternrefTable0(ret[0]);
|
|
2815
2822
|
}
|
|
2816
2823
|
/**
|
|
2817
|
-
* Get a root of the
|
|
2818
|
-
* @param {number}
|
|
2824
|
+
* Get the a root of the column with the given index.
|
|
2825
|
+
* @param {number} column
|
|
2819
2826
|
* @returns {any}
|
|
2820
2827
|
*/
|
|
2821
|
-
|
|
2822
|
-
const ret = wasm.
|
|
2828
|
+
columnRoot(column) {
|
|
2829
|
+
const ret = wasm.dataavailabilityheader_columnRoot(this.__wbg_ptr, column);
|
|
2823
2830
|
if (ret[2]) {
|
|
2824
2831
|
throw takeFromExternrefTable0(ret[1]);
|
|
2825
2832
|
}
|
|
2826
2833
|
return takeFromExternrefTable0(ret[0]);
|
|
2827
2834
|
}
|
|
2828
2835
|
/**
|
|
2829
|
-
*
|
|
2830
|
-
* @
|
|
2831
|
-
* @returns {any}
|
|
2836
|
+
* Merkle roots of the [`ExtendedDataSquare`] columns.
|
|
2837
|
+
* @returns {Array<any>}
|
|
2832
2838
|
*/
|
|
2833
|
-
|
|
2834
|
-
const ret = wasm.
|
|
2839
|
+
columnRoots() {
|
|
2840
|
+
const ret = wasm.dataavailabilityheader_columnRoots(this.__wbg_ptr);
|
|
2835
2841
|
if (ret[2]) {
|
|
2836
2842
|
throw takeFromExternrefTable0(ret[1]);
|
|
2837
2843
|
}
|
|
2838
2844
|
return takeFromExternrefTable0(ret[0]);
|
|
2839
2845
|
}
|
|
2846
|
+
/**
|
|
2847
|
+
* Get the size of the [`ExtendedDataSquare`] for which this header was built.
|
|
2848
|
+
* @returns {number}
|
|
2849
|
+
*/
|
|
2850
|
+
squareWidth() {
|
|
2851
|
+
const ret = wasm.dataavailabilityheader_squareWidth(this.__wbg_ptr);
|
|
2852
|
+
return ret;
|
|
2853
|
+
}
|
|
2840
2854
|
/**
|
|
2841
2855
|
* Compute the combined hash of all rows and columns.
|
|
2842
2856
|
*
|
|
@@ -2850,14 +2864,6 @@ export class DataAvailabilityHeader {
|
|
|
2850
2864
|
}
|
|
2851
2865
|
return takeFromExternrefTable0(ret[0]);
|
|
2852
2866
|
}
|
|
2853
|
-
/**
|
|
2854
|
-
* Get the size of the [`ExtendedDataSquare`] for which this header was built.
|
|
2855
|
-
* @returns {number}
|
|
2856
|
-
*/
|
|
2857
|
-
squareWidth() {
|
|
2858
|
-
const ret = wasm.dataavailabilityheader_squareWidth(this.__wbg_ptr);
|
|
2859
|
-
return ret;
|
|
2860
|
-
}
|
|
2861
2867
|
}
|
|
2862
2868
|
|
|
2863
2869
|
const DuplicateVoteEvidenceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -3058,10 +3064,10 @@ export class ExtendedHeader {
|
|
|
3058
3064
|
|
|
3059
3065
|
toJSON() {
|
|
3060
3066
|
return {
|
|
3061
|
-
dah: this.dah,
|
|
3062
|
-
header: this.header,
|
|
3063
|
-
commit: this.commit,
|
|
3064
3067
|
validatorSet: this.validatorSet,
|
|
3068
|
+
commit: this.commit,
|
|
3069
|
+
header: this.header,
|
|
3070
|
+
dah: this.dah,
|
|
3065
3071
|
};
|
|
3066
3072
|
}
|
|
3067
3073
|
|
|
@@ -3081,58 +3087,64 @@ export class ExtendedHeader {
|
|
|
3081
3087
|
wasm.__wbg_extendedheader_free(ptr, 0);
|
|
3082
3088
|
}
|
|
3083
3089
|
/**
|
|
3084
|
-
*
|
|
3085
|
-
* @returns {DataAvailabilityHeader}
|
|
3086
|
-
*/
|
|
3087
|
-
get dah() {
|
|
3088
|
-
const ret = wasm.__wbg_get_extendedheader_dah(this.__wbg_ptr);
|
|
3089
|
-
return DataAvailabilityHeader.__wrap(ret);
|
|
3090
|
-
}
|
|
3091
|
-
/**
|
|
3092
|
-
* Header of the block data availability.
|
|
3093
|
-
* @param {DataAvailabilityHeader} arg0
|
|
3094
|
-
*/
|
|
3095
|
-
set dah(arg0) {
|
|
3096
|
-
_assertClass(arg0, DataAvailabilityHeader);
|
|
3097
|
-
var ptr0 = arg0.__destroy_into_raw();
|
|
3098
|
-
wasm.__wbg_set_extendedheader_dah(this.__wbg_ptr, ptr0);
|
|
3099
|
-
}
|
|
3100
|
-
/**
|
|
3101
|
-
* Clone a header producing a deep copy of it.
|
|
3102
|
-
* @returns {ExtendedHeader}
|
|
3090
|
+
* Decode protobuf encoded header and then validate it.
|
|
3103
3091
|
*/
|
|
3104
|
-
|
|
3105
|
-
const ret = wasm.
|
|
3106
|
-
|
|
3092
|
+
validate() {
|
|
3093
|
+
const ret = wasm.extendedheader_validate(this.__wbg_ptr);
|
|
3094
|
+
if (ret[1]) {
|
|
3095
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3096
|
+
}
|
|
3107
3097
|
}
|
|
3108
3098
|
/**
|
|
3109
|
-
*
|
|
3110
|
-
*
|
|
3099
|
+
* Verify a chain of adjacent untrusted headers.
|
|
3100
|
+
*
|
|
3101
|
+
* # Note
|
|
3102
|
+
*
|
|
3103
|
+
* Provided headers will be consumed by this method, meaning
|
|
3104
|
+
* they will no longer be accessible. If this behavior is not desired,
|
|
3105
|
+
* consider using `ExtendedHeader.clone()`.
|
|
3106
|
+
*
|
|
3107
|
+
* ```js
|
|
3108
|
+
* const genesis = hdr0;
|
|
3109
|
+
* const headers = [hrd1, hdr2, hdr3];
|
|
3110
|
+
* genesis.verifyRange(headers.map(h => h.clone()));
|
|
3111
|
+
* ```
|
|
3112
|
+
*
|
|
3113
|
+
* # Errors
|
|
3114
|
+
*
|
|
3115
|
+
* If verification fails, this function will return an error with a reason of failure.
|
|
3116
|
+
* This function will also return an error if untrusted headers are not adjacent
|
|
3117
|
+
* to each other.
|
|
3118
|
+
* @param {ExtendedHeader[]} untrusted
|
|
3111
3119
|
*/
|
|
3112
|
-
|
|
3113
|
-
const
|
|
3114
|
-
|
|
3120
|
+
verifyRange(untrusted) {
|
|
3121
|
+
const ptr0 = passArrayJsValueToWasm0(untrusted, wasm.__wbindgen_malloc);
|
|
3122
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3123
|
+
const ret = wasm.extendedheader_verifyRange(this.__wbg_ptr, ptr0, len0);
|
|
3124
|
+
if (ret[1]) {
|
|
3125
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3126
|
+
}
|
|
3115
3127
|
}
|
|
3116
3128
|
/**
|
|
3117
|
-
*
|
|
3118
|
-
* @returns {
|
|
3129
|
+
* Information about the set of validators commiting the block.
|
|
3130
|
+
* @returns {any}
|
|
3119
3131
|
*/
|
|
3120
|
-
|
|
3121
|
-
const ret = wasm.
|
|
3132
|
+
get validatorSet() {
|
|
3133
|
+
const ret = wasm.extendedheader_validatorSet(this.__wbg_ptr);
|
|
3122
3134
|
if (ret[2]) {
|
|
3123
3135
|
throw takeFromExternrefTable0(ret[1]);
|
|
3124
3136
|
}
|
|
3125
|
-
return ret[0];
|
|
3137
|
+
return takeFromExternrefTable0(ret[0]);
|
|
3126
3138
|
}
|
|
3127
3139
|
/**
|
|
3128
|
-
* Get the
|
|
3140
|
+
* Get the hash of the previous header.
|
|
3129
3141
|
* @returns {string}
|
|
3130
3142
|
*/
|
|
3131
|
-
|
|
3143
|
+
previousHeaderHash() {
|
|
3132
3144
|
let deferred1_0;
|
|
3133
3145
|
let deferred1_1;
|
|
3134
3146
|
try {
|
|
3135
|
-
const ret = wasm.
|
|
3147
|
+
const ret = wasm.extendedheader_previousHeaderHash(this.__wbg_ptr);
|
|
3136
3148
|
deferred1_0 = ret[0];
|
|
3137
3149
|
deferred1_1 = ret[1];
|
|
3138
3150
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -3141,14 +3153,44 @@ export class ExtendedHeader {
|
|
|
3141
3153
|
}
|
|
3142
3154
|
}
|
|
3143
3155
|
/**
|
|
3144
|
-
*
|
|
3156
|
+
* Verify a chain of adjacent untrusted headers and make sure
|
|
3157
|
+
* they are adjacent to `self`.
|
|
3158
|
+
*
|
|
3159
|
+
* # Note
|
|
3160
|
+
*
|
|
3161
|
+
* Provided headers will be consumed by this method, meaning
|
|
3162
|
+
* they will no longer be accessible. If this behavior is not desired,
|
|
3163
|
+
* consider using `ExtendedHeader.clone()`.
|
|
3164
|
+
*
|
|
3165
|
+
* ```js
|
|
3166
|
+
* const genesis = hdr0;
|
|
3167
|
+
* const headers = [hrd1, hdr2, hdr3];
|
|
3168
|
+
* genesis.verifyAdjacentRange(headers.map(h => h.clone()));
|
|
3169
|
+
* ```
|
|
3170
|
+
*
|
|
3171
|
+
* # Errors
|
|
3172
|
+
*
|
|
3173
|
+
* If verification fails, this function will return an error with a reason of failure.
|
|
3174
|
+
* This function will also return an error if untrusted headers and `self` don't form contiguous range
|
|
3175
|
+
* @param {ExtendedHeader[]} untrusted
|
|
3176
|
+
*/
|
|
3177
|
+
verifyAdjacentRange(untrusted) {
|
|
3178
|
+
const ptr0 = passArrayJsValueToWasm0(untrusted, wasm.__wbindgen_malloc);
|
|
3179
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3180
|
+
const ret = wasm.extendedheader_verifyAdjacentRange(this.__wbg_ptr, ptr0, len0);
|
|
3181
|
+
if (ret[1]) {
|
|
3182
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
/**
|
|
3186
|
+
* Get the block hash.
|
|
3145
3187
|
* @returns {string}
|
|
3146
3188
|
*/
|
|
3147
|
-
|
|
3189
|
+
hash() {
|
|
3148
3190
|
let deferred1_0;
|
|
3149
3191
|
let deferred1_1;
|
|
3150
3192
|
try {
|
|
3151
|
-
const ret = wasm.
|
|
3193
|
+
const ret = wasm.extendedheader_hash(this.__wbg_ptr);
|
|
3152
3194
|
deferred1_0 = ret[0];
|
|
3153
3195
|
deferred1_1 = ret[1];
|
|
3154
3196
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -3157,15 +3199,23 @@ export class ExtendedHeader {
|
|
|
3157
3199
|
}
|
|
3158
3200
|
}
|
|
3159
3201
|
/**
|
|
3160
|
-
*
|
|
3161
|
-
* @returns {
|
|
3202
|
+
* Get the block time.
|
|
3203
|
+
* @returns {number}
|
|
3162
3204
|
*/
|
|
3163
|
-
|
|
3164
|
-
const ret = wasm.
|
|
3205
|
+
time() {
|
|
3206
|
+
const ret = wasm.extendedheader_time(this.__wbg_ptr);
|
|
3165
3207
|
if (ret[2]) {
|
|
3166
3208
|
throw takeFromExternrefTable0(ret[1]);
|
|
3167
3209
|
}
|
|
3168
|
-
return
|
|
3210
|
+
return ret[0];
|
|
3211
|
+
}
|
|
3212
|
+
/**
|
|
3213
|
+
* Clone a header producing a deep copy of it.
|
|
3214
|
+
* @returns {ExtendedHeader}
|
|
3215
|
+
*/
|
|
3216
|
+
clone() {
|
|
3217
|
+
const ret = wasm.extendedheader_clone(this.__wbg_ptr);
|
|
3218
|
+
return ExtendedHeader.__wrap(ret);
|
|
3169
3219
|
}
|
|
3170
3220
|
/**
|
|
3171
3221
|
* Commit metadata and signatures from validators committing the block.
|
|
@@ -3179,24 +3229,23 @@ export class ExtendedHeader {
|
|
|
3179
3229
|
return takeFromExternrefTable0(ret[0]);
|
|
3180
3230
|
}
|
|
3181
3231
|
/**
|
|
3182
|
-
*
|
|
3232
|
+
* Tendermint block header.
|
|
3183
3233
|
* @returns {any}
|
|
3184
3234
|
*/
|
|
3185
|
-
get
|
|
3186
|
-
const ret = wasm.
|
|
3235
|
+
get header() {
|
|
3236
|
+
const ret = wasm.extendedheader_header(this.__wbg_ptr);
|
|
3187
3237
|
if (ret[2]) {
|
|
3188
3238
|
throw takeFromExternrefTable0(ret[1]);
|
|
3189
3239
|
}
|
|
3190
3240
|
return takeFromExternrefTable0(ret[0]);
|
|
3191
3241
|
}
|
|
3192
3242
|
/**
|
|
3193
|
-
*
|
|
3243
|
+
* Get the block height.
|
|
3244
|
+
* @returns {bigint}
|
|
3194
3245
|
*/
|
|
3195
|
-
|
|
3196
|
-
const ret = wasm.
|
|
3197
|
-
|
|
3198
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
3199
|
-
}
|
|
3246
|
+
height() {
|
|
3247
|
+
const ret = wasm.extendedheader_height(this.__wbg_ptr);
|
|
3248
|
+
return BigInt.asUintN(64, ret);
|
|
3200
3249
|
}
|
|
3201
3250
|
/**
|
|
3202
3251
|
* Verify a chain of adjacent untrusted headers and make sure
|
|
@@ -3216,64 +3265,21 @@ export class ExtendedHeader {
|
|
|
3216
3265
|
}
|
|
3217
3266
|
}
|
|
3218
3267
|
/**
|
|
3219
|
-
*
|
|
3220
|
-
*
|
|
3221
|
-
* # Note
|
|
3222
|
-
*
|
|
3223
|
-
* Provided headers will be consumed by this method, meaning
|
|
3224
|
-
* they will no longer be accessible. If this behavior is not desired,
|
|
3225
|
-
* consider using `ExtendedHeader.clone()`.
|
|
3226
|
-
*
|
|
3227
|
-
* ```js
|
|
3228
|
-
* const genesis = hdr0;
|
|
3229
|
-
* const headers = [hrd1, hdr2, hdr3];
|
|
3230
|
-
* genesis.verifyRange(headers.map(h => h.clone()));
|
|
3231
|
-
* ```
|
|
3232
|
-
*
|
|
3233
|
-
* # Errors
|
|
3234
|
-
*
|
|
3235
|
-
* If verification fails, this function will return an error with a reason of failure.
|
|
3236
|
-
* This function will also return an error if untrusted headers are not adjacent
|
|
3237
|
-
* to each other.
|
|
3238
|
-
* @param {ExtendedHeader[]} untrusted
|
|
3268
|
+
* Header of the block data availability.
|
|
3269
|
+
* @returns {DataAvailabilityHeader}
|
|
3239
3270
|
*/
|
|
3240
|
-
|
|
3241
|
-
const
|
|
3242
|
-
|
|
3243
|
-
const ret = wasm.extendedheader_verifyRange(this.__wbg_ptr, ptr0, len0);
|
|
3244
|
-
if (ret[1]) {
|
|
3245
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
3246
|
-
}
|
|
3271
|
+
get dah() {
|
|
3272
|
+
const ret = wasm.__wbg_get_extendedheader_dah(this.__wbg_ptr);
|
|
3273
|
+
return DataAvailabilityHeader.__wrap(ret);
|
|
3247
3274
|
}
|
|
3248
3275
|
/**
|
|
3249
|
-
*
|
|
3250
|
-
*
|
|
3251
|
-
*
|
|
3252
|
-
* # Note
|
|
3253
|
-
*
|
|
3254
|
-
* Provided headers will be consumed by this method, meaning
|
|
3255
|
-
* they will no longer be accessible. If this behavior is not desired,
|
|
3256
|
-
* consider using `ExtendedHeader.clone()`.
|
|
3257
|
-
*
|
|
3258
|
-
* ```js
|
|
3259
|
-
* const genesis = hdr0;
|
|
3260
|
-
* const headers = [hrd1, hdr2, hdr3];
|
|
3261
|
-
* genesis.verifyAdjacentRange(headers.map(h => h.clone()));
|
|
3262
|
-
* ```
|
|
3263
|
-
*
|
|
3264
|
-
* # Errors
|
|
3265
|
-
*
|
|
3266
|
-
* If verification fails, this function will return an error with a reason of failure.
|
|
3267
|
-
* This function will also return an error if untrusted headers and `self` don't form contiguous range
|
|
3268
|
-
* @param {ExtendedHeader[]} untrusted
|
|
3276
|
+
* Header of the block data availability.
|
|
3277
|
+
* @param {DataAvailabilityHeader} arg0
|
|
3269
3278
|
*/
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
if (ret[1]) {
|
|
3275
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
3276
|
-
}
|
|
3279
|
+
set dah(arg0) {
|
|
3280
|
+
_assertClass(arg0, DataAvailabilityHeader);
|
|
3281
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
3282
|
+
wasm.__wbg_set_extendedheader_dah(this.__wbg_ptr, ptr0);
|
|
3277
3283
|
}
|
|
3278
3284
|
}
|
|
3279
3285
|
|
|
@@ -3575,22 +3581,27 @@ export class GrpcClient {
|
|
|
3575
3581
|
wasm.__wbg_grpcclient_free(ptr, 0);
|
|
3576
3582
|
}
|
|
3577
3583
|
/**
|
|
3578
|
-
*
|
|
3579
|
-
* @param {
|
|
3580
|
-
* @
|
|
3584
|
+
* Issue a direct ABCI query to the application
|
|
3585
|
+
* @param {Uint8Array} data
|
|
3586
|
+
* @param {string} path
|
|
3587
|
+
* @param {bigint} height
|
|
3588
|
+
* @param {boolean} prove
|
|
3589
|
+
* @returns {Promise<AbciQueryResponse>}
|
|
3581
3590
|
*/
|
|
3582
|
-
|
|
3583
|
-
const ptr0 =
|
|
3591
|
+
abciQuery(data, path, height, prove) {
|
|
3592
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
3584
3593
|
const len0 = WASM_VECTOR_LEN;
|
|
3585
|
-
const
|
|
3586
|
-
|
|
3594
|
+
const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3595
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3596
|
+
const ret = wasm.grpcclient_abciQuery(this.__wbg_ptr, ptr0, len0, ptr1, len1, height, prove);
|
|
3597
|
+
return ret;
|
|
3587
3598
|
}
|
|
3588
3599
|
/**
|
|
3589
|
-
*
|
|
3590
|
-
* @returns {Promise<
|
|
3600
|
+
* AppVersion of the client
|
|
3601
|
+
* @returns {Promise<AppVersion>}
|
|
3591
3602
|
*/
|
|
3592
|
-
|
|
3593
|
-
const ret = wasm.
|
|
3603
|
+
get appVersion() {
|
|
3604
|
+
const ret = wasm.grpcclient_appVersion(this.__wbg_ptr);
|
|
3594
3605
|
return ret;
|
|
3595
3606
|
}
|
|
3596
3607
|
/**
|
|
@@ -3604,34 +3615,6 @@ export class GrpcClient {
|
|
|
3604
3615
|
const ret = wasm.grpcclient_getAccount(this.__wbg_ptr, ptr0, len0);
|
|
3605
3616
|
return ret;
|
|
3606
3617
|
}
|
|
3607
|
-
/**
|
|
3608
|
-
* Get accounts
|
|
3609
|
-
* @returns {Promise<BaseAccount[]>}
|
|
3610
|
-
*/
|
|
3611
|
-
getAccounts() {
|
|
3612
|
-
const ret = wasm.grpcclient_getAccounts(this.__wbg_ptr);
|
|
3613
|
-
return ret;
|
|
3614
|
-
}
|
|
3615
|
-
/**
|
|
3616
|
-
* Retrieves the verified Celestia coin balance for the address.
|
|
3617
|
-
*
|
|
3618
|
-
* # Notes
|
|
3619
|
-
*
|
|
3620
|
-
* This returns the verified balance which is the one that was reported by
|
|
3621
|
-
* the previous network block. In other words, if you transfer some coins,
|
|
3622
|
-
* you need to wait 1 more block in order to see the new balance. If you want
|
|
3623
|
-
* something more immediate then use [`GrpcClient::get_balance`].
|
|
3624
|
-
* @param {string} address
|
|
3625
|
-
* @param {ExtendedHeader} header
|
|
3626
|
-
* @returns {Promise<Coin>}
|
|
3627
|
-
*/
|
|
3628
|
-
getVerifiedBalance(address, header) {
|
|
3629
|
-
const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3630
|
-
const len0 = WASM_VECTOR_LEN;
|
|
3631
|
-
_assertClass(header, ExtendedHeader);
|
|
3632
|
-
const ret = wasm.grpcclient_getVerifiedBalance(this.__wbg_ptr, ptr0, len0, header.__wbg_ptr);
|
|
3633
|
-
return ret;
|
|
3634
|
-
}
|
|
3635
3618
|
/**
|
|
3636
3619
|
* Retrieves the Celestia coin balance for the given address.
|
|
3637
3620
|
* @param {string} address
|
|
@@ -3647,33 +3630,101 @@ export class GrpcClient {
|
|
|
3647
3630
|
return ret;
|
|
3648
3631
|
}
|
|
3649
3632
|
/**
|
|
3650
|
-
*
|
|
3651
|
-
* @param {
|
|
3652
|
-
* @
|
|
3633
|
+
* Broadcast prepared and serialised transaction
|
|
3634
|
+
* @param {Uint8Array} tx_bytes
|
|
3635
|
+
* @param {BroadcastMode} mode
|
|
3636
|
+
* @returns {Promise<TxResponse>}
|
|
3653
3637
|
*/
|
|
3654
|
-
|
|
3655
|
-
const ptr0 =
|
|
3638
|
+
broadcastTx(tx_bytes, mode) {
|
|
3639
|
+
const ptr0 = passArray8ToWasm0(tx_bytes, wasm.__wbindgen_malloc);
|
|
3656
3640
|
const len0 = WASM_VECTOR_LEN;
|
|
3657
|
-
|
|
3641
|
+
_assertClass(mode, BroadcastMode);
|
|
3642
|
+
const ret = wasm.grpcclient_broadcastTx(this.__wbg_ptr, ptr0, len0, mode.__wbg_ptr);
|
|
3658
3643
|
return ret;
|
|
3659
3644
|
}
|
|
3660
3645
|
/**
|
|
3661
|
-
* Get
|
|
3662
|
-
* @
|
|
3663
|
-
* @returns {Promise<Coin[]>}
|
|
3646
|
+
* Get accounts
|
|
3647
|
+
* @returns {Promise<BaseAccount[]>}
|
|
3664
3648
|
*/
|
|
3665
|
-
|
|
3666
|
-
const
|
|
3649
|
+
getAccounts() {
|
|
3650
|
+
const ret = wasm.grpcclient_getAccounts(this.__wbg_ptr);
|
|
3651
|
+
return ret;
|
|
3652
|
+
}
|
|
3653
|
+
/**
|
|
3654
|
+
* Submit blobs to the celestia network.
|
|
3655
|
+
*
|
|
3656
|
+
* # Example
|
|
3657
|
+
* ```js
|
|
3658
|
+
* const ns = Namespace.newV0(new Uint8Array([97, 98, 99]));
|
|
3659
|
+
* const data = new Uint8Array([100, 97, 116, 97]);
|
|
3660
|
+
* const blob = new Blob(ns, data, AppVersion.latest());
|
|
3661
|
+
*
|
|
3662
|
+
* const txInfo = await txClient.submitBlobs([blob]);
|
|
3663
|
+
* await txClient.submitBlobs([blob], { gasLimit: 100000n, gasPrice: 0.02, memo: "foo" });
|
|
3664
|
+
* ```
|
|
3665
|
+
*
|
|
3666
|
+
* # Note
|
|
3667
|
+
*
|
|
3668
|
+
* Provided blobs will be consumed by this method, meaning
|
|
3669
|
+
* they will no longer be accessible. If this behavior is not desired,
|
|
3670
|
+
* consider using `Blob.clone()`.
|
|
3671
|
+
*
|
|
3672
|
+
* ```js
|
|
3673
|
+
* const blobs = [blob1, blob2, blob3];
|
|
3674
|
+
* await txClient.submitBlobs(blobs.map(b => b.clone()));
|
|
3675
|
+
* ```
|
|
3676
|
+
* @param {Blob[]} blobs
|
|
3677
|
+
* @param {TxConfig | null} [tx_config]
|
|
3678
|
+
* @returns {Promise<TxInfo>}
|
|
3679
|
+
*/
|
|
3680
|
+
submitBlobs(blobs, tx_config) {
|
|
3681
|
+
const ptr0 = passArrayJsValueToWasm0(blobs, wasm.__wbindgen_malloc);
|
|
3667
3682
|
const len0 = WASM_VECTOR_LEN;
|
|
3668
|
-
const ret = wasm.
|
|
3683
|
+
const ret = wasm.grpcclient_submitBlobs(this.__wbg_ptr, ptr0, len0, isLikeNone(tx_config) ? 0 : addToExternrefTable0(tx_config));
|
|
3669
3684
|
return ret;
|
|
3670
3685
|
}
|
|
3671
3686
|
/**
|
|
3672
|
-
*
|
|
3673
|
-
*
|
|
3687
|
+
* Submit message to the celestia network.
|
|
3688
|
+
*
|
|
3689
|
+
* # Example
|
|
3690
|
+
* ```js
|
|
3691
|
+
* import { Registry } from "@cosmjs/proto-signing";
|
|
3692
|
+
*
|
|
3693
|
+
* const registry = new Registry();
|
|
3694
|
+
* const sendMsg = {
|
|
3695
|
+
* typeUrl: "/cosmos.bank.v1beta1.MsgSend",
|
|
3696
|
+
* value: {
|
|
3697
|
+
* fromAddress: "celestia169s50psyj2f4la9a2235329xz7rk6c53zhw9mm",
|
|
3698
|
+
* toAddress: "celestia1t52q7uqgnjfzdh3wx5m5phvma3umrq8k6tq2p9",
|
|
3699
|
+
* amount: [{ denom: "utia", amount: "10000" }],
|
|
3700
|
+
* },
|
|
3701
|
+
* };
|
|
3702
|
+
* const sendMsgAny = registry.encodeAsAny(sendMsg);
|
|
3703
|
+
*
|
|
3704
|
+
* const txInfo = await txClient.submitMessage(sendMsgAny);
|
|
3705
|
+
* ```
|
|
3706
|
+
* @param {ProtoAny} message
|
|
3707
|
+
* @param {TxConfig | null} [tx_config]
|
|
3708
|
+
* @returns {Promise<TxInfo>}
|
|
3674
3709
|
*/
|
|
3675
|
-
|
|
3676
|
-
const ret = wasm.
|
|
3710
|
+
submitMessage(message, tx_config) {
|
|
3711
|
+
const ret = wasm.grpcclient_submitMessage(this.__wbg_ptr, message, isLikeNone(tx_config) ? 0 : addToExternrefTable0(tx_config));
|
|
3712
|
+
return ret;
|
|
3713
|
+
}
|
|
3714
|
+
/**
|
|
3715
|
+
* Get auth params
|
|
3716
|
+
* @returns {Promise<AuthParams>}
|
|
3717
|
+
*/
|
|
3718
|
+
getAuthParams() {
|
|
3719
|
+
const ret = wasm.grpcclient_getAuthParams(this.__wbg_ptr);
|
|
3720
|
+
return ret;
|
|
3721
|
+
}
|
|
3722
|
+
/**
|
|
3723
|
+
* Get blob params
|
|
3724
|
+
* @returns {Promise<BlobParams>}
|
|
3725
|
+
*/
|
|
3726
|
+
getBlobParams() {
|
|
3727
|
+
const ret = wasm.grpcclient_getBlobParams(this.__wbg_ptr);
|
|
3677
3728
|
return ret;
|
|
3678
3729
|
}
|
|
3679
3730
|
/**
|
|
@@ -3684,6 +3735,17 @@ export class GrpcClient {
|
|
|
3684
3735
|
const ret = wasm.grpcclient_get_node_config(this.__wbg_ptr);
|
|
3685
3736
|
return ret;
|
|
3686
3737
|
}
|
|
3738
|
+
/**
|
|
3739
|
+
* Get balance of all coins
|
|
3740
|
+
* @param {string} address
|
|
3741
|
+
* @returns {Promise<Coin[]>}
|
|
3742
|
+
*/
|
|
3743
|
+
getAllBalances(address) {
|
|
3744
|
+
const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3745
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3746
|
+
const ret = wasm.grpcclient_getAllBalances(this.__wbg_ptr, ptr0, len0);
|
|
3747
|
+
return ret;
|
|
3748
|
+
}
|
|
3687
3749
|
/**
|
|
3688
3750
|
* Get latest block
|
|
3689
3751
|
* @returns {Promise<Block>}
|
|
@@ -3693,41 +3755,64 @@ export class GrpcClient {
|
|
|
3693
3755
|
return ret;
|
|
3694
3756
|
}
|
|
3695
3757
|
/**
|
|
3696
|
-
* Get
|
|
3697
|
-
* @
|
|
3698
|
-
* @returns {Promise<Block>}
|
|
3758
|
+
* Get total supply
|
|
3759
|
+
* @returns {Promise<Coin[]>}
|
|
3699
3760
|
*/
|
|
3700
|
-
|
|
3701
|
-
const ret = wasm.
|
|
3761
|
+
getTotalSupply() {
|
|
3762
|
+
const ret = wasm.grpcclient_getTotalSupply(this.__wbg_ptr);
|
|
3702
3763
|
return ret;
|
|
3703
3764
|
}
|
|
3704
3765
|
/**
|
|
3705
|
-
*
|
|
3706
|
-
*
|
|
3707
|
-
*
|
|
3708
|
-
*
|
|
3709
|
-
*
|
|
3710
|
-
* @
|
|
3766
|
+
* Estimate gas price for given transaction priority based
|
|
3767
|
+
* on the gas prices of the transactions in the last five blocks.
|
|
3768
|
+
*
|
|
3769
|
+
* If no transaction is found in the last five blocks, return the network
|
|
3770
|
+
* min gas price.
|
|
3771
|
+
* @param {TxPriority} priority
|
|
3772
|
+
* @returns {Promise<number>}
|
|
3711
3773
|
*/
|
|
3712
|
-
|
|
3713
|
-
const
|
|
3774
|
+
estimateGasPrice(priority) {
|
|
3775
|
+
const ret = wasm.grpcclient_estimateGasPrice(this.__wbg_ptr, priority);
|
|
3776
|
+
return ret;
|
|
3777
|
+
}
|
|
3778
|
+
/**
|
|
3779
|
+
* Get block by height
|
|
3780
|
+
* @param {bigint} height
|
|
3781
|
+
* @returns {Promise<Block>}
|
|
3782
|
+
*/
|
|
3783
|
+
getBlockByHeight(height) {
|
|
3784
|
+
const ret = wasm.grpcclient_getBlockByHeight(this.__wbg_ptr, height);
|
|
3785
|
+
return ret;
|
|
3786
|
+
}
|
|
3787
|
+
/**
|
|
3788
|
+
* Retrieves the verified Celestia coin balance for the address.
|
|
3789
|
+
*
|
|
3790
|
+
* # Notes
|
|
3791
|
+
*
|
|
3792
|
+
* This returns the verified balance which is the one that was reported by
|
|
3793
|
+
* the previous network block. In other words, if you transfer some coins,
|
|
3794
|
+
* you need to wait 1 more block in order to see the new balance. If you want
|
|
3795
|
+
* something more immediate then use [`GrpcClient::get_balance`].
|
|
3796
|
+
* @param {string} address
|
|
3797
|
+
* @param {ExtendedHeader} header
|
|
3798
|
+
* @returns {Promise<Coin>}
|
|
3799
|
+
*/
|
|
3800
|
+
getVerifiedBalance(address, header) {
|
|
3801
|
+
const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3714
3802
|
const len0 = WASM_VECTOR_LEN;
|
|
3715
|
-
|
|
3716
|
-
const
|
|
3717
|
-
const ret = wasm.grpcclient_abciQuery(this.__wbg_ptr, ptr0, len0, ptr1, len1, height, prove);
|
|
3803
|
+
_assertClass(header, ExtendedHeader);
|
|
3804
|
+
const ret = wasm.grpcclient_getVerifiedBalance(this.__wbg_ptr, ptr0, len0, header.__wbg_ptr);
|
|
3718
3805
|
return ret;
|
|
3719
3806
|
}
|
|
3720
3807
|
/**
|
|
3721
|
-
*
|
|
3722
|
-
* @param {
|
|
3723
|
-
* @
|
|
3724
|
-
* @returns {Promise<TxResponse>}
|
|
3808
|
+
* Get balance of all spendable coins
|
|
3809
|
+
* @param {string} address
|
|
3810
|
+
* @returns {Promise<Coin[]>}
|
|
3725
3811
|
*/
|
|
3726
|
-
|
|
3727
|
-
const ptr0 =
|
|
3812
|
+
getSpendableBalances(address) {
|
|
3813
|
+
const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3728
3814
|
const len0 = WASM_VECTOR_LEN;
|
|
3729
|
-
|
|
3730
|
-
const ret = wasm.grpcclient_broadcastTx(this.__wbg_ptr, ptr0, len0, mode.__wbg_ptr);
|
|
3815
|
+
const ret = wasm.grpcclient_getSpendableBalances(this.__wbg_ptr, ptr0, len0);
|
|
3731
3816
|
return ret;
|
|
3732
3817
|
}
|
|
3733
3818
|
/**
|
|
@@ -3741,6 +3826,14 @@ export class GrpcClient {
|
|
|
3741
3826
|
const ret = wasm.grpcclient_getTx(this.__wbg_ptr, ptr0, len0);
|
|
3742
3827
|
return ret;
|
|
3743
3828
|
}
|
|
3829
|
+
/**
|
|
3830
|
+
* Chain id of the client
|
|
3831
|
+
* @returns {Promise<string>}
|
|
3832
|
+
*/
|
|
3833
|
+
get chainId() {
|
|
3834
|
+
const ret = wasm.grpcclient_chainId(this.__wbg_ptr);
|
|
3835
|
+
return ret;
|
|
3836
|
+
}
|
|
3744
3837
|
/**
|
|
3745
3838
|
* Simulate prepared and serialised transaction, returning simulated gas usage
|
|
3746
3839
|
* @param {Uint8Array} tx_bytes
|
|
@@ -3753,12 +3846,15 @@ export class GrpcClient {
|
|
|
3753
3846
|
return ret;
|
|
3754
3847
|
}
|
|
3755
3848
|
/**
|
|
3756
|
-
*
|
|
3757
|
-
* @
|
|
3849
|
+
* Create a builder for [`GrpcClient`] connected to `url`
|
|
3850
|
+
* @param {string} url
|
|
3851
|
+
* @returns {GrpcClientBuilder}
|
|
3758
3852
|
*/
|
|
3759
|
-
|
|
3760
|
-
const
|
|
3761
|
-
|
|
3853
|
+
static withUrl(url) {
|
|
3854
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3855
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3856
|
+
const ret = wasm.grpcclient_withUrl(ptr0, len0);
|
|
3857
|
+
return GrpcClientBuilder.__wrap(ret);
|
|
3762
3858
|
}
|
|
3763
3859
|
/**
|
|
3764
3860
|
* Get status of the transaction
|
|
@@ -3771,96 +3867,6 @@ export class GrpcClient {
|
|
|
3771
3867
|
const ret = wasm.grpcclient_txStatus(this.__wbg_ptr, ptr0, len0);
|
|
3772
3868
|
return ret;
|
|
3773
3869
|
}
|
|
3774
|
-
/**
|
|
3775
|
-
* Estimate gas price for given transaction priority based
|
|
3776
|
-
* on the gas prices of the transactions in the last five blocks.
|
|
3777
|
-
*
|
|
3778
|
-
* If no transaction is found in the last five blocks, return the network
|
|
3779
|
-
* min gas price.
|
|
3780
|
-
* @param {TxPriority} priority
|
|
3781
|
-
* @returns {Promise<number>}
|
|
3782
|
-
*/
|
|
3783
|
-
estimateGasPrice(priority) {
|
|
3784
|
-
const ret = wasm.grpcclient_estimateGasPrice(this.__wbg_ptr, priority);
|
|
3785
|
-
return ret;
|
|
3786
|
-
}
|
|
3787
|
-
/**
|
|
3788
|
-
* Chain id of the client
|
|
3789
|
-
* @returns {Promise<string>}
|
|
3790
|
-
*/
|
|
3791
|
-
get chainId() {
|
|
3792
|
-
const ret = wasm.grpcclient_chainId(this.__wbg_ptr);
|
|
3793
|
-
return ret;
|
|
3794
|
-
}
|
|
3795
|
-
/**
|
|
3796
|
-
* AppVersion of the client
|
|
3797
|
-
* @returns {Promise<AppVersion>}
|
|
3798
|
-
*/
|
|
3799
|
-
get appVersion() {
|
|
3800
|
-
const ret = wasm.grpcclient_appVersion(this.__wbg_ptr);
|
|
3801
|
-
return ret;
|
|
3802
|
-
}
|
|
3803
|
-
/**
|
|
3804
|
-
* Submit blobs to the celestia network.
|
|
3805
|
-
*
|
|
3806
|
-
* # Example
|
|
3807
|
-
* ```js
|
|
3808
|
-
* const ns = Namespace.newV0(new Uint8Array([97, 98, 99]));
|
|
3809
|
-
* const data = new Uint8Array([100, 97, 116, 97]);
|
|
3810
|
-
* const blob = new Blob(ns, data, AppVersion.latest());
|
|
3811
|
-
*
|
|
3812
|
-
* const txInfo = await txClient.submitBlobs([blob]);
|
|
3813
|
-
* await txClient.submitBlobs([blob], { gasLimit: 100000n, gasPrice: 0.02, memo: "foo" });
|
|
3814
|
-
* ```
|
|
3815
|
-
*
|
|
3816
|
-
* # Note
|
|
3817
|
-
*
|
|
3818
|
-
* Provided blobs will be consumed by this method, meaning
|
|
3819
|
-
* they will no longer be accessible. If this behavior is not desired,
|
|
3820
|
-
* consider using `Blob.clone()`.
|
|
3821
|
-
*
|
|
3822
|
-
* ```js
|
|
3823
|
-
* const blobs = [blob1, blob2, blob3];
|
|
3824
|
-
* await txClient.submitBlobs(blobs.map(b => b.clone()));
|
|
3825
|
-
* ```
|
|
3826
|
-
* @param {Blob[]} blobs
|
|
3827
|
-
* @param {TxConfig | null} [tx_config]
|
|
3828
|
-
* @returns {Promise<TxInfo>}
|
|
3829
|
-
*/
|
|
3830
|
-
submitBlobs(blobs, tx_config) {
|
|
3831
|
-
const ptr0 = passArrayJsValueToWasm0(blobs, wasm.__wbindgen_malloc);
|
|
3832
|
-
const len0 = WASM_VECTOR_LEN;
|
|
3833
|
-
const ret = wasm.grpcclient_submitBlobs(this.__wbg_ptr, ptr0, len0, isLikeNone(tx_config) ? 0 : addToExternrefTable0(tx_config));
|
|
3834
|
-
return ret;
|
|
3835
|
-
}
|
|
3836
|
-
/**
|
|
3837
|
-
* Submit message to the celestia network.
|
|
3838
|
-
*
|
|
3839
|
-
* # Example
|
|
3840
|
-
* ```js
|
|
3841
|
-
* import { Registry } from "@cosmjs/proto-signing";
|
|
3842
|
-
*
|
|
3843
|
-
* const registry = new Registry();
|
|
3844
|
-
* const sendMsg = {
|
|
3845
|
-
* typeUrl: "/cosmos.bank.v1beta1.MsgSend",
|
|
3846
|
-
* value: {
|
|
3847
|
-
* fromAddress: "celestia169s50psyj2f4la9a2235329xz7rk6c53zhw9mm",
|
|
3848
|
-
* toAddress: "celestia1t52q7uqgnjfzdh3wx5m5phvma3umrq8k6tq2p9",
|
|
3849
|
-
* amount: [{ denom: "utia", amount: "10000" }],
|
|
3850
|
-
* },
|
|
3851
|
-
* };
|
|
3852
|
-
* const sendMsgAny = registry.encodeAsAny(sendMsg);
|
|
3853
|
-
*
|
|
3854
|
-
* const txInfo = await txClient.submitMessage(sendMsgAny);
|
|
3855
|
-
* ```
|
|
3856
|
-
* @param {ProtoAny} message
|
|
3857
|
-
* @param {TxConfig | null} [tx_config]
|
|
3858
|
-
* @returns {Promise<TxInfo>}
|
|
3859
|
-
*/
|
|
3860
|
-
submitMessage(message, tx_config) {
|
|
3861
|
-
const ret = wasm.grpcclient_submitMessage(this.__wbg_ptr, message, isLikeNone(tx_config) ? 0 : addToExternrefTable0(tx_config));
|
|
3862
|
-
return ret;
|
|
3863
|
-
}
|
|
3864
3870
|
}
|
|
3865
3871
|
|
|
3866
3872
|
const GrpcClientBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -3937,38 +3943,6 @@ export class GrpcClientBuilder {
|
|
|
3937
3943
|
const ptr = this.__destroy_into_raw();
|
|
3938
3944
|
wasm.__wbg_grpcclientbuilder_free(ptr, 0);
|
|
3939
3945
|
}
|
|
3940
|
-
/**
|
|
3941
|
-
* Set the `url` of the grpc-web server to connect to
|
|
3942
|
-
*
|
|
3943
|
-
* Note that this method **consumes** builder and returns updated instance of it.
|
|
3944
|
-
* Make sure to re-assign it if you keep builder in a variable.
|
|
3945
|
-
* @param {string} url
|
|
3946
|
-
* @returns {GrpcClientBuilder}
|
|
3947
|
-
*/
|
|
3948
|
-
withUrl(url) {
|
|
3949
|
-
const ptr = this.__destroy_into_raw();
|
|
3950
|
-
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3951
|
-
const len0 = WASM_VECTOR_LEN;
|
|
3952
|
-
const ret = wasm.grpcclientbuilder_withUrl(ptr, ptr0, len0);
|
|
3953
|
-
return GrpcClientBuilder.__wrap(ret);
|
|
3954
|
-
}
|
|
3955
|
-
/**
|
|
3956
|
-
* Add public key and signer to the client being built
|
|
3957
|
-
*
|
|
3958
|
-
* Note that this method **consumes** builder and returns updated instance of it.
|
|
3959
|
-
* Make sure to re-assign it if you keep builder in a variable.
|
|
3960
|
-
* @param {Uint8Array} account_pubkey
|
|
3961
|
-
* @param {SignerFn} signer_fn
|
|
3962
|
-
* @returns {GrpcClientBuilder}
|
|
3963
|
-
*/
|
|
3964
|
-
withPubkeyAndSigner(account_pubkey, signer_fn) {
|
|
3965
|
-
const ptr = this.__destroy_into_raw();
|
|
3966
|
-
const ret = wasm.grpcclientbuilder_withPubkeyAndSigner(ptr, account_pubkey, signer_fn);
|
|
3967
|
-
if (ret[2]) {
|
|
3968
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
3969
|
-
}
|
|
3970
|
-
return GrpcClientBuilder.__wrap(ret[0]);
|
|
3971
|
-
}
|
|
3972
3946
|
/**
|
|
3973
3947
|
* Appends ascii metadata to all requests made by the client.
|
|
3974
3948
|
*
|
|
@@ -4005,6 +3979,23 @@ export class GrpcClientBuilder {
|
|
|
4005
3979
|
const ret = wasm.grpcclientbuilder_withMetadataBin(ptr, ptr0, len0, value);
|
|
4006
3980
|
return GrpcClientBuilder.__wrap(ret);
|
|
4007
3981
|
}
|
|
3982
|
+
/**
|
|
3983
|
+
* Add public key and signer to the client being built
|
|
3984
|
+
*
|
|
3985
|
+
* Note that this method **consumes** builder and returns updated instance of it.
|
|
3986
|
+
* Make sure to re-assign it if you keep builder in a variable.
|
|
3987
|
+
* @param {Uint8Array} account_pubkey
|
|
3988
|
+
* @param {SignerFn} signer_fn
|
|
3989
|
+
* @returns {GrpcClientBuilder}
|
|
3990
|
+
*/
|
|
3991
|
+
withPubkeyAndSigner(account_pubkey, signer_fn) {
|
|
3992
|
+
const ptr = this.__destroy_into_raw();
|
|
3993
|
+
const ret = wasm.grpcclientbuilder_withPubkeyAndSigner(ptr, account_pubkey, signer_fn);
|
|
3994
|
+
if (ret[2]) {
|
|
3995
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3996
|
+
}
|
|
3997
|
+
return GrpcClientBuilder.__wrap(ret[0]);
|
|
3998
|
+
}
|
|
4008
3999
|
/**
|
|
4009
4000
|
* build gRPC client
|
|
4010
4001
|
* @returns {GrpcClient}
|
|
@@ -4017,6 +4008,21 @@ export class GrpcClientBuilder {
|
|
|
4017
4008
|
}
|
|
4018
4009
|
return GrpcClient.__wrap(ret[0]);
|
|
4019
4010
|
}
|
|
4011
|
+
/**
|
|
4012
|
+
* Set the `url` of the grpc-web server to connect to
|
|
4013
|
+
*
|
|
4014
|
+
* Note that this method **consumes** builder and returns updated instance of it.
|
|
4015
|
+
* Make sure to re-assign it if you keep builder in a variable.
|
|
4016
|
+
* @param {string} url
|
|
4017
|
+
* @returns {GrpcClientBuilder}
|
|
4018
|
+
*/
|
|
4019
|
+
withUrl(url) {
|
|
4020
|
+
const ptr = this.__destroy_into_raw();
|
|
4021
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4022
|
+
const len0 = WASM_VECTOR_LEN;
|
|
4023
|
+
const ret = wasm.grpcclientbuilder_withUrl(ptr, ptr0, len0);
|
|
4024
|
+
return GrpcClientBuilder.__wrap(ret);
|
|
4025
|
+
}
|
|
4020
4026
|
}
|
|
4021
4027
|
|
|
4022
4028
|
const HeaderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -4382,13 +4388,6 @@ export class IntoUnderlyingByteSource {
|
|
|
4382
4388
|
const ptr = this.__destroy_into_raw();
|
|
4383
4389
|
wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
|
|
4384
4390
|
}
|
|
4385
|
-
/**
|
|
4386
|
-
* @returns {ReadableStreamType}
|
|
4387
|
-
*/
|
|
4388
|
-
get type() {
|
|
4389
|
-
const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
|
|
4390
|
-
return __wbindgen_enum_ReadableStreamType[ret];
|
|
4391
|
-
}
|
|
4392
4391
|
/**
|
|
4393
4392
|
* @returns {number}
|
|
4394
4393
|
*/
|
|
@@ -4396,6 +4395,14 @@ export class IntoUnderlyingByteSource {
|
|
|
4396
4395
|
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
|
|
4397
4396
|
return ret >>> 0;
|
|
4398
4397
|
}
|
|
4398
|
+
/**
|
|
4399
|
+
* @param {ReadableByteStreamController} controller
|
|
4400
|
+
* @returns {Promise<any>}
|
|
4401
|
+
*/
|
|
4402
|
+
pull(controller) {
|
|
4403
|
+
const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, controller);
|
|
4404
|
+
return ret;
|
|
4405
|
+
}
|
|
4399
4406
|
/**
|
|
4400
4407
|
* @param {ReadableByteStreamController} controller
|
|
4401
4408
|
*/
|
|
@@ -4403,12 +4410,11 @@ export class IntoUnderlyingByteSource {
|
|
|
4403
4410
|
wasm.intounderlyingbytesource_start(this.__wbg_ptr, controller);
|
|
4404
4411
|
}
|
|
4405
4412
|
/**
|
|
4406
|
-
* @
|
|
4407
|
-
* @returns {Promise<any>}
|
|
4413
|
+
* @returns {ReadableStreamType}
|
|
4408
4414
|
*/
|
|
4409
|
-
|
|
4410
|
-
const ret = wasm.
|
|
4411
|
-
return ret;
|
|
4415
|
+
get type() {
|
|
4416
|
+
const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
|
|
4417
|
+
return __wbindgen_enum_ReadableStreamType[ret];
|
|
4412
4418
|
}
|
|
4413
4419
|
cancel() {
|
|
4414
4420
|
const ptr = this.__destroy_into_raw();
|
|
@@ -4434,11 +4440,12 @@ export class IntoUnderlyingSink {
|
|
|
4434
4440
|
wasm.__wbg_intounderlyingsink_free(ptr, 0);
|
|
4435
4441
|
}
|
|
4436
4442
|
/**
|
|
4437
|
-
* @param {any}
|
|
4443
|
+
* @param {any} reason
|
|
4438
4444
|
* @returns {Promise<any>}
|
|
4439
4445
|
*/
|
|
4440
|
-
|
|
4441
|
-
const
|
|
4446
|
+
abort(reason) {
|
|
4447
|
+
const ptr = this.__destroy_into_raw();
|
|
4448
|
+
const ret = wasm.intounderlyingsink_abort(ptr, reason);
|
|
4442
4449
|
return ret;
|
|
4443
4450
|
}
|
|
4444
4451
|
/**
|
|
@@ -4450,12 +4457,11 @@ export class IntoUnderlyingSink {
|
|
|
4450
4457
|
return ret;
|
|
4451
4458
|
}
|
|
4452
4459
|
/**
|
|
4453
|
-
* @param {any}
|
|
4460
|
+
* @param {any} chunk
|
|
4454
4461
|
* @returns {Promise<any>}
|
|
4455
4462
|
*/
|
|
4456
|
-
|
|
4457
|
-
const
|
|
4458
|
-
const ret = wasm.intounderlyingsink_abort(ptr, reason);
|
|
4463
|
+
write(chunk) {
|
|
4464
|
+
const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, chunk);
|
|
4459
4465
|
return ret;
|
|
4460
4466
|
}
|
|
4461
4467
|
}
|
|
@@ -4823,7 +4829,7 @@ export class JsValidatorInfo {
|
|
|
4823
4829
|
* @returns {bigint}
|
|
4824
4830
|
*/
|
|
4825
4831
|
get power() {
|
|
4826
|
-
const ret = wasm.
|
|
4832
|
+
const ret = wasm.__wbg_get_jsvalidatorinfo_power(this.__wbg_ptr);
|
|
4827
4833
|
return BigInt.asUintN(64, ret);
|
|
4828
4834
|
}
|
|
4829
4835
|
/**
|
|
@@ -4831,7 +4837,7 @@ export class JsValidatorInfo {
|
|
|
4831
4837
|
* @param {bigint} arg0
|
|
4832
4838
|
*/
|
|
4833
4839
|
set power(arg0) {
|
|
4834
|
-
wasm.
|
|
4840
|
+
wasm.__wbg_set_jsvalidatorinfo_power(this.__wbg_ptr, arg0);
|
|
4835
4841
|
}
|
|
4836
4842
|
/**
|
|
4837
4843
|
* Validator name
|
|
@@ -5019,6 +5025,21 @@ export class ModeInfo {
|
|
|
5019
5025
|
const ptr = this.__destroy_into_raw();
|
|
5020
5026
|
wasm.__wbg_modeinfo_free(ptr, 0);
|
|
5021
5027
|
}
|
|
5028
|
+
/**
|
|
5029
|
+
* Multi is the mode info for a multisig public key
|
|
5030
|
+
* mode_infos is the corresponding modes of the signers of the multisig
|
|
5031
|
+
* which could include nested multisig public keys
|
|
5032
|
+
* @returns {ModeInfo[] | undefined}
|
|
5033
|
+
*/
|
|
5034
|
+
get mode_infos() {
|
|
5035
|
+
const ret = wasm.modeinfo_mode_infos(this.__wbg_ptr);
|
|
5036
|
+
let v1;
|
|
5037
|
+
if (ret[0] !== 0) {
|
|
5038
|
+
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
5039
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
5040
|
+
}
|
|
5041
|
+
return v1;
|
|
5042
|
+
}
|
|
5022
5043
|
/**
|
|
5023
5044
|
* Return signature mode for the stored signature(s)
|
|
5024
5045
|
* @returns {SignatureMode}
|
|
@@ -5046,21 +5067,6 @@ export class ModeInfo {
|
|
|
5046
5067
|
const ret = wasm.modeinfo_bitarray(this.__wbg_ptr);
|
|
5047
5068
|
return ret === 0 ? undefined : JsBitVector.__wrap(ret);
|
|
5048
5069
|
}
|
|
5049
|
-
/**
|
|
5050
|
-
* Multi is the mode info for a multisig public key
|
|
5051
|
-
* mode_infos is the corresponding modes of the signers of the multisig
|
|
5052
|
-
* which could include nested multisig public keys
|
|
5053
|
-
* @returns {ModeInfo[] | undefined}
|
|
5054
|
-
*/
|
|
5055
|
-
get mode_infos() {
|
|
5056
|
-
const ret = wasm.modeinfo_mode_infos(this.__wbg_ptr);
|
|
5057
|
-
let v1;
|
|
5058
|
-
if (ret[0] !== 0) {
|
|
5059
|
-
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
5060
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
5061
|
-
}
|
|
5062
|
-
return v1;
|
|
5063
|
-
}
|
|
5064
5070
|
}
|
|
5065
5071
|
|
|
5066
5072
|
const NamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -5100,14 +5106,14 @@ export class Namespace {
|
|
|
5100
5106
|
toJSON() {
|
|
5101
5107
|
return {
|
|
5102
5108
|
NS_SIZE: this.NS_SIZE,
|
|
5109
|
+
version: this.version,
|
|
5103
5110
|
TRANSACTION: this.TRANSACTION,
|
|
5111
|
+
PARITY_SHARE: this.PARITY_SHARE,
|
|
5104
5112
|
PAY_FOR_BLOB: this.PAY_FOR_BLOB,
|
|
5105
|
-
|
|
5113
|
+
TAIL_PADDING: this.TAIL_PADDING,
|
|
5106
5114
|
MAX_PRIMARY_RESERVED: this.MAX_PRIMARY_RESERVED,
|
|
5107
5115
|
MIN_SECONDARY_RESERVED: this.MIN_SECONDARY_RESERVED,
|
|
5108
|
-
|
|
5109
|
-
PARITY_SHARE: this.PARITY_SHARE,
|
|
5110
|
-
version: this.version,
|
|
5116
|
+
PRIMARY_RESERVED_PADDING: this.PRIMARY_RESERVED_PADDING,
|
|
5111
5117
|
id: this.id,
|
|
5112
5118
|
};
|
|
5113
5119
|
}
|
|
@@ -5135,6 +5141,44 @@ export class Namespace {
|
|
|
5135
5141
|
const ret = wasm.namespace_NS_SIZE();
|
|
5136
5142
|
return ret >>> 0;
|
|
5137
5143
|
}
|
|
5144
|
+
/**
|
|
5145
|
+
* Returns the first byte indicating the version of the [`Namespace`].
|
|
5146
|
+
* @returns {number}
|
|
5147
|
+
*/
|
|
5148
|
+
get version() {
|
|
5149
|
+
const ret = wasm.namespace_version(this.__wbg_ptr);
|
|
5150
|
+
return ret;
|
|
5151
|
+
}
|
|
5152
|
+
/**
|
|
5153
|
+
* Converts the [`Namespace`] to a byte slice.
|
|
5154
|
+
* @returns {Uint8Array}
|
|
5155
|
+
*/
|
|
5156
|
+
asBytes() {
|
|
5157
|
+
const ret = wasm.namespace_asBytes(this.__wbg_ptr);
|
|
5158
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
5159
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
5160
|
+
return v1;
|
|
5161
|
+
}
|
|
5162
|
+
/**
|
|
5163
|
+
* Create a new [`Namespace`] from the raw bytes.
|
|
5164
|
+
*
|
|
5165
|
+
* # Errors
|
|
5166
|
+
*
|
|
5167
|
+
* This function will return an error if the slice length is different than
|
|
5168
|
+
* [`NS_SIZE`] or if the namespace is invalid. If you are constructing the
|
|
5169
|
+
* version `0` namespace, check [`newV0`].
|
|
5170
|
+
* @param {Uint8Array} raw
|
|
5171
|
+
* @returns {Namespace}
|
|
5172
|
+
*/
|
|
5173
|
+
static fromRaw(raw) {
|
|
5174
|
+
const ptr0 = passArray8ToWasm0(raw, wasm.__wbindgen_malloc);
|
|
5175
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5176
|
+
const ret = wasm.namespace_fromRaw(ptr0, len0);
|
|
5177
|
+
if (ret[2]) {
|
|
5178
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
5179
|
+
}
|
|
5180
|
+
return Namespace.__wrap(ret[0]);
|
|
5181
|
+
}
|
|
5138
5182
|
/**
|
|
5139
5183
|
* Primary reserved [`Namespace`] for the compact `Share`s with `cosmos SDK` transactions.
|
|
5140
5184
|
* @returns {Namespace}
|
|
@@ -5143,6 +5187,18 @@ export class Namespace {
|
|
|
5143
5187
|
const ret = wasm.namespace_TRANSACTION();
|
|
5144
5188
|
return Namespace.__wrap(ret);
|
|
5145
5189
|
}
|
|
5190
|
+
/**
|
|
5191
|
+
* The [`Namespace`] for `parity shares`.
|
|
5192
|
+
*
|
|
5193
|
+
* It is the namespace with which all the `parity shares` from
|
|
5194
|
+
* `ExtendedDataSquare` are inserted to the `Nmt` when computing
|
|
5195
|
+
* merkle roots.
|
|
5196
|
+
* @returns {Namespace}
|
|
5197
|
+
*/
|
|
5198
|
+
static get PARITY_SHARE() {
|
|
5199
|
+
const ret = wasm.namespace_PARITY_SHARE();
|
|
5200
|
+
return Namespace.__wrap(ret);
|
|
5201
|
+
}
|
|
5146
5202
|
/**
|
|
5147
5203
|
* Primary reserved [`Namespace`] for the compact Shares with MsgPayForBlobs transactions.
|
|
5148
5204
|
* @returns {Namespace}
|
|
@@ -5152,14 +5208,14 @@ export class Namespace {
|
|
|
5152
5208
|
return Namespace.__wrap(ret);
|
|
5153
5209
|
}
|
|
5154
5210
|
/**
|
|
5155
|
-
*
|
|
5211
|
+
* Secondary reserved [`Namespace`] used for padding after the blobs.
|
|
5156
5212
|
*
|
|
5157
|
-
*
|
|
5158
|
-
*
|
|
5213
|
+
* It is used to fill up the `original data square` after all user-submitted
|
|
5214
|
+
* blobs before the parity data is generated for the `ExtendedDataSquare`.
|
|
5159
5215
|
* @returns {Namespace}
|
|
5160
5216
|
*/
|
|
5161
|
-
static get
|
|
5162
|
-
const ret = wasm.
|
|
5217
|
+
static get TAIL_PADDING() {
|
|
5218
|
+
const ret = wasm.namespace_TAIL_PADDING();
|
|
5163
5219
|
return Namespace.__wrap(ret);
|
|
5164
5220
|
}
|
|
5165
5221
|
/**
|
|
@@ -5183,27 +5239,25 @@ export class Namespace {
|
|
|
5183
5239
|
return Namespace.__wrap(ret);
|
|
5184
5240
|
}
|
|
5185
5241
|
/**
|
|
5186
|
-
*
|
|
5242
|
+
* Primary reserved [`Namespace`] for the `Share`s used for padding.
|
|
5187
5243
|
*
|
|
5188
|
-
*
|
|
5189
|
-
*
|
|
5244
|
+
* `Share`s with this namespace are inserted after other shares from primary reserved namespace
|
|
5245
|
+
* so that user-defined namespaces are correctly aligned in `ExtendedDataSquare`
|
|
5190
5246
|
* @returns {Namespace}
|
|
5191
5247
|
*/
|
|
5192
|
-
static get
|
|
5193
|
-
const ret = wasm.
|
|
5248
|
+
static get PRIMARY_RESERVED_PADDING() {
|
|
5249
|
+
const ret = wasm.namespace_MAX_PRIMARY_RESERVED();
|
|
5194
5250
|
return Namespace.__wrap(ret);
|
|
5195
5251
|
}
|
|
5196
5252
|
/**
|
|
5197
|
-
*
|
|
5198
|
-
*
|
|
5199
|
-
* It is the namespace with which all the `parity shares` from
|
|
5200
|
-
* `ExtendedDataSquare` are inserted to the `Nmt` when computing
|
|
5201
|
-
* merkle roots.
|
|
5202
|
-
* @returns {Namespace}
|
|
5253
|
+
* Returns the trailing 28 bytes indicating the id of the [`Namespace`].
|
|
5254
|
+
* @returns {Uint8Array}
|
|
5203
5255
|
*/
|
|
5204
|
-
|
|
5205
|
-
const ret = wasm.
|
|
5206
|
-
|
|
5256
|
+
get id() {
|
|
5257
|
+
const ret = wasm.namespace_id(this.__wbg_ptr);
|
|
5258
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
5259
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
5260
|
+
return v1;
|
|
5207
5261
|
}
|
|
5208
5262
|
/**
|
|
5209
5263
|
* Create a new [`Namespace`] version `0` with given id.
|
|
@@ -5223,54 +5277,6 @@ export class Namespace {
|
|
|
5223
5277
|
}
|
|
5224
5278
|
return Namespace.__wrap(ret[0]);
|
|
5225
5279
|
}
|
|
5226
|
-
/**
|
|
5227
|
-
* Create a new [`Namespace`] from the raw bytes.
|
|
5228
|
-
*
|
|
5229
|
-
* # Errors
|
|
5230
|
-
*
|
|
5231
|
-
* This function will return an error if the slice length is different than
|
|
5232
|
-
* [`NS_SIZE`] or if the namespace is invalid. If you are constructing the
|
|
5233
|
-
* version `0` namespace, check [`newV0`].
|
|
5234
|
-
* @param {Uint8Array} raw
|
|
5235
|
-
* @returns {Namespace}
|
|
5236
|
-
*/
|
|
5237
|
-
static fromRaw(raw) {
|
|
5238
|
-
const ptr0 = passArray8ToWasm0(raw, wasm.__wbindgen_malloc);
|
|
5239
|
-
const len0 = WASM_VECTOR_LEN;
|
|
5240
|
-
const ret = wasm.namespace_fromRaw(ptr0, len0);
|
|
5241
|
-
if (ret[2]) {
|
|
5242
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
5243
|
-
}
|
|
5244
|
-
return Namespace.__wrap(ret[0]);
|
|
5245
|
-
}
|
|
5246
|
-
/**
|
|
5247
|
-
* Converts the [`Namespace`] to a byte slice.
|
|
5248
|
-
* @returns {Uint8Array}
|
|
5249
|
-
*/
|
|
5250
|
-
asBytes() {
|
|
5251
|
-
const ret = wasm.namespace_asBytes(this.__wbg_ptr);
|
|
5252
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
5253
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
5254
|
-
return v1;
|
|
5255
|
-
}
|
|
5256
|
-
/**
|
|
5257
|
-
* Returns the first byte indicating the version of the [`Namespace`].
|
|
5258
|
-
* @returns {number}
|
|
5259
|
-
*/
|
|
5260
|
-
get version() {
|
|
5261
|
-
const ret = wasm.namespace_version(this.__wbg_ptr);
|
|
5262
|
-
return ret;
|
|
5263
|
-
}
|
|
5264
|
-
/**
|
|
5265
|
-
* Returns the trailing 28 bytes indicating the id of the [`Namespace`].
|
|
5266
|
-
* @returns {Uint8Array}
|
|
5267
|
-
*/
|
|
5268
|
-
get id() {
|
|
5269
|
-
const ret = wasm.namespace_id(this.__wbg_ptr);
|
|
5270
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
5271
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
5272
|
-
return v1;
|
|
5273
|
-
}
|
|
5274
5280
|
}
|
|
5275
5281
|
|
|
5276
5282
|
const NetworkInfoSnapshotFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -5375,24 +5381,6 @@ export class NodeClient {
|
|
|
5375
5381
|
const ptr = this.__destroy_into_raw();
|
|
5376
5382
|
wasm.__wbg_nodeclient_free(ptr, 0);
|
|
5377
5383
|
}
|
|
5378
|
-
/**
|
|
5379
|
-
* Create a new connection to a Lumina node running in [`NodeWorker`]. Provided `port` is
|
|
5380
|
-
* expected to have `MessagePort`-like interface for sending and receiving messages.
|
|
5381
|
-
* @param {any} port
|
|
5382
|
-
*/
|
|
5383
|
-
constructor(port) {
|
|
5384
|
-
const ret = wasm.nodeclient_new(port);
|
|
5385
|
-
return ret;
|
|
5386
|
-
}
|
|
5387
|
-
/**
|
|
5388
|
-
* Establish a new connection to the existing worker over provided port
|
|
5389
|
-
* @param {any} port
|
|
5390
|
-
* @returns {Promise<void>}
|
|
5391
|
-
*/
|
|
5392
|
-
addConnectionToWorker(port) {
|
|
5393
|
-
const ret = wasm.nodeclient_addConnectionToWorker(this.__wbg_ptr, port);
|
|
5394
|
-
return ret;
|
|
5395
|
-
}
|
|
5396
5384
|
/**
|
|
5397
5385
|
* Check whether Lumina is currently running
|
|
5398
5386
|
* @returns {Promise<boolean>}
|
|
@@ -5402,20 +5390,37 @@ export class NodeClient {
|
|
|
5402
5390
|
return ret;
|
|
5403
5391
|
}
|
|
5404
5392
|
/**
|
|
5405
|
-
*
|
|
5406
|
-
*
|
|
5407
|
-
*
|
|
5393
|
+
* Get synced headers from the given heights range.
|
|
5394
|
+
*
|
|
5395
|
+
* If start of the range is undefined (None), the first returned header will be of height 1.
|
|
5396
|
+
* If end of the range is undefined (None), the last returned header will be the last header in the
|
|
5397
|
+
* store.
|
|
5398
|
+
*
|
|
5399
|
+
* # Errors
|
|
5400
|
+
*
|
|
5401
|
+
* If range contains a height of a header that is not found in the store.
|
|
5402
|
+
* @param {bigint | null} [start_height]
|
|
5403
|
+
* @param {bigint | null} [end_height]
|
|
5404
|
+
* @returns {Promise<ExtendedHeader[]>}
|
|
5408
5405
|
*/
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
const ret = wasm.nodeclient_start(this.__wbg_ptr, config.__wbg_ptr);
|
|
5406
|
+
getHeaders(start_height, end_height) {
|
|
5407
|
+
const ret = wasm.nodeclient_getHeaders(this.__wbg_ptr, !isLikeNone(start_height), isLikeNone(start_height) ? BigInt(0) : start_height, !isLikeNone(end_height), isLikeNone(end_height) ? BigInt(0) : end_height);
|
|
5412
5408
|
return ret;
|
|
5413
5409
|
}
|
|
5414
5410
|
/**
|
|
5415
|
-
*
|
|
5411
|
+
* Get current header syncing info.
|
|
5412
|
+
* @returns {Promise<SyncingInfoSnapshot>}
|
|
5416
5413
|
*/
|
|
5417
|
-
|
|
5418
|
-
const ret = wasm.
|
|
5414
|
+
syncerInfo() {
|
|
5415
|
+
const ret = wasm.nodeclient_syncerInfo(this.__wbg_ptr);
|
|
5416
|
+
return ret;
|
|
5417
|
+
}
|
|
5418
|
+
/**
|
|
5419
|
+
* Get current network info.
|
|
5420
|
+
* @returns {Promise<NetworkInfoSnapshot>}
|
|
5421
|
+
*/
|
|
5422
|
+
networkInfo() {
|
|
5423
|
+
const ret = wasm.nodeclient_networkInfo(this.__wbg_ptr);
|
|
5419
5424
|
return ret;
|
|
5420
5425
|
}
|
|
5421
5426
|
/**
|
|
@@ -5427,63 +5432,71 @@ export class NodeClient {
|
|
|
5427
5432
|
return ret;
|
|
5428
5433
|
}
|
|
5429
5434
|
/**
|
|
5430
|
-
*
|
|
5431
|
-
* @returns {Promise<
|
|
5435
|
+
* Returns a [`BroadcastChannel`] for events generated by [`Node`].
|
|
5436
|
+
* @returns {Promise<BroadcastChannel>}
|
|
5432
5437
|
*/
|
|
5433
|
-
|
|
5434
|
-
const ret = wasm.
|
|
5438
|
+
eventsChannel() {
|
|
5439
|
+
const ret = wasm.nodeclient_eventsChannel(this.__wbg_ptr);
|
|
5435
5440
|
return ret;
|
|
5436
5441
|
}
|
|
5437
5442
|
/**
|
|
5438
|
-
*
|
|
5443
|
+
* Trust or untrust the peer with a given ID.
|
|
5444
|
+
* @param {string} peer_id
|
|
5445
|
+
* @param {boolean} is_trusted
|
|
5439
5446
|
* @returns {Promise<void>}
|
|
5440
5447
|
*/
|
|
5441
|
-
|
|
5442
|
-
const
|
|
5448
|
+
setPeerTrust(peer_id, is_trusted) {
|
|
5449
|
+
const ptr0 = passStringToWasm0(peer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5450
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5451
|
+
const ret = wasm.nodeclient_setPeerTrust(this.__wbg_ptr, ptr0, len0, is_trusted);
|
|
5443
5452
|
return ret;
|
|
5444
5453
|
}
|
|
5445
5454
|
/**
|
|
5446
|
-
* Wait until the node is connected to at least 1
|
|
5455
|
+
* Wait until the node is connected to at least 1 peer.
|
|
5447
5456
|
* @returns {Promise<void>}
|
|
5448
5457
|
*/
|
|
5449
|
-
|
|
5450
|
-
const ret = wasm.
|
|
5458
|
+
waitConnected() {
|
|
5459
|
+
const ret = wasm.nodeclient_waitConnected(this.__wbg_ptr);
|
|
5451
5460
|
return ret;
|
|
5452
5461
|
}
|
|
5453
5462
|
/**
|
|
5454
|
-
* Get
|
|
5455
|
-
* @returns {Promise<
|
|
5463
|
+
* Get all the peers that node is connected to.
|
|
5464
|
+
* @returns {Promise<Array<any>>}
|
|
5456
5465
|
*/
|
|
5457
|
-
|
|
5458
|
-
const ret = wasm.
|
|
5466
|
+
connectedPeers() {
|
|
5467
|
+
const ret = wasm.nodeclient_connectedPeers(this.__wbg_ptr);
|
|
5459
5468
|
return ret;
|
|
5460
5469
|
}
|
|
5461
5470
|
/**
|
|
5462
|
-
* Get
|
|
5463
|
-
* @returns {Promise<
|
|
5471
|
+
* Get current [`PeerTracker`] info.
|
|
5472
|
+
* @returns {Promise<PeerTrackerInfoSnapshot>}
|
|
5464
5473
|
*/
|
|
5465
|
-
|
|
5466
|
-
const ret = wasm.
|
|
5474
|
+
peerTrackerInfo() {
|
|
5475
|
+
const ret = wasm.nodeclient_peerTrackerInfo(this.__wbg_ptr);
|
|
5467
5476
|
return ret;
|
|
5468
5477
|
}
|
|
5469
5478
|
/**
|
|
5470
|
-
*
|
|
5471
|
-
*
|
|
5479
|
+
* Request all blobs with provided namespace in the block corresponding to this header
|
|
5480
|
+
* using bitswap protocol.
|
|
5481
|
+
* @param {Namespace} namespace
|
|
5482
|
+
* @param {bigint} block_height
|
|
5483
|
+
* @param {number | null} [timeout_secs]
|
|
5484
|
+
* @returns {Promise<Blob[]>}
|
|
5472
5485
|
*/
|
|
5473
|
-
|
|
5474
|
-
|
|
5486
|
+
requestAllBlobs(namespace, block_height, timeout_secs) {
|
|
5487
|
+
_assertClass(namespace, Namespace);
|
|
5488
|
+
const ret = wasm.nodeclient_requestAllBlobs(this.__wbg_ptr, namespace.__wbg_ptr, block_height, !isLikeNone(timeout_secs), isLikeNone(timeout_secs) ? 0 : timeout_secs);
|
|
5475
5489
|
return ret;
|
|
5476
5490
|
}
|
|
5477
5491
|
/**
|
|
5478
|
-
*
|
|
5479
|
-
* @param {string}
|
|
5480
|
-
* @
|
|
5481
|
-
* @returns {Promise<void>}
|
|
5492
|
+
* Get a synced header for the block with a given hash.
|
|
5493
|
+
* @param {string} hash
|
|
5494
|
+
* @returns {Promise<ExtendedHeader>}
|
|
5482
5495
|
*/
|
|
5483
|
-
|
|
5484
|
-
const ptr0 = passStringToWasm0(
|
|
5496
|
+
getHeaderByHash(hash) {
|
|
5497
|
+
const ptr0 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5485
5498
|
const len0 = WASM_VECTOR_LEN;
|
|
5486
|
-
const ret = wasm.
|
|
5499
|
+
const ret = wasm.nodeclient_getHeaderByHash(this.__wbg_ptr, ptr0, len0);
|
|
5487
5500
|
return ret;
|
|
5488
5501
|
}
|
|
5489
5502
|
/**
|
|
@@ -5495,57 +5508,48 @@ export class NodeClient {
|
|
|
5495
5508
|
return ret;
|
|
5496
5509
|
}
|
|
5497
5510
|
/**
|
|
5498
|
-
*
|
|
5499
|
-
* @param {
|
|
5511
|
+
* Get a synced header for the block with a given height.
|
|
5512
|
+
* @param {bigint} height
|
|
5500
5513
|
* @returns {Promise<ExtendedHeader>}
|
|
5501
5514
|
*/
|
|
5502
|
-
|
|
5503
|
-
const
|
|
5504
|
-
const len0 = WASM_VECTOR_LEN;
|
|
5505
|
-
const ret = wasm.nodeclient_requestHeaderByHash(this.__wbg_ptr, ptr0, len0);
|
|
5515
|
+
getHeaderByHeight(height) {
|
|
5516
|
+
const ret = wasm.nodeclient_getHeaderByHeight(this.__wbg_ptr, height);
|
|
5506
5517
|
return ret;
|
|
5507
5518
|
}
|
|
5508
5519
|
/**
|
|
5509
|
-
*
|
|
5510
|
-
* @param {bigint} height
|
|
5520
|
+
* Get the latest locally synced header.
|
|
5511
5521
|
* @returns {Promise<ExtendedHeader>}
|
|
5512
5522
|
*/
|
|
5513
|
-
|
|
5514
|
-
const ret = wasm.
|
|
5523
|
+
getLocalHeadHeader() {
|
|
5524
|
+
const ret = wasm.nodeclient_getLocalHeadHeader(this.__wbg_ptr);
|
|
5515
5525
|
return ret;
|
|
5516
5526
|
}
|
|
5517
5527
|
/**
|
|
5518
|
-
*
|
|
5519
|
-
*
|
|
5520
|
-
*
|
|
5521
|
-
* @param {ExtendedHeader} from
|
|
5522
|
-
* @param {bigint} amount
|
|
5523
|
-
* @returns {Promise<ExtendedHeader[]>}
|
|
5528
|
+
* Get data sampling metadata of an already sampled height.
|
|
5529
|
+
* @param {bigint} height
|
|
5530
|
+
* @returns {Promise<SamplingMetadata | undefined>}
|
|
5524
5531
|
*/
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
const ret = wasm.nodeclient_requestVerifiedHeaders(this.__wbg_ptr, from.__wbg_ptr, amount);
|
|
5532
|
+
getSamplingMetadata(height) {
|
|
5533
|
+
const ret = wasm.nodeclient_getSamplingMetadata(this.__wbg_ptr, height);
|
|
5528
5534
|
return ret;
|
|
5529
5535
|
}
|
|
5530
5536
|
/**
|
|
5531
|
-
* Request
|
|
5532
|
-
*
|
|
5533
|
-
* @
|
|
5534
|
-
* @param {bigint} block_height
|
|
5535
|
-
* @param {number | null} [timeout_secs]
|
|
5536
|
-
* @returns {Promise<Blob[]>}
|
|
5537
|
+
* Request a header for the block with a given hash from the network.
|
|
5538
|
+
* @param {string} hash
|
|
5539
|
+
* @returns {Promise<ExtendedHeader>}
|
|
5537
5540
|
*/
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
const
|
|
5541
|
+
requestHeaderByHash(hash) {
|
|
5542
|
+
const ptr0 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5543
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5544
|
+
const ret = wasm.nodeclient_requestHeaderByHash(this.__wbg_ptr, ptr0, len0);
|
|
5541
5545
|
return ret;
|
|
5542
5546
|
}
|
|
5543
5547
|
/**
|
|
5544
|
-
*
|
|
5545
|
-
* @returns {Promise<
|
|
5548
|
+
* Wait until the node is connected to at least 1 trusted peer.
|
|
5549
|
+
* @returns {Promise<void>}
|
|
5546
5550
|
*/
|
|
5547
|
-
|
|
5548
|
-
const ret = wasm.
|
|
5551
|
+
waitConnectedTrusted() {
|
|
5552
|
+
const ret = wasm.nodeclient_waitConnectedTrusted(this.__wbg_ptr);
|
|
5549
5553
|
return ret;
|
|
5550
5554
|
}
|
|
5551
5555
|
/**
|
|
@@ -5557,66 +5561,69 @@ export class NodeClient {
|
|
|
5557
5561
|
return ret;
|
|
5558
5562
|
}
|
|
5559
5563
|
/**
|
|
5560
|
-
*
|
|
5561
|
-
* @
|
|
5564
|
+
* Establish a new connection to the existing worker over provided port
|
|
5565
|
+
* @param {any} port
|
|
5566
|
+
* @returns {Promise<void>}
|
|
5562
5567
|
*/
|
|
5563
|
-
|
|
5564
|
-
const ret = wasm.
|
|
5568
|
+
addConnectionToWorker(port) {
|
|
5569
|
+
const ret = wasm.nodeclient_addConnectionToWorker(this.__wbg_ptr, port);
|
|
5565
5570
|
return ret;
|
|
5566
5571
|
}
|
|
5567
5572
|
/**
|
|
5568
|
-
*
|
|
5569
|
-
* @param {
|
|
5573
|
+
* Request a header for the block with a given height from the network.
|
|
5574
|
+
* @param {bigint} height
|
|
5570
5575
|
* @returns {Promise<ExtendedHeader>}
|
|
5571
5576
|
*/
|
|
5572
|
-
|
|
5573
|
-
const
|
|
5574
|
-
const len0 = WASM_VECTOR_LEN;
|
|
5575
|
-
const ret = wasm.nodeclient_getHeaderByHash(this.__wbg_ptr, ptr0, len0);
|
|
5577
|
+
requestHeaderByHeight(height) {
|
|
5578
|
+
const ret = wasm.nodeclient_requestHeaderByHeight(this.__wbg_ptr, height);
|
|
5576
5579
|
return ret;
|
|
5577
5580
|
}
|
|
5578
5581
|
/**
|
|
5579
|
-
*
|
|
5580
|
-
*
|
|
5581
|
-
*
|
|
5582
|
+
* Request headers in range (from, from + amount] from the network.
|
|
5583
|
+
*
|
|
5584
|
+
* The headers will be verified with the `from` header.
|
|
5585
|
+
* @param {ExtendedHeader} from
|
|
5586
|
+
* @param {bigint} amount
|
|
5587
|
+
* @returns {Promise<ExtendedHeader[]>}
|
|
5582
5588
|
*/
|
|
5583
|
-
|
|
5584
|
-
|
|
5589
|
+
requestVerifiedHeaders(from, amount) {
|
|
5590
|
+
_assertClass(from, ExtendedHeader);
|
|
5591
|
+
const ret = wasm.nodeclient_requestVerifiedHeaders(this.__wbg_ptr, from.__wbg_ptr, amount);
|
|
5585
5592
|
return ret;
|
|
5586
5593
|
}
|
|
5587
5594
|
/**
|
|
5588
|
-
*
|
|
5589
|
-
*
|
|
5590
|
-
*
|
|
5591
|
-
* If end of the range is undefined (None), the last returned header will be the last header in the
|
|
5592
|
-
* store.
|
|
5593
|
-
*
|
|
5594
|
-
* # Errors
|
|
5595
|
-
*
|
|
5596
|
-
* If range contains a height of a header that is not found in the store.
|
|
5597
|
-
* @param {bigint | null} [start_height]
|
|
5598
|
-
* @param {bigint | null} [end_height]
|
|
5599
|
-
* @returns {Promise<ExtendedHeader[]>}
|
|
5595
|
+
* Create a new connection to a Lumina node running in [`NodeWorker`]. Provided `port` is
|
|
5596
|
+
* expected to have `MessagePort`-like interface for sending and receiving messages.
|
|
5597
|
+
* @param {any} port
|
|
5600
5598
|
*/
|
|
5601
|
-
|
|
5602
|
-
const ret = wasm.
|
|
5599
|
+
constructor(port) {
|
|
5600
|
+
const ret = wasm.nodeclient_new(port);
|
|
5603
5601
|
return ret;
|
|
5604
5602
|
}
|
|
5605
5603
|
/**
|
|
5606
|
-
*
|
|
5607
|
-
* @
|
|
5608
|
-
* @returns {Promise<SamplingMetadata | undefined>}
|
|
5604
|
+
* Stop the node.
|
|
5605
|
+
* @returns {Promise<void>}
|
|
5609
5606
|
*/
|
|
5610
|
-
|
|
5611
|
-
const ret = wasm.
|
|
5607
|
+
stop() {
|
|
5608
|
+
const ret = wasm.nodeclient_stop(this.__wbg_ptr);
|
|
5612
5609
|
return ret;
|
|
5613
5610
|
}
|
|
5614
5611
|
/**
|
|
5615
|
-
*
|
|
5616
|
-
* @
|
|
5612
|
+
* Start the node with the provided config, if it's not running
|
|
5613
|
+
* @param {NodeConfig} config
|
|
5614
|
+
* @returns {Promise<void>}
|
|
5617
5615
|
*/
|
|
5618
|
-
|
|
5619
|
-
|
|
5616
|
+
start(config) {
|
|
5617
|
+
_assertClass(config, NodeConfig);
|
|
5618
|
+
const ret = wasm.nodeclient_start(this.__wbg_ptr, config.__wbg_ptr);
|
|
5619
|
+
return ret;
|
|
5620
|
+
}
|
|
5621
|
+
/**
|
|
5622
|
+
* Get all the multiaddresses on which the node listens.
|
|
5623
|
+
* @returns {Promise<Array<any>>}
|
|
5624
|
+
*/
|
|
5625
|
+
listeners() {
|
|
5626
|
+
const ret = wasm.nodeclient_listeners(this.__wbg_ptr);
|
|
5620
5627
|
return ret;
|
|
5621
5628
|
}
|
|
5622
5629
|
}
|
|
@@ -5662,6 +5669,15 @@ export class NodeConfig {
|
|
|
5662
5669
|
const ptr = this.__destroy_into_raw();
|
|
5663
5670
|
wasm.__wbg_nodeconfig_free(ptr, 0);
|
|
5664
5671
|
}
|
|
5672
|
+
/**
|
|
5673
|
+
* Get the configuration with default bootnodes for provided network
|
|
5674
|
+
* @param {Network} network
|
|
5675
|
+
* @returns {NodeConfig}
|
|
5676
|
+
*/
|
|
5677
|
+
static default(network) {
|
|
5678
|
+
const ret = wasm.nodeconfig_default(network);
|
|
5679
|
+
return NodeConfig.__wrap(ret);
|
|
5680
|
+
}
|
|
5665
5681
|
/**
|
|
5666
5682
|
* A network to connect to.
|
|
5667
5683
|
* @returns {Network}
|
|
@@ -5772,15 +5788,6 @@ export class NodeConfig {
|
|
|
5772
5788
|
set customPruningWindowSecs(arg0) {
|
|
5773
5789
|
wasm.__wbg_set_nodeconfig_customPruningWindowSecs(this.__wbg_ptr, isLikeNone(arg0) ? 0x100000001 : (arg0) >>> 0);
|
|
5774
5790
|
}
|
|
5775
|
-
/**
|
|
5776
|
-
* Get the configuration with default bootnodes for provided network
|
|
5777
|
-
* @param {Network} network
|
|
5778
|
-
* @returns {NodeConfig}
|
|
5779
|
-
*/
|
|
5780
|
-
static default(network) {
|
|
5781
|
-
const ret = wasm.nodeconfig_default(network);
|
|
5782
|
-
return NodeConfig.__wrap(ret);
|
|
5783
|
-
}
|
|
5784
5791
|
}
|
|
5785
5792
|
|
|
5786
5793
|
const NodeWorkerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -5806,6 +5813,7 @@ export class NodeWorker {
|
|
|
5806
5813
|
wasm.__wbg_nodeworker_free(ptr, 0);
|
|
5807
5814
|
}
|
|
5808
5815
|
/**
|
|
5816
|
+
* Create a new `NodeWorker` with a port-like JS object.
|
|
5809
5817
|
* @param {any} port_like_object
|
|
5810
5818
|
*/
|
|
5811
5819
|
constructor(port_like_object) {
|
|
@@ -5815,6 +5823,7 @@ export class NodeWorker {
|
|
|
5815
5823
|
return this;
|
|
5816
5824
|
}
|
|
5817
5825
|
/**
|
|
5826
|
+
* Run `NodeWorker` main loop.
|
|
5818
5827
|
* @returns {Promise<void>}
|
|
5819
5828
|
*/
|
|
5820
5829
|
run() {
|
|
@@ -6347,6 +6356,16 @@ export class SignerInfo {
|
|
|
6347
6356
|
const ptr = this.__destroy_into_raw();
|
|
6348
6357
|
wasm.__wbg_signerinfo_free(ptr, 0);
|
|
6349
6358
|
}
|
|
6359
|
+
/**
|
|
6360
|
+
* public_key is the public key of the signer. It is optional for accounts
|
|
6361
|
+
* that already exist in state. If unset, the verifier can use the required \
|
|
6362
|
+
* signer address for this position and lookup the public key.
|
|
6363
|
+
* @returns {ProtoAny | undefined}
|
|
6364
|
+
*/
|
|
6365
|
+
public_key() {
|
|
6366
|
+
const ret = wasm.signerinfo_public_key(this.__wbg_ptr);
|
|
6367
|
+
return ret;
|
|
6368
|
+
}
|
|
6350
6369
|
/**
|
|
6351
6370
|
* mode_info describes the signing mode of the signer and is a nested
|
|
6352
6371
|
* structure to support nested multisig pubkey's
|
|
@@ -6385,16 +6404,6 @@ export class SignerInfo {
|
|
|
6385
6404
|
set sequence(arg0) {
|
|
6386
6405
|
wasm.__wbg_set_signerinfo_sequence(this.__wbg_ptr, arg0);
|
|
6387
6406
|
}
|
|
6388
|
-
/**
|
|
6389
|
-
* public_key is the public key of the signer. It is optional for accounts
|
|
6390
|
-
* that already exist in state. If unset, the verifier can use the required \
|
|
6391
|
-
* signer address for this position and lookup the public key.
|
|
6392
|
-
* @returns {ProtoAny | undefined}
|
|
6393
|
-
*/
|
|
6394
|
-
public_key() {
|
|
6395
|
-
const ret = wasm.signerinfo_public_key(this.__wbg_ptr);
|
|
6396
|
-
return ret;
|
|
6397
|
-
}
|
|
6398
6407
|
}
|
|
6399
6408
|
|
|
6400
6409
|
const StringEventFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -6676,23 +6685,6 @@ export class TxBody {
|
|
|
6676
6685
|
const len0 = WASM_VECTOR_LEN;
|
|
6677
6686
|
wasm.__wbg_set_txbody_memo(this.__wbg_ptr, ptr0, len0);
|
|
6678
6687
|
}
|
|
6679
|
-
/**
|
|
6680
|
-
* `messages` is a list of messages to be executed. The required signers of
|
|
6681
|
-
* those messages define the number and order of elements in `AuthInfo`'s
|
|
6682
|
-
* signer_infos and Tx's signatures. Each required signer address is added to
|
|
6683
|
-
* the list only the first time it occurs.
|
|
6684
|
-
*
|
|
6685
|
-
* By convention, the first required signer (usually from the first message)
|
|
6686
|
-
* is referred to as the primary signer and pays the fee for the whole
|
|
6687
|
-
* transaction.
|
|
6688
|
-
* @returns {ProtoAny[]}
|
|
6689
|
-
*/
|
|
6690
|
-
messages() {
|
|
6691
|
-
const ret = wasm.txbody_messages(this.__wbg_ptr);
|
|
6692
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
6693
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
6694
|
-
return v1;
|
|
6695
|
-
}
|
|
6696
6688
|
/**
|
|
6697
6689
|
* `timeout` is the block height after which this transaction will not
|
|
6698
6690
|
* be processed by the chain
|
|
@@ -6726,6 +6718,23 @@ export class TxBody {
|
|
|
6726
6718
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
6727
6719
|
return v1;
|
|
6728
6720
|
}
|
|
6721
|
+
/**
|
|
6722
|
+
* `messages` is a list of messages to be executed. The required signers of
|
|
6723
|
+
* those messages define the number and order of elements in `AuthInfo`'s
|
|
6724
|
+
* signer_infos and Tx's signatures. Each required signer address is added to
|
|
6725
|
+
* the list only the first time it occurs.
|
|
6726
|
+
*
|
|
6727
|
+
* By convention, the first required signer (usually from the first message)
|
|
6728
|
+
* is referred to as the primary signer and pays the fee for the whole
|
|
6729
|
+
* transaction.
|
|
6730
|
+
* @returns {ProtoAny[]}
|
|
6731
|
+
*/
|
|
6732
|
+
messages() {
|
|
6733
|
+
const ret = wasm.txbody_messages(this.__wbg_ptr);
|
|
6734
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
6735
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
6736
|
+
return v1;
|
|
6737
|
+
}
|
|
6729
6738
|
}
|
|
6730
6739
|
|
|
6731
6740
|
const TxResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -6755,6 +6764,27 @@ export class TxResponse {
|
|
|
6755
6764
|
const ptr = this.__destroy_into_raw();
|
|
6756
6765
|
wasm.__wbg_txresponse_free(ptr, 0);
|
|
6757
6766
|
}
|
|
6767
|
+
/**
|
|
6768
|
+
* Events defines all the events emitted by processing a transaction. Note,
|
|
6769
|
+
* these events include those emitted by processing all the messages and those
|
|
6770
|
+
* emitted from the ante. Whereas Logs contains the events, with
|
|
6771
|
+
* additional metadata, emitted only by processing the messages.
|
|
6772
|
+
* @returns {JsEvent[]}
|
|
6773
|
+
*/
|
|
6774
|
+
get events() {
|
|
6775
|
+
const ret = wasm.txresponse_events(this.__wbg_ptr);
|
|
6776
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
6777
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
6778
|
+
return v1;
|
|
6779
|
+
}
|
|
6780
|
+
/**
|
|
6781
|
+
* The block height
|
|
6782
|
+
* @returns {bigint}
|
|
6783
|
+
*/
|
|
6784
|
+
get height() {
|
|
6785
|
+
const ret = wasm.txbody_timeout_height(this.__wbg_ptr);
|
|
6786
|
+
return BigInt.asUintN(64, ret);
|
|
6787
|
+
}
|
|
6758
6788
|
/**
|
|
6759
6789
|
* Namespace for the Code
|
|
6760
6790
|
* @returns {string}
|
|
@@ -6950,27 +6980,6 @@ export class TxResponse {
|
|
|
6950
6980
|
const len0 = WASM_VECTOR_LEN;
|
|
6951
6981
|
wasm.__wbg_set_txresponse_timestamp(this.__wbg_ptr, ptr0, len0);
|
|
6952
6982
|
}
|
|
6953
|
-
/**
|
|
6954
|
-
* The block height
|
|
6955
|
-
* @returns {bigint}
|
|
6956
|
-
*/
|
|
6957
|
-
get height() {
|
|
6958
|
-
const ret = wasm.txbody_timeout_height(this.__wbg_ptr);
|
|
6959
|
-
return BigInt.asUintN(64, ret);
|
|
6960
|
-
}
|
|
6961
|
-
/**
|
|
6962
|
-
* Events defines all the events emitted by processing a transaction. Note,
|
|
6963
|
-
* these events include those emitted by processing all the messages and those
|
|
6964
|
-
* emitted from the ante. Whereas Logs contains the events, with
|
|
6965
|
-
* additional metadata, emitted only by processing the messages.
|
|
6966
|
-
* @returns {JsEvent[]}
|
|
6967
|
-
*/
|
|
6968
|
-
get events() {
|
|
6969
|
-
const ret = wasm.txresponse_events(this.__wbg_ptr);
|
|
6970
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
6971
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
6972
|
-
return v1;
|
|
6973
|
-
}
|
|
6974
6983
|
}
|
|
6975
6984
|
|
|
6976
6985
|
const TxStatusResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -7000,6 +7009,14 @@ export class TxStatusResponse {
|
|
|
7000
7009
|
const ptr = this.__destroy_into_raw();
|
|
7001
7010
|
wasm.__wbg_txstatusresponse_free(ptr, 0);
|
|
7002
7011
|
}
|
|
7012
|
+
/**
|
|
7013
|
+
* Height of the block in which the transaction was committed.
|
|
7014
|
+
* @returns {bigint}
|
|
7015
|
+
*/
|
|
7016
|
+
get height() {
|
|
7017
|
+
const ret = wasm.txstatusresponse_height(this.__wbg_ptr);
|
|
7018
|
+
return BigInt.asUintN(64, ret);
|
|
7019
|
+
}
|
|
7003
7020
|
/**
|
|
7004
7021
|
* Index of the transaction in block.
|
|
7005
7022
|
* @returns {number}
|
|
@@ -7074,14 +7091,6 @@ export class TxStatusResponse {
|
|
|
7074
7091
|
set status(arg0) {
|
|
7075
7092
|
wasm.__wbg_set_txstatusresponse_status(this.__wbg_ptr, arg0);
|
|
7076
7093
|
}
|
|
7077
|
-
/**
|
|
7078
|
-
* Height of the block in which the transaction was committed.
|
|
7079
|
-
* @returns {bigint}
|
|
7080
|
-
*/
|
|
7081
|
-
get height() {
|
|
7082
|
-
const ret = wasm.txstatusresponse_height(this.__wbg_ptr);
|
|
7083
|
-
return BigInt.asUintN(64, ret);
|
|
7084
|
-
}
|
|
7085
7094
|
}
|
|
7086
7095
|
|
|
7087
7096
|
const ValAddressFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -7455,7 +7464,7 @@ export function __wbg_abort_496881624c2d80da() { return handleError(function (ar
|
|
|
7455
7464
|
arg0.abort();
|
|
7456
7465
|
}, arguments) };
|
|
7457
7466
|
|
|
7458
|
-
export function
|
|
7467
|
+
export function __wbg_accountNumber_8a52b3ddaecb3ddf(arg0) {
|
|
7459
7468
|
const ret = arg0.accountNumber;
|
|
7460
7469
|
return ret;
|
|
7461
7470
|
};
|
|
@@ -7498,7 +7507,7 @@ export function __wbg_attribute_unwrap(arg0) {
|
|
|
7498
7507
|
return ret;
|
|
7499
7508
|
};
|
|
7500
7509
|
|
|
7501
|
-
export function
|
|
7510
|
+
export function __wbg_authInfoBytes_0a5d207619ad0422(arg0, arg1) {
|
|
7502
7511
|
const ret = arg1.authInfoBytes;
|
|
7503
7512
|
const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
|
|
7504
7513
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -7536,7 +7545,7 @@ export function __wbg_blockrange_unwrap(arg0) {
|
|
|
7536
7545
|
return ret;
|
|
7537
7546
|
};
|
|
7538
7547
|
|
|
7539
|
-
export function
|
|
7548
|
+
export function __wbg_bodyBytes_75efcd7cc8472ddf(arg0, arg1) {
|
|
7540
7549
|
const ret = arg1.bodyBytes;
|
|
7541
7550
|
const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
|
|
7542
7551
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -7549,11 +7558,6 @@ export function __wbg_body_be60ee806470b990(arg0) {
|
|
|
7549
7558
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
7550
7559
|
};
|
|
7551
7560
|
|
|
7552
|
-
export function __wbg_bound_5807fb7ebc427c03() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
7553
|
-
const ret = IDBKeyRange.bound(arg0, arg1, arg2 !== 0, arg3 !== 0);
|
|
7554
|
-
return ret;
|
|
7555
|
-
}, arguments) };
|
|
7556
|
-
|
|
7557
7561
|
export function __wbg_buffer_1f897e9f3ed6b41d(arg0) {
|
|
7558
7562
|
const ret = arg0.buffer;
|
|
7559
7563
|
return ret;
|
|
@@ -7604,7 +7608,7 @@ export function __wbg_cause_94f62e1c92956ce2(arg0) {
|
|
|
7604
7608
|
return ret;
|
|
7605
7609
|
};
|
|
7606
7610
|
|
|
7607
|
-
export function
|
|
7611
|
+
export function __wbg_chainId_2a4115c1298b59d8(arg0, arg1) {
|
|
7608
7612
|
const ret = arg1.chainId;
|
|
7609
7613
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
7610
7614
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -7635,7 +7639,7 @@ export function __wbg_clearTimeout_96804de0ab838f26(arg0) {
|
|
|
7635
7639
|
return ret;
|
|
7636
7640
|
};
|
|
7637
7641
|
|
|
7638
|
-
export function
|
|
7642
|
+
export function __wbg_clearTimeout_d270f24e5d43eaf7(arg0) {
|
|
7639
7643
|
clearTimeout(arg0);
|
|
7640
7644
|
};
|
|
7641
7645
|
|
|
@@ -7839,13 +7843,13 @@ export function __wbg_extendedheader_unwrap(arg0) {
|
|
|
7839
7843
|
return ret;
|
|
7840
7844
|
};
|
|
7841
7845
|
|
|
7842
|
-
export function
|
|
7843
|
-
const ret =
|
|
7846
|
+
export function __wbg_fetch_12e13d0511844bfd(arg0) {
|
|
7847
|
+
const ret = fetch(arg0);
|
|
7844
7848
|
return ret;
|
|
7845
7849
|
};
|
|
7846
7850
|
|
|
7847
|
-
export function
|
|
7848
|
-
const ret = fetch(
|
|
7851
|
+
export function __wbg_fetch_4fae101547df73b6(arg0, arg1, arg2) {
|
|
7852
|
+
const ret = arg0.fetch(arg1, arg2);
|
|
7849
7853
|
return ret;
|
|
7850
7854
|
};
|
|
7851
7855
|
|
|
@@ -7859,13 +7863,13 @@ export function __wbg_from_237b1ad767238d8b(arg0) {
|
|
|
7859
7863
|
return ret;
|
|
7860
7864
|
};
|
|
7861
7865
|
|
|
7862
|
-
export function
|
|
7866
|
+
export function __wbg_gasLimit_156da322edae975b(arg0, arg1) {
|
|
7863
7867
|
const ret = arg1.gasLimit;
|
|
7864
7868
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
7865
7869
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
7866
7870
|
};
|
|
7867
7871
|
|
|
7868
|
-
export function
|
|
7872
|
+
export function __wbg_gasPrice_7ed979d29f5321b7(arg0, arg1) {
|
|
7869
7873
|
const ret = arg1.gasPrice;
|
|
7870
7874
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
7871
7875
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
@@ -8289,7 +8293,7 @@ export function __wbg_length_904c0910ed998bf3(arg0) {
|
|
|
8289
8293
|
return ret;
|
|
8290
8294
|
};
|
|
8291
8295
|
|
|
8292
|
-
export function
|
|
8296
|
+
export function __wbg_memo_aceadb714ed9785c(arg0, arg1) {
|
|
8293
8297
|
const ret = arg1.memo;
|
|
8294
8298
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
8295
8299
|
var len1 = WASM_VECTOR_LEN;
|
|
@@ -8379,7 +8383,7 @@ export function __wbg_new_d5e3800b120e37e1(arg0, arg1) {
|
|
|
8379
8383
|
const a = state0.a;
|
|
8380
8384
|
state0.a = 0;
|
|
8381
8385
|
try {
|
|
8382
|
-
return
|
|
8386
|
+
return __wbg_adapter_982(a, state0.b, arg0, arg1);
|
|
8383
8387
|
} finally {
|
|
8384
8388
|
state0.a = a;
|
|
8385
8389
|
}
|
|
@@ -8545,15 +8549,15 @@ export function __wbg_postMessage_3b4fb1cda6756bf0() { return handleError(functi
|
|
|
8545
8549
|
arg0.postMessage(arg1);
|
|
8546
8550
|
}, arguments) };
|
|
8547
8551
|
|
|
8548
|
-
export function
|
|
8552
|
+
export function __wbg_postMessage_b9234f931da7f86a() { return handleError(function (arg0, arg1, arg2) {
|
|
8549
8553
|
arg0.postMessage(arg1, arg2);
|
|
8550
8554
|
}, arguments) };
|
|
8551
8555
|
|
|
8552
|
-
export function
|
|
8556
|
+
export function __wbg_postMessage_ecb1e9ee54a5b2f1() { return handleError(function (arg0, arg1) {
|
|
8553
8557
|
arg0.postMessage(arg1);
|
|
8554
8558
|
}, arguments) };
|
|
8555
8559
|
|
|
8556
|
-
export function
|
|
8560
|
+
export function __wbg_priority_1990e2825970b82f(arg0) {
|
|
8557
8561
|
const ret = arg0.priority;
|
|
8558
8562
|
return isLikeNone(ret) ? 0 : ret;
|
|
8559
8563
|
};
|
|
@@ -8639,7 +8643,7 @@ export function __wbg_releaseLock_fbec365467db2e6c(arg0) {
|
|
|
8639
8643
|
arg0.releaseLock();
|
|
8640
8644
|
};
|
|
8641
8645
|
|
|
8642
|
-
export function
|
|
8646
|
+
export function __wbg_request_3be0f0335cc6a465(arg0, arg1, arg2, arg3, arg4) {
|
|
8643
8647
|
const ret = arg0.request(getStringFromWasm0(arg1, arg2), arg3, arg4);
|
|
8644
8648
|
return ret;
|
|
8645
8649
|
};
|
|
@@ -8692,7 +8696,7 @@ export function __wbg_setInterval_ed3b5e3c3ebb8a6d() { return handleError(functi
|
|
|
8692
8696
|
return ret;
|
|
8693
8697
|
}, arguments) };
|
|
8694
8698
|
|
|
8695
|
-
export function
|
|
8699
|
+
export function __wbg_setTimeout_c19d61d90c66d11f(arg0, arg1) {
|
|
8696
8700
|
const ret = setTimeout(arg0, arg1 >>> 0);
|
|
8697
8701
|
return ret;
|
|
8698
8702
|
};
|
|
@@ -8969,7 +8973,7 @@ export function __wbg_txstatusresponse_new(arg0) {
|
|
|
8969
8973
|
return ret;
|
|
8970
8974
|
};
|
|
8971
8975
|
|
|
8972
|
-
export function
|
|
8976
|
+
export function __wbg_typeUrl_3684fcca6ad58882(arg0, arg1) {
|
|
8973
8977
|
const ret = arg1.typeUrl;
|
|
8974
8978
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
8975
8979
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -9003,7 +9007,7 @@ export function __wbg_value_09d0b4eaab48b91d(arg0) {
|
|
|
9003
9007
|
return ret;
|
|
9004
9008
|
};
|
|
9005
9009
|
|
|
9006
|
-
export function
|
|
9010
|
+
export function __wbg_value_1c415f2db45fc801(arg0, arg1) {
|
|
9007
9011
|
const ret = arg1.value;
|
|
9008
9012
|
const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
|
|
9009
9013
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -9147,6 +9151,12 @@ export function __wbg_write_39d7c51f917777a5(arg0, arg1) {
|
|
|
9147
9151
|
return ret;
|
|
9148
9152
|
};
|
|
9149
9153
|
|
|
9154
|
+
export function __wbindgen_cast_0d71f2ff3d5df848(arg0, arg1) {
|
|
9155
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 2886, function: Function { arguments: [], shim_idx: 2887, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
9156
|
+
const ret = makeMutClosure(arg0, arg1, 2886, __wbg_adapter_13);
|
|
9157
|
+
return ret;
|
|
9158
|
+
};
|
|
9159
|
+
|
|
9150
9160
|
export function __wbindgen_cast_13f728beb3308701(arg0, arg1) {
|
|
9151
9161
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
9152
9162
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
@@ -9155,9 +9165,9 @@ export function __wbindgen_cast_13f728beb3308701(arg0, arg1) {
|
|
|
9155
9165
|
return ret;
|
|
9156
9166
|
};
|
|
9157
9167
|
|
|
9158
|
-
export function
|
|
9159
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
9160
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
9168
|
+
export function __wbindgen_cast_1549fdb98e982686(arg0, arg1) {
|
|
9169
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 669, function: Function { arguments: [Externref], shim_idx: 675, ret: NamedExternref("Promise<any>"), inner_ret: Some(NamedExternref("Promise<any>")) }, mutable: true }) -> Externref`.
|
|
9170
|
+
const ret = makeMutClosure(arg0, arg1, 669, __wbg_adapter_38);
|
|
9161
9171
|
return ret;
|
|
9162
9172
|
};
|
|
9163
9173
|
|
|
@@ -9167,39 +9177,33 @@ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
|
|
|
9167
9177
|
return ret;
|
|
9168
9178
|
};
|
|
9169
9179
|
|
|
9170
|
-
export function
|
|
9171
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
9172
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
9173
|
-
return ret;
|
|
9174
|
-
};
|
|
9175
|
-
|
|
9176
|
-
export function __wbindgen_cast_4625c577ab2ec9ee(arg0) {
|
|
9177
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
9178
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
9180
|
+
export function __wbindgen_cast_2d3f4f6921336305(arg0, arg1) {
|
|
9181
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1784, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1785, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
9182
|
+
const ret = makeMutClosure(arg0, arg1, 1784, __wbg_adapter_8);
|
|
9179
9183
|
return ret;
|
|
9180
9184
|
};
|
|
9181
9185
|
|
|
9182
|
-
export function
|
|
9183
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
9184
|
-
const ret =
|
|
9186
|
+
export function __wbindgen_cast_439df55617f52063(arg0, arg1) {
|
|
9187
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 669, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 673, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
9188
|
+
const ret = makeClosure(arg0, arg1, 669, __wbg_adapter_47);
|
|
9185
9189
|
return ret;
|
|
9186
9190
|
};
|
|
9187
9191
|
|
|
9188
|
-
export function
|
|
9189
|
-
// Cast intrinsic for `
|
|
9190
|
-
const ret =
|
|
9192
|
+
export function __wbindgen_cast_4625c577ab2ec9ee(arg0) {
|
|
9193
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
9194
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
9191
9195
|
return ret;
|
|
9192
9196
|
};
|
|
9193
9197
|
|
|
9194
|
-
export function
|
|
9195
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
9196
|
-
const ret =
|
|
9198
|
+
export function __wbindgen_cast_5ce2b55b30716d02(arg0, arg1) {
|
|
9199
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 2976, function: Function { arguments: [NamedExternref("Event")], shim_idx: 2977, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
9200
|
+
const ret = makeMutClosure(arg0, arg1, 2976, __wbg_adapter_16);
|
|
9197
9201
|
return ret;
|
|
9198
9202
|
};
|
|
9199
9203
|
|
|
9200
|
-
export function
|
|
9201
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
9202
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
9204
|
+
export function __wbindgen_cast_6fcc2e550fb2fc08(arg0, arg1) {
|
|
9205
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 2874, function: Function { arguments: [Externref], shim_idx: 2875, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
9206
|
+
const ret = makeMutClosure(arg0, arg1, 2874, __wbg_adapter_33);
|
|
9203
9207
|
return ret;
|
|
9204
9208
|
};
|
|
9205
9209
|
|
|
@@ -9211,9 +9215,9 @@ export function __wbindgen_cast_76a0f6231a633ad2(arg0, arg1) {
|
|
|
9211
9215
|
return ret;
|
|
9212
9216
|
};
|
|
9213
9217
|
|
|
9214
|
-
export function
|
|
9215
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
9216
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
9218
|
+
export function __wbindgen_cast_84b488785ba1336b(arg0, arg1) {
|
|
9219
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1784, function: Function { arguments: [NamedExternref("Event")], shim_idx: 1785, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
9220
|
+
const ret = makeMutClosure(arg0, arg1, 1784, __wbg_adapter_8);
|
|
9217
9221
|
return ret;
|
|
9218
9222
|
};
|
|
9219
9223
|
|
|
@@ -9231,15 +9235,27 @@ export function __wbindgen_cast_9ae0607507abb057(arg0) {
|
|
|
9231
9235
|
return ret;
|
|
9232
9236
|
};
|
|
9233
9237
|
|
|
9238
|
+
export function __wbindgen_cast_b48b6bd0973f59e2(arg0, arg1) {
|
|
9239
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1784, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1785, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
9240
|
+
const ret = makeMutClosure(arg0, arg1, 1784, __wbg_adapter_8);
|
|
9241
|
+
return ret;
|
|
9242
|
+
};
|
|
9243
|
+
|
|
9244
|
+
export function __wbindgen_cast_b56f0f95b6de8085(arg0, arg1) {
|
|
9245
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 2337, function: Function { arguments: [], shim_idx: 2338, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
9246
|
+
const ret = makeMutClosure(arg0, arg1, 2337, __wbg_adapter_19);
|
|
9247
|
+
return ret;
|
|
9248
|
+
};
|
|
9249
|
+
|
|
9234
9250
|
export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
|
|
9235
9251
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
9236
9252
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
9237
9253
|
return ret;
|
|
9238
9254
|
};
|
|
9239
9255
|
|
|
9240
|
-
export function
|
|
9241
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
9242
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
9256
|
+
export function __wbindgen_cast_cdc847d25519f930(arg0, arg1) {
|
|
9257
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 669, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 670, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
9258
|
+
const ret = makeMutClosure(arg0, arg1, 669, __wbg_adapter_28);
|
|
9243
9259
|
return ret;
|
|
9244
9260
|
};
|
|
9245
9261
|
|
|
@@ -9249,12 +9265,6 @@ export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
|
|
|
9249
9265
|
return ret;
|
|
9250
9266
|
};
|
|
9251
9267
|
|
|
9252
|
-
export function __wbindgen_cast_d81407fed0b5a02d(arg0, arg1) {
|
|
9253
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 2294, function: Function { arguments: [], shim_idx: 2295, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
9254
|
-
const ret = makeMutClosure(arg0, arg1, 2294, __wbg_adapter_8);
|
|
9255
|
-
return ret;
|
|
9256
|
-
};
|
|
9257
|
-
|
|
9258
9268
|
export function __wbindgen_cast_da0d185114cf54d4(arg0, arg1) {
|
|
9259
9269
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
9260
9270
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
@@ -9263,12 +9273,6 @@ export function __wbindgen_cast_da0d185114cf54d4(arg0, arg1) {
|
|
|
9263
9273
|
return ret;
|
|
9264
9274
|
};
|
|
9265
9275
|
|
|
9266
|
-
export function __wbindgen_cast_f2aa4ac7119e14c0(arg0, arg1) {
|
|
9267
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 726, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 731, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
9268
|
-
const ret = makeMutClosure(arg0, arg1, 726, __wbg_adapter_20);
|
|
9269
|
-
return ret;
|
|
9270
|
-
};
|
|
9271
|
-
|
|
9272
9276
|
export function __wbindgen_init_externref_table() {
|
|
9273
9277
|
const table = wasm.__wbindgen_export_4;
|
|
9274
9278
|
const offset = table.grow(4);
|