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

@arccade/game-sdk

v1.5.1

Published

Gaming SDK for Canton — a two-write game cycle on the Canton Network: value commitment, settlement, and independently verifiable period anchors

Readme

@arccade/game-sdk

JavaScript client for the Gaming SDK for Canton — the off-ledger half of a two-write game cycle on the Canton Network.

npm install @arccade/game-sdk

Requires Node 20 or later. No runtime dependencies.

What this package is for

The Daml package (arccade-game-sdk) holds the contracts. This one holds everything a client needs to speak to them correctly, which in practice means everything that has to produce the same bytes the ledger will produce:

  • the commitment scheme arccade-sdk-digest-v1/sha256 — canonical document encoding, digests, integer amount units;
  • the period audit side — Merkle trees, cycle-audit-row leaves, inclusion proofs, and rebuilding report rows from the ledger's transaction tree;
  • helpers for cycle ids, custody tags, tenant keys and asset instrument ids.

MAJOR.MINOR tracks the Daml package; PATCH does not. 1.5.x of this client talks to 1.5.0 of the contracts. The two encode one agreement, and letting them drift is how a client starts computing a digest the ledger will reject — that already happened once, at 1.1.0 against a 1.5.0 ledger package, unnoticed because the only consumer was a local file: dependency.

Patch is free to move on its own so that a client-only change — a packaging fix, a helper, better types — does not require a new Daml package and another round of on-chain vetting, which is governance-paced. The release workflow enforces exactly this.

Why a digest has to match exactly

GameStake_Settle recomputes the commitment on the ledger and rejects a mismatch. A digest that differs by one byte does not produce a warning — it produces a stake that cannot be settled. That is why this implementation is pinned by golden vectors against the Daml, Python and Java ones:

import { documentDigest, canonText, canonInt } from '@arccade/game-sdk'

const digest = documentDigest('my-game-entry', 1, [
  ['cycleId', canonText('pr-abc123')],
  ['seed', canonInt(42n)],
])

Two rules the encoding will not let you break quietly: lengths are counted in Unicode code points, and amounts are hashed as integer 1e-10 units, never as formatted decimals.

Verifying a published period

Every cycle arCCade settles is committed to a daily Merkle root written on Canton in a VenuePeriodAnchor. Given a published report you can check a row belongs to it without trusting the publisher:

import { periodLeaf, merkleProof, periodRowVerify, merkleRoot } from '@arccade/game-sdk'

const leaves = report.rows.map(periodLeaf)
const root = merkleRoot(leaves)                      // compare with the anchor
const ok = periodRowVerify(report.rows[2], merkleProof(2, leaves), root)

Use periodRowVerify, not merkleVerify, when the claim is "this cycle is in the report". merkleVerify folds a hash and cannot know whether it started from a leaf or an internal node; deriving the leaf from the row is what binds the claim to the row schema.

Rebuilding rows from the ledger

rowsFromTransactions turns a TRANSACTION_SHAPE_LEDGER_EFFECTS stream into report rows, so an auditor can produce the report themselves rather than taking one. The rules live in fixtures — test-vectors/cycle-trees.json and cycle-rows.json in the repository — and the Python and Java implementations assert against the same pair.

Two things it does that are easy to get wrong: it joins the commit and closing halves by the stake contract id (a closing choice does not repeat the cycle id), and it reports unmatched halves instead of dropping them.

License

Apache-2.0. See LICENSE and NOTICE.