Documentation Index
Fetch the complete documentation index at: https://docs.privacyboost.io/llms.txt
Use this file to discover all available pages before exploring further.
Getting Started
This guide walks you through basic CLI usage for Privacy Boost operations.
For a minimal copy-paste example, see the CLI Quickstart. This guide explains each step in detail.
Prerequisites
Overview
The Privacy Boost CLI provides command-line access to all SDK functionality:
- Wallet connection and key derivation
- Authentication with the backend
- Deposits, withdrawals, and transfers
- Balance queries and transaction history
Quick Start
Set up your environment:
# Set environment variables
export SERVER_URL="https://test-api.privacyboost.io"
export RPC_URL="https://eth.llamarpc.com"
export WETH_CONTRACT_ADDRESS="0x4200000000000000000000000000000000000006"
# Your private key (keep secure!)
export PRIVATE_KEY="0x..."
2. Login
Connect your wallet and authenticate with the Privacy Boost backend:
privacy-boost login --private-key $PRIVATE_KEY
Output:
Logged in!
Wallet Address: 0x1234...5678
Privacy Address: 0x9abc...def0
MPK: 0xfedc...ba98
Session saved! Future commands won't require --private-key.
3. Check Balance
Query your shielded balance:
# Check specific token
privacy-boost balance --token 0x4200000000000000000000000000000000000006
# Check all balances
privacy-boost balances
Output:
Token: 0xC02a...Cc2 (WETH)
Shielded Balance: 1.5 ETH
Wallet Balance: 0.5 ETH
4. Deposit
Deposit tokens into the shielded pool:
privacy-boost deposit \
--token 0x4200000000000000000000000000000000000006 \
--amount 1.0 \
--human
Output:
Deposit submitted!
Transaction: 0x1234...5678
Commitment: 0xabcd...ef01
Waiting for confirmation...
Deposit confirmed in block 12345678
5. Withdraw
Withdraw tokens from the shielded pool:
privacy-boost withdraw \
--token 0x4200000000000000000000000000000000000006 \
--amount 0.5 \
--recipient 0x1234567890123456789012345678901234567890 \
--human
Output:
Building proof... (this may take a moment)
Proof generated successfully
Withdraw submitted!
Transaction: 0x5678...9abc
Amount: 0.5 ETH
Recipient: 0x1234...7890
6. Send Private Transfer
Send tokens privately to another privacy address:
privacy-boost send \
--token 0x4200000000000000000000000000000000000006 \
--amount 0.1 \
--recipient 0x[194-character-privacy-address] \
--human
Output:
Building proof... (this may take a moment)
Proof generated successfully
Transfer submitted!
Transaction: 0x9abc...def0
Amount: 0.1 ETH
Recipient: 0x9abc...ef01 (privacy address)
Common Workflows
Check Status
View current connection and authentication status:
Output:
Status
------
Connected: Yes
Authenticated: Yes
Wallet Address: 0x1234...5678
Privacy Address: 0x9abc...def0
MPK: 0xfedc...ba98
Chain ID: 1
Session Expires: 2024-01-15 10:30:00 UTC
| Field | Meaning |
|---|
Connected | A wallet has been connected to the SDK (private-key, mnemonic, or external). |
Authenticated | A valid server session is active. |
Wallet Address | EOA controlling the funds. |
Privacy Address | The 194-character private receiving address that others use to send to you. |
MPK | Master Public Key — a hex-encoded compressed public key derived from your wallet identity. |
Chain ID | EVM chain the SDK is currently scoped to. |
Session Expires | When the current JWT becomes invalid. After expiry, run privacy-boost login again. |
Pass --output json to receive the same fields as a structured object suitable for scripting.
View Transaction History
# All transactions
privacy-boost history
# Filter by type
privacy-boost history --tx-type shield
privacy-boost history --tx-type unshield
privacy-boost history --tx-type transact
# Filter by token
privacy-boost history --token 0x4200000000000000000000000000000000000006
# Limit results
privacy-boost history --limit 10
List Sessions
Logout
Working with Amounts
Amounts default to wei. Use --human for human-readable format:
# 1 ETH (human-readable)
privacy-boost deposit --token $TOKEN --amount 1.0 --human
# 0.5 ETH
privacy-boost deposit --token $TOKEN --amount 0.5 --human
# Small amounts
privacy-boost deposit --token $TOKEN --amount 0.001 --human
Or specify directly in wei (default):
privacy-boost deposit --token $TOKEN --amount 1000000000000000000
Error Handling
Common Errors
Not Authenticated
Error: Not authenticated. Run 'privacy-boost login' first.
Insufficient Balance
Error: Insufficient shielded balance. Have: 0.5 ETH, Need: 1.0 ETH
Network Error
Error: Failed to connect to server at https://test-api.privacyboost.io
Check your network connection and SERVER_URL configuration.
Next Steps
Deposits
Deposit tokens into the shielded pool
Withdrawals
Withdraw tokens from the shielded pool
Private Transfers
Send tokens privately between users
Balances
Query token balances
Transaction History
View and filter transaction history
Wallet Integration
Authentication and key management
Session Storage
Session persistence
Error Handling
Error codes and recovery patterns