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-sdk

v0.0.3

Published

BitShard MPC SDK for distributed key generation and threshold signatures

Readme

BitShard SDK

BitShard SDK is a TypeScript library for distributed key generation (DKG) and threshold signatures using the DKLs23 protocol. It enables secure multi-party computation (MPC) wallets with flexible n-of-m threshold configurations.

Features

  • Distributed Key Generation: Secure generation of threshold key shares across multiple parties
  • Threshold Signatures: Sign transactions with any t-of-n parties
  • Multi-Chain Support: Native support for Ethereum, Bitcoin, and EVM-compatible chains
  • WebSocket Coordination: Real-time protocol coordination between parties
  • Flexible Configuration: Support for any n-of-m threshold scheme
  • Pre-signature Management: Secure generation and consumption of pre-signatures
  • Address Derivation: Consistent address generation across all supported chains

Installation

npm i @bitshard.io/bitshard-sdk

For browser environments, you'll also need the web WASM module:

npm install @silencelaboratories/dkls-wasm-ll-web

Quick Start

Local Testing (All Parties in One Process)

import { BitShardSDK } from '@bitshard.io/bitshard-sdk'

const sdk = new BitShardSDK();

// Create a 2-of-3 threshold wallet locally
const wallet = await sdk.createLocalWallet({
  totalParties: 3,
  threshold: 2,
  partyIds: [0, 1, 2]
});

// Derive addresses
const addresses = sdk.deriveAddresses(wallet.publicKey);
console.log('Ethereum address:', addresses.ethereum);
console.log('Bitcoin address:', addresses.bitcoin);

// Sign a message
const message = 'Hello BitShard!';
const signature = await sdk.personalSign(message, wallet.keyshares, {
  threshold: 2,
  publicKey: wallet.publicKey
});

Distributed Setup (WebSocket Coordination)

// Party 0 (Coordinator)
const party0 = sdk.createParty({
  partyId: 0,
  totalParties: 3,
  threshold: 2,
  role: 'coordinator'
});

// Connect to WebSocket server
await party0.connect('ws://localhost:8080/ws');

// Initiate DKG
const session = await party0.initiateDKG();

// Other parties join using session.id
// ... coordinate protocol rounds via WebSocket ...

const keyshare = await party0.finalize();

Architecture

The SDK is organized into several modules:

  • Core: DKLS protocol implementation and party management
  • Crypto: Address derivation and encoding utilities
  • Protocols: DKG, signing, and key refresh protocols
  • Chains: Multi-chain configuration and transaction handling
  • RPC: EIP-1193 compatible RPC methods
  • WebSocket: Real-time protocol coordination

Security

⚠️ CRITICAL: Pre-signatures MUST NOT be reused

Reusing pre-signatures will expose your private key. The SDK includes built-in protection against pre-signature reuse, but developers must ensure proper handling in their applications.

Documentation

Examples

See the examples directory for:

  • Basic wallet creation
  • WebSocket coordination
  • Multi-party signing
  • Chain-specific transactions
  • Docker deployment

License

MIT

Contributing

Contributions are welcome! Please read our contributing guidelines and submit pull requests to our repository.

Releasing new version guide

This document describes the standard release process for publishing the @bitshard.io/bitshard-sdk package.

Rule: Always push commits and tags to GitHub before publishing to npm.


Release Steps

1. Commit your changes

git add .
git commit -m "feat: describe your change"

2. Bump version and create a Git tag

Patch release example (0.0.10.0.2):

npm version patch

This will:

  • Update package.json
  • Create an annotated Git tag (e.g. v0.0.2)

3. Push commits and tags to GitHub

git push origin main --follow-tags

This ensures Git is the source of truth before publishing.


4. Build the package

npm run build

Verify:

  • Build output exists (e.g. dist/)
  • package.json points to built files (main, module, types)

5. Publish to npm

npm publish --access public

Scoped packages default to private unless published with --access public or publishConfig.access = "public".


6. Verify release

npm view @bitshard.io/bitshard-sdk version
git tag --list

Release Checklist

  • [ ] Changes committed
  • [ ] Version bumped via npm version
  • [ ] Commits and tags pushed to GitHub
  • [ ] Build successful
  • [ ] npm publish successful

Notes

  • Do not publish to npm without a Git tag
  • Ensure you are authenticated with npm using a publish-capable token (2FA-compliant)
  • Prefer annotated tags for all releases

Support

For support, please open an issue on GitHub or contact [email protected]