Skip to main content

Commands Reference

Complete reference for all Privacy Boost CLI commands.

Global Options

Available for all commands:

Configuration Commands

init

Initialize a configuration file at ~/.privacy-boost/config.toml.
Options:
  • -n, --network <PRESET> - Network preset to use (default: local)
If a config file already exists, the command prints a warning and does nothing. Delete the existing file first to reinitialize. You can also import an existing config file:
Examples:

Authentication Commands

login

Connect wallet, derive privacy keys, and authenticate with the backend. Saves the session so future commands don’t require --private-key.
Examples:
Output:

logout

Clear saved session.

sessions

List saved sessions and their expiry status.

status

Show current connection and authentication status.
Output:

Balance Commands

balance

Query shielded balance for a specific token.
Options:
  • -t, --token <ADDRESS> - Token contract address (use 0x0 for ETH)
Examples:

balances

Query all token balances.

Vault Commands

shield

Deposit tokens into the shielded pool.
Options:
  • -t, --token <ADDRESS> - Token contract address (required)
  • -a, --amount <VALUE> - Amount in wei
  • --human - Parse amount as human-readable (e.g., 1.5 instead of wei)
  • --decimals <N> - Decimals for human-readable parsing (default: 18)
Examples:

unshield

Withdraw tokens from the shielded pool to a public address.
Options:
  • -t, --token <ADDRESS> - Token contract address (required)
  • -a, --amount <VALUE> - Amount in wei
  • -r, --recipient <ADDRESS> - Recipient Ethereum address (required)
  • --human - Parse amount as human-readable
  • --decimals <N> - Decimals for human-readable parsing (default: 18)
Examples:

send

Send a private transfer to a privacy address or Ethereum address.
Options:
  • -t, --token <ADDRESS> - Token contract address (required)
  • -a, --amount <VALUE> - Amount in wei
  • -r, --recipient <ADDRESS> - Recipient privacy address (194 chars) or Ethereum address (42 chars)
  • --human - Parse amount as human-readable
  • --decimals <N> - Decimals for human-readable parsing (default: 18)
Examples:

prepare-shield

Build a deposit payload without submitting it, for relaying the transaction yourself (a gasless relayer, an EIP-7702 session key, or a plain raw transaction). Prints the wrap/approve/requestDeposit calls plus the note commitment; nothing is sent on-chain. Requires authentication (login first, or pass --private-key). After relaying, settle it with finalize-shield.
Options:
  • -t, --token <ADDRESS> - Token contract address (use 0x0 for ETH) (required)
  • -a, --amount <VALUE> - Amount in wei
  • -r, --recipient <ADDRESS> - Recipient privacy address (omit to shield to yourself)
  • --human - Parse amount as human-readable
  • --decimals <N> - Decimals for human-readable parsing (default: 18)
Examples:
With --output json the full PreparedShield is printed (the approve, wrap, and shield calls, each as { to, value, data }, plus commitment and finalize), ready to feed into a relayer.

finalize-shield

Recover the on-chain shield request id from the mined receipt of a relayed deposit (see prepare-shield). Stateless — no authentication required.
Options:
  • --receipt <JSON> - Mined receipt as inline JSON {transactionHash,status,logs:[{address,topics,data}]}, or @path to a file (required)
  • --commitment <0x..> - Commitment from the prepared shield being settled (required)
  • --shield-contract <ADDRESS> - Shield pool contract (defaults to --shield-contract-address)
Examples:

History Commands

history

View transaction history.
Options:
  • -t, --tx-type <TYPE> - Filter by type (shield, unshield, transact)
  • --token <ADDRESS> - Filter by token address
  • -l, --limit <N> - Maximum number of results
Examples:

Utility Commands

resolve-identity

Look up a user’s identity by Ethereum address or MPK.
Arguments:
  • <IDENTIFIER> - Ethereum address (42 chars) or MPK (66 chars)
Examples:

version

Show version information.

Gift Commands

Claimable transfers — send to an unregistered wallet. Preview feature, pending external audit.

gift-fund-to-wallet

Fund a gift bound to a wallet that has not joined Privacy Boost.
Options:
  • -t, --token <ADDRESS> - Token contract address (required)
  • -a, --amount <VALUE> - Amount in wei (or decimal with --human)
  • --recipient-wallet <ADDRESS> - Recipient Ethereum address the gift binds to
  • --refund-after-block <N> - Block after which you may reclaim an unclaimed gift
  • --current-block <N> - Current chain head (pre-validates the refund delay)
  • --human - Parse amount as human-readable
  • --yes - Skip the recipient-wallet confirmation prompt

gift-fund

Like gift-fund-to-wallet, but also takes the recipient’s privacy address (-r, --recipient) so the gift ciphertext is sealed to their viewing key.

gift-list

List the claimable (pending) gifts addressed to your wallet.

gift-claim

Claim a pending gift by its index in gift-list.
--acknowledge-unknown-sender is required — the sender is hidden, so you explicitly accept funds from an unknown source. Claim directly from an out-of-band claim link.

gift-refund-by-record

Reclaim a gift you funded that went unclaimed, by its index in your local gift ledger (persisted in your session file).

gift-refund

Reclaim an unclaimed gift by supplying every field manually (when you no longer have the local record): --recipient-wallet, --blind, --refund-after-block, --token-id, --amount, --tree-number, --leaf-index. Decode and decrypt a claim link into a preview, with no network call.

Portal Commands

Portal deposit addresses — reusable public deposit addresses. Preview feature, pending external audit. All require an authenticated session.

portal create

Derive a portal address E, delegate it, register, and publish — in one call.

portal list

List your portals.

portal status

Show the registered / delegated / published status of a portal. (delegated always reports false at launch.)

portal deposits

List the deposits observed at a portal.

portal sweep

Self-service sweep backstop (operator-run at launch): sweep a token’s balance at the portal into the pool.

portal reclaim

Reclaim an un-credited deposit after the cancel delay; funds return to the portal.

portal withdraw

Build a signed raw EIP-1559 tx that withdraws funds resting at E (escape hatch); prints the raw tx to broadcast yourself.

Environment Variables

Next Steps