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
CommandDescriptionExample
depositDeposit ETH into privacy poolzksentinel deposit --pool 1
deposit-stealthStealth deposit with ephemeral keyzksentinel deposit-stealth --pool 0.1
batch-depositMultiple deposits in 1 TXzksentinel batch-deposit --pool 0.01 --count 3
withdrawWithdraw via relayer (gasless)zksentinel withdraw note.json 0xRecipient
withdraw --panicDecoy withdrawal under duresszksentinel withdraw note.json 0xDecoy --panic
partial-withdrawWithdraw partial amountzksentinel partial-withdraw note.json 0.5 0xAddr
transferShielded in-pool transferzksentinel transfer note.json 0xNewOwnerPubKey
poiGenerate Proof of Innocencezksentinel poi note.json --asp chainalysis
selective-disclosureRange proof on amountzksentinel sd note.json --min 0 --max 10
statusShow pool stats and balancezksentinel 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