> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloak.ag/llms.txt
> Use this file to discover all available pages before exploring further.

# Core concepts

> The eight terms you need before writing your first Cloak integration

Cloak adds a private balance to Solana. Money enters a shielded pool, moves between private balances
without revealing amounts or parties, and leaves to any public address. This page defines the terms
the rest of the docs use. Each links to a deeper page.

## The account

A Cloak **account** is a set of keys derived from one wallet signature. With `createCloak`, the
wallet signs a fixed message (`CLOAK_ACCOUNT_MESSAGE`), and the SDK derives everything else from
that signature. The first time a wallet is seen on a device it signs twice, so the SDK can check it
signs the same way each time. The same wallet opens the same account on any device, in the Cloak mobile app or in
your app. The signature does not approve a transaction and moves no funds.

The account has a public **Cloak address** (`cloak.address`, starting with `cloak_`). Share it to
receive private sends.

## The private balance and its pools

The private balance holds SOL, USDC, USDT and BRS. Each token has its own **pool** on chain. A
balance is the sum of the account's unspent notes in each pool. See
[Networks and assets](https://docs.cloak.ag/get-started/networks-and-assets.md).

## Notes

Value inside a pool lives as **notes** (UTXOs). A note is a secret tuple of amount, owner key,
random blinding and mint. Only a hash of it, the **commitment**, goes on chain. Spending a note
publishes a **nullifier** that prevents a second spend without revealing which note it was.
`createCloak` picks, merges and stores notes for you. See [Notes and balances](https://docs.cloak.ag/concepts/notes-and-balances.md)
and [UTXO model](https://docs.cloak.ag/concepts/utxo-model.md).

## The four movements

| Movement | `createCloak` call | What the chain sees |
| - | - | - |
| **Shield** (deposit) | `cloak.shield(...)` | The funding wallet and the amount entering the pool |
| **Private send** | `cloak.send({ to: "cloak_…" })` | Only that a transaction happened in the pool |
| **Withdraw** (unshield) | `cloak.withdraw(...)` | The amount and the receiving address |
| **Private swap** | `swapWithChange(...)` (low-level only) | The swap leaving the SOL pool and the output delivered |

Sends to Base, Polygon, Sui and Tron, and shields from Base, Polygon and Sui, are the same calls with
a different `from` or `to`. See [Cross-chain](https://docs.cloak.ag/guides/cross-chain.md).

## Zero-knowledge proofs

Every movement carries a Groth16 proof generated on the client. The proof shows the spent notes
exist, belong to the account and balance against the outputs, without revealing them. The SDK
downloads the circuit bundle once, verifies its hashes and proves in a worker. The first proof in a
session takes longer. See [Zero-knowledge proofs](https://docs.cloak.ag/concepts/zero-knowledge-proofs.md).

## Who submits, and who pays

A shield is signed and paid by the funding wallet, which is public on the way in anyway. Private
sends, withdrawals and swaps are submitted for the user, so the user's wallet never appears as the
sender and needs no SOL. With `createCloak`, these spends never prompt the wallet: their requests are
signed by a key derived from the account.

## Fees

The on-chain program charges a fee only when value leaves a pool: withdrawals, swaps and sends
to other networks. Shields and private sends carry no protocol fee. `cloak.withdraw` adds the fee on
top, so exactly the requested amount arrives. See [Fees](https://docs.cloak.ag/concepts/fees.md).

## Viewing keys

The account's **viewing key** (`nk`) finds and reads its notes and history but can never spend. It
is what makes selective disclosure possible: give it to an auditor and they can verify the history
without being able to move funds. See [Viewing keys and compliance](https://docs.cloak.ag/concepts/viewing-keys-compliance.md).

## Two layers of the SDK

| Layer | Use it when |
| - | - |
| [`createCloak`](https://docs.cloak.ag/sdk/create-cloak) | You want one call per action. Notes, fees, storage and resumption are handled for you. Start here. |
| [Low-level API](https://docs.cloak.ag/sdk/low-level-api.md) | You need private swaps, your own note storage, batch signing or full control over proofs and submission. |

> [card] [Quickstart](https://docs.cloak.ag/get-started/quickstart.md)
>
> Install the SDK and move money privately in a few calls.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.