New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@canton-network/core-signing-bitgo

Package Overview
Dependencies
Maintainers
5
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@canton-network/core-signing-bitgo

Wallet Gateway signing driver for BitGo

latest
Source
npmnpm
Version
1.2.1
Version published
Weekly downloads
243
99.18%
Maintainers
5
Weekly downloads
 
Created
Source

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:

  • 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).
  • 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.
  • 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

  • Sign in to BitGo (or BitGo Test for testnet).
  • 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).
  • Note your Enterprise ID from Settings → Enterprise. This is required for wallet creation.

Environment variables

VariableRequiredDescription
BITGO_ACCESS_TOKENYesBitGo long-lived access token
BITGO_API_URLNoAPI base URL. Defaults to https://app.bitgo.com (prod). Use https://app.bitgo-test.com for testnet.
BITGO_ENTERPRISE_IDNoBitGo enterprise ID. Required for createKey. Enables restart-safe getTransaction fallback via the enterprise txrequests endpoint.
BITGO_COINNoCanton 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 stateCanton statusNotes
initialized, pendingApproval, pendingDelivery, pendingUserSignature, pendingUserCommitment, pendingUserRShare, pendingUserGShare, readyToSendpendingMPC rounds in progress
messages[0].state === 'signed'signedMessage-level state takes precedence — signing is complete even if txRequest is still pendingDelivery
delivered, signedsigned
canceled, rejectedrejected
failedfailed

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

FAQs

Package last updated on 17 Sep 2026

Related posts