Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@parity/truapi-provider

Latest version: v0.6.1-dev-20261125.0

Overview

Last scanned
25 Nov 2026
Published
25 Nov 2026
npm package Publisher: dvdplm, jacogr, kianenigma, mcornholio, nachopalparity, parity-jacogr, paritytech, paritytech-ci, pepo, stefan-sopic, vincecorsica, wirednkod
14 Stars
7 Forks
31 Versions
3.6K Downloads
Swift Repo language

Scan summary

@parity/truapi-provider was last scanned on 25 Nov 2026 at version 0.6.1-dev-20261125.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 31 versions; the latest 5 were published within 6 days (20–25 Nov 2026).
  • Findings: 1 rule fired in version 0.6.1-dev-20261125.0 (1 low). The score describes this version only.
  • Downloads: 3,573 downloads.

Versions

31 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.6.1-dev-20261125.0 LATEST 25 Nov 2026 1 rule fired
0.6.0 24 Nov 2026 1 rule fired
0.5.2-dev-20261123.0 23 Nov 2026 1 rule fired
0.5.2-dev-20261121.0 21 Nov 2026 Not shown
0.5.2-dev-20261120.0 20 Nov 2026 Not shown

Rules fired in 0.6.1-dev-20261125.0: 1

Findings

1 Low

Findings for v0.6.1-dev-20261125.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

WebAssembly module included

The package includes a WebAssembly (.wasm) module. It cannot be reviewed as source, but it runs sandboxed inside the JavaScript runtime and can access only what the host code gives it. WebAssembly is common in parsers, codecs and cryptography libraries. Shown for awareness.

LOW
Checking access…

🔒 Create a free account to see all 1 finding with descriptions and instance counts

The score describes 0.6.1-dev-20261125.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@parity/truapi-provider

Network transport for the TrUAPI ChainProvider contract: an embedded smoldot light client, or a remote WebSocket JSON-RPC node, behind one API. This package is the WebAssembly build, for browser and desktop (webview) hosts.

You connect to a chain by its genesis hash. A provider built for a Trinity stack (setStack) runs the chains of the stack's descriptor from the light specs you fetched for it. Without a stack, the bundled catalog provides the spec and relay wiring of paseo-next-v2 and previewnet. One light client is shared across all connections, and its synced state is kept between launches, so a launch resumes from finalized state instead of syncing from scratch. It holds at most 32 of them at once and rejects a connect past that, so a client that leaks connections fails instead of growing; closing one hands its slot back. Connections to a remote node you registered with addRpcChain are not counted against it. A provider with an addRpcChain registration connects only to chains registered on it. The catalog does not resolve any other genesis hash for it, so a host on remote nodes never starts the light client by accident.

Usage

Web (JavaScript)

The published package is wasm-bindgen glue plus a .wasm binary. Instantiate the module once per page or worker.

import init, { ChainProviderBuilder } from "@parity/truapi-provider";
import wasmUrl from "@parity/truapi-provider/truapi_provider_bg.wasm?url";

await init({ module_or_path: wasmUrl });

const builder = new ChainProviderBuilder();
const chains = builder.addNetwork("paseo-next-v2");

const provider = builder.build();
const connection = await provider.connect(chains.relay);

connection.send(
  '{"jsonrpc":"2.0","id":1,"method":"chainSpec_v1_genesisHash","params":[]}',
);
const response = await connection.nextResponse(); // undefined once closed
connection.close();

To run a Trinity stack, give the builder the stack's link and its descriptor as served, the same pair the host gives the core. The builder then lists where each chain's light spec is published:

const builder = new ChainProviderBuilder();
builder.setStack(link, descriptorBytes);
for (const { genesisHash, url } of builder.lightSpecs()) {
  const response = await fetch(url);
  if (!response.ok) continue; // the chain stays unknown; add its spec later
  builder.addLightSpec(genesisHash, new Uint8Array(await response.arrayBuffer()));
}
const provider = builder.build();
  • setStack throws when the link is malformed or the descriptor is refused under it. A link with a key accepts only a descriptor signed with that key. See LightStack::open for which copy of the descriptor to pass.
  • addLightSpec throws when the bytes differ from the descriptor's sha256 or imply another genesis hash, and names the chain's role. Pass the bytes as served, because the digest covers them. A wrong spec is what a stale descriptor looks like after a wipe, so fetch the descriptor again before refusing the stack.
  • A chain is unknown to the provider until its spec is added, and a parachain also until the relay's is; connect rejects for it meanwhile, and the chains that have what they need run. provider.addLightSpec(genesisHash, bytes) supplies a spec later.
  • The descriptor decides the relay every other chain syncs through, and which chains run the statement-store protocol. The bundled catalog is not used.
  • Build one provider per stack, and a new one when the stack's generation changes. The light client keys a chain by its genesis hash, which a fork shares with its source. Before building the new one, close every connection of the previous provider and call its free(). Until then its snapshots are stored under the same stack and genesis hash and replace the new provider's state.

Warm start is opt-in, because this package stores nothing itself. Hand setStorage a client to storage you already own:

builder.setStorage({
  async load(genesisHash, stack) {
    return (await myStore.get(key(genesisHash, stack))) ?? null;
  },
  async save(genesisHash, blob, stack) {
    await myStore.put(key(genesisHash, stack), blob);
  },
});

function key(genesisHash, stack) {
  return stack === undefined ? genesisHash : `${stack}:${genesisHash}`;
}

Both are called with a 0x-prefixed lowercase genesis hash. stack identifies the stack given to setStack, as stackId(decodeLink(link)) from @parity/trinity-stack gives it: its key in hex when the link has one, otherwise its normalised descriptor URL. It is undefined on a provider without a stack. Key the store on stack and genesis hash, and return a blob unchanged. A stack's provider starts each blob with a line naming the stack and its generation, and reads back only its own, so a fork never resumes from its source's state and a wiped stack starts fresh. A store keyed on the genesis hash alone is not safe to share between two stacks all the same: each provider replaces the other's blob on every save, so on the next launch only the one that saved last resumes and the other starts cold. A stack's provider and a provider without one sharing such a store do the same. A client that cannot answer must reject rather than resolve null, which means "nothing stored yet" and would let the next write replace good state. Without a client every chain syncs from the checkpoint in the chain spec on every run.

The provider never deletes a blob, and one can reach 8 MB. A blob of an older generation under a genesis hash the stack still has is replaced by the next save. Anything else no provider reads again stays until you delete it: the blobs of a stack you no longer run, those of a genesis hash the stack's lightSpecs() no longer lists, and, once every provider you build has a stack, those stored with stack undefined.

setDatabaseContent(genesisHash, blob) seeds one chain for this run and beats anything the client would load for it. saveDatabase(genesisHash) forces a write at a moment the host chooses.

The light client dials peers over wss://, and over plain ws:// to localhost and to other hosts. A page whose browser blocks some of those can turn them off:

builder.setConnectionTypes({ unsecure: false }); // mixed content on an https page

A light-client connection holds its requests until the chain first syncs, then sends them in order. Chain-spec queries, statement-store and Bitswap calls are answered at once. To show sync progress, watch the chain once something is connected to it:

const watch = provider.lifecycle(chains.relay);
for (let state; (state = await watch.next()); ) {
  // state.phase: { kind: "connecting" } | { kind: "syncing", at, target } | { kind: "ready" }
  // state.peers: connected peer count
  // state.health: { kind: "ok" } | { kind: "stalled", reason: "noPeers" | "noProgress" }
}

The first next() resolves with the current state, and each later one with the next change. It resolves undefined after watch.close() or once nothing holds the chain. A parachain goes from connecting straight to ready, so watch its relay for warp sync progress. lifecycle throws for a chain nothing is connected to.

Native hosts

Android and iOS do not consume this package. The same truapi-provider crate is published for them as its own artifacts over UniFFI — a TrUAPIProvider Swift package and a truapi-provider-android AAR — exposing the same ChainProvider contract with the same bundled catalog, so the wiring differs only in language.

Building

The dist/ bundle is generated and gitignored. Rebuild it from the Rust crate:

npm run build           # wasm-pack --target web, features "js networks"

wasm-pack is required (cargo install wasm-pack). Set TRUAPI_WASM_PROFILE=dev for a fast unoptimized build. The repo's make wasm target rebuilds this bundle alongside the host runtime.

License

MIT AND Apache-2.0. See LICENSE, LICENSE-APACHE, and NOTICE.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @parity/truapi-provider

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229