@parity/truapi-provider 0.1.1-dev-20260714-4.0 → 0.1.1-dev-20260731.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 +52 -34
- package/dist/truapi_provider.d.ts +15 -6
- package/dist/truapi_provider.js +93 -68
- package/dist/truapi_provider_bg.wasm +0 -0
- package/dist/truapi_provider_bg.wasm.d.ts +7 -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, and its synced state is saved between runs, so the next launch
|
|
13
|
+
resumes where it left off 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,45 @@ import wasmUrl from "@parity/truapi-provider/truapi_provider_bg.wasm?url";
|
|
|
21
29
|
|
|
22
30
|
await init({ module_or_path: wasmUrl });
|
|
23
31
|
|
|
24
|
-
// A bundled network is resolved from the genesis hash alone (relay wiring and
|
|
25
|
-
// statement-store placement come from the catalog); no per-chain registration.
|
|
26
32
|
const provider = new ChainProviderBuilder().build();
|
|
27
|
-
const connection = await provider.connect("0x77af…");
|
|
33
|
+
const connection = await provider.connect("0x77af…"); // genesis hash
|
|
28
34
|
|
|
29
|
-
connection.send(
|
|
30
|
-
'{"jsonrpc":"2.0","id":1,"method":"chainSpec_v1_genesisHash","params":[]}',
|
|
31
|
-
);
|
|
35
|
+
connection.send('{"jsonrpc":"2.0","id":1,"method":"chainSpec_v1_genesisHash","params":[]}');
|
|
32
36
|
const response = await connection.nextResponse(); // undefined once closed
|
|
33
37
|
connection.close();
|
|
34
38
|
```
|
|
35
39
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
#### Android (Kotlin)
|
|
41
|
+
|
|
42
|
+
Native targets deliver responses to a listener instead of a pull loop, and take
|
|
43
|
+
the genesis hash as 32 raw bytes.
|
|
44
|
+
|
|
45
|
+
```kotlin
|
|
46
|
+
val provider = ChainProvider()
|
|
47
|
+
|
|
48
|
+
val connection = provider.connect(genesisHash, object : ChainMessageListener {
|
|
49
|
+
override fun onMessage(message: String) { /* JSON-RPC response */ }
|
|
50
|
+
override fun onClosed() {}
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
connection.send("""{"jsonrpc":"2.0","id":1,"method":"chainSpec_v1_genesisHash","params":[]}""")
|
|
54
|
+
connection.close()
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### iOS (Swift)
|
|
58
|
+
|
|
59
|
+
```swift
|
|
60
|
+
let provider = ChainProvider()
|
|
61
|
+
|
|
62
|
+
final class Responses: ChainMessageListener {
|
|
63
|
+
func onMessage(message: String) { /* JSON-RPC response */ }
|
|
64
|
+
func onClosed() {}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
let connection = try provider.connect(genesisHash: genesis, listener: Responses())
|
|
68
|
+
connection.send(request: #"{"jsonrpc":"2.0","id":1,"method":"chainSpec_v1_genesisHash","params":[]}"#)
|
|
69
|
+
connection.close()
|
|
70
|
+
```
|
|
39
71
|
|
|
40
72
|
## Building
|
|
41
73
|
|
|
@@ -49,20 +81,6 @@ npm run build:wasm # wasm-pack --target web, features "js networks"
|
|
|
49
81
|
for a fast unoptimized build. The repo's `make wasm` target rebuilds this bundle
|
|
50
82
|
alongside the host runtime.
|
|
51
83
|
|
|
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
84
|
## License
|
|
67
85
|
|
|
68
86
|
MIT AND Apache-2.0. See [LICENSE](LICENSE), [LICENSE-APACHE](LICENSE-APACHE), and
|
|
@@ -112,6 +112,14 @@ export class NetworkChains {
|
|
|
112
112
|
readonly relay: string;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
/**
|
|
116
|
+
* Route the embedded provider's (and smoldot's) `tracing` output to the
|
|
117
|
+
* browser console at `level` (`error`|`warn`|`info`|`debug`|`trace`; anything
|
|
118
|
+
* else disables it). Installs the console subscriber on the first call and is
|
|
119
|
+
* safe to call again at any time to retune verbosity.
|
|
120
|
+
*/
|
|
121
|
+
export function setLogLevel(level: string): void;
|
|
122
|
+
|
|
115
123
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
116
124
|
|
|
117
125
|
export interface InitOutput {
|
|
@@ -135,12 +143,13 @@ export interface InitOutput {
|
|
|
135
143
|
readonly networkchains_bulletin: (a: number, b: number) => void;
|
|
136
144
|
readonly networkchains_people: (a: number, b: number) => void;
|
|
137
145
|
readonly networkchains_relay: (a: number, b: number) => void;
|
|
138
|
-
readonly
|
|
139
|
-
readonly
|
|
140
|
-
readonly
|
|
141
|
-
readonly
|
|
142
|
-
readonly
|
|
143
|
-
readonly
|
|
146
|
+
readonly setLogLevel: (a: number, b: number) => void;
|
|
147
|
+
readonly __wasm_bindgen_func_elem_12915: (a: number, b: number, c: number, d: number) => void;
|
|
148
|
+
readonly __wasm_bindgen_func_elem_12917: (a: number, b: number, c: number, d: number) => void;
|
|
149
|
+
readonly __wasm_bindgen_func_elem_3697: (a: number, b: number, c: number) => void;
|
|
150
|
+
readonly __wasm_bindgen_func_elem_3697_2: (a: number, b: number, c: number) => void;
|
|
151
|
+
readonly __wasm_bindgen_func_elem_3697_3: (a: number, b: number, c: number) => void;
|
|
152
|
+
readonly __wasm_bindgen_func_elem_7073: (a: number, b: number) => void;
|
|
144
153
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
145
154
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
146
155
|
readonly __wbindgen_export3: (a: number) => void;
|
package/dist/truapi_provider.js
CHANGED
|
@@ -342,38 +342,51 @@ export class NetworkChains {
|
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
if (Symbol.dispose) NetworkChains.prototype[Symbol.dispose] = NetworkChains.prototype.free;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Route the embedded provider's (and smoldot's) `tracing` output to the
|
|
348
|
+
* browser console at `level` (`error`|`warn`|`info`|`debug`|`trace`; anything
|
|
349
|
+
* else disables it). Installs the console subscriber on the first call and is
|
|
350
|
+
* safe to call again at any time to retune verbosity.
|
|
351
|
+
* @param {string} level
|
|
352
|
+
*/
|
|
353
|
+
export function setLogLevel(level) {
|
|
354
|
+
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
355
|
+
const len0 = WASM_VECTOR_LEN;
|
|
356
|
+
wasm.setLogLevel(ptr0, len0);
|
|
357
|
+
}
|
|
345
358
|
function __wbg_get_imports() {
|
|
346
359
|
const import0 = {
|
|
347
360
|
__proto__: null,
|
|
348
|
-
|
|
361
|
+
__wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
|
|
349
362
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
350
363
|
return addHeapObject(ret);
|
|
351
364
|
},
|
|
352
|
-
|
|
365
|
+
__wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
|
|
353
366
|
const ret = debugString(getObject(arg1));
|
|
354
367
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
355
368
|
const len1 = WASM_VECTOR_LEN;
|
|
356
369
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
357
370
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
358
371
|
},
|
|
359
|
-
|
|
372
|
+
__wbg___wbindgen_is_function_1ff95bcc5517c252: function(arg0) {
|
|
360
373
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
361
374
|
return ret;
|
|
362
375
|
},
|
|
363
|
-
|
|
376
|
+
__wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
|
|
364
377
|
const val = getObject(arg0);
|
|
365
378
|
const ret = typeof(val) === 'object' && val !== null;
|
|
366
379
|
return ret;
|
|
367
380
|
},
|
|
368
|
-
|
|
381
|
+
__wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
|
|
369
382
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
370
383
|
return ret;
|
|
371
384
|
},
|
|
372
|
-
|
|
385
|
+
__wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
|
|
373
386
|
const ret = getObject(arg0) === undefined;
|
|
374
387
|
return ret;
|
|
375
388
|
},
|
|
376
|
-
|
|
389
|
+
__wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
|
|
377
390
|
const obj = getObject(arg1);
|
|
378
391
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
379
392
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -381,24 +394,24 @@ function __wbg_get_imports() {
|
|
|
381
394
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
382
395
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
383
396
|
},
|
|
384
|
-
|
|
397
|
+
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
385
398
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
386
399
|
},
|
|
387
|
-
|
|
400
|
+
__wbg__wbg_cb_unref_fffb441def202758: function(arg0) {
|
|
388
401
|
getObject(arg0)._wbg_cb_unref();
|
|
389
402
|
},
|
|
390
|
-
|
|
403
|
+
__wbg_call_a6e5c5dce5018821: function() { return handleError(function (arg0, arg1, arg2) {
|
|
391
404
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
392
405
|
return addHeapObject(ret);
|
|
393
406
|
}, arguments); },
|
|
394
|
-
|
|
407
|
+
__wbg_clearTimeout_3629d6209dfcc46e: function(arg0) {
|
|
395
408
|
const ret = clearTimeout(takeObject(arg0));
|
|
396
409
|
return addHeapObject(ret);
|
|
397
410
|
},
|
|
398
|
-
|
|
411
|
+
__wbg_close_c65ca0257e895318: function() { return handleError(function (arg0) {
|
|
399
412
|
getObject(arg0).close();
|
|
400
413
|
}, arguments); },
|
|
401
|
-
|
|
414
|
+
__wbg_code_1fc52b4142a112ac: function(arg0) {
|
|
402
415
|
const ret = getObject(arg0).code;
|
|
403
416
|
return ret;
|
|
404
417
|
},
|
|
@@ -410,14 +423,23 @@ function __wbg_get_imports() {
|
|
|
410
423
|
const ret = getObject(arg0).crypto;
|
|
411
424
|
return addHeapObject(ret);
|
|
412
425
|
},
|
|
413
|
-
|
|
426
|
+
__wbg_data_328de4280640da92: function(arg0) {
|
|
414
427
|
const ret = getObject(arg0).data;
|
|
415
428
|
return addHeapObject(ret);
|
|
416
429
|
},
|
|
430
|
+
__wbg_debug_87fd9b1a625b7efb: function(arg0) {
|
|
431
|
+
console.debug(getObject(arg0));
|
|
432
|
+
},
|
|
433
|
+
__wbg_error_744744ff0c9861e6: function(arg0) {
|
|
434
|
+
console.error(getObject(arg0));
|
|
435
|
+
},
|
|
417
436
|
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
418
437
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
419
438
|
}, arguments); },
|
|
420
|
-
|
|
439
|
+
__wbg_info_eadbe775a8e2e9eb: function(arg0) {
|
|
440
|
+
console.info(getObject(arg0));
|
|
441
|
+
},
|
|
442
|
+
__wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
|
|
421
443
|
let result;
|
|
422
444
|
try {
|
|
423
445
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -427,7 +449,7 @@ function __wbg_get_imports() {
|
|
|
427
449
|
const ret = result;
|
|
428
450
|
return ret;
|
|
429
451
|
},
|
|
430
|
-
|
|
452
|
+
__wbg_length_1f0964f4a5e2c6d8: function(arg0) {
|
|
431
453
|
const ret = getObject(arg0).length;
|
|
432
454
|
return ret;
|
|
433
455
|
},
|
|
@@ -435,22 +457,22 @@ function __wbg_get_imports() {
|
|
|
435
457
|
const ret = getObject(arg0).msCrypto;
|
|
436
458
|
return addHeapObject(ret);
|
|
437
459
|
},
|
|
438
|
-
|
|
439
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
440
|
-
return addHeapObject(ret);
|
|
441
|
-
},
|
|
442
|
-
__wbg_new_b1280f836646084c: function() { return handleError(function (arg0, arg1) {
|
|
460
|
+
__wbg_new_bf8729ffe10e9ee7: function() { return handleError(function (arg0, arg1) {
|
|
443
461
|
const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
|
|
444
462
|
return addHeapObject(ret);
|
|
445
463
|
}, arguments); },
|
|
446
|
-
|
|
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) {
|
|
447
469
|
try {
|
|
448
470
|
var state0 = {a: arg0, b: arg1};
|
|
449
471
|
var cb0 = (arg0, arg1) => {
|
|
450
472
|
const a = state0.a;
|
|
451
473
|
state0.a = 0;
|
|
452
474
|
try {
|
|
453
|
-
return
|
|
475
|
+
return __wasm_bindgen_func_elem_12917(a, state0.b, arg0, arg1);
|
|
454
476
|
} finally {
|
|
455
477
|
state0.a = a;
|
|
456
478
|
}
|
|
@@ -461,7 +483,7 @@ function __wbg_get_imports() {
|
|
|
461
483
|
state0.a = 0;
|
|
462
484
|
}
|
|
463
485
|
},
|
|
464
|
-
|
|
486
|
+
__wbg_new_with_length_e6785c33c8e4cce8: function(arg0) {
|
|
465
487
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
466
488
|
return addHeapObject(ret);
|
|
467
489
|
},
|
|
@@ -469,7 +491,7 @@ function __wbg_get_imports() {
|
|
|
469
491
|
const ret = getObject(arg0).node;
|
|
470
492
|
return addHeapObject(ret);
|
|
471
493
|
},
|
|
472
|
-
|
|
494
|
+
__wbg_now_86c0d4ba3fa605b8: function() {
|
|
473
495
|
const ret = Date.now();
|
|
474
496
|
return ret;
|
|
475
497
|
},
|
|
@@ -485,20 +507,20 @@ function __wbg_get_imports() {
|
|
|
485
507
|
const ret = getObject(arg0).process;
|
|
486
508
|
return addHeapObject(ret);
|
|
487
509
|
},
|
|
488
|
-
|
|
510
|
+
__wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
|
|
489
511
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
490
512
|
},
|
|
491
|
-
|
|
513
|
+
__wbg_queueMicrotask_0ab5b2d2393e99b9: function(arg0) {
|
|
492
514
|
const ret = getObject(arg0).queueMicrotask;
|
|
493
515
|
return addHeapObject(ret);
|
|
494
516
|
},
|
|
495
|
-
|
|
517
|
+
__wbg_queueMicrotask_6a09b7bc46549209: function(arg0) {
|
|
496
518
|
queueMicrotask(getObject(arg0));
|
|
497
519
|
},
|
|
498
520
|
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
499
521
|
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
500
522
|
}, arguments); },
|
|
501
|
-
|
|
523
|
+
__wbg_readyState_50bc38c2a9e83db6: function(arg0) {
|
|
502
524
|
const ret = getObject(arg0).readyState;
|
|
503
525
|
return ret;
|
|
504
526
|
},
|
|
@@ -506,56 +528,56 @@ function __wbg_get_imports() {
|
|
|
506
528
|
const ret = module.require;
|
|
507
529
|
return addHeapObject(ret);
|
|
508
530
|
}, arguments); },
|
|
509
|
-
|
|
531
|
+
__wbg_resolve_2191a4dfe481c25b: function(arg0) {
|
|
510
532
|
const ret = Promise.resolve(getObject(arg0));
|
|
511
533
|
return addHeapObject(ret);
|
|
512
534
|
},
|
|
513
|
-
|
|
535
|
+
__wbg_send_a321b376d40ec867: function() { return handleError(function (arg0, arg1, arg2) {
|
|
514
536
|
getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
|
|
515
537
|
}, arguments); },
|
|
516
|
-
|
|
538
|
+
__wbg_send_df98dd5ede9b3f4d: function() { return handleError(function (arg0, arg1, arg2) {
|
|
517
539
|
getObject(arg0).send(getStringFromWasm0(arg1, arg2));
|
|
518
540
|
}, arguments); },
|
|
519
|
-
|
|
541
|
+
__wbg_setTimeout_56bcdccbad22fd44: function() { return handleError(function (arg0, arg1) {
|
|
520
542
|
const ret = setTimeout(getObject(arg0), arg1);
|
|
521
543
|
return addHeapObject(ret);
|
|
522
544
|
}, arguments); },
|
|
523
|
-
|
|
545
|
+
__wbg_set_binaryType_a37b086c78ca7c29: function(arg0, arg1) {
|
|
524
546
|
getObject(arg0).binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
525
547
|
},
|
|
526
|
-
|
|
548
|
+
__wbg_set_onclose_f706475385ecce07: function(arg0, arg1) {
|
|
527
549
|
getObject(arg0).onclose = getObject(arg1);
|
|
528
550
|
},
|
|
529
|
-
|
|
551
|
+
__wbg_set_onerror_9f5773fd31512333: function(arg0, arg1) {
|
|
530
552
|
getObject(arg0).onerror = getObject(arg1);
|
|
531
553
|
},
|
|
532
|
-
|
|
554
|
+
__wbg_set_onmessage_836d2f72130b4706: function(arg0, arg1) {
|
|
533
555
|
getObject(arg0).onmessage = getObject(arg1);
|
|
534
556
|
},
|
|
535
|
-
|
|
557
|
+
__wbg_set_onopen_4f65470ae522a61a: function(arg0, arg1) {
|
|
536
558
|
getObject(arg0).onopen = getObject(arg1);
|
|
537
559
|
},
|
|
538
|
-
|
|
539
|
-
const ret = typeof
|
|
560
|
+
__wbg_static_accessor_GLOBAL_4ef717fb391d88b7: function() {
|
|
561
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
540
562
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
541
563
|
},
|
|
542
|
-
|
|
543
|
-
const ret = typeof
|
|
564
|
+
__wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4: function() {
|
|
565
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
544
566
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
545
567
|
},
|
|
546
|
-
|
|
568
|
+
__wbg_static_accessor_SELF_146583524fe1469b: function() {
|
|
547
569
|
const ret = typeof self === 'undefined' ? null : self;
|
|
548
570
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
549
571
|
},
|
|
550
|
-
|
|
572
|
+
__wbg_static_accessor_WINDOW_f2829a2234d7819e: function() {
|
|
551
573
|
const ret = typeof window === 'undefined' ? null : window;
|
|
552
574
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
553
575
|
},
|
|
554
|
-
|
|
576
|
+
__wbg_subarray_3ed232c8a6baee09: function(arg0, arg1, arg2) {
|
|
555
577
|
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
556
578
|
return addHeapObject(ret);
|
|
557
579
|
},
|
|
558
|
-
|
|
580
|
+
__wbg_then_6ec10ae38b3e92f7: function(arg0, arg1) {
|
|
559
581
|
const ret = getObject(arg0).then(getObject(arg1));
|
|
560
582
|
return addHeapObject(ret);
|
|
561
583
|
},
|
|
@@ -563,29 +585,32 @@ function __wbg_get_imports() {
|
|
|
563
585
|
const ret = getObject(arg0).versions;
|
|
564
586
|
return addHeapObject(ret);
|
|
565
587
|
},
|
|
588
|
+
__wbg_warn_b1370d804fa3e259: function(arg0) {
|
|
589
|
+
console.warn(getObject(arg0));
|
|
590
|
+
},
|
|
566
591
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
567
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
568
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
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, __wasm_bindgen_func_elem_12915);
|
|
569
594
|
return addHeapObject(ret);
|
|
570
595
|
},
|
|
571
596
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
572
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx:
|
|
573
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
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, __wasm_bindgen_func_elem_3697);
|
|
574
599
|
return addHeapObject(ret);
|
|
575
600
|
},
|
|
576
601
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
577
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx:
|
|
578
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
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, __wasm_bindgen_func_elem_3697_2);
|
|
579
604
|
return addHeapObject(ret);
|
|
580
605
|
},
|
|
581
606
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
582
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx:
|
|
583
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
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, __wasm_bindgen_func_elem_3697_3);
|
|
584
609
|
return addHeapObject(ret);
|
|
585
610
|
},
|
|
586
611
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
587
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
588
|
-
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_7073);
|
|
589
614
|
return addHeapObject(ret);
|
|
590
615
|
},
|
|
591
616
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
@@ -612,26 +637,26 @@ function __wbg_get_imports() {
|
|
|
612
637
|
};
|
|
613
638
|
}
|
|
614
639
|
|
|
615
|
-
function
|
|
616
|
-
wasm.
|
|
640
|
+
function __wasm_bindgen_func_elem_7073(arg0, arg1) {
|
|
641
|
+
wasm.__wasm_bindgen_func_elem_7073(arg0, arg1);
|
|
617
642
|
}
|
|
618
643
|
|
|
619
|
-
function
|
|
620
|
-
wasm.
|
|
644
|
+
function __wasm_bindgen_func_elem_3697(arg0, arg1, arg2) {
|
|
645
|
+
wasm.__wasm_bindgen_func_elem_3697(arg0, arg1, addHeapObject(arg2));
|
|
621
646
|
}
|
|
622
647
|
|
|
623
|
-
function
|
|
624
|
-
wasm.
|
|
648
|
+
function __wasm_bindgen_func_elem_3697_2(arg0, arg1, arg2) {
|
|
649
|
+
wasm.__wasm_bindgen_func_elem_3697_2(arg0, arg1, addHeapObject(arg2));
|
|
625
650
|
}
|
|
626
651
|
|
|
627
|
-
function
|
|
628
|
-
wasm.
|
|
652
|
+
function __wasm_bindgen_func_elem_3697_3(arg0, arg1, arg2) {
|
|
653
|
+
wasm.__wasm_bindgen_func_elem_3697_3(arg0, arg1, addHeapObject(arg2));
|
|
629
654
|
}
|
|
630
655
|
|
|
631
|
-
function
|
|
656
|
+
function __wasm_bindgen_func_elem_12915(arg0, arg1, arg2) {
|
|
632
657
|
try {
|
|
633
658
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
634
|
-
wasm.
|
|
659
|
+
wasm.__wasm_bindgen_func_elem_12915(retptr, arg0, arg1, addHeapObject(arg2));
|
|
635
660
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
636
661
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
637
662
|
if (r1) {
|
|
@@ -642,8 +667,8 @@ function __wasm_bindgen_func_elem_12601(arg0, arg1, arg2) {
|
|
|
642
667
|
}
|
|
643
668
|
}
|
|
644
669
|
|
|
645
|
-
function
|
|
646
|
-
wasm.
|
|
670
|
+
function __wasm_bindgen_func_elem_12917(arg0, arg1, arg2, arg3) {
|
|
671
|
+
wasm.__wasm_bindgen_func_elem_12917(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
647
672
|
}
|
|
648
673
|
|
|
649
674
|
|
|
Binary file
|
|
@@ -20,12 +20,13 @@ export const networkchains_assethub: (a: number, b: number) => void;
|
|
|
20
20
|
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
|
-
export const
|
|
24
|
-
export const
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
23
|
+
export const setLogLevel: (a: number, b: number) => void;
|
|
24
|
+
export const __wasm_bindgen_func_elem_12915: (a: number, b: number, c: number, d: number) => void;
|
|
25
|
+
export const __wasm_bindgen_func_elem_12917: (a: number, b: number, c: number, d: number) => void;
|
|
26
|
+
export const __wasm_bindgen_func_elem_3697: (a: number, b: number, c: number) => void;
|
|
27
|
+
export const __wasm_bindgen_func_elem_3697_2: (a: number, b: number, c: number) => void;
|
|
28
|
+
export const __wasm_bindgen_func_elem_3697_3: (a: number, b: number, c: number) => void;
|
|
29
|
+
export const __wasm_bindgen_func_elem_7073: (a: number, b: number) => void;
|
|
29
30
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
30
31
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
31
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-20260731.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>",
|