npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@idrto/idr_browser_sdk

v1.0.0

Published

idr.to browser SDK — WebRTC access to on-prem target agents

Downloads

154

Readme

@idrto/idr_browser_sdk

Browser SDK for idr.to — WebRTC access to on-prem target agents (Ollama, HTTP services, etc.).

ISVs hardcode service at dev time; end-users enter target host only. Auth, billing, and platform URLs are built into the SDK.

Install

npm install @idrto/idr_browser_sdk

Quick start (ISV)

<input id="host" placeholder="edge-gpu-1.your-entity.idr" />
<div id="auth"></div>
<button id="go">Connect</button>
<script type="module">
  import { IdrClient, mountAuthPanel } from "@idrto/idr_browser_sdk";

  const client = IdrClient.forService("ollama");
  mountAuthPanel(document.getElementById("auth"), { client });

  document.getElementById("go").onclick = async () => {
    await client.ensureSession({ interactive: true, mount: document.getElementById("auth") });
    await client.connect({ host: document.getElementById("host").value.trim() });
    const tags = await (await client.fetch("/api/tags")).json();
    console.log(tags);
  };
</script>

Security

  • Never collect access keys in ISV code or send them to your backend.
  • Use mountAuthPanel() or <idr-auth-panel> for credentials.
  • Do not pass accessKey to connect() — the SDK rejects it.

See docs/ISV_GUIDE.md and docs/ACCESS_KEYS.md.

Platform requirements

  • Account sign-in: POST /v1/auth/browser/loginbrowser:write scope
  • Access keys: POST /v1/auth/access-key/exchange
  • Resolve: POST /resolve with source_host: "browser" (or key-scoped host)
  • Signaling: wss://idr.to/v1/signal with Ed25519 device auth
  • Transport: WebRTC data channel idr-tunnel + idr-tunnel-v1 binary mux

Target hosts: use .idr synthetic names (buildIdrHostname) or idrto: URIs. Do not parse *.idr.to labels locally — they may be opaque hashes.

Examples

| Framework | Directory | |-----------|-------------| | Vanilla | examples/vanilla-vite/ | | React | examples/react-vite/ | | Vue | examples/vue-vite/ | | Svelte | examples/svelte-vite/ | | Angular | examples/angular-vite/ |

npm run build
cd examples/react-vite && npm install && npm run dev

Development

npm install
npm test
npm run build

For local API testing: localStorage.setItem("idr.sdk.devApiBase", "http://localhost:3000").

License

MIT