Skip to main contentGlossary
Technical terminology used throughout the Privacy Boost SDK documentation.
Core Concepts
Privacy Address
A 66-byte encoded string (132 hex characters) that represents a user’s receiving address in the privacy system. Contains the user’s MPK and viewing key. Safe to share publicly for receiving private transfers.
Format: 0x04{mpk}{viewing_key}
Master Public Key (MPK)
A public cryptographic key derived from the user’s wallet signature. Used to:
- Compute the user’s privacy address
- Encrypt notes for the user
- Identify the user in the privacy system
The MPK is public information and can be shared freely.
Viewing Key
A private cryptographic key that allows decryption of incoming transactions and notes. Required to:
- View your private balance
- Decrypt transaction details
- See your transaction history
Must be kept private. Sharing the viewing key allows others to see (but not spend) your balance.
Nullifying Key
A private cryptographic key used to spend private balance. Creates nullifiers that:
- Prove ownership of notes
- Prevent double-spending
- Authorize transfers and withdrawals
Must be kept secret. Anyone with the nullifying key can spend your private balance.
Notes and Commitments
Note
A cryptographic representation of a private balance. Each note contains:
- Token address: Which token this note represents
- Amount: The value of the note
- Owner MPK: Who can spend this note
- Blinding factor: Random value for cryptographic security
Notes are stored encrypted and only readable by the owner.
Commitment
A cryptographic hash of a note, published on-chain. Commitments:
- Hide the note’s contents
- Are stored in a Merkle tree
- Enable efficient proof verification
Nullifier
A value derived from a note and the owner’s nullifying key. When a note is spent:
- Its nullifier is published on-chain
- The nullifier is added to a spent list
- The same nullifier cannot be used twice (prevents double-spending)
Nullifiers cannot be linked back to their original commitments.
Merkle Tree
A data structure that efficiently stores all commitments. Enables:
- Proof that a commitment exists (Merkle proof)
- Compact storage of the tree root on-chain
- Efficient verification of inclusion
Merkle Proof
A path from a specific commitment to the Merkle tree root. Proves that a commitment exists without revealing which one.
Operations
Deposit (Shield)
Moving tokens from a public wallet address into a private balance:
- Tokens are transferred to the Shield contract
- A new note is created
- The note’s commitment is added to the Merkle tree
- Only the depositor can spend the new note
Transfer (Private Send)
Sending tokens from one private balance to another:
- Input notes are consumed (nullifiers published)
- New output notes are created
- Zero-knowledge proof validates the transaction
- No public link between sender and recipient
Withdraw (Unshield)
Moving tokens from a private balance back to a public address:
- Input note is consumed (nullifier published)
- Zero-knowledge proof validates ownership
- Tokens are released from Shield contract to recipient address
Sync (Balance Sync)
The process of querying the indexer to update local balance information:
- Fetches notes owned by your MPK
- Updates cached balance
- Retrieves new transaction history
Cryptography
Poseidon2
A cryptographic hash function optimized for zero-knowledge proofs. Used for:
- Note commitment generation
- Nullifier derivation
- Key derivation
ECDH (Elliptic Curve Diffie-Hellman)
A key agreement protocol used to:
- Derive shared secrets between parties
- Enable encrypted note transmission
AES-GCM
Symmetric encryption algorithm used to:
- Encrypt note contents
- Protect data in transit
EIP-712
Ethereum typed data signing standard. Used for:
- Structured message signing
- Key derivation signatures
- Authentication challenges
Zero-Knowledge Proof (ZKP)
A cryptographic proof that demonstrates knowledge of information without revealing it. In Privacy Boost:
- Proves ownership of notes
- Proves transaction validity
- Hides amounts and parties
System Components
Shield Contract
The on-chain smart contract that:
- Holds deposited tokens
- Stores commitment Merkle tree root
- Tracks spent nullifiers
- Verifies zero-knowledge proofs
Indexer Service
An off-chain service that:
- Monitors blockchain events
- Maintains the full Merkle tree
- Stores encrypted notes
- Provides balance and history queries
Prover Service
An off-chain service that:
- Generates zero-knowledge proofs
- Handles complex computation
- Submits proven transactions
SDK Terminology
Wallet Adapter
An interface that wraps wallet functionality:
connect() - Establish wallet connection
signMessage() - Sign arbitrary messages
signTypedData() - Sign EIP-712 typed data
sendTransaction() - Submit transactions
Session
The authenticated state containing:
- Privacy keys (MPK, viewing key, nullifying key)
- JWT for indexer authentication
- Session expiry information
Sessions can be exported and imported for persistence.
Resource
A namespace object in the TypeScript SDK that groups related functionality:
sdk.auth - Authentication operations
sdk.vault - Deposit, withdraw, transfer, balance
sdk.contacts - Contact management
sdk.transactions - Transaction history
Token Handling
Native ETH
The native currency of Ethereum. For privacy operations:
- ETH is automatically wrapped to WETH for deposits
- WETH can be optionally unwrapped on withdrawal
WETH (Wrapped ETH)
An ERC-20 token representation of ETH. Used because:
- Privacy Boost works with ERC-20 tokens
- Enables ETH to participate in private transfers
Token Address
The ERC-20 contract address for a token. Special values:
0x0000000000000000000000000000000000000000 - Native ETH
- WETH address varies by network
Authentication
Challenge
A random value provided by the indexer for authentication:
- Prevents replay attacks
- Has a short expiration time
- Must be signed by the wallet
JWT (JSON Web Token)
An authentication token returned after successful login:
- Used for indexer API requests
- Contains session information
- Has an expiration time
Error Types
ConfigError
Invalid SDK configuration (missing URLs, invalid addresses).
WalletError
Wallet operation failures (user rejection, signing errors).
AuthError
Authentication failures (expired challenge, invalid signature).
OperationError
Transaction operation failures (insufficient balance, invalid recipient).
NetworkError
Network communication failures (timeout, server errors).
ProofError
Zero-knowledge proof generation failures.