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

kaspa-toccata-api

v0.1.1

Published

Developer-facing client for a live TN10-only Kaspa/Toccata fairness API

Readme

kaspa-toccata-api

Developer-facing JavaScript client for the Kaspa TN10/Toccata fairness API.

This package is intentionally app-agnostic. A roulette proof-of-concept can consume it later, but the API/client naming is generic: rounds are committed, closed, revealed, proven, and verified.

Install

npm install kaspa-toccata-api

Use the client

const { createToccataApiClient } = require('kaspa-toccata-api');

const client = createToccataApiClient({
  baseUrl: 'http://127.0.0.1:8787'
});

const created = await client.createRound({
  game: 'roulette-poc',
  tableId: 'example-table'
});

const roundId = created.round.roundId;

await client.commitRound(roundId, { serverSeed: 'server-seed-kept-secret-until-reveal' });
await client.updateBetLedger(roundId, {
  bets: [{ playerId: 'alice', selection: '17', amount: 1 }]
});
await client.closeRound(roundId, {
  clientSeed: 'client-seed',
  entropyMode: 'live_tn10_future',
  targetOffsetBlueScore: 1
});

const entropy = await client.getEntropy(roundId);
const reveal = await client.revealRound(roundId, { serverSeed: 'server-seed-kept-secret-until-reveal' });
const proof = await client.getProof(roundId);
const verified = await client.verifyProof(proof.proof);

Proof responses include first-class TN10 write evidence when live transactions have been broadcast:

proof.proof.tn10Writes.commit.transactionIds
proof.proof.tn10Writes.close.transactionIds
proof.proof.tn10Writes.reveal.transactionIds
proof.proof.tn10Writes.reveal.evidence[0].decodedPayload

verifyProof() also returns txEvidence when transaction evidence is present and internally consistent.

Generic live-write methods

The API also exposes explicit TN10 transaction write endpoints. They are live TN10 only and fail closed unless the API server has explicit testnet write gates configured.

await client.createCommitTx(roundId);
await client.createCloseTx(roundId);
await client.createRevealTx(roundId);

These methods do not perform local transaction dry-runs. Dry-run/mock/offline transaction paths are intentionally unsupported.

Independent TN10 transaction confirmation

After a live write, the API/proof can include transaction IDs for:

commit/tx
close/tx
reveal/tx

Users can independently confirm those transactions through the public TN10 API, without trusting the roulette app or this package.

See:

docs/VERIFY_TN10_TRANSACTIONS.md

Safety and claim level

Current guarantees are deliberately conservative:

  • network: Kaspa TN10 / testnet-10
  • API/client names are app-agnostic
  • dry-runs, mocks, offline transaction paths, and static app proof fixtures are forbidden
  • live writes require explicit server-side testnet-only gates
  • browser apps should consume the API/client and display proof; they should not sign or broadcast

Toccata covenant lineage/state-transition enforcement is a future claim level and is not claimed by this package yet.