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

# SDK overview

> What the Fluton SDK is, which of its two surfaces exists today and which is planned, its entry points, and a map of the pool client's modules.

> [!NOTE]
>
> The Fluton SDK is not published to npm yet. It will ship as `@fluton/sdk`.
> These pages describe the pool client as it exists today and the intent client as it is planned.

The Fluton SDK is the TypeScript client for Fluton. It has two surfaces:

* The **pool client** exists today. It covers notes and keys, tree rebuild and note discovery, proving, deposits, obligations and claims, private transfers, and the relayer and indexer clients of Fluton Pool. [Keys, notes and scanning](https://docs.fluton.io/sdk/keys-and-scanning.md) and [Deposits, withdrawals and transfers](https://docs.fluton.io/sdk/transactions.md) walk through it, and the [Pool client reference](https://docs.fluton.io/sdk/reference.md) lists every export.
* The **intent client** is planned. A `FlutonClient` will create intents, request quotes, stream offers and execute the selected offer across chains, with React bindings on top. [Intent client (planned)](https://docs.fluton.io/sdk/intent-client.md) describes that interface ahead of its release.

Everything on-chain goes through **viem**. Proofs are Groth16 proofs built with **snarkjs**, Poseidon hashing comes from **poseidon-lite**, the `@noble/ciphers`, `@noble/curves` and `@noble/hashes` packages supply the pure crypto, and the confidential (eTOKEN) side uses **@cofhe/sdk**. `circomlibjs` provides the circomlib-generated Poseidon bytecode that runs on-chain.

## Entry points

The pool client has two entry points, and the difference is what each may import:

> [tab] @fluton/sdk (node)
>
> The full surface. It includes the snarkjs-backed proving flows (`proof`, `transact`) and the node CoFHE client (`cofheNode`).
>
> ```ts theme={null}
> import { transact, scanShieldedNotes, deriveSpendKey } from "@fluton/sdk";
> ```

> [tab] @fluton/sdk/browser
>
> The browser-safe surface: pure crypto, the Merkle tree, the ABIs, the read-side pool operations and the runtime-agnostic transaction core. It excludes the snarkjs modules and the node CoFHE client and adds `inputs`; the web wallet proves with its own snarkjs build and brings its own CoFHE client.
>
> ```ts theme={null}
> import { transactWith, scanShieldedNotes, parseShieldedAddress } from "@fluton/sdk/browser";
> ```

Both entry points re-export whole modules, so every name below is available from the entry point that includes its module. When the intent client ships it adds `@fluton/sdk/react` for hooks and providers, and `@fluton/sdk/viem` and `@fluton/sdk/ethers` as optional adapter helpers.

## Modules

One line per module of the pool client, with `inputs` (the one module the browser entry point exports directly) in its place. The last column says which entry points carry the module; the pages linked here document its functions, and the [Pool client reference](https://docs.fluton.io/sdk/reference.md) lists each export.

| Module | What it holds | Entry points |
| - | - | - |
| `crypto` | Pure crypto: Poseidon hashing (`poseidon-lite`) | both |
| `chains` | The public networks the pool client knows, as viem chains, and their Chainlink ETH/USD feeds | both |
| `merkleTree` | The Merkle trees and leaf positions | both |
| `utxo` | Notes and keys: notes, commitments and nullifiers ([Notes and proofs](https://docs.fluton.io/concepts/notes-and-proofs.md)) | both |
| `encrypt` | Notes and keys: note ciphertexts and shielded addresses ([Private transfers](https://docs.fluton.io/concepts/private-transfers.md)) | both |
| `spendKey` | Notes and keys: the spend key ([Keys, notes and scanning](https://docs.fluton.io/sdk/keys-and-scanning.md)) | both |
| `viewKey` | Notes and keys: the view key ([Keys, notes and scanning](https://docs.fluton.io/sdk/keys-and-scanning.md)) | both |
| `inputs` | Proving: circuit inputs ([Deposits, withdrawals and transfers](https://docs.fluton.io/sdk/transactions.md)) | both: directly from `@fluton/sdk/browser`, through `proof` from `@fluton/sdk` |
| `proof` | Proving: snarkjs ([Deposits, withdrawals and transfers](https://docs.fluton.io/sdk/transactions.md)) | `@fluton/sdk` only |
| `scan` | Tree rebuild and note discovery ([Keys, notes and scanning](https://docs.fluton.io/sdk/keys-and-scanning.md)) | both |
| `pool` | Read-side pool operations | both |
| `cofhe` | Deposits, obligations and claims on the eTOKEN side ([Deposits, withdrawals and transfers](https://docs.fluton.io/sdk/transactions.md)) | both |
| `relay` | The relayer client ([Deposits, withdrawals and transfers](https://docs.fluton.io/sdk/transactions.md)) | both |
| `indexer` | The indexer client ([Keys, notes and scanning](https://docs.fluton.io/sdk/keys-and-scanning.md)) | both |
| `referral` | Referral codes ([Invite and referrals](https://docs.fluton.io/wallet/invite-and-referrals.md)) | both |
| `bonus` | The referral bonus ([Fees and referrals](https://docs.fluton.io/concepts/fees.md)) | both |
| `bonusClaims` | Referral bonus claims ([Invite and referrals](https://docs.fluton.io/wallet/invite-and-referrals.md)) | both |
| `screening` | Deposit screening ([Deposit screening](https://docs.fluton.io/concepts/deposit-screening.md)) | both |
| `transactCore` | The runtime-agnostic transaction core ([Deposits, withdrawals and transfers](https://docs.fluton.io/sdk/transactions.md)) | both |
| `outcome` | Transaction outcomes ([Deposits, withdrawals and transfers](https://docs.fluton.io/sdk/transactions.md)) | both |
| `wrapEther` | Wrapping ETH for a TOKEN deposit of wrapped ether ([Deposits, withdrawals and transfers](https://docs.fluton.io/sdk/transactions.md)) | both |
| `transact` | The snarkjs-backed proving flow for node ([Deposits, withdrawals and transfers](https://docs.fluton.io/sdk/transactions.md)) | `@fluton/sdk` only |
| `cofheNode` | The node CoFHE client | `@fluton/sdk` only |
| `logs` | `ScanOptions`, exported as a type only | both, type only |
| `abi` | `poolAbi`, `erc20Abi`, `wrappedEtherAbi` and `confidentialWrapperAbi` | both |

## Where to go next

> [card] [Keys, notes and scanning](https://docs.fluton.io/sdk/keys-and-scanning.md)
>
> Derive a spend key, hand out an address or a view key, and discover the notes a key owns.

> [card] [Deposits, withdrawals and transfers](https://docs.fluton.io/sdk/transactions.md)
>
> Build, prove, relay and read back every kind of transaction.

> [card] [Pool client reference](https://docs.fluton.io/sdk/reference.md)
>
> Every export of the pool client, module by module, with its signature.

> [card] [Intent client (planned)](https://docs.fluton.io/sdk/intent-client.md)
>
> The cross-chain intent interface the SDK will add: quotes, offers, execution and React bindings.

For the ideas behind the API (what a note is, what TOKEN and eTOKEN mean, why a withdrawal pays a fee, and what each transaction still makes public), see [Notes and proofs](https://docs.fluton.io/concepts/notes-and-proofs.md), [TOKEN and eTOKEN](https://docs.fluton.io/concepts/token-formats.md), [Fees and referrals](https://docs.fluton.io/concepts/fees.md) and [What stays public](https://docs.fluton.io/concepts/privacy-model.md).


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