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

# Configurazione

> Metodi builder per configurare LiteSVM in TypeScript

LiteSVM usa un builder pattern per la configurazione. Tutti i metodi restituiscono `LiteSVM`
per il concatenamento.

## Setup tipico dei test

```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
  .withSigverify(false) // Skip signature verification (faster)
  .withBlockhashCheck(false) // Skip blockhash validation (simpler)
  .withTransactionHistory(100n); // Store last 100 transactions
```

Un client `litesvm()` ha già caricati i sysvar, i programmi builtin, i
precompilati e i programmi predefiniti, quindi una configurazione tipica modifica
soltanto i controlli necessari.

## Firma e blockhash

### withSigverify

```typescript
withSigverify(sigverify: boolean): LiteSVM
```

Abilita o disabilita la verifica delle firme.

```typescript
// Disable for faster tests (default is enabled)
client.svm.withSigverify(false);

// Enable for production-like testing
client.svm.withSigverify(true);
```

<Info>
  Disabilitare la verifica delle firme rende i test più veloci ma meno realistici.
</Info>

### withBlockhashCheck

```typescript
withBlockhashCheck(check: boolean): LiteSVM
```

Abilita o disabilita il controllo della scadenza del blockhash.

```typescript
// Disable for simpler tests
client.svm.withBlockhashCheck(false);
```

## Programmi e sysvar

Questi metodi caricano programmi e sysvar nella VM. Un client `litesvm()`
li ha già tutti, quindi servono solo per reimpostare un client o per configurare
un'istanza base di `LiteSVM.default()` dal pacchetto `litesvm`.

### withSysvars

```typescript
withSysvars(): LiteSVM
```

Reimposta Clock, Rent, EpochSchedule e gli altri sysvar ai valori predefiniti.
I sysvar sono già disponibili in un nuovo client, quindi questo metodo serve solo per annullare
le modifiche. Se lo chiami dopo `setClock` o `warpToSlot`, il clock impostato viene scartato.

```typescript
client.svm.setClock(myClock);
client.svm.withSysvars(); // the clock is back to its default
```

### withBuiltins

```typescript
withBuiltins(): LiteSVM
```

Aggiunge i programmi builtin del runtime: System Program, i loader BPF, Vote
e Compute Budget.

```typescript
client.svm.withBuiltins();
```

### withPrecompiles

```typescript
withPrecompiles(): LiteSVM
```

Aggiunge i precompilati per la verifica delle firme: ed25519, secp256k1 e secp256r1.

```typescript
client.svm.withPrecompiles();
```

### withDefaultPrograms

```typescript
withDefaultPrograms(): LiteSVM
```

Aggiunge i programmi predefiniti: Token, Token-2022, Associated Token Account, Memo,
Stake e Address Lookup Table.

```typescript
client.svm.withDefaultPrograms();
```

## Limiti delle risorse

### withLamports

```typescript
withLamports(lamports: bigint): LiteSVM
```

Imposta il saldo dell'account faucet interno da cui attinge `airdrop()`.
Gli airdrop di importo superiore a questo saldo falliscono.

```typescript
client.svm.withLamports(1_000_000_000n); // the faucet holds 1 SOL
```

### withLogBytesLimit

```typescript
withLogBytesLimit(limit?: bigint): LiteSVM
```

Imposta il limite in byte dell'output dei log.

```typescript
client.svm.withLogBytesLimit(10000n);
```

### withTransactionHistory

```typescript
withTransactionHistory(capacity: bigint): LiteSVM
```

Abilita l'archiviazione della cronologia delle transazioni.

```typescript
// Store last 100 transactions
client.svm.withTransactionHistory(100n);
```

## Feature set

### withFeatureSet

```typescript
withFeatureSet(featureSet: FeatureSet): LiteSVM
```

Configura il feature set per testare versioni specifiche di Solana.
