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

# Block data for Solana

> Block data interfaces for Solana — the batch handler context and the Block item iterables.

In Solana Squid SDK, the data is processed by repeatedly calling the user-defined [batch handler](../batch-processor#handler-context) function on batches of on-chain data. The sole argument of the batch handler is its context `ctx` with the structure `{store, blocks, isHead}`; `ctx.blocks` is an array of `Block` objects containing the data to be processed, aligned at the block level. Portal-native handlers do not receive `ctx.log` — create a [logger](../logger) explicitly if the handler needs one.

The `Block` interface is defined as follows:

```typescript theme={"system"}
export interface Block<F extends FieldSelection = {}> {
  header: BlockHeader<F>;
  instructions: Instruction<F>[];
  transactions: Transaction<F>[];
  logs: LogMessage<F>[];
  balances: Balance<F>[];
  tokenBalances: TokenBalance<F>[];
  rewards: Reward<F>[];
}
```

`F` here is the type of the argument of the [`setFields()`](./field-selection) method of `DataSourceBuilder`.

`Block.header` contains the block header data. Note that `block.header.number` is the Solana slot number — there is no separate `slot` field. The rest of the fields are iterables containing the six kinds of blockchain data. Canonical ordering within each iterable depends on the data kind:

* `transactions` are ordered in the same way as they are within blocks;
* `instructions` follow the order of transactions that gave rise to them;
* `tokenBalances` are ordered in a deterministic but otherwise unspecified way.

The exact fields available in each data item type are inferred from the `setFields()` call argument. They are documented on the [field selection](./field-selection) page:

* [`Instruction` section](./field-selection#instruction);
* [`Transaction` section](./field-selection#transaction);
* [`LogMessage` section](./field-selection#logmessage);
* [`Balance` section](./field-selection#balance);
* [`TokenBalance` section](./field-selection#tokenbalance);
* [`Reward` section](./field-selection#reward);
* [`BlockHeader` section](./field-selection#block-header).
