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

@cyotee/boardgameio-crypto

v0.1.0

Published

Cryptographic primitives for boardgame.io games — mental poker (SRA), Merkle commitments, EC ElGamal, Feldman DKG, DLEQ, ECDSA, Paillier HE, Shamir SSS, snarkjs ZK helpers, the boardgame.io crypto plugin, and setup-flow helpers.

Readme

@manamesh/boardgameio-crypto

Shared cryptographic primitives for ManaMesh's provably-fair P2P card games.

This is a leaf package — it has no dependencies on @manamesh/frontend or any other in-tree package, so it can be consumed freely without import cycles.

Consumers

  • @manamesh/frontend — War, Go Fish, OnePiece, Threshold Tally, Battleship game modules.
  • @manamesh/poker — mental-poker dealing + the EIP-712 settlement flow.

Entry points

| Import | Contents | |--------|----------| | @manamesh/boardgameio-crypto | Barrel: re-exports everything below | | @manamesh/boardgameio-crypto/mental-poker | SRA commutative encryption, commitment + shuffle proofs | | @manamesh/boardgameio-crypto/keychain | GPG-style public-key registry + admission policies | | @manamesh/boardgameio-crypto/plugin/crypto-plugin | boardgame.io crypto plugin | | @manamesh/boardgameio-crypto/merkle | Merkle-tree commitments (Battleship) | | @manamesh/boardgameio-crypto/ec-elgamal-exp, /feldman-dkg, /dleq | Threshold Tally primitives | | @manamesh/boardgameio-crypto/ecdsa, /secp256k1, /sha256, /stable-json | Signing + hashing helpers | | @manamesh/boardgameio-crypto/paillier | Paillier HE (HE Battleship) | | @manamesh/boardgameio-crypto/shamirs | Shamir secret sharing (ECIES-encrypted) | | @manamesh/boardgameio-crypto/zk, /snarkjs-range | snarkjs ZK helpers |

Agent / integration skill

Read before wiring crypto into a game:
.grok/skills/boardgameio-crypto/SKILL.md (also under .opencode/skills/boardgameio-crypto/).

Hard rules summarized there:

  1. Never put private keys in shared G or multiplayer move args — submit ciphertexts / peels only.
  2. Admit public keys via keychain (MENTAL_POKER_KEYCHAIN_POLICY for multi-party SRA).
  3. Bind encrypt sk → published pk on the client (prepareEncryptionLayer / requirePrivateKeyMatchesPublished).
  4. Keep game phases / INVALID_MOVE in the game package; crypto stays pure.

Test

yarn workspace @manamesh/boardgameio-crypto test

Note on type-checking

This code was authored under @manamesh/frontend, which ships via esbuild and never runs tsc. As a result the sources carry pre-existing latent strict-mode type issues (e.g. stable-json.ts strict-null, a BufferSource lib-version mismatch, a Groth16 duplicate re-export in the barrel) that were never enforced. No standalone typecheck script is wired here yet, to match that origin convention; cleaning up the latent type debt is tracked separately. Runtime correctness is covered by the Vitest suite.