@parity/truapi-provider 0.1.1-dev-20260714-4.0 → 0.1.1-dev-20260715.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.
@@ -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_12941: (a: number, b: number, c: number, d: number) => void;
148
+ readonly __wasm_bindgen_func_elem_12943: (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_7062: (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,6 +342,19 @@ 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,
@@ -414,9 +427,18 @@ function __wbg_get_imports() {
414
427
  const ret = getObject(arg0).data;
415
428
  return addHeapObject(ret);
416
429
  },
430
+ __wbg_debug_83758bc0b77ada71: function(arg0) {
431
+ console.debug(getObject(arg0));
432
+ },
433
+ __wbg_error_f085d7e62279b703: 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); },
439
+ __wbg_info_d2226ca1698bd09c: function(arg0) {
440
+ console.info(getObject(arg0));
441
+ },
420
442
  __wbg_instanceof_ArrayBuffer_53db37b06f6b9afe: function(arg0) {
421
443
  let result;
422
444
  try {
@@ -450,7 +472,7 @@ function __wbg_get_imports() {
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_12943(a, state0.b, arg0, arg1);
454
476
  } finally {
455
477
  state0.a = a;
456
478
  }
@@ -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_c4e0780980765a86: 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_12941);
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: 676, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
613
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_7062);
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_7062(arg0, arg1) {
641
+ wasm.__wasm_bindgen_func_elem_7062(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_12941(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_12941(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_12943(arg0, arg1, arg2, arg3) {
671
+ wasm.__wasm_bindgen_func_elem_12943(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_12941: (a: number, b: number, c: number, d: number) => void;
25
+ export const __wasm_bindgen_func_elem_12943: (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_7062: (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-20260715.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>",