lumina-node-wasm 0.8.4 → 0.9.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 +45 -67
- package/lumina_node_wasm_bg.js +109 -133
- package/lumina_node_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/lumina_node_wasm.d.ts
CHANGED
|
@@ -29,23 +29,6 @@ export enum Network {
|
|
|
29
29
|
*/
|
|
30
30
|
Private = 3,
|
|
31
31
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Sampling status for a block.
|
|
34
|
-
*/
|
|
35
|
-
export enum SamplingStatus {
|
|
36
|
-
/**
|
|
37
|
-
* Sampling is not done.
|
|
38
|
-
*/
|
|
39
|
-
Unknown = 0,
|
|
40
|
-
/**
|
|
41
|
-
* Sampling is done and block is accepted.
|
|
42
|
-
*/
|
|
43
|
-
Accepted = 1,
|
|
44
|
-
/**
|
|
45
|
-
* Sampling is done and block is rejected.
|
|
46
|
-
*/
|
|
47
|
-
Rejected = 2,
|
|
48
|
-
}
|
|
49
32
|
/**
|
|
50
33
|
* The `ReadableStreamType` enum.
|
|
51
34
|
*
|
|
@@ -53,6 +36,25 @@ export enum SamplingStatus {
|
|
|
53
36
|
*/
|
|
54
37
|
type ReadableStreamType = "bytes";
|
|
55
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Transaction info
|
|
41
|
+
*/
|
|
42
|
+
export interface TxInfo {
|
|
43
|
+
hash: string;
|
|
44
|
+
height: bigint;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Transaction config.
|
|
49
|
+
*/
|
|
50
|
+
export interface TxConfig {
|
|
51
|
+
gasLimit?: bigint; // utia
|
|
52
|
+
gasPrice?: number;
|
|
53
|
+
memo?: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
56
58
|
/**
|
|
57
59
|
* Public key
|
|
58
60
|
*/
|
|
@@ -120,24 +122,6 @@ export interface ProtoAny {
|
|
|
120
122
|
}
|
|
121
123
|
|
|
122
124
|
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Transaction info
|
|
126
|
-
*/
|
|
127
|
-
export interface TxInfo {
|
|
128
|
-
hash: string;
|
|
129
|
-
height: bigint;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Transaction config.
|
|
134
|
-
*/
|
|
135
|
-
export interface TxConfig {
|
|
136
|
-
gasLimit?: bigint; // utia
|
|
137
|
-
gasPrice?: number;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
125
|
/**
|
|
142
126
|
* Address of an account.
|
|
143
127
|
*/
|
|
@@ -175,6 +159,10 @@ export class AppVersion {
|
|
|
175
159
|
* App v3
|
|
176
160
|
*/
|
|
177
161
|
static readonly V3: AppVersion;
|
|
162
|
+
/**
|
|
163
|
+
* App v4
|
|
164
|
+
*/
|
|
165
|
+
static readonly V4: AppVersion;
|
|
178
166
|
}
|
|
179
167
|
/**
|
|
180
168
|
* Arbitrary data that can be stored in the network within certain [`Namespace`].
|
|
@@ -809,7 +797,7 @@ export class NodeClient {
|
|
|
809
797
|
* Request all blobs with provided namespace in the block corresponding to this header
|
|
810
798
|
* using bitswap protocol.
|
|
811
799
|
*/
|
|
812
|
-
requestAllBlobs(
|
|
800
|
+
requestAllBlobs(namespace: Namespace, block_height: bigint, timeout_secs?: number | null): Promise<Blob[]>;
|
|
813
801
|
/**
|
|
814
802
|
* Get current header syncing info.
|
|
815
803
|
*/
|
|
@@ -886,49 +874,43 @@ export class NodeConfig {
|
|
|
886
874
|
/**
|
|
887
875
|
* Sampling window defines maximum age of a block considered for syncing and sampling.
|
|
888
876
|
*
|
|
889
|
-
*
|
|
890
|
-
*
|
|
891
|
-
* * If `use_persistent_memory == true`, default value is 30 days.
|
|
892
|
-
* * If `use_persistent_memory == false`, default value is 60 seconds.
|
|
893
|
-
*
|
|
894
|
-
* The minimum value that can be set is 60 seconds.
|
|
877
|
+
* **Default value:** 2592000 seconds (30 days)\
|
|
878
|
+
* **Minimum:** 60 seconds
|
|
895
879
|
*/
|
|
896
880
|
get customSamplingWindowSecs(): number | undefined;
|
|
897
881
|
/**
|
|
898
882
|
* Sampling window defines maximum age of a block considered for syncing and sampling.
|
|
899
883
|
*
|
|
900
|
-
*
|
|
901
|
-
*
|
|
902
|
-
* * If `use_persistent_memory == true`, default value is 30 days.
|
|
903
|
-
* * If `use_persistent_memory == false`, default value is 60 seconds.
|
|
904
|
-
*
|
|
905
|
-
* The minimum value that can be set is 60 seconds.
|
|
884
|
+
* **Default value:** 2592000 seconds (30 days)\
|
|
885
|
+
* **Minimum:** 60 seconds
|
|
906
886
|
*/
|
|
907
887
|
set customSamplingWindowSecs(value: number | null | undefined);
|
|
908
888
|
/**
|
|
909
|
-
* Pruning
|
|
910
|
-
* order to prune the block.
|
|
889
|
+
* Pruning window defines maximum age of a block for it to be retained in store.
|
|
911
890
|
*
|
|
912
|
-
* If
|
|
891
|
+
* If pruning window is smaller than sampling window, then blocks will be pruned
|
|
892
|
+
* right after they are sampled. This is useful when you want to keep low
|
|
893
|
+
* memory footprint but still validate the blockchain.
|
|
913
894
|
*
|
|
914
|
-
*
|
|
915
|
-
* * If `use_persistent_memory == false`, default value is 60 seconds.
|
|
895
|
+
* If this is not set, then default value will apply:
|
|
916
896
|
*
|
|
917
|
-
*
|
|
897
|
+
* * If `use_persistent_memory == true`, default value is 30 days plus 1 hour.
|
|
898
|
+
* * If `use_persistent_memory == false`, default value is 0 seconds.
|
|
918
899
|
*/
|
|
919
|
-
get
|
|
900
|
+
get customPruningWindowSecs(): number | undefined;
|
|
920
901
|
/**
|
|
921
|
-
* Pruning
|
|
922
|
-
* order to prune the block.
|
|
902
|
+
* Pruning window defines maximum age of a block for it to be retained in store.
|
|
923
903
|
*
|
|
924
|
-
* If
|
|
904
|
+
* If pruning window is smaller than sampling window, then blocks will be pruned
|
|
905
|
+
* right after they are sampled. This is useful when you want to keep low
|
|
906
|
+
* memory footprint but still validate the blockchain.
|
|
925
907
|
*
|
|
926
|
-
*
|
|
927
|
-
* * If `use_persistent_memory == false`, default value is 60 seconds.
|
|
908
|
+
* If this is not set, then default value will apply:
|
|
928
909
|
*
|
|
929
|
-
*
|
|
910
|
+
* * If `use_persistent_memory == true`, default value is 30 days plus 1 hour.
|
|
911
|
+
* * If `use_persistent_memory == false`, default value is 0 seconds.
|
|
930
912
|
*/
|
|
931
|
-
set
|
|
913
|
+
set customPruningWindowSecs(value: number | null | undefined);
|
|
932
914
|
}
|
|
933
915
|
/**
|
|
934
916
|
* `NodeWorker` is responsible for receiving commands from connected [`NodeClient`]s, executing
|
|
@@ -972,10 +954,6 @@ export class PeerTrackerInfoSnapshot {
|
|
|
972
954
|
export class SamplingMetadata {
|
|
973
955
|
private constructor();
|
|
974
956
|
free(): void;
|
|
975
|
-
/**
|
|
976
|
-
* Indicates whether this node was able to successfuly sample the block
|
|
977
|
-
*/
|
|
978
|
-
status: SamplingStatus;
|
|
979
957
|
/**
|
|
980
958
|
* Return Array of cids
|
|
981
959
|
*/
|
|
@@ -1063,7 +1041,7 @@ export class TxClient {
|
|
|
1063
1041
|
* const blob = new Blob(ns, data, AppVersion.latest());
|
|
1064
1042
|
*
|
|
1065
1043
|
* const txInfo = await txClient.submitBlobs([blob]);
|
|
1066
|
-
* await txClient.submitBlobs([blob], { gasLimit: 100000n, gasPrice: 0.02 });
|
|
1044
|
+
* await txClient.submitBlobs([blob], { gasLimit: 100000n, gasPrice: 0.02, memo: "foo" });
|
|
1067
1045
|
* ```
|
|
1068
1046
|
*
|
|
1069
1047
|
* # Note
|
package/lumina_node_wasm_bg.js
CHANGED
|
@@ -128,23 +128,20 @@ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
|
128
128
|
wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b)
|
|
129
129
|
});
|
|
130
130
|
|
|
131
|
-
function
|
|
131
|
+
function makeClosure(arg0, arg1, dtor, f) {
|
|
132
132
|
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
133
133
|
const real = (...args) => {
|
|
134
134
|
// First up with a closure we increment the internal reference
|
|
135
135
|
// count. This ensures that the Rust closure environment won't
|
|
136
136
|
// be deallocated while we're invoking it.
|
|
137
137
|
state.cnt++;
|
|
138
|
-
const a = state.a;
|
|
139
|
-
state.a = 0;
|
|
140
138
|
try {
|
|
141
|
-
return f(a, state.b, ...args);
|
|
139
|
+
return f(state.a, state.b, ...args);
|
|
142
140
|
} finally {
|
|
143
141
|
if (--state.cnt === 0) {
|
|
144
|
-
wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
|
|
142
|
+
wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b);
|
|
143
|
+
state.a = 0;
|
|
145
144
|
CLOSURE_DTORS.unregister(state);
|
|
146
|
-
} else {
|
|
147
|
-
state.a = a;
|
|
148
145
|
}
|
|
149
146
|
}
|
|
150
147
|
};
|
|
@@ -153,20 +150,23 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
153
150
|
return real;
|
|
154
151
|
}
|
|
155
152
|
|
|
156
|
-
function
|
|
153
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
157
154
|
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
158
155
|
const real = (...args) => {
|
|
159
156
|
// First up with a closure we increment the internal reference
|
|
160
157
|
// count. This ensures that the Rust closure environment won't
|
|
161
158
|
// be deallocated while we're invoking it.
|
|
162
159
|
state.cnt++;
|
|
160
|
+
const a = state.a;
|
|
161
|
+
state.a = 0;
|
|
163
162
|
try {
|
|
164
|
-
return f(
|
|
163
|
+
return f(a, state.b, ...args);
|
|
165
164
|
} finally {
|
|
166
165
|
if (--state.cnt === 0) {
|
|
167
|
-
wasm.__wbindgen_export_6.get(state.dtor)(
|
|
168
|
-
state.a = 0;
|
|
166
|
+
wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
|
|
169
167
|
CLOSURE_DTORS.unregister(state);
|
|
168
|
+
} else {
|
|
169
|
+
state.a = a;
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
};
|
|
@@ -239,6 +239,18 @@ function debugString(val) {
|
|
|
239
239
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
240
240
|
return className;
|
|
241
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
* Set up a logging layer that direct logs to the browser's console.
|
|
244
|
+
*/
|
|
245
|
+
export function setup_logging() {
|
|
246
|
+
wasm.setup_logging();
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function _assertClass(instance, klass) {
|
|
250
|
+
if (!(instance instanceof klass)) {
|
|
251
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
242
254
|
|
|
243
255
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
244
256
|
ptr = ptr >>> 0;
|
|
@@ -261,18 +273,6 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
261
273
|
return ptr;
|
|
262
274
|
}
|
|
263
275
|
|
|
264
|
-
function _assertClass(instance, klass) {
|
|
265
|
-
if (!(instance instanceof klass)) {
|
|
266
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Set up a logging layer that direct logs to the browser's console.
|
|
271
|
-
*/
|
|
272
|
-
export function setup_logging() {
|
|
273
|
-
wasm.setup_logging();
|
|
274
|
-
}
|
|
275
|
-
|
|
276
276
|
function takeFromExternrefTable0(idx) {
|
|
277
277
|
const value = wasm.__wbindgen_export_4.get(idx);
|
|
278
278
|
wasm.__externref_table_dealloc(idx);
|
|
@@ -291,35 +291,35 @@ export function protoEncodeSignDoc(sign_doc) {
|
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
function __wbg_adapter_64(arg0, arg1, arg2) {
|
|
294
|
-
wasm.
|
|
294
|
+
wasm.closure281_externref_shim(arg0, arg1, arg2);
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
function __wbg_adapter_67(arg0, arg1, arg2) {
|
|
298
|
-
wasm.
|
|
298
|
+
wasm.closure278_externref_shim(arg0, arg1, arg2);
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
function __wbg_adapter_70(arg0, arg1) {
|
|
302
|
-
wasm.
|
|
302
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc303b50fd0434b4b(arg0, arg1);
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
function __wbg_adapter_73(arg0, arg1, arg2) {
|
|
306
|
-
wasm.
|
|
306
|
+
wasm.closure1639_externref_shim(arg0, arg1, arg2);
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
function __wbg_adapter_80(arg0, arg1, arg2) {
|
|
310
|
-
wasm.
|
|
310
|
+
wasm.closure2157_externref_shim(arg0, arg1, arg2);
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
function __wbg_adapter_83(arg0, arg1) {
|
|
314
|
-
wasm.
|
|
314
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h24eb43bac16ae864(arg0, arg1);
|
|
315
315
|
}
|
|
316
316
|
|
|
317
317
|
function __wbg_adapter_86(arg0, arg1, arg2) {
|
|
318
|
-
wasm.
|
|
318
|
+
wasm.closure2825_externref_shim(arg0, arg1, arg2);
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
function
|
|
322
|
-
wasm.
|
|
321
|
+
function __wbg_adapter_681(arg0, arg1, arg2, arg3) {
|
|
322
|
+
wasm.closure2843_externref_shim(arg0, arg1, arg2, arg3);
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
/**
|
|
@@ -344,24 +344,6 @@ export const Network = Object.freeze({
|
|
|
344
344
|
*/
|
|
345
345
|
Private: 3, "3": "Private",
|
|
346
346
|
});
|
|
347
|
-
/**
|
|
348
|
-
* Sampling status for a block.
|
|
349
|
-
* @enum {0 | 1 | 2}
|
|
350
|
-
*/
|
|
351
|
-
export const SamplingStatus = Object.freeze({
|
|
352
|
-
/**
|
|
353
|
-
* Sampling is not done.
|
|
354
|
-
*/
|
|
355
|
-
Unknown: 0, "0": "Unknown",
|
|
356
|
-
/**
|
|
357
|
-
* Sampling is done and block is accepted.
|
|
358
|
-
*/
|
|
359
|
-
Accepted: 1, "1": "Accepted",
|
|
360
|
-
/**
|
|
361
|
-
* Sampling is done and block is rejected.
|
|
362
|
-
*/
|
|
363
|
-
Rejected: 2, "2": "Rejected",
|
|
364
|
-
});
|
|
365
347
|
|
|
366
348
|
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
367
349
|
|
|
@@ -470,12 +452,20 @@ export class AppVersion {
|
|
|
470
452
|
const ret = wasm.appversion_V3();
|
|
471
453
|
return AppVersion.__wrap(ret);
|
|
472
454
|
}
|
|
455
|
+
/**
|
|
456
|
+
* App v4
|
|
457
|
+
* @returns {AppVersion}
|
|
458
|
+
*/
|
|
459
|
+
static get V4() {
|
|
460
|
+
const ret = wasm.appversion_V4();
|
|
461
|
+
return AppVersion.__wrap(ret);
|
|
462
|
+
}
|
|
473
463
|
/**
|
|
474
464
|
* Latest App version variant.
|
|
475
465
|
* @returns {AppVersion}
|
|
476
466
|
*/
|
|
477
467
|
static latest() {
|
|
478
|
-
const ret = wasm.
|
|
468
|
+
const ret = wasm.appversion_V4();
|
|
479
469
|
return AppVersion.__wrap(ret);
|
|
480
470
|
}
|
|
481
471
|
}
|
|
@@ -2004,15 +1994,14 @@ export class NodeClient {
|
|
|
2004
1994
|
/**
|
|
2005
1995
|
* Request all blobs with provided namespace in the block corresponding to this header
|
|
2006
1996
|
* using bitswap protocol.
|
|
2007
|
-
* @param {ExtendedHeader} header
|
|
2008
1997
|
* @param {Namespace} namespace
|
|
1998
|
+
* @param {bigint} block_height
|
|
2009
1999
|
* @param {number | null} [timeout_secs]
|
|
2010
2000
|
* @returns {Promise<Blob[]>}
|
|
2011
2001
|
*/
|
|
2012
|
-
requestAllBlobs(
|
|
2013
|
-
_assertClass(header, ExtendedHeader);
|
|
2002
|
+
requestAllBlobs(namespace, block_height, timeout_secs) {
|
|
2014
2003
|
_assertClass(namespace, Namespace);
|
|
2015
|
-
const ret = wasm.nodeclient_requestAllBlobs(this.__wbg_ptr,
|
|
2004
|
+
const ret = wasm.nodeclient_requestAllBlobs(this.__wbg_ptr, namespace.__wbg_ptr, block_height, !isLikeNone(timeout_secs), isLikeNone(timeout_secs) ? 0 : timeout_secs);
|
|
2016
2005
|
return ret;
|
|
2017
2006
|
}
|
|
2018
2007
|
/**
|
|
@@ -2118,7 +2107,7 @@ export class NodeConfig {
|
|
|
2118
2107
|
bootnodes: this.bootnodes,
|
|
2119
2108
|
usePersistentMemory: this.usePersistentMemory,
|
|
2120
2109
|
customSamplingWindowSecs: this.customSamplingWindowSecs,
|
|
2121
|
-
|
|
2110
|
+
customPruningWindowSecs: this.customPruningWindowSecs,
|
|
2122
2111
|
};
|
|
2123
2112
|
}
|
|
2124
2113
|
|
|
@@ -2193,12 +2182,8 @@ export class NodeConfig {
|
|
|
2193
2182
|
/**
|
|
2194
2183
|
* Sampling window defines maximum age of a block considered for syncing and sampling.
|
|
2195
2184
|
*
|
|
2196
|
-
*
|
|
2197
|
-
*
|
|
2198
|
-
* * If `use_persistent_memory == true`, default value is 30 days.
|
|
2199
|
-
* * If `use_persistent_memory == false`, default value is 60 seconds.
|
|
2200
|
-
*
|
|
2201
|
-
* The minimum value that can be set is 60 seconds.
|
|
2185
|
+
* **Default value:** 2592000 seconds (30 days)\
|
|
2186
|
+
* **Minimum:** 60 seconds
|
|
2202
2187
|
* @returns {number | undefined}
|
|
2203
2188
|
*/
|
|
2204
2189
|
get customSamplingWindowSecs() {
|
|
@@ -2208,47 +2193,45 @@ export class NodeConfig {
|
|
|
2208
2193
|
/**
|
|
2209
2194
|
* Sampling window defines maximum age of a block considered for syncing and sampling.
|
|
2210
2195
|
*
|
|
2211
|
-
*
|
|
2212
|
-
*
|
|
2213
|
-
* * If `use_persistent_memory == true`, default value is 30 days.
|
|
2214
|
-
* * If `use_persistent_memory == false`, default value is 60 seconds.
|
|
2215
|
-
*
|
|
2216
|
-
* The minimum value that can be set is 60 seconds.
|
|
2196
|
+
* **Default value:** 2592000 seconds (30 days)\
|
|
2197
|
+
* **Minimum:** 60 seconds
|
|
2217
2198
|
* @param {number | null} [arg0]
|
|
2218
2199
|
*/
|
|
2219
2200
|
set customSamplingWindowSecs(arg0) {
|
|
2220
2201
|
wasm.__wbg_set_nodeconfig_customSamplingWindowSecs(this.__wbg_ptr, isLikeNone(arg0) ? 0x100000001 : (arg0) >>> 0);
|
|
2221
2202
|
}
|
|
2222
2203
|
/**
|
|
2223
|
-
* Pruning
|
|
2224
|
-
* order to prune the block.
|
|
2204
|
+
* Pruning window defines maximum age of a block for it to be retained in store.
|
|
2225
2205
|
*
|
|
2226
|
-
* If
|
|
2206
|
+
* If pruning window is smaller than sampling window, then blocks will be pruned
|
|
2207
|
+
* right after they are sampled. This is useful when you want to keep low
|
|
2208
|
+
* memory footprint but still validate the blockchain.
|
|
2227
2209
|
*
|
|
2228
|
-
*
|
|
2229
|
-
* * If `use_persistent_memory == false`, default value is 60 seconds.
|
|
2210
|
+
* If this is not set, then default value will apply:
|
|
2230
2211
|
*
|
|
2231
|
-
*
|
|
2212
|
+
* * If `use_persistent_memory == true`, default value is 30 days plus 1 hour.
|
|
2213
|
+
* * If `use_persistent_memory == false`, default value is 0 seconds.
|
|
2232
2214
|
* @returns {number | undefined}
|
|
2233
2215
|
*/
|
|
2234
|
-
get
|
|
2235
|
-
const ret = wasm.
|
|
2216
|
+
get customPruningWindowSecs() {
|
|
2217
|
+
const ret = wasm.__wbg_get_nodeconfig_customPruningWindowSecs(this.__wbg_ptr);
|
|
2236
2218
|
return ret === 0x100000001 ? undefined : ret;
|
|
2237
2219
|
}
|
|
2238
2220
|
/**
|
|
2239
|
-
* Pruning
|
|
2240
|
-
* order to prune the block.
|
|
2221
|
+
* Pruning window defines maximum age of a block for it to be retained in store.
|
|
2241
2222
|
*
|
|
2242
|
-
* If
|
|
2223
|
+
* If pruning window is smaller than sampling window, then blocks will be pruned
|
|
2224
|
+
* right after they are sampled. This is useful when you want to keep low
|
|
2225
|
+
* memory footprint but still validate the blockchain.
|
|
2243
2226
|
*
|
|
2244
|
-
*
|
|
2245
|
-
* * If `use_persistent_memory == false`, default value is 60 seconds.
|
|
2227
|
+
* If this is not set, then default value will apply:
|
|
2246
2228
|
*
|
|
2247
|
-
*
|
|
2229
|
+
* * If `use_persistent_memory == true`, default value is 30 days plus 1 hour.
|
|
2230
|
+
* * If `use_persistent_memory == false`, default value is 0 seconds.
|
|
2248
2231
|
* @param {number | null} [arg0]
|
|
2249
2232
|
*/
|
|
2250
|
-
set
|
|
2251
|
-
wasm.
|
|
2233
|
+
set customPruningWindowSecs(arg0) {
|
|
2234
|
+
wasm.__wbg_set_nodeconfig_customPruningWindowSecs(this.__wbg_ptr, isLikeNone(arg0) ? 0x100000001 : (arg0) >>> 0);
|
|
2252
2235
|
}
|
|
2253
2236
|
/**
|
|
2254
2237
|
* Get the configuration with default bootnodes for provided network
|
|
@@ -2400,21 +2383,6 @@ export class SamplingMetadata {
|
|
|
2400
2383
|
const ptr = this.__destroy_into_raw();
|
|
2401
2384
|
wasm.__wbg_samplingmetadata_free(ptr, 0);
|
|
2402
2385
|
}
|
|
2403
|
-
/**
|
|
2404
|
-
* Indicates whether this node was able to successfuly sample the block
|
|
2405
|
-
* @returns {SamplingStatus}
|
|
2406
|
-
*/
|
|
2407
|
-
get status() {
|
|
2408
|
-
const ret = wasm.__wbg_get_samplingmetadata_status(this.__wbg_ptr);
|
|
2409
|
-
return ret;
|
|
2410
|
-
}
|
|
2411
|
-
/**
|
|
2412
|
-
* Indicates whether this node was able to successfuly sample the block
|
|
2413
|
-
* @param {SamplingStatus} arg0
|
|
2414
|
-
*/
|
|
2415
|
-
set status(arg0) {
|
|
2416
|
-
wasm.__wbg_set_samplingmetadata_status(this.__wbg_ptr, arg0);
|
|
2417
|
-
}
|
|
2418
2386
|
/**
|
|
2419
2387
|
* Return Array of cids
|
|
2420
2388
|
* @returns {Uint8Array[]}
|
|
@@ -2621,7 +2589,7 @@ export class TxClient {
|
|
|
2621
2589
|
* const blob = new Blob(ns, data, AppVersion.latest());
|
|
2622
2590
|
*
|
|
2623
2591
|
* const txInfo = await txClient.submitBlobs([blob]);
|
|
2624
|
-
* await txClient.submitBlobs([blob], { gasLimit: 100000n, gasPrice: 0.02 });
|
|
2592
|
+
* await txClient.submitBlobs([blob], { gasLimit: 100000n, gasPrice: 0.02, memo: "foo" });
|
|
2625
2593
|
* ```
|
|
2626
2594
|
*
|
|
2627
2595
|
* # Note
|
|
@@ -2796,7 +2764,7 @@ export function __wbg_abort_99fc644e2c79c9fb() { return handleError(function (ar
|
|
|
2796
2764
|
arg0.abort();
|
|
2797
2765
|
}, arguments) };
|
|
2798
2766
|
|
|
2799
|
-
export function
|
|
2767
|
+
export function __wbg_accountNumber_3bec3bbbe2ab015a(arg0) {
|
|
2800
2768
|
const ret = arg0.accountNumber;
|
|
2801
2769
|
return ret;
|
|
2802
2770
|
};
|
|
@@ -2824,7 +2792,7 @@ export function __wbg_apply_eb9e9b97497f91e4() { return handleError(function (ar
|
|
|
2824
2792
|
return ret;
|
|
2825
2793
|
}, arguments) };
|
|
2826
2794
|
|
|
2827
|
-
export function
|
|
2795
|
+
export function __wbg_authInfoBytes_f4ef7dd995816fbf(arg0, arg1) {
|
|
2828
2796
|
const ret = arg1.authInfoBytes;
|
|
2829
2797
|
const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
|
|
2830
2798
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -2852,7 +2820,7 @@ export function __wbg_blockrange_unwrap(arg0) {
|
|
|
2852
2820
|
return ret;
|
|
2853
2821
|
};
|
|
2854
2822
|
|
|
2855
|
-
export function
|
|
2823
|
+
export function __wbg_bodyBytes_b1340478def6c5c2(arg0, arg1) {
|
|
2856
2824
|
const ret = arg1.bodyBytes;
|
|
2857
2825
|
const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
|
|
2858
2826
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -2920,7 +2888,7 @@ export function __wbg_cause_9940c4e8dfcd5129(arg0) {
|
|
|
2920
2888
|
return ret;
|
|
2921
2889
|
};
|
|
2922
2890
|
|
|
2923
|
-
export function
|
|
2891
|
+
export function __wbg_chainId_54d75c34075babea(arg0, arg1) {
|
|
2924
2892
|
const ret = arg1.chainId;
|
|
2925
2893
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2926
2894
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -3135,7 +3103,7 @@ export function __wbg_fetch_3079ee47bab2b144(arg0, arg1) {
|
|
|
3135
3103
|
return ret;
|
|
3136
3104
|
};
|
|
3137
3105
|
|
|
3138
|
-
export function
|
|
3106
|
+
export function __wbg_fetch_7277995ab2eb75ce(arg0) {
|
|
3139
3107
|
const ret = fetch(arg0);
|
|
3140
3108
|
return ret;
|
|
3141
3109
|
};
|
|
@@ -3145,13 +3113,13 @@ export function __wbg_from_2a5d3e218e67aa85(arg0) {
|
|
|
3145
3113
|
return ret;
|
|
3146
3114
|
};
|
|
3147
3115
|
|
|
3148
|
-
export function
|
|
3116
|
+
export function __wbg_gasLimit_173cf2edc7e1a679(arg0, arg1) {
|
|
3149
3117
|
const ret = arg1.gasLimit;
|
|
3150
3118
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
3151
3119
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
3152
3120
|
};
|
|
3153
3121
|
|
|
3154
|
-
export function
|
|
3122
|
+
export function __wbg_gasPrice_5c1945f7aded1c32(arg0, arg1) {
|
|
3155
3123
|
const ret = arg1.gasPrice;
|
|
3156
3124
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
3157
3125
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
@@ -3531,6 +3499,14 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
|
|
|
3531
3499
|
return ret;
|
|
3532
3500
|
};
|
|
3533
3501
|
|
|
3502
|
+
export function __wbg_memo_84e3eb9681b02cdf(arg0, arg1) {
|
|
3503
|
+
const ret = arg1.memo;
|
|
3504
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3505
|
+
var len1 = WASM_VECTOR_LEN;
|
|
3506
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3507
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3508
|
+
};
|
|
3509
|
+
|
|
3534
3510
|
export function __wbg_message_97a2af9b89d693a3(arg0) {
|
|
3535
3511
|
const ret = arg0.message;
|
|
3536
3512
|
return ret;
|
|
@@ -3583,7 +3559,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
|
|
|
3583
3559
|
const a = state0.a;
|
|
3584
3560
|
state0.a = 0;
|
|
3585
3561
|
try {
|
|
3586
|
-
return
|
|
3562
|
+
return __wbg_adapter_681(a, state0.b, arg0, arg1);
|
|
3587
3563
|
} finally {
|
|
3588
3564
|
state0.a = a;
|
|
3589
3565
|
}
|
|
@@ -3765,16 +3741,16 @@ export function __wbg_ports_b00492ca2866b691(arg0) {
|
|
|
3765
3741
|
return ret;
|
|
3766
3742
|
};
|
|
3767
3743
|
|
|
3768
|
-
export function
|
|
3744
|
+
export function __wbg_postMessage_4d1035436bf64f72() { return handleError(function (arg0, arg1) {
|
|
3769
3745
|
arg0.postMessage(arg1);
|
|
3770
3746
|
}, arguments) };
|
|
3771
3747
|
|
|
3772
|
-
export function
|
|
3773
|
-
arg0.postMessage(arg1
|
|
3748
|
+
export function __wbg_postMessage_bb72e89e7ba80355() { return handleError(function (arg0, arg1) {
|
|
3749
|
+
arg0.postMessage(arg1);
|
|
3774
3750
|
}, arguments) };
|
|
3775
3751
|
|
|
3776
|
-
export function
|
|
3777
|
-
arg0.postMessage(arg1);
|
|
3752
|
+
export function __wbg_postMessage_d2f426c59390abed() { return handleError(function (arg0, arg1, arg2) {
|
|
3753
|
+
arg0.postMessage(arg1, arg2);
|
|
3778
3754
|
}, arguments) };
|
|
3779
3755
|
|
|
3780
3756
|
export function __wbg_process_5c1d670bc53614b8(arg0) {
|
|
@@ -4139,7 +4115,7 @@ export function __wbg_txclient_new(arg0) {
|
|
|
4139
4115
|
return ret;
|
|
4140
4116
|
};
|
|
4141
4117
|
|
|
4142
|
-
export function
|
|
4118
|
+
export function __wbg_typeUrl_a94b2e8fe2645d7a(arg0, arg1) {
|
|
4143
4119
|
const ret = arg1.typeUrl;
|
|
4144
4120
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4145
4121
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -4173,7 +4149,7 @@ export function __wbg_value_68c4e9a54bb7fd5e() { return handleError(function (ar
|
|
|
4173
4149
|
return ret;
|
|
4174
4150
|
}, arguments) };
|
|
4175
4151
|
|
|
4176
|
-
export function
|
|
4152
|
+
export function __wbg_value_9f1e6e829e38376c(arg0, arg1) {
|
|
4177
4153
|
const ret = arg1.value;
|
|
4178
4154
|
const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
|
|
4179
4155
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -4257,48 +4233,48 @@ export function __wbindgen_cb_drop(arg0) {
|
|
|
4257
4233
|
return ret;
|
|
4258
4234
|
};
|
|
4259
4235
|
|
|
4260
|
-
export function
|
|
4261
|
-
const ret =
|
|
4236
|
+
export function __wbindgen_closure_wrapper1182(arg0, arg1, arg2) {
|
|
4237
|
+
const ret = makeClosure(arg0, arg1, 279, __wbg_adapter_64);
|
|
4262
4238
|
return ret;
|
|
4263
4239
|
};
|
|
4264
4240
|
|
|
4265
|
-
export function
|
|
4266
|
-
const ret =
|
|
4241
|
+
export function __wbindgen_closure_wrapper1183(arg0, arg1, arg2) {
|
|
4242
|
+
const ret = makeMutClosure(arg0, arg1, 279, __wbg_adapter_67);
|
|
4267
4243
|
return ret;
|
|
4268
4244
|
};
|
|
4269
4245
|
|
|
4270
|
-
export function
|
|
4271
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4246
|
+
export function __wbindgen_closure_wrapper4448(arg0, arg1, arg2) {
|
|
4247
|
+
const ret = makeMutClosure(arg0, arg1, 1499, __wbg_adapter_70);
|
|
4272
4248
|
return ret;
|
|
4273
4249
|
};
|
|
4274
4250
|
|
|
4275
|
-
export function
|
|
4276
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4251
|
+
export function __wbindgen_closure_wrapper4756(arg0, arg1, arg2) {
|
|
4252
|
+
const ret = makeMutClosure(arg0, arg1, 1640, __wbg_adapter_73);
|
|
4277
4253
|
return ret;
|
|
4278
4254
|
};
|
|
4279
4255
|
|
|
4280
|
-
export function
|
|
4281
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4256
|
+
export function __wbindgen_closure_wrapper4757(arg0, arg1, arg2) {
|
|
4257
|
+
const ret = makeMutClosure(arg0, arg1, 1640, __wbg_adapter_73);
|
|
4282
4258
|
return ret;
|
|
4283
4259
|
};
|
|
4284
4260
|
|
|
4285
|
-
export function
|
|
4286
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4261
|
+
export function __wbindgen_closure_wrapper4758(arg0, arg1, arg2) {
|
|
4262
|
+
const ret = makeMutClosure(arg0, arg1, 1640, __wbg_adapter_73);
|
|
4287
4263
|
return ret;
|
|
4288
4264
|
};
|
|
4289
4265
|
|
|
4290
|
-
export function
|
|
4291
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4266
|
+
export function __wbindgen_closure_wrapper6220(arg0, arg1, arg2) {
|
|
4267
|
+
const ret = makeMutClosure(arg0, arg1, 2158, __wbg_adapter_80);
|
|
4292
4268
|
return ret;
|
|
4293
4269
|
};
|
|
4294
4270
|
|
|
4295
|
-
export function
|
|
4296
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4271
|
+
export function __wbindgen_closure_wrapper6329(arg0, arg1, arg2) {
|
|
4272
|
+
const ret = makeMutClosure(arg0, arg1, 2215, __wbg_adapter_83);
|
|
4297
4273
|
return ret;
|
|
4298
4274
|
};
|
|
4299
4275
|
|
|
4300
|
-
export function
|
|
4301
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4276
|
+
export function __wbindgen_closure_wrapper8094(arg0, arg1, arg2) {
|
|
4277
|
+
const ret = makeMutClosure(arg0, arg1, 2826, __wbg_adapter_86);
|
|
4302
4278
|
return ret;
|
|
4303
4279
|
};
|
|
4304
4280
|
|
package/lumina_node_wasm_bg.wasm
CHANGED
|
Binary file
|