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

@dignetwork/chia-provider

v0.1.0

Published

Canonical DIG window.chia wallet provider — a Goby/CHIP-0002/Sage-WC2-compatible injected provider surface, transport-injected, shared by the DIG Browser (in-process native bridge) and the dig-chrome-extension (WalletConnect→Sage). One contract, two consu

Readme

@dignetwork/chia-provider

The canonical DIG window.chia wallet provider — a Goby / CHIP-0002 / Sage-WalletConnect2 compatible injected provider surface, shared by the DIG Browser and the dig-chrome-extension so a dApp sees the same window.chia on either. One contract, two consumers, no drift.

The provider is transport-agnostic: you inject a bridgeCall(method, params) → {status, body} and get back the provider object. Each consumer supplies its own transport:

  • DIG Browser — an in-process native bridge (window.__digWalletRpc, a Mojo pipe).
  • dig-chrome-extensionwindow.postMessage → content script → background SW → WalletConnect → Sage.

Why it exists

A dApp built for Goby (dexie.space, tibetswap, …) or Sage's WC2 API expects a specific window.chia shape: identity flags (isGoby), Goby-legacy direct methods on the object (provider.getPublicKeys(), .transfer(), …), requestAccounts()/accounts(), and bare method names that don't map 1:1 to chip0002_* (Goby's transfer is Sage's chia_send). This package implements that superset once, so both DIG surfaces are interoperable with the existing Chia dApp ecosystem. See SPEC.md for the normative contract.

Usage

import { buildProvider } from '@dignetwork/chia-provider';

const provider = buildProvider({
  version: '1.2.3',
  // Return the wallet's { status, body:{ data } } envelope (200 ok, 202 pending, 4xx/5xx error).
  bridgeCall: async (method, params) => myTransport(method, params),
});

globalThis.chia = provider; // inject into the page's MAIN world

CHIP-0002, Goby-legacy, and Sage-WC2 dApps then all work:

await window.chia.request({ method: 'connect' });        // CHIP-0002
const keys = await window.chia.getPublicKeys();          // Goby-legacy direct method
const [addr] = await window.chia.requestAccounts();      // Goby account helper
await window.chia.transfer({ to: addr, amount: 1000 });  // → routed to chia_send{address}
window.chia.isGoby;        // true (Goby feature-detection)
window.chia.isConnected(); // boolean (Goby convention: a callable)

Surface

  • Identity: isDIG, isGoby, name, version, apiVersion, info, methods, errorCodes.
  • CHIP-0002: request({ method, params }) — accepts bare, chip0002_*, and chia_* names.
  • Goby-legacy direct methods: connect, getPublicKeys, filterUnlockedCoins, getAssetCoins, getAssetBalance, signCoinSpends, signMessage, signMessageByAddress, transfer, sendTransaction, createOffer, takeOffer, cancelOffer, getNFTs, getNFTInfo, walletSwitchChain, walletWatchAsset, requestAccounts, accounts.
  • Accessors: chainId, selectedAddress, isConnected().
  • Events: on / off / removeListenerconnect, chainChanged, accountChanged.

Method-name routing

normalizeMethod + GOBY_ALIASES route a dApp-facing name to the broker method; remapGobyParams adapts params (Goby transfer{to} → Sage chia_send{address}). Already-namespaced chip0002_* / chia_* pass through unchanged.

Testing

npm test            # node --test
npm run coverage    # c8, gated ≥80% lines/functions

MIT.