> ## 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.

# Privacy Boost SDK

> Privacy-preserving transaction SDK for EVM-compatible blockchains

# Privacy Boost SDK

Privacy Boost is a privacy-preserving transaction SDK that enables confidential token transfers on EVM-compatible blockchains. Build private payment flows across web, mobile, and CLI with a unified API.

## How It Works

Privacy Boost uses a **shielded pool** — a smart contract that holds deposited tokens using encrypted commitments — combined with **zero-knowledge proofs** to enable private transactions in three steps:

1. **Deposit** — Move tokens from your wallet into the shielded pool
2. **Send** — Transfer tokens privately to any privacy address (fully hidden from observers)
3. **Withdraw** — Move tokens back to any public address

Once tokens are in the shielded pool, transfers are completely private: no one can see the sender, recipient, or amount. [Learn more about the privacy model.](/product/overview)

## Core Concepts

Before diving in, here are the key terms you'll encounter throughout the SDK:

| Concept              | What it means                                                                                                                                                                                                   |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Shielded pool**    | The on-chain smart contract that holds deposited tokens. Once tokens are in the pool, all transfers are private.                                                                                                |
| **Shielded balance** | Your private token balance inside the shielded pool — only visible to you.                                                                                                                                      |
| **Privacy address**  | A public address others use to send you private transfers. Derived from your wallet, similar to sharing a bank account number. Not the same as your Ethereum address.                                           |
| **Vault**            | The SDK module (`sdk.vault`) for all shielded pool operations — deposit, send, unshield, and balance queries.                                                                                                   |
| **Wallet adapter**   | A platform-specific object that bridges the SDK and your wallet. It provides signing functions (`signMessage`, `signTypedData`, `sendTransaction`). Each platform implements this interface differently.        |
| **Chain client**     | A chain-scoped client created via `sdk.forChain()` for [multi-chain](/sdk/concepts/multi-chain) operations. Each chain client has its own auth state and balances but shares identity keys with the parent SDK. |

For protocol-level details (UTXO model, notes, nullifiers, Merkle trees), see the [Protocol Deep Dive](/technical-explainer/protocol). For key hierarchy and encryption, see [Keys & Encryption](/technical-explainer/keys-and-encryption). For a full glossary, see [Glossary](/technical-explainer/glossary).

## Quick Example

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { PrivacyBoost } from '@sunnyside-io/privacy-boost';
  import { createWalletAdapter } from '@sunnyside-io/privacy-boost-react';

  // Initialize
  const sdk = await PrivacyBoost.create({
    serverUrl: 'https://optimism.sepolia.privacyboost.io',
    wethContractAddress: '0x4200000000000000000000000000000000000006',
    appId: 'app_abc123xyz',
  });

  // Authenticate with browser wallet (MetaMask, etc.)
  const adapter = createWalletAdapter();
  await sdk.auth.authenticate(adapter);

  // Deposit 1 token into the shielded pool
  await sdk.vault.shield({
    tokenAddress: '0x...token-address',
    amount: 1000000000000000000n, // 1 token (18 decimals)
  });

  // Send 0.5 tokens privately
  await sdk.vault.send({
    to: '0x04...recipient-privacy-address',
    tokenAddress: '0x...token-address',
    amount: 500000000000000000n, // 0.5 tokens
  });
  ```

  ```tsx React theme={null}
  import { PrivacyBoostProvider, useAuth, useVault } from '@sunnyside-io/privacy-boost-react';

  function App() {
    return (
      <PrivacyBoostProvider config={{
        serverUrl: 'https://optimism.sepolia.privacyboost.io',
        wethContractAddress: '0x4200000000000000000000000000000000000006',
        appId: 'app_abc123xyz',
      }}>
        <WalletUI />
      </PrivacyBoostProvider>
    );
  }

  function WalletUI() {
    const { authenticateWithWalletAdapter, isAuthenticated, privacyAddress } = useAuth();
    const { shield } = useVault();

    if (!isAuthenticated) {
      return <button onClick={authenticateWithWalletAdapter}>Connect Wallet</button>;
    }

    return (
      <div>
        <p>Privacy Address: {privacyAddress}</p>
        <button onClick={() => shield({ tokenAddress: '0x...', amount: '1.0' })}>
          Deposit 1 Token
        </button>
      </div>
    );
  }
  ```
</CodeGroup>

***

## Getting Started Path

<Steps>
  <Step title="Try a Quickstart">
    Pick your platform below and follow the 5-minute quickstart to get a working integration.
  </Step>

  <Step title="Set up your app">
    Read [App Setup](/sdk/concepts/app-setup) to get an App ID, then [Configuration](/sdk/concepts/configuration) and [Authentication](/sdk/concepts/authentication) to understand the setup options.
  </Step>

  <Step title="Go deeper with your platform SDK">
    Each platform has a full Getting Started guide and topic-specific guides (vault operations, session management, error handling).
  </Step>

  <Step title="Prepare for production">
    Choose an [auth integration](/sdk/guides/api-secret) for your backend, configure [key persistence](/sdk/concepts/key-management), and add [error handling](/sdk/concepts/error-handling).
  </Step>
</Steps>

***

## Choose Your Platform

<CardGroup cols={3}>
  <Card title="TypeScript" icon="js" href="/sdk/quickstart/typescript">
    Full-featured SDK for web applications. Works in browser and Node.js.
  </Card>

  <Card title="React" icon="react" href="/sdk/quickstart/react">
    React hooks and components for seamless integration with your React app.
  </Card>

  <Card title="iOS" icon="apple" href="/sdk/quickstart/ios">
    Native Swift SDK with async/await support for iOS applications.
  </Card>

  <Card title="Android" icon="android" href="/sdk/quickstart/android">
    Native Kotlin SDK with coroutines for Android applications.
  </Card>

  <Card title="React Native" icon="mobile" href="/sdk/quickstart/react-native">
    React Native SDK with native wallet integration.
  </Card>

  <Card title="CLI" icon="terminal" href="/sdk/quickstart/cli">
    Command-line tool for scripting, automation, and testing.
  </Card>
</CardGroup>

***

## Multi-Chain Support

Privacy Boost supports operating across multiple EVM-compatible blockchains from a single SDK instance. Create chain-scoped clients to deposit, transfer, and withdraw on any supported chain while sharing your cryptographic identity.

```typescript theme={null}
const ethereum = sdk.forChain({ serverUrl: 'https://eth.example.com' });
await ethereum.authenticate(walletAdapter);
await ethereum.vault.shield({ tokenAddress: '0x...', amount: 1000n });
```

See the [Multi-Chain guide](/sdk/concepts/multi-chain) for details.

***

## Learn More

<CardGroup cols={2}>
  <Card title="Multi-Chain" icon="link" href="/sdk/concepts/multi-chain">
    Operate across multiple blockchains with a single SDK instance
  </Card>

  <Card title="Protocol Deep Dive" icon="microchip" href="/technical-explainer/protocol">
    UTXO model, notes, nullifiers, Merkle trees, and full transaction lifecycle
  </Card>

  <Card title="Keys & Encryption" icon="key" href="/technical-explainer/keys-and-encryption">
    Key hierarchy, privacy addresses, and 3-way ECDH encryption
  </Card>

  <Card title="Trust & Security" icon="shield-halved" href="/product/trust-and-security">
    TEE guarantees, self-custody, forced withdrawal, and threat model
  </Card>

  <Card title="Glossary" icon="book" href="/technical-explainer/glossary">
    Technical terminology and definitions
  </Card>
</CardGroup>
