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

@bitshard.io/bitshard-wagmi-connector

v0.2.1

Published

Wagmi connector for the BitShard MPC wallet. Lets dApps connect to a non-custodial 2-of-3 threshold wallet via a hosted popup, with no per-dApp browser extension.

Readme

@bitshard.io/bitshard-wagmi-connector

npm version License: MIT

Wagmi connector for the BitShard MPC wallet.

BitShard is a non-custodial wallet that uses 2-of-3 threshold signatures: the user's shares live on their mobile app and browser extension, and a third share lives on the BitShard server. This connector lets any wagmi-powered dApp connect to a BitShard wallet without the user installing any browser extension for the dApp itself — authentication and signature approval happen in a popup to wallet.bitshard.io.

Install

npm install @bitshard.io/bitshard-wagmi-connector @wagmi/core viem

Peer dependencies: @wagmi/core ^2, viem ^2.

Usage

import { createConfig, http } from '@wagmi/core';
import { arbitrumSepolia } from '@wagmi/core/chains';
import { bitshard } from '@bitshard.io/bitshard-wagmi-connector';

export const config = createConfig({
  chains: [arbitrumSepolia],
  connectors: [
    bitshard({
      appUrl: 'https://wallet.bitshard.io'
    })
  ],
  transports: {
    [arbitrumSepolia.id]: http()
  }
});

With React

import { WagmiProvider, useAccount, useConnect, useSignMessage } from 'wagmi';

function ConnectButton() {
  const { connect, connectors } = useConnect();
  const bitshardConnector = connectors.find((c) => c.id === 'bitshard');
  return <button onClick={() => connect({ connector: bitshardConnector! })}>Connect BitShard</button>;
}

Parameters

appUrl (required)

string — Origin of the BitShard wallet app (for example, https://wallet.bitshard.io). The connector opens a popup at ${appUrl}/connector?action=... to handle authentication and signature approval.

chains

readonly Chain[] — Chains supported by this connector. Defaults to Arbitrum One, Nova, and Sepolia.

popupTimeoutMs

number — How long to wait for the popup to return a response before rejecting. Defaults to 300_000 (5 minutes).

storagePrefix

string — LocalStorage prefix for persisted session state. Defaults to 'bitshard.wagmi'.

Architecture

The connector is architecturally a thin EIP-1193 popup proxy. It does not run DKLS, doesn't generate or hold keyshares, and never sees private material. All MPC heavy lifting happens inside the BitShard popup window (/connector page on the wallet origin), the BitShard backend, the mobile app, and the browser extension.

That's why the only runtime peers are @wagmi/core and viem — no DKLS WASM, no ws, no ethers — keeping the dApp bundle small and the trust boundary obvious.

How it works

  1. connect() → popup opens at ${appUrl}/connector?action=connect. The user logs in through Keycloak on the BitShard wallet domain, and the bridge page postMessages { type: 'bitshard:connected', address, chainId } back to the dApp.
  2. personal_sign / eth_signTypedData_v4 → popup opens at ${appUrl}/connector?action=sign. The BitShard app runs the existing 2-of-3 MPC signing ceremony (user approves on mobile + browser extension), then posts back { type: 'bitshard:signed', signature }.
  3. eth_sendTransaction → popup opens at ${appUrl}/connector?action=tx. Same MPC ceremony, then broadcast, then posts back { type: 'bitshard:tx', hash }.
  4. Read-only methods (eth_call, eth_getBalance, etc.) are forwarded to a viem public client — no popup needed.

Session state (address, chainId, expiry) is persisted in localStorage. Wagmi's reconnect hydrates silently from storage without re-opening the popup.

Development

npm install
npm run build       # tsc -> dist/
npm test            # jest (jsdom)
npm run typecheck

Publishing

Maintainers only. Bump the version in package.json, then:

git commit -am "<version>"
git tag v<version>
git push origin main
git push origin v<version>

npm publish --access public

License

MIT — see LICENSE.