Skip to content

Dark SDK 0.3.2

Choose a tag to compare

@DarkWalletRH DarkWalletRH released this 07 Oct 07:03
· 6 commits to main since this release

The first public release of the Dark SDK: the TypeScript client for confidential USDG balances on Robinhood Chain.

Highlights

  • Confidential balances. Deterministic privacy-key derivation from an account's secp256k1 key, twisted ElGamal encryption over the Grumpkin curve, and bounded discrete-log decryption.
  • Zero-knowledge proofs. Witnesses and public inputs for the register, transfer, withdraw and disclose_range circuits, proved on Node (NodeDarkProver) or in the browser (WebDarkProver).
  • Live client. LiveDarkClient reads and writes the vault through viem, walks every action through explicit states, re-derives public inputs before trusting a proof, and simulates before sending.
  • Selective disclosure. Create, seal and verify signed statements about a private balance that anyone can check against the chain.

Changes since the previous internal version

  • balancePublic is derived from the account's ciphertext: an account is public exactly when its available balance carries no randomness and nothing is pending.
  • exportRevokeTokens() and importRevokeTokens() persist disclosure revoke tokens across restarts. Import is all-or-nothing, and its errors never echo a token.
  • Chain reads are pinned to a single block and retried at that block when an RPC replica lags.
  • Explorer links use hosts that serve TLS.

Security

This release includes hardening from internal security review:

  • Disclosure claims are bound to their kind; a claim that mixes an exact value with range bounds is rejected.
  • The balance-search bound is clamped to the protocol's hard ceiling.
  • Proving witnesses written to disk are created owner-only (0600) and overwritten before deletion.

Earlier internal versions are not published and should not be used.

Compatibility

Node 22+, ESM only. Optional peers: viem ^2, @aztec/bb.js 5.0.0-nightly.20260522, @noir-lang/noir_js 1.0.0-beta.22, react ≥ 18.