
Security News
Lovable’s OJ Rewrites Vite’s Dev Server in Rust as AI Lowers the Cost of Forking Open Source
Lovable’s OJ rewrites Vite’s dev server in Rust, reducing memory use and preview times as AI lowers the cost of open source reimplementation.
@zkcoins/sdk
Advanced tools
Pure-TypeScript wallet SDK for zkCoins — BIP-39/32 derivation, Schnorr signing, typed REST client, high-level account adapter.
@zkcoins/sdkPure-TypeScript wallet SDK for zkCoins. One package covers BIP-39 / BIP-32 derivation, BIP-340 Schnorr signing, the typed REST client for /api/*, and a high-level account adapter that wallet integrators (Cake Wallet, Layerz Wallet, the in-tree web app) consume as a drop-in InterfaceAccountBasedWallet-style API.
Status: v0.1.0 implementation complete, awaiting first npm publish. Tracked on the
developbranch — seeCONTRIBUTING.mdfor the bootstrap workflow.
Earlier iterations of the wallet primitives were compiled to WASM from zk-coins/app/rust/client/. That works in the browser but creates friction for every other consumer — React Native (Layerz Wallet) struggles to bundle WASM cleanly, and Cake Wallet (Dart) cannot consume a WASM blob at all. The functions involved are all standard BIP-39 / BIP-32 / secp256k1 Schnorr / SHA-256 — every audited pure-JS library can do them. @zkcoins/sdk is the pure-JS replacement, so the same library runs identically in Node 22+, the browser, and React Native.
Each cryptographic primitive is exercised by an internal verify-roundtrip test: the SDK produces a Schnorr signature, then re-verifies it under the derived x-only pubkey via the same @noble/curves library. This proves the signing → verifying loop is consistent within JS.
A separate cross-test against the Rust reference in zk-coins/app/rust/client/ (proving the JS output is byte-equivalent to the in-tree Rust implementation for 100 randomized inputs per primitive) is planned as a v0.1.1 follow-up — see issue #6 once tracked.
npm install @zkcoins/sdk
import { ZkCoinsAccount, generateMnemonic } from '@zkcoins/sdk';
// 1. Create or restore an account. The SDK does not ship endpoint
// constants — pass the URL of the node you want to talk to.
const mnemonic = await generateMnemonic();
const account = await ZkCoinsAccount.fromMnemonic(mnemonic, /* accountIndex */ 0, {
apiUrl: 'https://dev-api.zkcoins.app',
});
// 2. Read authoritative state from the server.
const { balance, username } = await account.getBalance();
console.warn('balance:', balance, 'sats; username:', username);
// 3. Send.
const result = await account.pay(/* recipient */ recipientHex, /* amountSats */ 5_000);
console.warn('proof id:', result.proofId);
@zkcoins/sdk is a protocol SDK, not a service SDK — it has no built-in knowledge of any particular operator. The apiUrl you pass to ZkCoinsAccount.fromMnemonic or new ZkCoinsClient({ apiUrl }) is the only thing that determines which node the wallet talks to.
DFX operates two public stages today:
| URL | Bitcoin network | Notes |
|---|---|---|
https://api.zkcoins.app | Mainnet | Production. No faucet — mint requires real on-chain funding. |
https://dev-api.zkcoins.app | Mutinynet | DEV. Open mint faucet, signet-grade reorgs, no real value. |
Self-hosters point apiUrl at their own node (zk-coins/node docker image, see zk-coins/node README). Wallet integrators typically expose a chooser in their own config; the SDK stays opinion-free on which node is "the right one".
The ZkCoinsAccount class is the recommended entry point. It composes the lower-level building blocks (derivation, signing, REST client) into a wallet-friendly shape:
class ZkCoinsAccount {
static fromMnemonic(
mnemonic: string,
accountIndex: number,
opts: { apiUrl: string; passphrase?: string },
): Promise<ZkCoinsAccount>;
readonly address: string;
getBalance(): Promise<{ balance: number; username?: string }>;
pay(recipient: string, amountSats: number): Promise<{ txid?: string; proofId: number }>;
getTransactions(opts?: HistoryOpts): Promise<TxItem[]>; // throws until /api/history lands
claimUsername(username: string): Promise<void>;
resolveUsername(username: string): Promise<{ address: string }>;
}
Lower-level building blocks are also exported for advanced use (custom signing flows, key-derivation helpers, raw REST client):
import {
// BIP-39 / BIP-32
generateMnemonic,
validateMnemonic,
mnemonicFromEntropy,
generateAccountKeys,
generateAccountKeysFromMnemonic,
derivePublicKeys,
deriveSigningKey,
// BIP-340 Schnorr + commitment building
signSchnorr,
createCommitment,
// Typed REST client
ZkCoinsClient,
// Zod schemas + typed errors
InfoResponseSchema,
BalanceResponseSchema,
SendResponseSchema,
ApiError,
NotImplementedError,
} from '@zkcoins/sdk';
ZkCoinsAccount.pay() enforces this by calling getBalance() first internally — but if you build your own flow on top of the lower-level ZkCoinsClient, replicate that pattern.getTransactions() will throw NotImplementedError until zk-coins/node #153 ships. Wallets that need a transaction list today should poll getBalance() and persist sends locally as a fallback.MIT.
/api/*.@zkcoins/sdk as a follow-up).FAQs
Pure-TypeScript wallet SDK for zkCoins — BIP-39/32 derivation, Schnorr signing, typed REST client, high-level account adapter.
The npm package @zkcoins/sdk receives a total of 6 weekly downloads. As such, @zkcoins/sdk popularity was classified as not popular.
We found that @zkcoins/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Lovable’s OJ rewrites Vite’s dev server in Rust, reducing memory use and preview times as AI lowers the cost of open source reimplementation.

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.