@parity/truapi-provider 0.1.1-dev-20260911.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -9,7 +9,10 @@ You connect to a network by its genesis hash, and everything else is handled for
|
|
|
9
9
|
you: the bundled catalog provides the spec and relay wiring, so clients never
|
|
10
10
|
ship or refresh specs of their own. One light client is shared across all
|
|
11
11
|
connections, and its synced state is kept between launches, so a launch resumes
|
|
12
|
-
from finalized state instead of syncing from scratch.
|
|
12
|
+
from finalized state instead of syncing from scratch. It holds at most 32 of them
|
|
13
|
+
at once and rejects a `connect` past that, so a client that leaks connections
|
|
14
|
+
fails instead of growing; closing one hands its slot back. Connections to a
|
|
15
|
+
remote node you registered with `addRpcChain` are not counted against it.
|
|
13
16
|
|
|
14
17
|
## Usage
|
|
15
18
|
|
|
@@ -78,7 +78,8 @@ export class ChainProviderHandle {
|
|
|
78
78
|
[Symbol.dispose](): void;
|
|
79
79
|
/**
|
|
80
80
|
* Open a connection to the chain identified by the `0x`-prefixed genesis
|
|
81
|
-
* hash. Rejects when the chain is not registered
|
|
81
|
+
* hash. Rejects when the chain is not registered, the transport fails, or
|
|
82
|
+
* the light client already holds as many connections as it allows.
|
|
82
83
|
*/
|
|
83
84
|
connect(genesis_hash: string): Promise<Connection>;
|
|
84
85
|
/**
|
|
@@ -192,12 +193,12 @@ export interface InitOutput {
|
|
|
192
193
|
readonly networkchains_people: (a: number, b: number) => void;
|
|
193
194
|
readonly networkchains_relay: (a: number, b: number) => void;
|
|
194
195
|
readonly setLogLevel: (a: number, b: number) => void;
|
|
195
|
-
readonly
|
|
196
|
-
readonly
|
|
197
|
-
readonly
|
|
198
|
-
readonly
|
|
199
|
-
readonly
|
|
200
|
-
readonly
|
|
196
|
+
readonly __wasm_bindgen_func_elem_20031: (a: number, b: number, c: number, d: number) => void;
|
|
197
|
+
readonly __wasm_bindgen_func_elem_20033: (a: number, b: number, c: number, d: number) => void;
|
|
198
|
+
readonly __wasm_bindgen_func_elem_3926: (a: number, b: number, c: number) => void;
|
|
199
|
+
readonly __wasm_bindgen_func_elem_3926_2: (a: number, b: number, c: number) => void;
|
|
200
|
+
readonly __wasm_bindgen_func_elem_3926_3: (a: number, b: number, c: number) => void;
|
|
201
|
+
readonly __wasm_bindgen_func_elem_7481: (a: number, b: number) => void;
|
|
201
202
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
202
203
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
203
204
|
readonly __wbindgen_export3: (a: number) => void;
|
package/dist/truapi_provider.js
CHANGED
|
@@ -204,7 +204,8 @@ export class ChainProviderHandle {
|
|
|
204
204
|
}
|
|
205
205
|
/**
|
|
206
206
|
* Open a connection to the chain identified by the `0x`-prefixed genesis
|
|
207
|
-
* hash. Rejects when the chain is not registered
|
|
207
|
+
* hash. Rejects when the chain is not registered, the transport fails, or
|
|
208
|
+
* the light client already holds as many connections as it allows.
|
|
208
209
|
* @param {string} genesis_hash
|
|
209
210
|
* @returns {Promise<Connection>}
|
|
210
211
|
*/
|
|
@@ -550,7 +551,7 @@ function __wbg_get_imports() {
|
|
|
550
551
|
const a = state0.a;
|
|
551
552
|
state0.a = 0;
|
|
552
553
|
try {
|
|
553
|
-
return
|
|
554
|
+
return __wasm_bindgen_func_elem_20033(a, state0.b, arg0, arg1);
|
|
554
555
|
} finally {
|
|
555
556
|
state0.a = a;
|
|
556
557
|
}
|
|
@@ -671,28 +672,28 @@ function __wbg_get_imports() {
|
|
|
671
672
|
console.warn(getObject(arg0));
|
|
672
673
|
},
|
|
673
674
|
__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,
|
|
675
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1864, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
676
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_20031);
|
|
676
677
|
return addHeapObject(ret);
|
|
677
678
|
},
|
|
678
679
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
679
680
|
// 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,
|
|
681
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3926);
|
|
681
682
|
return addHeapObject(ret);
|
|
682
683
|
},
|
|
683
684
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
684
685
|
// 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,
|
|
686
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3926_2);
|
|
686
687
|
return addHeapObject(ret);
|
|
687
688
|
},
|
|
688
689
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
689
690
|
// 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,
|
|
691
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3926_3);
|
|
691
692
|
return addHeapObject(ret);
|
|
692
693
|
},
|
|
693
694
|
__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,
|
|
695
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 714, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
696
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_7481);
|
|
696
697
|
return addHeapObject(ret);
|
|
697
698
|
},
|
|
698
699
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
@@ -719,26 +720,26 @@ function __wbg_get_imports() {
|
|
|
719
720
|
};
|
|
720
721
|
}
|
|
721
722
|
|
|
722
|
-
function
|
|
723
|
-
wasm.
|
|
723
|
+
function __wasm_bindgen_func_elem_7481(arg0, arg1) {
|
|
724
|
+
wasm.__wasm_bindgen_func_elem_7481(arg0, arg1);
|
|
724
725
|
}
|
|
725
726
|
|
|
726
|
-
function
|
|
727
|
-
wasm.
|
|
727
|
+
function __wasm_bindgen_func_elem_3926(arg0, arg1, arg2) {
|
|
728
|
+
wasm.__wasm_bindgen_func_elem_3926(arg0, arg1, addHeapObject(arg2));
|
|
728
729
|
}
|
|
729
730
|
|
|
730
|
-
function
|
|
731
|
-
wasm.
|
|
731
|
+
function __wasm_bindgen_func_elem_3926_2(arg0, arg1, arg2) {
|
|
732
|
+
wasm.__wasm_bindgen_func_elem_3926_2(arg0, arg1, addHeapObject(arg2));
|
|
732
733
|
}
|
|
733
734
|
|
|
734
|
-
function
|
|
735
|
-
wasm.
|
|
735
|
+
function __wasm_bindgen_func_elem_3926_3(arg0, arg1, arg2) {
|
|
736
|
+
wasm.__wasm_bindgen_func_elem_3926_3(arg0, arg1, addHeapObject(arg2));
|
|
736
737
|
}
|
|
737
738
|
|
|
738
|
-
function
|
|
739
|
+
function __wasm_bindgen_func_elem_20031(arg0, arg1, arg2) {
|
|
739
740
|
try {
|
|
740
741
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
741
|
-
wasm.
|
|
742
|
+
wasm.__wasm_bindgen_func_elem_20031(retptr, arg0, arg1, addHeapObject(arg2));
|
|
742
743
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
743
744
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
744
745
|
if (r1) {
|
|
@@ -749,8 +750,8 @@ function __wasm_bindgen_func_elem_19842(arg0, arg1, arg2) {
|
|
|
749
750
|
}
|
|
750
751
|
}
|
|
751
752
|
|
|
752
|
-
function
|
|
753
|
-
wasm.
|
|
753
|
+
function __wasm_bindgen_func_elem_20033(arg0, arg1, arg2, arg3) {
|
|
754
|
+
wasm.__wasm_bindgen_func_elem_20033(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
754
755
|
}
|
|
755
756
|
|
|
756
757
|
|
|
Binary file
|
|
@@ -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_20031: (a: number, b: number, c: number, d: number) => void;
|
|
27
|
+
export const __wasm_bindgen_func_elem_20033: (a: number, b: number, c: number, d: number) => void;
|
|
28
|
+
export const __wasm_bindgen_func_elem_3926: (a: number, b: number, c: number) => void;
|
|
29
|
+
export const __wasm_bindgen_func_elem_3926_2: (a: number, b: number, c: number) => void;
|
|
30
|
+
export const __wasm_bindgen_func_elem_3926_3: (a: number, b: number, c: number) => void;
|
|
31
|
+
export const __wasm_bindgen_func_elem_7481: (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.
|
|
3
|
+
"version": "0.2.1",
|
|
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>",
|