Privacy x402
Zero-Knowledge Privacy for x402 Solana Payments
1 second
PAYMENT TIME
~1%
PROTOCOL FEE
4
AUDITS
100%
PRIVATE
const processor = createPrivacyProcessor({
rpcUrl: process.env.SOLANA_RPC_URL,
treasuryWallet: process.env.TREASURY,
userPrivateKey: userKey
});
const result = await processor.processPayment(0.001);
console.log(result.depositSignature);INSTALL
npm
npm install privacy-cash-402-sdkyarn
yarn add privacy-cash-402-sdkpnpm
pnpm add privacy-cash-402-sdkPRIVACY FLOW
Deposit → Pool
Mix with Others
Generate ZK Proof
Withdraw → Treasury
UNLINKED
SDK for privacy-enhanced HTTP 402 payments on Solana. Payments are mixed through Privacy Cash before reaching your treasury, breaking all on-chain links between payer and recipient.
WHAT IS HTTP 402?
HTTP 402 "Payment Required" enables pay-per-request APIs. Users pay before accessing content or services. This SDK adds zero-knowledge privacy to 402 payment flows.
HOW IT WORKS
01
USER INITIATES PAYMENT
Client calls SDK to process 402 payment request
02
DEPOSIT TO PRIVACY CASH
SOL deposited into Privacy Cash pool, commitment created on-chain
03
ZERO-KNOWLEDGE PROOF
SDK generates Groth16 proof without revealing deposit identity
04
PRIVATE WITHDRAWAL
Treasury receives payment via ZK proof - link to user broken
TypeScript SDK
+
Privacy Cash Protocol
+
Groth16 ZK-SNARKs
=
PRIVATE 402 PAYMENTS
UNLINKABLE
Deposits and withdrawals cannot be connected on-chain
MIDDLEWARE
Drop-in Express middleware for 402 payments
AUDITED
Privacy Cash protocol audited by 4 firms