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

@kshan0515/frost-node-binding

v0.1.0

Published

Node.js native binding for FROST Ed25519 MPC protocol - Distributed key generation and threshold signing

Readme

@kshan0515/frost-node-binding

Node.js native binding for FROST (Flexible Round-Optimized Schnorr Threshold Signatures) on Ed25519 curve.

개요 (Overview)

@kshan0515/frost-node-binding은 Zcash Foundation의 frost-corefrost-ed25519 라이브러리를 기반으로 구현된 고성능 N-API(napi-rs) Node.js 네이티브 바인딩 모듈입니다.

  • 지원 곡선: Ed25519 (EdDSA)
  • 주요 기능:
    • 분산 키 생성 (DKG: Distributed Key Generation) - 3 Round
    • 임계치 서명 (Threshold Signing) - 2 Round + Aggregation
    • 세션 기반 실행기 (FrostExecutor) 제공
    • 무상태(Stateless) API (FrostDkgState, FrostSigningState) 제공
    • SoftHSM 및 Key-Registry 연동을 위한 KeyShare 직렬화/역직렬화 지원

설치 (Installation)

npm install @kshan0515/frost-node-binding
# 또는
pnpm add @kshan0515/frost-node-binding

사용법 (Usage)

FrostExecutor (Stateful Session Runner) 예시

import { FrostExecutor } from '@kshan0515/frost-node-binding';

const n = 3; // 전체 참여자 수
const t = 2; // 임계치 (Threshold)
const partyId = 1; // 1-based Party ID

// 1. DKG 세션 초기화
const executor = new FrostExecutor(partyId, n, t);

// 2. Round 1 시작 (Broadcast 패키지 생성)
const r1Package = executor.startKeygen();

// 3. Round 2 진행 (다른 노드들의 R1 패키지 수신 후 step 실행)
// inputs 포맷: [Sender PID(2바이트 BE) + Payload]
const r2DirectedOutputs = executor.step(r1Inputs);

// 4. DKG 완료 (다른 노드들의 R2 Direct 패키지 수신 후 step 실행)
executor.step(r2Inputs);

// 그룹 공개키 조회
const pubKeyBytes = executor.getPublicKeyBytes();
console.log('그룹 Ed25519 공개키:', Buffer.from(pubKeyBytes).toString('hex'));

// 5. 서명 세션 시작
const message = Buffer.from('Hello FROST');
const signers = [1, 2]; // 서명 참여 노드 목록
const commitPayload = executor.startSigning(message, signers);

// 6. 서명 Round 2 및 집약(Aggregation)
const sigShareOutput = executor.step(commitmentInputs);
executor.step(signatureShareInputs);

// 최종 Ed25519 서명 조회 (64 바이트)
const signature = executor.getSignature();
console.log('최종 서명:', Buffer.from(signature).toString('hex'));

개발 및 빌드 (Development & Build)

요구 사항

  • Rust 1.81 이상
  • Node.js 18 이상
  • pnpm

빌드 및 테스트

# 디버그 빌드
pnpm run build:debug

# 릴리즈 빌드
pnpm run build

# 단위 테스트 실행
pnpm test

라이선스 (License)

MIT License