@parity/truapi-provider 0.1.1-dev-20260715.0 → 0.1.1-dev-20260806.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/README.md +67 -35
- package/dist/truapi_provider.d.ts +6 -6
- package/dist/truapi_provider.js +68 -68
- package/dist/truapi_provider_bg.wasm +0 -0
- package/dist/truapi_provider_bg.wasm.d.ts +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
# @parity/truapi-provider
|
|
2
2
|
|
|
3
|
-
Network
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
Network transport for the TrUAPI `ChainProvider` contract: an embedded
|
|
4
|
+
[smoldot](https://github.com/smol-dot/smoldot) light client, or a remote
|
|
5
|
+
WebSocket JSON-RPC node, behind one API. This is the WebAssembly build, for
|
|
6
|
+
browser and desktop (webview) hosts. Android and iOS hosts use the same Rust
|
|
7
|
+
crate natively over UniFFI, so network access works the same everywhere.
|
|
8
|
+
|
|
9
|
+
You connect to a network by its genesis hash, and everything else is handled for
|
|
10
|
+
you: the bundled catalog provides the spec and relay wiring, so clients never
|
|
11
|
+
ship or refresh specs of their own. One light client is shared across all
|
|
12
|
+
connections. Its synced state can be captured and restored, so a launch resumes
|
|
13
|
+
from finalized state instead of syncing from scratch.
|
|
11
14
|
|
|
12
15
|
## Usage
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
Build a provider, connect to a network by its genesis hash, and exchange JSON-RPC
|
|
18
|
+
request and response strings over the connection. Every connection shares the one
|
|
19
|
+
embedded light client.
|
|
20
|
+
|
|
21
|
+
#### Web (JavaScript)
|
|
22
|
+
|
|
23
|
+
The published package is `wasm-bindgen` glue plus a `.wasm` binary. Instantiate
|
|
24
|
+
the module once per page or worker.
|
|
17
25
|
|
|
18
26
|
```js
|
|
19
27
|
import init, { ChainProviderBuilder } from "@parity/truapi-provider";
|
|
@@ -21,21 +29,59 @@ import wasmUrl from "@parity/truapi-provider/truapi_provider_bg.wasm?url";
|
|
|
21
29
|
|
|
22
30
|
await init({ module_or_path: wasmUrl });
|
|
23
31
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
const genesis = "0x77af…";
|
|
33
|
+
const builder = new ChainProviderBuilder();
|
|
34
|
+
|
|
35
|
+
// Resume from the state saved by the previous run, when there is one.
|
|
36
|
+
const saved = localStorage.getItem(`chain-db:${genesis}`);
|
|
37
|
+
if (saved) builder.setDatabase(genesis, saved);
|
|
38
|
+
|
|
39
|
+
const provider = builder.build();
|
|
40
|
+
const connection = await provider.connect(genesis);
|
|
28
41
|
|
|
29
|
-
connection.send(
|
|
30
|
-
'{"jsonrpc":"2.0","id":1,"method":"chainSpec_v1_genesisHash","params":[]}',
|
|
31
|
-
);
|
|
42
|
+
connection.send('{"jsonrpc":"2.0","id":1,"method":"chainSpec_v1_genesisHash","params":[]}');
|
|
32
43
|
const response = await connection.nextResponse(); // undefined once closed
|
|
33
44
|
connection.close();
|
|
45
|
+
|
|
46
|
+
// Later, once the light client has synced, save state for the next launch.
|
|
47
|
+
localStorage.setItem(`chain-db:${genesis}`, await provider.snapshot(genesis));
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Warm start is yours to drive: call `snapshot()` once the light client has synced,
|
|
51
|
+
persist the string wherever you like, and hand it back through `setDatabase()`
|
|
52
|
+
before `build()` on the next launch.
|
|
53
|
+
|
|
54
|
+
#### Android (Kotlin)
|
|
55
|
+
|
|
56
|
+
Native targets deliver responses to a listener instead of a pull loop, and take
|
|
57
|
+
the genesis hash as 32 raw bytes.
|
|
58
|
+
|
|
59
|
+
```kotlin
|
|
60
|
+
val provider = ChainProvider()
|
|
61
|
+
|
|
62
|
+
val connection = provider.connect(genesisHash, object : ChainMessageListener {
|
|
63
|
+
override fun onMessage(message: String) { /* JSON-RPC response */ }
|
|
64
|
+
override fun onClosed() {}
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
connection.send("""{"jsonrpc":"2.0","id":1,"method":"chainSpec_v1_genesisHash","params":[]}""")
|
|
68
|
+
connection.close()
|
|
34
69
|
```
|
|
35
70
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
71
|
+
#### iOS (Swift)
|
|
72
|
+
|
|
73
|
+
```swift
|
|
74
|
+
let provider = ChainProvider()
|
|
75
|
+
|
|
76
|
+
final class Responses: ChainMessageListener {
|
|
77
|
+
func onMessage(message: String) { /* JSON-RPC response */ }
|
|
78
|
+
func onClosed() {}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
let connection = try provider.connect(genesisHash: genesis, listener: Responses())
|
|
82
|
+
connection.send(request: #"{"jsonrpc":"2.0","id":1,"method":"chainSpec_v1_genesisHash","params":[]}"#)
|
|
83
|
+
connection.close()
|
|
84
|
+
```
|
|
39
85
|
|
|
40
86
|
## Building
|
|
41
87
|
|
|
@@ -49,20 +95,6 @@ npm run build:wasm # wasm-pack --target web, features "js networks"
|
|
|
49
95
|
for a fast unoptimized build. The repo's `make wasm` target rebuilds this bundle
|
|
50
96
|
alongside the host runtime.
|
|
51
97
|
|
|
52
|
-
## Publishing
|
|
53
|
-
|
|
54
|
-
Publishing goes through `paritytech/npm_publish_automation`, so no local npm
|
|
55
|
-
token is needed:
|
|
56
|
-
|
|
57
|
-
- **Stable release** — a `release:`-prefixed commit on `main` triggers
|
|
58
|
-
[`release.yml`](../../../.github/workflows/release.yml), which publishes the
|
|
59
|
-
committed version to `latest`.
|
|
60
|
-
- **Dev snapshot** — run the [`Dev publish`](../../../.github/workflows/dev-publish.yml)
|
|
61
|
-
workflow (`workflow_dispatch`, optional `npm_tag_suffix`). It stamps a unique
|
|
62
|
-
`<next-patch>-dev-<YYYYMMDD>[-suffix].<N>` version and publishes it under a
|
|
63
|
-
`dev-<YYYYMMDD>[-suffix]` dist-tag, so `latest` is never moved. Consumers pin
|
|
64
|
-
the exact version it prints.
|
|
65
|
-
|
|
66
98
|
## License
|
|
67
99
|
|
|
68
100
|
MIT AND Apache-2.0. See [LICENSE](LICENSE), [LICENSE-APACHE](LICENSE-APACHE), and
|
|
@@ -144,12 +144,12 @@ export interface InitOutput {
|
|
|
144
144
|
readonly networkchains_people: (a: number, b: number) => void;
|
|
145
145
|
readonly networkchains_relay: (a: number, b: number) => void;
|
|
146
146
|
readonly setLogLevel: (a: number, b: number) => void;
|
|
147
|
-
readonly
|
|
148
|
-
readonly
|
|
149
|
-
readonly
|
|
150
|
-
readonly
|
|
151
|
-
readonly
|
|
152
|
-
readonly
|
|
147
|
+
readonly __wasm_bindgen_func_elem_12921: (a: number, b: number, c: number, d: number) => void;
|
|
148
|
+
readonly __wasm_bindgen_func_elem_12923: (a: number, b: number, c: number, d: number) => void;
|
|
149
|
+
readonly __wasm_bindgen_func_elem_3701: (a: number, b: number, c: number) => void;
|
|
150
|
+
readonly __wasm_bindgen_func_elem_3701_2: (a: number, b: number, c: number) => void;
|
|
151
|
+
readonly __wasm_bindgen_func_elem_3701_3: (a: number, b: number, c: number) => void;
|
|
152
|
+
readonly __wasm_bindgen_func_elem_7079: (a: number, b: number) => void;
|
|
153
153
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
154
154
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
155
155
|
readonly __wbindgen_export3: (a: number) => void;
|
package/dist/truapi_provider.js
CHANGED
|
@@ -358,35 +358,35 @@ export function setLogLevel(level) {
|
|
|
358
358
|
function __wbg_get_imports() {
|
|
359
359
|
const import0 = {
|
|
360
360
|
__proto__: null,
|
|
361
|
-
|
|
361
|
+
__wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
|
|
362
362
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
363
363
|
return addHeapObject(ret);
|
|
364
364
|
},
|
|
365
|
-
|
|
365
|
+
__wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
|
|
366
366
|
const ret = debugString(getObject(arg1));
|
|
367
367
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
368
368
|
const len1 = WASM_VECTOR_LEN;
|
|
369
369
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
370
370
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
371
371
|
},
|
|
372
|
-
|
|
372
|
+
__wbg___wbindgen_is_function_1ff95bcc5517c252: function(arg0) {
|
|
373
373
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
374
374
|
return ret;
|
|
375
375
|
},
|
|
376
|
-
|
|
376
|
+
__wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
|
|
377
377
|
const val = getObject(arg0);
|
|
378
378
|
const ret = typeof(val) === 'object' && val !== null;
|
|
379
379
|
return ret;
|
|
380
380
|
},
|
|
381
|
-
|
|
381
|
+
__wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
|
|
382
382
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
383
383
|
return ret;
|
|
384
384
|
},
|
|
385
|
-
|
|
385
|
+
__wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
|
|
386
386
|
const ret = getObject(arg0) === undefined;
|
|
387
387
|
return ret;
|
|
388
388
|
},
|
|
389
|
-
|
|
389
|
+
__wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
|
|
390
390
|
const obj = getObject(arg1);
|
|
391
391
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
392
392
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -394,24 +394,24 @@ function __wbg_get_imports() {
|
|
|
394
394
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
395
395
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
396
396
|
},
|
|
397
|
-
|
|
397
|
+
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
398
398
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
399
399
|
},
|
|
400
|
-
|
|
400
|
+
__wbg__wbg_cb_unref_fffb441def202758: function(arg0) {
|
|
401
401
|
getObject(arg0)._wbg_cb_unref();
|
|
402
402
|
},
|
|
403
|
-
|
|
403
|
+
__wbg_call_a6e5c5dce5018821: function() { return handleError(function (arg0, arg1, arg2) {
|
|
404
404
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
405
405
|
return addHeapObject(ret);
|
|
406
406
|
}, arguments); },
|
|
407
|
-
|
|
407
|
+
__wbg_clearTimeout_3629d6209dfcc46e: function(arg0) {
|
|
408
408
|
const ret = clearTimeout(takeObject(arg0));
|
|
409
409
|
return addHeapObject(ret);
|
|
410
410
|
},
|
|
411
|
-
|
|
411
|
+
__wbg_close_c65ca0257e895318: function() { return handleError(function (arg0) {
|
|
412
412
|
getObject(arg0).close();
|
|
413
413
|
}, arguments); },
|
|
414
|
-
|
|
414
|
+
__wbg_code_1fc52b4142a112ac: function(arg0) {
|
|
415
415
|
const ret = getObject(arg0).code;
|
|
416
416
|
return ret;
|
|
417
417
|
},
|
|
@@ -423,23 +423,23 @@ function __wbg_get_imports() {
|
|
|
423
423
|
const ret = getObject(arg0).crypto;
|
|
424
424
|
return addHeapObject(ret);
|
|
425
425
|
},
|
|
426
|
-
|
|
426
|
+
__wbg_data_328de4280640da92: function(arg0) {
|
|
427
427
|
const ret = getObject(arg0).data;
|
|
428
428
|
return addHeapObject(ret);
|
|
429
429
|
},
|
|
430
|
-
|
|
430
|
+
__wbg_debug_87fd9b1a625b7efb: function(arg0) {
|
|
431
431
|
console.debug(getObject(arg0));
|
|
432
432
|
},
|
|
433
|
-
|
|
433
|
+
__wbg_error_744744ff0c9861e6: function(arg0) {
|
|
434
434
|
console.error(getObject(arg0));
|
|
435
435
|
},
|
|
436
436
|
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
437
437
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
438
438
|
}, arguments); },
|
|
439
|
-
|
|
439
|
+
__wbg_info_eadbe775a8e2e9eb: function(arg0) {
|
|
440
440
|
console.info(getObject(arg0));
|
|
441
441
|
},
|
|
442
|
-
|
|
442
|
+
__wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
|
|
443
443
|
let result;
|
|
444
444
|
try {
|
|
445
445
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -449,7 +449,7 @@ function __wbg_get_imports() {
|
|
|
449
449
|
const ret = result;
|
|
450
450
|
return ret;
|
|
451
451
|
},
|
|
452
|
-
|
|
452
|
+
__wbg_length_1f0964f4a5e2c6d8: function(arg0) {
|
|
453
453
|
const ret = getObject(arg0).length;
|
|
454
454
|
return ret;
|
|
455
455
|
},
|
|
@@ -457,22 +457,22 @@ function __wbg_get_imports() {
|
|
|
457
457
|
const ret = getObject(arg0).msCrypto;
|
|
458
458
|
return addHeapObject(ret);
|
|
459
459
|
},
|
|
460
|
-
|
|
461
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
462
|
-
return addHeapObject(ret);
|
|
463
|
-
},
|
|
464
|
-
__wbg_new_b1280f836646084c: function() { return handleError(function (arg0, arg1) {
|
|
460
|
+
__wbg_new_bf8729ffe10e9ee7: function() { return handleError(function (arg0, arg1) {
|
|
465
461
|
const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
|
|
466
462
|
return addHeapObject(ret);
|
|
467
463
|
}, arguments); },
|
|
468
|
-
|
|
464
|
+
__wbg_new_cd45aabdf6073e84: function(arg0) {
|
|
465
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
466
|
+
return addHeapObject(ret);
|
|
467
|
+
},
|
|
468
|
+
__wbg_new_typed_1824d93f294193e5: function(arg0, arg1) {
|
|
469
469
|
try {
|
|
470
470
|
var state0 = {a: arg0, b: arg1};
|
|
471
471
|
var cb0 = (arg0, arg1) => {
|
|
472
472
|
const a = state0.a;
|
|
473
473
|
state0.a = 0;
|
|
474
474
|
try {
|
|
475
|
-
return
|
|
475
|
+
return __wasm_bindgen_func_elem_12923(a, state0.b, arg0, arg1);
|
|
476
476
|
} finally {
|
|
477
477
|
state0.a = a;
|
|
478
478
|
}
|
|
@@ -483,7 +483,7 @@ function __wbg_get_imports() {
|
|
|
483
483
|
state0.a = 0;
|
|
484
484
|
}
|
|
485
485
|
},
|
|
486
|
-
|
|
486
|
+
__wbg_new_with_length_e6785c33c8e4cce8: function(arg0) {
|
|
487
487
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
488
488
|
return addHeapObject(ret);
|
|
489
489
|
},
|
|
@@ -491,7 +491,7 @@ function __wbg_get_imports() {
|
|
|
491
491
|
const ret = getObject(arg0).node;
|
|
492
492
|
return addHeapObject(ret);
|
|
493
493
|
},
|
|
494
|
-
|
|
494
|
+
__wbg_now_86c0d4ba3fa605b8: function() {
|
|
495
495
|
const ret = Date.now();
|
|
496
496
|
return ret;
|
|
497
497
|
},
|
|
@@ -507,20 +507,20 @@ function __wbg_get_imports() {
|
|
|
507
507
|
const ret = getObject(arg0).process;
|
|
508
508
|
return addHeapObject(ret);
|
|
509
509
|
},
|
|
510
|
-
|
|
510
|
+
__wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
|
|
511
511
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
512
512
|
},
|
|
513
|
-
|
|
513
|
+
__wbg_queueMicrotask_0ab5b2d2393e99b9: function(arg0) {
|
|
514
514
|
const ret = getObject(arg0).queueMicrotask;
|
|
515
515
|
return addHeapObject(ret);
|
|
516
516
|
},
|
|
517
|
-
|
|
517
|
+
__wbg_queueMicrotask_6a09b7bc46549209: function(arg0) {
|
|
518
518
|
queueMicrotask(getObject(arg0));
|
|
519
519
|
},
|
|
520
520
|
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
521
521
|
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
522
522
|
}, arguments); },
|
|
523
|
-
|
|
523
|
+
__wbg_readyState_50bc38c2a9e83db6: function(arg0) {
|
|
524
524
|
const ret = getObject(arg0).readyState;
|
|
525
525
|
return ret;
|
|
526
526
|
},
|
|
@@ -528,56 +528,56 @@ function __wbg_get_imports() {
|
|
|
528
528
|
const ret = module.require;
|
|
529
529
|
return addHeapObject(ret);
|
|
530
530
|
}, arguments); },
|
|
531
|
-
|
|
531
|
+
__wbg_resolve_2191a4dfe481c25b: function(arg0) {
|
|
532
532
|
const ret = Promise.resolve(getObject(arg0));
|
|
533
533
|
return addHeapObject(ret);
|
|
534
534
|
},
|
|
535
|
-
|
|
535
|
+
__wbg_send_a321b376d40ec867: function() { return handleError(function (arg0, arg1, arg2) {
|
|
536
536
|
getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
|
|
537
537
|
}, arguments); },
|
|
538
|
-
|
|
538
|
+
__wbg_send_df98dd5ede9b3f4d: function() { return handleError(function (arg0, arg1, arg2) {
|
|
539
539
|
getObject(arg0).send(getStringFromWasm0(arg1, arg2));
|
|
540
540
|
}, arguments); },
|
|
541
|
-
|
|
541
|
+
__wbg_setTimeout_56bcdccbad22fd44: function() { return handleError(function (arg0, arg1) {
|
|
542
542
|
const ret = setTimeout(getObject(arg0), arg1);
|
|
543
543
|
return addHeapObject(ret);
|
|
544
544
|
}, arguments); },
|
|
545
|
-
|
|
545
|
+
__wbg_set_binaryType_a37b086c78ca7c29: function(arg0, arg1) {
|
|
546
546
|
getObject(arg0).binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
547
547
|
},
|
|
548
|
-
|
|
548
|
+
__wbg_set_onclose_f706475385ecce07: function(arg0, arg1) {
|
|
549
549
|
getObject(arg0).onclose = getObject(arg1);
|
|
550
550
|
},
|
|
551
|
-
|
|
551
|
+
__wbg_set_onerror_9f5773fd31512333: function(arg0, arg1) {
|
|
552
552
|
getObject(arg0).onerror = getObject(arg1);
|
|
553
553
|
},
|
|
554
|
-
|
|
554
|
+
__wbg_set_onmessage_836d2f72130b4706: function(arg0, arg1) {
|
|
555
555
|
getObject(arg0).onmessage = getObject(arg1);
|
|
556
556
|
},
|
|
557
|
-
|
|
557
|
+
__wbg_set_onopen_4f65470ae522a61a: function(arg0, arg1) {
|
|
558
558
|
getObject(arg0).onopen = getObject(arg1);
|
|
559
559
|
},
|
|
560
|
-
|
|
561
|
-
const ret = typeof
|
|
560
|
+
__wbg_static_accessor_GLOBAL_4ef717fb391d88b7: function() {
|
|
561
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
562
562
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
563
563
|
},
|
|
564
|
-
|
|
565
|
-
const ret = typeof
|
|
564
|
+
__wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4: function() {
|
|
565
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
566
566
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
567
567
|
},
|
|
568
|
-
|
|
568
|
+
__wbg_static_accessor_SELF_146583524fe1469b: function() {
|
|
569
569
|
const ret = typeof self === 'undefined' ? null : self;
|
|
570
570
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
571
571
|
},
|
|
572
|
-
|
|
572
|
+
__wbg_static_accessor_WINDOW_f2829a2234d7819e: function() {
|
|
573
573
|
const ret = typeof window === 'undefined' ? null : window;
|
|
574
574
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
575
575
|
},
|
|
576
|
-
|
|
576
|
+
__wbg_subarray_3ed232c8a6baee09: function(arg0, arg1, arg2) {
|
|
577
577
|
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
578
578
|
return addHeapObject(ret);
|
|
579
579
|
},
|
|
580
|
-
|
|
580
|
+
__wbg_then_6ec10ae38b3e92f7: function(arg0, arg1) {
|
|
581
581
|
const ret = getObject(arg0).then(getObject(arg1));
|
|
582
582
|
return addHeapObject(ret);
|
|
583
583
|
},
|
|
@@ -585,32 +585,32 @@ function __wbg_get_imports() {
|
|
|
585
585
|
const ret = getObject(arg0).versions;
|
|
586
586
|
return addHeapObject(ret);
|
|
587
587
|
},
|
|
588
|
-
|
|
588
|
+
__wbg_warn_b1370d804fa3e259: function(arg0) {
|
|
589
589
|
console.warn(getObject(arg0));
|
|
590
590
|
},
|
|
591
591
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
592
592
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 979, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
593
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
593
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_12921);
|
|
594
594
|
return addHeapObject(ret);
|
|
595
595
|
},
|
|
596
596
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
597
597
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 20, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
598
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
598
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3701);
|
|
599
599
|
return addHeapObject(ret);
|
|
600
600
|
},
|
|
601
601
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
602
602
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 20, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
603
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
603
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3701_2);
|
|
604
604
|
return addHeapObject(ret);
|
|
605
605
|
},
|
|
606
606
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
607
607
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 20, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
608
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
608
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3701_3);
|
|
609
609
|
return addHeapObject(ret);
|
|
610
610
|
},
|
|
611
611
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
612
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
613
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
612
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 672, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
613
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_7079);
|
|
614
614
|
return addHeapObject(ret);
|
|
615
615
|
},
|
|
616
616
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
@@ -637,26 +637,26 @@ function __wbg_get_imports() {
|
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
639
|
|
|
640
|
-
function
|
|
641
|
-
wasm.
|
|
640
|
+
function __wasm_bindgen_func_elem_7079(arg0, arg1) {
|
|
641
|
+
wasm.__wasm_bindgen_func_elem_7079(arg0, arg1);
|
|
642
642
|
}
|
|
643
643
|
|
|
644
|
-
function
|
|
645
|
-
wasm.
|
|
644
|
+
function __wasm_bindgen_func_elem_3701(arg0, arg1, arg2) {
|
|
645
|
+
wasm.__wasm_bindgen_func_elem_3701(arg0, arg1, addHeapObject(arg2));
|
|
646
646
|
}
|
|
647
647
|
|
|
648
|
-
function
|
|
649
|
-
wasm.
|
|
648
|
+
function __wasm_bindgen_func_elem_3701_2(arg0, arg1, arg2) {
|
|
649
|
+
wasm.__wasm_bindgen_func_elem_3701_2(arg0, arg1, addHeapObject(arg2));
|
|
650
650
|
}
|
|
651
651
|
|
|
652
|
-
function
|
|
653
|
-
wasm.
|
|
652
|
+
function __wasm_bindgen_func_elem_3701_3(arg0, arg1, arg2) {
|
|
653
|
+
wasm.__wasm_bindgen_func_elem_3701_3(arg0, arg1, addHeapObject(arg2));
|
|
654
654
|
}
|
|
655
655
|
|
|
656
|
-
function
|
|
656
|
+
function __wasm_bindgen_func_elem_12921(arg0, arg1, arg2) {
|
|
657
657
|
try {
|
|
658
658
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
659
|
-
wasm.
|
|
659
|
+
wasm.__wasm_bindgen_func_elem_12921(retptr, arg0, arg1, addHeapObject(arg2));
|
|
660
660
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
661
661
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
662
662
|
if (r1) {
|
|
@@ -667,8 +667,8 @@ function __wasm_bindgen_func_elem_12941(arg0, arg1, arg2) {
|
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
669
|
|
|
670
|
-
function
|
|
671
|
-
wasm.
|
|
670
|
+
function __wasm_bindgen_func_elem_12923(arg0, arg1, arg2, arg3) {
|
|
671
|
+
wasm.__wasm_bindgen_func_elem_12923(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
672
672
|
}
|
|
673
673
|
|
|
674
674
|
|
|
Binary file
|
|
@@ -21,12 +21,12 @@ export const networkchains_bulletin: (a: number, b: number) => void;
|
|
|
21
21
|
export const networkchains_people: (a: number, b: number) => void;
|
|
22
22
|
export const networkchains_relay: (a: number, b: number) => void;
|
|
23
23
|
export const setLogLevel: (a: number, b: number) => void;
|
|
24
|
-
export const
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
24
|
+
export const __wasm_bindgen_func_elem_12921: (a: number, b: number, c: number, d: number) => void;
|
|
25
|
+
export const __wasm_bindgen_func_elem_12923: (a: number, b: number, c: number, d: number) => void;
|
|
26
|
+
export const __wasm_bindgen_func_elem_3701: (a: number, b: number, c: number) => void;
|
|
27
|
+
export const __wasm_bindgen_func_elem_3701_2: (a: number, b: number, c: number) => void;
|
|
28
|
+
export const __wasm_bindgen_func_elem_3701_3: (a: number, b: number, c: number) => void;
|
|
29
|
+
export const __wasm_bindgen_func_elem_7079: (a: number, b: number) => void;
|
|
30
30
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
31
31
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
32
32
|
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-
|
|
3
|
+
"version": "0.1.1-dev-20260806.0",
|
|
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>",
|