@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 CHANGED
@@ -1,19 +1,27 @@
1
1
  # @parity/truapi-provider
2
2
 
3
- Network provider backends for the TrUAPI `ChainProvider` contract, compiled to
4
- WebAssembly for browser hosts. It embeds a [smoldot](https://github.com/smol-dot/smoldot)
5
- light client and a remote WebSocket JSON-RPC backend behind one API, and bundles
6
- the chain-spec catalog so a host can `connect(genesisHash)` without shipping its
7
- own specs.
8
-
9
- It is the browser counterpart to the native (iOS/Android) provider that the same
10
- crate exposes over UniFFI, so chain access behaves identically across hosts.
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
- The bundle is `wasm-bindgen` glue plus a `.wasm` binary. Instantiate the module
15
- once per page/worker, then open a connection per genesis hash. Connections share
16
- the single embedded light client.
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
- Add a remote node instead of the light client with
37
- `builder.addRpcChain(genesisHash, "wss://node.example")`, or a light client for
38
- an unbundled chain with `builder.addLightChain(genesisHash, specification)`.
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 __wasm_bindgen_func_elem_12601: (a: number, b: number, c: number, d: number) => void;
139
- readonly __wasm_bindgen_func_elem_12603: (a: number, b: number, c: number, d: number) => void;
140
- readonly __wasm_bindgen_func_elem_3625: (a: number, b: number, c: number) => void;
141
- readonly __wasm_bindgen_func_elem_3625_2: (a: number, b: number, c: number) => void;
142
- readonly __wasm_bindgen_func_elem_3625_3: (a: number, b: number, c: number) => void;
143
- readonly __wasm_bindgen_func_elem_6911: (a: number, b: number) => void;
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;
@@ -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
- __wbg_Error_bce6d499ff0a4aff: function(arg0, arg1) {
361
+ __wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
349
362
  const ret = Error(getStringFromWasm0(arg0, arg1));
350
363
  return addHeapObject(ret);
351
364
  },
352
- __wbg___wbindgen_debug_string_edece8177ad01481: function(arg0, arg1) {
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
- __wbg___wbindgen_is_function_5cd60d5cf78b4eef: function(arg0) {
372
+ __wbg___wbindgen_is_function_1ff95bcc5517c252: function(arg0) {
360
373
  const ret = typeof(getObject(arg0)) === 'function';
361
374
  return ret;
362
375
  },
363
- __wbg___wbindgen_is_object_b4593df85baada48: function(arg0) {
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
- __wbg___wbindgen_is_string_dde0fd9020db4434: function(arg0) {
381
+ __wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
369
382
  const ret = typeof(getObject(arg0)) === 'string';
370
383
  return ret;
371
384
  },
372
- __wbg___wbindgen_is_undefined_35bb9f4c7fd651d5: function(arg0) {
385
+ __wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
373
386
  const ret = getObject(arg0) === undefined;
374
387
  return ret;
375
388
  },
376
- __wbg___wbindgen_string_get_d109740c0d18f4d7: function(arg0, arg1) {
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
- __wbg___wbindgen_throw_9c31b086c2b26051: function(arg0, arg1) {
397
+ __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
385
398
  throw new Error(getStringFromWasm0(arg0, arg1));
386
399
  },
387
- __wbg__wbg_cb_unref_3fa391f3fcdb55f8: function(arg0) {
400
+ __wbg__wbg_cb_unref_fffb441def202758: function(arg0) {
388
401
  getObject(arg0)._wbg_cb_unref();
389
402
  },
390
- __wbg_call_dfde26266607c996: function() { return handleError(function (arg0, arg1, arg2) {
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
- __wbg_clearTimeout_01406e55473040f6: function(arg0) {
407
+ __wbg_clearTimeout_3629d6209dfcc46e: function(arg0) {
395
408
  const ret = clearTimeout(takeObject(arg0));
396
409
  return addHeapObject(ret);
397
410
  },
398
- __wbg_close_e323e9eee669c291: function() { return handleError(function (arg0) {
411
+ __wbg_close_c65ca0257e895318: function() { return handleError(function (arg0) {
399
412
  getObject(arg0).close();
400
413
  }, arguments); },
401
- __wbg_code_98ceeaa5ff83fb0b: function(arg0) {
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
- __wbg_data_5fc79a19e47d1531: function(arg0) {
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
- __wbg_instanceof_ArrayBuffer_53db37b06f6b9afe: function(arg0) {
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
- __wbg_length_56fcd3e2b7e0299d: function(arg0) {
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
- __wbg_new_7ddec6de44ff8f5d: function(arg0) {
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
- __wbg_new_typed_c072c4ce9a2a0cdf: function(arg0, arg1) {
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 __wasm_bindgen_func_elem_12603(a, state0.b, arg0, arg1);
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
- __wbg_new_with_length_99887c91eae4abab: function(arg0) {
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
- __wbg_now_81363d44c96dd239: function() {
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
- __wbg_prototypesetcall_5f9bdc8d75e07276: function(arg0, arg1, arg2) {
510
+ __wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
489
511
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
490
512
  },
491
- __wbg_queueMicrotask_78d584b53af520f5: function(arg0) {
513
+ __wbg_queueMicrotask_0ab5b2d2393e99b9: function(arg0) {
492
514
  const ret = getObject(arg0).queueMicrotask;
493
515
  return addHeapObject(ret);
494
516
  },
495
- __wbg_queueMicrotask_b39ea83c7f01971a: function(arg0) {
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
- __wbg_readyState_a1a00cc8898812ac: function(arg0) {
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
- __wbg_resolve_d17db9352f5a220e: function(arg0) {
531
+ __wbg_resolve_2191a4dfe481c25b: function(arg0) {
510
532
  const ret = Promise.resolve(getObject(arg0));
511
533
  return addHeapObject(ret);
512
534
  },
513
- __wbg_send_b9d998a91cbc8429: function() { return handleError(function (arg0, arg1, arg2) {
535
+ __wbg_send_a321b376d40ec867: function() { return handleError(function (arg0, arg1, arg2) {
514
536
  getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
515
537
  }, arguments); },
516
- __wbg_send_e1d2f71ce4473d1e: function() { return handleError(function (arg0, arg1, arg2) {
538
+ __wbg_send_df98dd5ede9b3f4d: function() { return handleError(function (arg0, arg1, arg2) {
517
539
  getObject(arg0).send(getStringFromWasm0(arg1, arg2));
518
540
  }, arguments); },
519
- __wbg_setTimeout_613a21b62dc655a1: function() { return handleError(function (arg0, arg1) {
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
- __wbg_set_binaryType_5c0002dfcf194934: function(arg0, arg1) {
545
+ __wbg_set_binaryType_a37b086c78ca7c29: function(arg0, arg1) {
524
546
  getObject(arg0).binaryType = __wbindgen_enum_BinaryType[arg1];
525
547
  },
526
- __wbg_set_onclose_3121e15055418a37: function(arg0, arg1) {
548
+ __wbg_set_onclose_f706475385ecce07: function(arg0, arg1) {
527
549
  getObject(arg0).onclose = getObject(arg1);
528
550
  },
529
- __wbg_set_onerror_1dd52df6279c8dd2: function(arg0, arg1) {
551
+ __wbg_set_onerror_9f5773fd31512333: function(arg0, arg1) {
530
552
  getObject(arg0).onerror = getObject(arg1);
531
553
  },
532
- __wbg_set_onmessage_9eb2cf76e70783ad: function(arg0, arg1) {
554
+ __wbg_set_onmessage_836d2f72130b4706: function(arg0, arg1) {
533
555
  getObject(arg0).onmessage = getObject(arg1);
534
556
  },
535
- __wbg_set_onopen_6f3fc5e2ad3144f1: function(arg0, arg1) {
557
+ __wbg_set_onopen_4f65470ae522a61a: function(arg0, arg1) {
536
558
  getObject(arg0).onopen = getObject(arg1);
537
559
  },
538
- __wbg_static_accessor_GLOBAL_THIS_02344c9b09eb08a9: function() {
539
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
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
- __wbg_static_accessor_GLOBAL_ac6d4ac874d5cd54: function() {
543
- const ret = typeof global === 'undefined' ? null : global;
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
- __wbg_static_accessor_SELF_9b2406c23aeb2023: function() {
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
- __wbg_static_accessor_WINDOW_b34d2126934e16ba: function() {
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
- __wbg_subarray_7c6a0da8f3b4a1ba: function(arg0, arg1, arg2) {
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
- __wbg_then_837494e384b37459: function(arg0, arg1) {
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: 921, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
568
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_12601);
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: 18, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
573
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3625);
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: 18, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
578
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3625_2);
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: 18, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
583
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3625_3);
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: 632, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
588
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_6911);
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 __wasm_bindgen_func_elem_6911(arg0, arg1) {
616
- wasm.__wasm_bindgen_func_elem_6911(arg0, arg1);
640
+ function __wasm_bindgen_func_elem_7073(arg0, arg1) {
641
+ wasm.__wasm_bindgen_func_elem_7073(arg0, arg1);
617
642
  }
618
643
 
619
- function __wasm_bindgen_func_elem_3625(arg0, arg1, arg2) {
620
- wasm.__wasm_bindgen_func_elem_3625(arg0, arg1, addHeapObject(arg2));
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 __wasm_bindgen_func_elem_3625_2(arg0, arg1, arg2) {
624
- wasm.__wasm_bindgen_func_elem_3625_2(arg0, arg1, addHeapObject(arg2));
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 __wasm_bindgen_func_elem_3625_3(arg0, arg1, arg2) {
628
- wasm.__wasm_bindgen_func_elem_3625_3(arg0, arg1, addHeapObject(arg2));
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 __wasm_bindgen_func_elem_12601(arg0, arg1, arg2) {
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.__wasm_bindgen_func_elem_12601(retptr, arg0, arg1, addHeapObject(arg2));
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 __wasm_bindgen_func_elem_12603(arg0, arg1, arg2, arg3) {
646
- wasm.__wasm_bindgen_func_elem_12603(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
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 __wasm_bindgen_func_elem_12601: (a: number, b: number, c: number, d: number) => void;
24
- export const __wasm_bindgen_func_elem_12603: (a: number, b: number, c: number, d: number) => void;
25
- export const __wasm_bindgen_func_elem_3625: (a: number, b: number, c: number) => void;
26
- export const __wasm_bindgen_func_elem_3625_2: (a: number, b: number, c: number) => void;
27
- export const __wasm_bindgen_func_elem_3625_3: (a: number, b: number, c: number) => void;
28
- export const __wasm_bindgen_func_elem_6911: (a: number, b: number) => void;
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-20260714-4.0",
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>",