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

@canton-network/core-signing-bitgo

v1.2.1

Published

Wallet Gateway signing driver for BitGo

Downloads

461

Readme

BitGo Signing Driver

A driver for signing and retrieving Canton transactions using the BitGo TSS MPC custodial wallet API, implementing the SigningDriverInterface from @canton-network/core-signing-lib.

How it works

BitGo signs Canton transactions asynchronously via its MPC TSS protocol:

  1. Key creation — a BitGo custodial wallet is created per Canton party (POST /api/v2/{coin}/wallet). The returned Key carries the BitGo wallet ID as id (stable routing identifier) and the Ed25519 public key derived from the wallet keychain at m/0 as publicKey (used for Canton party allocation and fingerprint generation).
  2. Sign request — the Canton transaction is submitted as a message signing request (POST /api/v2/wallet/{walletId}/msgrequests) and returns a txRequestId immediately with status pending.
  3. Polling — the wallet gateway polls getTransaction(txRequestId) until status === 'signed'. The Ed25519 signature and Canton signer fingerprint are extracted from the signed txRequest response.

Credentials

  1. Sign in to BitGo (or BitGo Test for testnet).
  2. Create a Long-Lived Access Token in User Settings → Developer Options → Access Tokens. Select the scopes your use case requires (at minimum: wallet management and transaction signing).
  3. Note your Enterprise ID from Settings → Enterprise. This is required for wallet creation.

Environment variables

| Variable | Required | Description | | --------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------- | | BITGO_ACCESS_TOKEN | Yes | BitGo long-lived access token | | BITGO_API_URL | No | API base URL. Defaults to https://app.bitgo.com (prod). Use https://app.bitgo-test.com for testnet. | | BITGO_ENTERPRISE_ID | No | BitGo enterprise ID. Required for createKey. Enables restart-safe getTransaction fallback via the enterprise txrequests endpoint. | | BITGO_COIN | No | Canton coin identifier. Auto-detected: tcanton for bitgo-test.com URLs, canton for everything else (prod, proxies, custom URLs). |

Transaction state lifecycle

BitGo signing is asynchronous — the MPC TSS protocol requires multiple internal rounds before a signature is produced. The driver maps BitGo states to Canton SigningStatus:

| BitGo state | Canton status | Notes | | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------- | | initialized, pendingApproval, pendingDelivery, pendingUserSignature, pendingUserCommitment, pendingUserRShare, pendingUserGShare, readyToSend | pending | MPC rounds in progress | | messages[0].state === 'signed' | signed | Message-level state takes precedence — signing is complete even if txRequest is still pendingDelivery | | delivered, signed | signed | | | canceled, rejected | rejected | | | failed | failed | |

Restart resilience

The driver maintains in-memory caches for fast lookups (txRequestId → walletId, publicKey ↔ walletId). If the process restarts, these caches are empty. Transactions are recovered via the BitGo enterprise txrequests endpoint (requires BITGO_ENTERPRISE_ID). Public keys are resolved on demand per wallet via the BitGo wallet and keychain endpoints when not in cache.

Development

pnpm build          # compile
pnpm test           # run tests
pnpm test:coverage  # with coverage report