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

@bchconnect/connector-walletconnect

v0.1.0

Published

WalletConnect connector for BCH Connect, speaking the bch-wc2 protocol.

Readme

@bchconnect/connector-walletconnect

The WalletConnect connector of BCH Connect, a wallet-connection library for Bitcoin Cash dapps. It speaks the BCH WalletConnect protocol (bch-wc2) through the WalletConnect sign client.

This package is in alpha and not yet stable. Expect breaking changes.

Install

npm install @bchconnect/core @bchconnect/connector-walletconnect @walletconnect/sign-client

@walletconnect/sign-client is a peer dependency. Install it in your dapp at version 2.21.8 or later; the connector uses the version you install.

The connector imports the sign client dynamically, the first time a connection starts or a saved session is restored. Bundlers emit it as a separate chunk, so it is not part of your initial bundle and is never fetched on a visit where neither happens.

Usage

import { createClient, signMessage } from "@bchconnect/core";
import { walletConnect } from "@bchconnect/connector-walletconnect";
import { bchconnectModal } from "@bchconnect/ui/modal";

const client = createClient({
	connectors: [walletConnect({ projectId: "your-project-id" })],
	network: "mainnet",
	appMetadata: { name: "My dapp", url: "https://example.com" },
	ui: bchconnectModal(),
});

await client.init(); // restores sessions from the previous visit

const session = await client.connect();
console.log(session.data.addresses[0]);

const signature = await signMessage(client, session, { message: "Hello" });

Without a modal, pass onPairing and show the link yourself:

const session = await client.connect("bch-wc2", {
	onPairing: (pairing) => {
		if (pairing.kind === "uri") showQrCode(pairing.uri);
	},
});

Options

| Option | Description | | ----------- | --------------------------------------------------------------------------------------------- | | projectId | Project id from the WalletConnect dashboard. Required. | | relayUrl | Relay URL. Defaults to the sign client's own relay. | | methods | Custom methods to ask the wallet for, besides the standard three. Optional. |

The session

session.data holds what the wallet approved:

| Field | Description | | ----------- | ---------------------------------------------------------------------------- | | chain | bch:bitcoincash, bch:bchtest or bch:bchreg, from the client's network. | | addresses | The wallet's cash addresses for that chain. The first is its primary one. | | methods | The requests the wallet accepts in this session. |

A wallet may approve fewer requests than the connector asks for. Check before you sign with client.can(session, "libauth-signing") or client.can(session, "message-signing").

Requirements

  • @bchconnect/core and @walletconnect/sign-client 2.21.8 or later, as peer dependencies.
  • TypeScript 5.9 or later, for typed usage.
  • ESM and CommonJS builds are both included.

License

MIT