# Account Adapters

The SDK requires two types of blockchain connections:

## Public Providers

[Public providers](/client-sdk/sdk/public-provider-adapters.md) enable read-only blockchain operations like fetching balances, estimating gas, and reading contracts. They are **required** when initializing the Manifold Client.

* [Viem Public Provider](/client-sdk/sdk/public-provider-adapters/viem.md) - For Viem users
* [Ethers v5 Public Provider](/client-sdk/sdk/public-provider-adapters/ethersv5.md) - For Ethers v5 users

## Account Adapters

An [account](/client-sdk/reference/account.md) is required to execute on-chain transactions.\
Both [**purchase**](/client-sdk/sdk/product/common/purchase.md) and [**execute**](/client-sdk/sdk/transaction-steps/execute.md) operations require an account, as they involve triggering transactions on the user's behalf.\
The SDK provides convenient methods for creating an account using popular Web3 libraries:

* [**Viem**](/client-sdk/sdk/account-adapters/viem.md) - Modern, TypeScript-first library
* [**Ethers v5**](/client-sdk/sdk/account-adapters/ethersv5.md) - Popular, battle-tested library

## Quick Start

```typescript
import { createClient, createPublicProviderViem, createAccountViem } from '@manifoldxyz/client-sdk';
import { createPublicClient, createWalletClient, http } from 'viem';
import { mainnet } from 'viem/chains';

// 1. Create public provider for blockchain reads
const publicClient = createPublicClient({
  chain: mainnet,
  transport: http('YOUR_RPC_URL')
});
const publicProvider = createPublicProviderViem({ 1: publicClient });

// 2. Initialize Manifold client
const client = createClient({ publicProvider });

// 3. Create account for transactions (when needed)
const walletClient = createWalletClient({ /* ... */ });
const account = createAccountViem({ walletClient });
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.manifold.xyz/client-sdk/sdk/account-adapters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
