ZK-Sentinel V11
TESTNET
๐ง SDK / CLI Reference
JavaScript SDK and command-line interface for all ZK-Sentinel operations
Installation
# Install CLI globally
npm install -g zksentinel-cli
# Or use SDK in your project
npm install zksentinel-sdk ethers snarkjs circomlibjs
CLI Commands
| Command | Description | Example |
|---|---|---|
| deposit | Deposit ETH into privacy pool | zksentinel deposit --pool 1 |
| deposit-stealth | Stealth deposit with ephemeral key | zksentinel deposit-stealth --pool 0.1 |
| batch-deposit | Multiple deposits in 1 TX | zksentinel batch-deposit --pool 0.01 --count 3 |
| withdraw | Withdraw via relayer (gasless) | zksentinel withdraw note.json 0xRecipient |
| withdraw --panic | Decoy withdrawal under duress | zksentinel withdraw note.json 0xDecoy --panic |
| partial-withdraw | Withdraw partial amount | zksentinel partial-withdraw note.json 0.5 0xAddr |
| transfer | Shielded in-pool transfer | zksentinel transfer note.json 0xNewOwnerPubKey |
| poi | Generate Proof of Innocence | zksentinel poi note.json --asp chainalysis |
| selective-disclosure | Range proof on amount | zksentinel sd note.json --min 0 --max 10 |
| status | Show pool stats and balance | zksentinel status --pool all |
SDK Quick Start
const { ZKSentinelSDK } = require('zksentinel-sdk');
const sdk = new ZKSentinelSDK({
rpcUrl: 'https://ethereum-sepolia-rpc.publicnode.com',
privateKey: process.env.PRIVATE_KEY,
});
await sdk.init();
// Deposit 1 ETH
const note = await sdk.deposit('1');
// console.log('Note saved:', note.path);
// Withdraw (normal mode)
const tx = await sdk.withdraw(note, '0xRecipientAddress');
// console.log('TX:', tx.hash);
// Withdraw (panic mode โ decoy nullifier)
const decoyTx = await sdk.withdraw(note, '0xDecoyAddress', { panic: true });
// Real funds still recoverable later with normal mode