- Browsers — uses native WebTransport.
- Node 18+ — uses the
@fails-components/webtransportpolyfill.
Install
Browser setup
The WASM module loads on demand; just include the JS bundle and the.wasm file via your bundler’s asset pipeline. With Vite / webpack / esbuild
the package’s exports do this transparently.
For raw <script> usage:
BROWSER_JWT is a short-lived (≤ 5 min) token your backend mints from
the service account. Don’t ship the service account itself to the browser.
Node setup
Self-signed dev certificates
If you’re connecting to a dev gateway with a self-signed cert, pass the SHA-256 fingerprint as the fourth constructor arg (base64-encoded):serverCertificateHashes for hosts in their dev
allow-list (localhost, *.localhost). Use a real cert in production.
TypeScript types
The package ships full.d.ts types — no @types/@telequick/sdk required.