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

@steerprotocol/agentconnect-provider

v0.4.0

Published

Browser-safe EIP-1193 provider client for the local AgentConnect daemon.

Readme

AgentConnect Provider

EIP-1193 provider for browser apps that send wallet requests to the local AgentConnect daemon.

import { createAgentConnectProvider } from "@steerprotocol/agentconnect-provider";

const provider = createAgentConnectProvider({
  appName: "Example Dapp",
  autoPairing: true,
  origin: window.location.origin,
  url: "http://127.0.0.1:48745",
});

Pairing

eth_requestAccounts is the pairing entrypoint. If the app is not paired, the daemon creates an origin-bound pairing challenge. With autoPairing: true, the provider waits while an MCP/control-plane operator discovers the challenge with agentconnect_list_pairing_challenges and approves it with agentconnect_pair_app; the browser provider then claims the approved app-scoped token and stores it automatically.

Without autoPairing, the provider rejects with 4100 and includes daemon challenge metadata in error.data.challenge so a host app can drive its own trusted pairing UX. The browser does not approve that challenge itself.

Provider storage accepts only app_ tokens. MCP/admin tokens are rejected or cleared before use.

Each provider instance includes a stable opaque tab_... identifier in daemon request context. If tabId is not provided, the provider creates a random session-scoped id in provider storage. The id is not derived from origin, app name, account, user agent, or other browser fingerprinting data.

Request Lifecycle

eth_sendTransaction returns a pending AgentConnect envelope while the daemon waits for MCP/operator review. The original provider.request(...) promise remains pending through approved, signing, and signed lifecycle events and resolves only on broadcast with a transaction hash. rejected maps to 4001; expired and failed reject with daemon error metadata when available. Duplicate or late lifecycle events after settlement are ignored.

Allowlisted read-only RPC methods such as eth_blockNumber, eth_call, eth_getBalance, eth_getCode, and eth_getTransactionCount are proxied through the daemon's configured chain RPC. They do not enter the signing queue and do not grant browser-side approval authority.

Events And Errors

The provider emits standard connect, accountsChanged, chainChanged, disconnect, and message events. Account and chain results from direct EIP-1193 calls update those events immediately; daemon lifecycle events can update them later.

Error mapping:

  • 4001: user/operator rejection.
  • 4100: unauthorized, unpaired, or invalidated app token.
  • 4200: unsupported or browser-forbidden methods.
  • 4900: daemon offline, transport failure, or provider disposal.
  • 4901: requested chain is unavailable from the daemon.

Reconnect And Resync Limits

The provider opens a WebSocket lifecycle stream when a browser WebSocket implementation and app token are available. It also polls daemon lifecycle events for pending requests as a fallback. WebSocket reconnects use bounded exponential backoff with jitter, refresh account and chain state after reconnect, and resync local pending requests from daemon lifecycle truth by request id. Cursor-based replay remains future hardening. When the provider is disposed or its app token is invalidated, it rejects local pending promises instead of silently resubmitting signing or transaction requests.

Boundaries

The provider creates browser requests only. It never imports, exports, or reveals private keys, never exposes MCP/admin approval methods, and never sends browser-visible approval/rejection/signing/broadcast commands.

Use @steerprotocol/agentconnect-wagmi for Wagmi integration. Viem can consume the provider through custom(provider) for representative wallet reads.

License

BUSL-1.1. See LICENSE.