@parity/truapi-provider 0.1.1-dev-20260908.3 → 0.1.1-dev-20260908.5
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/README.md
CHANGED
|
@@ -54,11 +54,11 @@ builder.setStorage({
|
|
|
54
54
|
Both are called with a `0x`-prefixed lowercase genesis hash. A client that cannot
|
|
55
55
|
answer must reject rather than resolve `null`, which means "nothing stored yet"
|
|
56
56
|
and would let the next write replace good state. Without a client every chain
|
|
57
|
-
syncs from the chain spec
|
|
57
|
+
syncs from the checkpoint in the chain spec on every run.
|
|
58
58
|
|
|
59
59
|
`setDatabaseContent(genesisHash, blob)` seeds one chain for this run and beats
|
|
60
60
|
anything the client would load for it. `saveDatabase(genesisHash)` forces a write
|
|
61
|
-
at a moment
|
|
61
|
+
at a moment the host chooses.
|
|
62
62
|
|
|
63
63
|
## Native hosts
|
|
64
64
|
|
|
@@ -91,7 +91,7 @@ export class ChainProviderHandle {
|
|
|
91
91
|
*/
|
|
92
92
|
loadDatabase(genesis_hash: string): Promise<boolean>;
|
|
93
93
|
/**
|
|
94
|
-
* Snapshot the finalized state of the chain and write it to
|
|
94
|
+
* Snapshot the finalized state of the chain and write it to storage.
|
|
95
95
|
* Resolves with whether a blob was stored.
|
|
96
96
|
*
|
|
97
97
|
* A chain that has finalized nothing yet is skipped rather than stored,
|
|
@@ -100,7 +100,7 @@ export class ChainProviderHandle {
|
|
|
100
100
|
* alive. Neither `pagehide` nor a hidden tab is guaranteed to stay
|
|
101
101
|
* scheduled long enough to finish one, and a Worker sees neither event.
|
|
102
102
|
*/
|
|
103
|
-
|
|
103
|
+
saveDatabase(genesis_hash: string): Promise<boolean>;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
/**
|
|
@@ -183,7 +183,7 @@ export interface InitOutput {
|
|
|
183
183
|
readonly chainproviderbuilder_setStorage: (a: number, b: number, c: number) => void;
|
|
184
184
|
readonly chainproviderhandle_connect: (a: number, b: number, c: number) => number;
|
|
185
185
|
readonly chainproviderhandle_loadDatabase: (a: number, b: number, c: number) => number;
|
|
186
|
-
readonly
|
|
186
|
+
readonly chainproviderhandle_saveDatabase: (a: number, b: number, c: number) => number;
|
|
187
187
|
readonly connection_close: (a: number) => void;
|
|
188
188
|
readonly connection_nextResponse: (a: number) => number;
|
|
189
189
|
readonly connection_send: (a: number, b: number, c: number) => void;
|
|
@@ -192,12 +192,12 @@ export interface InitOutput {
|
|
|
192
192
|
readonly networkchains_people: (a: number, b: number) => void;
|
|
193
193
|
readonly networkchains_relay: (a: number, b: number) => void;
|
|
194
194
|
readonly setLogLevel: (a: number, b: number) => void;
|
|
195
|
-
readonly
|
|
196
|
-
readonly
|
|
197
|
-
readonly
|
|
198
|
-
readonly
|
|
199
|
-
readonly
|
|
200
|
-
readonly
|
|
195
|
+
readonly __wasm_bindgen_func_elem_19288: (a: number, b: number, c: number, d: number) => void;
|
|
196
|
+
readonly __wasm_bindgen_func_elem_19290: (a: number, b: number, c: number, d: number) => void;
|
|
197
|
+
readonly __wasm_bindgen_func_elem_3807: (a: number, b: number, c: number) => void;
|
|
198
|
+
readonly __wasm_bindgen_func_elem_3807_2: (a: number, b: number, c: number) => void;
|
|
199
|
+
readonly __wasm_bindgen_func_elem_3807_3: (a: number, b: number, c: number) => void;
|
|
200
|
+
readonly __wasm_bindgen_func_elem_7316: (a: number, b: number) => void;
|
|
201
201
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
202
202
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
203
203
|
readonly __wbindgen_export3: (a: number) => void;
|
package/dist/truapi_provider.js
CHANGED
|
@@ -231,7 +231,7 @@ export class ChainProviderHandle {
|
|
|
231
231
|
return takeObject(ret);
|
|
232
232
|
}
|
|
233
233
|
/**
|
|
234
|
-
* Snapshot the finalized state of the chain and write it to
|
|
234
|
+
* Snapshot the finalized state of the chain and write it to storage.
|
|
235
235
|
* Resolves with whether a blob was stored.
|
|
236
236
|
*
|
|
237
237
|
* A chain that has finalized nothing yet is skipped rather than stored,
|
|
@@ -242,10 +242,10 @@ export class ChainProviderHandle {
|
|
|
242
242
|
* @param {string} genesis_hash
|
|
243
243
|
* @returns {Promise<boolean>}
|
|
244
244
|
*/
|
|
245
|
-
|
|
245
|
+
saveDatabase(genesis_hash) {
|
|
246
246
|
const ptr0 = passStringToWasm0(genesis_hash, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
247
247
|
const len0 = WASM_VECTOR_LEN;
|
|
248
|
-
const ret = wasm.
|
|
248
|
+
const ret = wasm.chainproviderhandle_saveDatabase(this.__wbg_ptr, ptr0, len0);
|
|
249
249
|
return takeObject(ret);
|
|
250
250
|
}
|
|
251
251
|
}
|
|
@@ -550,7 +550,7 @@ function __wbg_get_imports() {
|
|
|
550
550
|
const a = state0.a;
|
|
551
551
|
state0.a = 0;
|
|
552
552
|
try {
|
|
553
|
-
return
|
|
553
|
+
return __wasm_bindgen_func_elem_19290(a, state0.b, arg0, arg1);
|
|
554
554
|
} finally {
|
|
555
555
|
state0.a = a;
|
|
556
556
|
}
|
|
@@ -671,28 +671,28 @@ function __wbg_get_imports() {
|
|
|
671
671
|
console.warn(getObject(arg0));
|
|
672
672
|
},
|
|
673
673
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
674
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
675
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
674
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1853, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
675
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_19288);
|
|
676
676
|
return addHeapObject(ret);
|
|
677
677
|
},
|
|
678
678
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
679
679
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 20, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
680
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
680
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3807);
|
|
681
681
|
return addHeapObject(ret);
|
|
682
682
|
},
|
|
683
683
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
684
684
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 20, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
685
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
685
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3807_2);
|
|
686
686
|
return addHeapObject(ret);
|
|
687
687
|
},
|
|
688
688
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
689
689
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 20, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
690
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
690
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3807_3);
|
|
691
691
|
return addHeapObject(ret);
|
|
692
692
|
},
|
|
693
693
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
694
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
695
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
694
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 701, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
695
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_7316);
|
|
696
696
|
return addHeapObject(ret);
|
|
697
697
|
},
|
|
698
698
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
@@ -719,26 +719,26 @@ function __wbg_get_imports() {
|
|
|
719
719
|
};
|
|
720
720
|
}
|
|
721
721
|
|
|
722
|
-
function
|
|
723
|
-
wasm.
|
|
722
|
+
function __wasm_bindgen_func_elem_7316(arg0, arg1) {
|
|
723
|
+
wasm.__wasm_bindgen_func_elem_7316(arg0, arg1);
|
|
724
724
|
}
|
|
725
725
|
|
|
726
|
-
function
|
|
727
|
-
wasm.
|
|
726
|
+
function __wasm_bindgen_func_elem_3807(arg0, arg1, arg2) {
|
|
727
|
+
wasm.__wasm_bindgen_func_elem_3807(arg0, arg1, addHeapObject(arg2));
|
|
728
728
|
}
|
|
729
729
|
|
|
730
|
-
function
|
|
731
|
-
wasm.
|
|
730
|
+
function __wasm_bindgen_func_elem_3807_2(arg0, arg1, arg2) {
|
|
731
|
+
wasm.__wasm_bindgen_func_elem_3807_2(arg0, arg1, addHeapObject(arg2));
|
|
732
732
|
}
|
|
733
733
|
|
|
734
|
-
function
|
|
735
|
-
wasm.
|
|
734
|
+
function __wasm_bindgen_func_elem_3807_3(arg0, arg1, arg2) {
|
|
735
|
+
wasm.__wasm_bindgen_func_elem_3807_3(arg0, arg1, addHeapObject(arg2));
|
|
736
736
|
}
|
|
737
737
|
|
|
738
|
-
function
|
|
738
|
+
function __wasm_bindgen_func_elem_19288(arg0, arg1, arg2) {
|
|
739
739
|
try {
|
|
740
740
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
741
|
-
wasm.
|
|
741
|
+
wasm.__wasm_bindgen_func_elem_19288(retptr, arg0, arg1, addHeapObject(arg2));
|
|
742
742
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
743
743
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
744
744
|
if (r1) {
|
|
@@ -749,8 +749,8 @@ function __wasm_bindgen_func_elem_19274(arg0, arg1, arg2) {
|
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
751
|
|
|
752
|
-
function
|
|
753
|
-
wasm.
|
|
752
|
+
function __wasm_bindgen_func_elem_19290(arg0, arg1, arg2, arg3) {
|
|
753
|
+
wasm.__wasm_bindgen_func_elem_19290(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
754
754
|
}
|
|
755
755
|
|
|
756
756
|
|
|
Binary file
|
|
@@ -14,7 +14,7 @@ export const chainproviderbuilder_setDatabaseContent: (a: number, b: number, c:
|
|
|
14
14
|
export const chainproviderbuilder_setStorage: (a: number, b: number, c: number) => void;
|
|
15
15
|
export const chainproviderhandle_connect: (a: number, b: number, c: number) => number;
|
|
16
16
|
export const chainproviderhandle_loadDatabase: (a: number, b: number, c: number) => number;
|
|
17
|
-
export const
|
|
17
|
+
export const chainproviderhandle_saveDatabase: (a: number, b: number, c: number) => number;
|
|
18
18
|
export const connection_close: (a: number) => void;
|
|
19
19
|
export const connection_nextResponse: (a: number) => number;
|
|
20
20
|
export const connection_send: (a: number, b: number, c: number) => void;
|
|
@@ -23,12 +23,12 @@ export const networkchains_bulletin: (a: number, b: number) => void;
|
|
|
23
23
|
export const networkchains_people: (a: number, b: number) => void;
|
|
24
24
|
export const networkchains_relay: (a: number, b: number) => void;
|
|
25
25
|
export const setLogLevel: (a: number, b: number) => void;
|
|
26
|
-
export const
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
26
|
+
export const __wasm_bindgen_func_elem_19288: (a: number, b: number, c: number, d: number) => void;
|
|
27
|
+
export const __wasm_bindgen_func_elem_19290: (a: number, b: number, c: number, d: number) => void;
|
|
28
|
+
export const __wasm_bindgen_func_elem_3807: (a: number, b: number, c: number) => void;
|
|
29
|
+
export const __wasm_bindgen_func_elem_3807_2: (a: number, b: number, c: number) => void;
|
|
30
|
+
export const __wasm_bindgen_func_elem_3807_3: (a: number, b: number, c: number) => void;
|
|
31
|
+
export const __wasm_bindgen_func_elem_7316: (a: number, b: number) => void;
|
|
32
32
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
33
33
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
34
34
|
export const __wbindgen_export3: (a: number) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parity/truapi-provider",
|
|
3
|
-
"version": "0.1.1-dev-20260908.
|
|
3
|
+
"version": "0.1.1-dev-20260908.5",
|
|
4
4
|
"description": "Network provider backends for the TrUAPI ChainProvider: an embedded smoldot light client and remote WebSocket JSON-RPC nodes, compiled to WebAssembly for browser hosts",
|
|
5
5
|
"license": "MIT AND Apache-2.0",
|
|
6
6
|
"author": "Parity Technologies <admin@parity.io>",
|