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

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Referência da API

> Referência completa da API TypeScript para o LiteSVM

Documentação completa da API para usar o LiteSVM com `@solana/kit` e seu ecossistema
de plugins.

## Seções da API

<Columns cols={2}>
  <Card title="Gerenciamento de contas" href="/developers/docs/tools/litesvm/typescript/api-reference/account-management">
    setAccount, getAccount, airdrop, getBalance
  </Card>
  <Card title="Transações" href="/developers/docs/tools/litesvm/typescript/api-reference/transactions">
    sendTransaction, simulateTransaction, gerenciamento de blockhash
  </Card>
  <Card title="Configuração" href="/developers/docs/tools/litesvm/typescript/api-reference/configuration">
    Métodos builder para configurar o LiteSVM
  </Card>
  <Card title="Tempo e sysvars" href="/developers/docs/tools/litesvm/typescript/api-reference/time-and-sysvars">
    Manipulação do clock e acesso aos sysvars
  </Card>
</Columns>

## Referência rápida

### Configuração do plugin

```typescript
import { createClient, generateKeyPairSigner } from "@solana/kit";
import { litesvm } from "@solana/kit-plugin-litesvm";
import { signer } from "@solana/kit-plugin-signer";

const mySigner = await generateKeyPairSigner();
const client = createClient().use(signer(mySigner)).use(litesvm());
// client.svm: LiteSVM instance
// client.rpc: RPC compatibility layer
```

### Gerenciamento de contas (client.svm)

| Método                                 | Descrição                   |
| -------------------------------------- | ----------------------------- |
| `setAccount(account)`                  | Definir o estado da conta diretamente    |
| `getAccount(address)`                  | Recuperar os dados da conta         |
| `getBalance(address)`                  | Obter o saldo em SOL               |
| `airdrop(address, lamports)`           | Financiar uma conta               |
| `minimumBalanceForRentExemption(size)` | Calcular o mínimo para isenção de rent |

### Gerenciamento de programas (client.svm)

| Método                                | Descrição                |
| ------------------------------------- | -------------------------- |
| `addProgram(programId, bytes)`        | Carregar programa a partir de bytes    |
| `addProgramFromFile(programId, path)` | Carregar programa a partir de um arquivo .so |

### Transações (client.svm)

| Método                    | Descrição                    |
| ------------------------- | ------------------------------ |
| `sendTransaction(tx)`     | Executar uma transação          |
| `simulateTransaction(tx)` | Simular sem alterar o estado |
| `latestBlockhash()`       | Obter o blockhash atual          |
| `expireBlockhash()`       | Avançar para um novo blockhash       |

### Configuração (client.svm)

| Método                      | Descrição                           |
| --------------------------- | ------------------------------------- |
| `withSigverify(bool)`       | Ativar/desativar a verificação de assinaturas |
| `withBlockhashCheck(bool)`  | Ativar/desativar a validação do blockhash   |
| `withSysvars()`             | Redefinir os sysvars para os valores padrão       |
| `withBuiltins()`            | Ativar programas integrados              |
| `withPrecompiles()`         | Ativar programas pré-compilados           |
| `withTransactionHistory(n)` | Armazenar as últimas n transações             |
| `withComputeBudget(budget)` | Definir limites de computação                    |
| `withLamports(amount)`      | Definir o saldo do faucet de airdrop        |
| `withLogBytesLimit(n)`      | Definir o limite de saída de logs                  |

### Tempo e sysvars (client.svm)

| Método                     | Descrição           |
| -------------------------- | --------------------- |
| `warpToSlot(slot)`         | Avançar para um slot específico |
| `getClock()`               | Obter o sysvar clock      |
| `getRent()`                | Obter o sysvar rent       |
| `getEpochSchedule()`       | Obter o cronograma de epoch    |
| `getLastRestartSlot()`     | Obter o último slot de reinício |
| `setLastRestartSlot(slot)` | Definir o último slot de reinício |

### RPC (client.rpc)

| Método                           | Descrição                        |
| -------------------------------- | ---------------------------------- |
| `getAccountInfo(address)`        | Buscar uma única conta (somente base64) |
| `getMultipleAccounts(addresses)` | Buscar várias contas            |
| `getLatestBlockhash()`           | Obter o blockhash atual              |
