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

# Network

> Access network-wide information like epoch data and performance metrics

Access network-wide information like epoch data, inflation rates, and performance metrics.

## getMinimumBalanceForRentExemption

Returns the minimum balance required for rent exemption.

**Parameters**

<ParamField body="dataLen" type="integer" required>
  The account data length in bytes.
</ParamField>

<ParamField body="commitment" type="object">
  The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'.

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="&#x22;processed&#x22; | &#x22;confirmed&#x22; | &#x22;finalized&#x22;">
      The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
    </ParamField>
  </Expandable>
</ParamField>

**Result**

<ResponseField name="result" type="integer">
  getMinimumBalanceForRentExemption - Returns minimum balance for rent exemption
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getMinimumBalanceForRentExemption",
    "params": [
      0,
      {
        "commitment": "processed"
      }
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 890880
}
```

## getInflationGovernor

Retrieves the inflation governor settings.

**Parameters**

<ParamField body="commitment" type="object">
  The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'.

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="&#x22;processed&#x22; | &#x22;confirmed&#x22; | &#x22;finalized&#x22;">
      The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
    </ParamField>
  </Expandable>
</ParamField>

**Result**

<ResponseField name="foundation" type="number" />

<ResponseField name="foundationTerm" type="number" />

<ResponseField name="initial" type="number" />

<ResponseField name="taper" type="number" />

<ResponseField name="terminal" type="number" />

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getInflationGovernor",
    "params": [
      {
        "commitment": "processed"
      }
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "initial": 0.08,
    "terminal": 0.015,
    "taper": 0.15,
    "foundation": 0.05,
    "foundationTerm": 7
  }
}
```

## getInflationRate

Retrieves the current inflation rate.

**Result**

<ResponseField name="epoch" type="integer" />

<ResponseField name="foundation" type="number" />

<ResponseField name="total" type="number" />

<ResponseField name="validator" type="number" />

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getInflationRate",
    "params": []
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "total": 0.07992883773599962,
    "validator": 0.07593239584919964,
    "foundation": 0.003996441886799981,
    "epoch": 1058
  }
}
```

## getEpochSchedule

Retrieves the epoch schedule.

**Result**

<ResponseField name="firstNormalEpoch" type="integer">
  First normal-length epoch, if any
</ResponseField>

<ResponseField name="firstNormalSlot" type="integer">
  First normal-length slot
</ResponseField>

<ResponseField name="leaderScheduleSlotOffset" type="integer">
  Duration of leader schedule slot in each epoch
</ResponseField>

<ResponseField name="slotsPerEpoch" type="integer">
  Number of slots in each epoch
</ResponseField>

<ResponseField name="warmup" type="boolean">
  Whether epochs start short and grow
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getEpochSchedule",
    "params": []
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "slotsPerEpoch": 432000,
    "leaderScheduleSlotOffset": 432000,
    "warmup": false,
    "firstNormalEpoch": 0,
    "firstNormalSlot": 0
  }
}
```

## getSlotLeader

Retrieves the leader of the current slot.

**Parameters**

<ParamField body="config" type="object">
  Configuration object for the query.

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="&#x22;processed&#x22; | &#x22;confirmed&#x22; | &#x22;finalized&#x22;">
      The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
    </ParamField>

    <ParamField body="minContextSlot" type="integer">
      The minimum context slot for the context.
    </ParamField>
  </Expandable>
</ParamField>

**Result**

<ResponseField name="result" type="string">
  getSlotLeader - Returns the leader of the current slot
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getSlotLeader",
    "params": [
      {
        "commitment": "confirmed"
      }
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "SUrFPooLSUrFPooLSUrFPooLSUrFPooLSUrFPooLSUr"
}
```

## getSlotLeaders

Retrieves the leaders for a specified range of slots.

**Parameters**

<ParamField body="startSlot" type="integer" required>
  The starting slot to query for leaders.
</ParamField>

<ParamField body="limit" type="integer" required>
  The maximum number of leaders to return.
</ParamField>

**Result**

<ResponseField name="result" type="array<string>">
  getSlotLeaders - Returns leaders for a specified range of slots
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getSlotLeaders",
    "params": [
      0,
      5
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    "SUrFPooLSUrFPooLSUrFPooLSUrFPooLSUrFPooLSUr"
  ]
}
```

## getBlockProduction

Retrieves block production information.

**Parameters**

<ParamField body="config" type="object">
  Configuration object for the query.

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="object">
      The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'.

      <Expandable title="properties">
        <ParamField body="commitment" type="&#x22;processed&#x22; | &#x22;confirmed&#x22; | &#x22;finalized&#x22;">
          The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="identity" type="string">
      Filter by validator identity, as a base-58 encoded string.
    </ParamField>

    <ParamField body="range" type="object">
      Slot range to query.

      <Expandable title="properties">
        <ParamField body="firstSlot" type="integer">
          The first slot to include in the range.
        </ParamField>

        <ParamField body="lastSlot" type="integer">
          The last slot to include in the range.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

**Result**

<ResponseField name="context" type="object">
  <Expandable title="properties" defaultOpen>
    <ResponseField name="apiVersion" type="string">
      The API version
    </ResponseField>

    <ResponseField name="slot" type="integer">
      The current slot
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="value" type="object">
  <Expandable title="properties" defaultOpen>
    <ResponseField name="byIdentity" type="object" />

    <ResponseField name="range" type="object">
      <Expandable title="properties">
        <ResponseField name="firstSlot" type="integer" />

        <ResponseField name="lastSlot" type="integer" />
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getBlockProduction",
    "params": [
      {
        "commitment": "confirmed"
      }
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "context": {
      "slot": 457254784,
      "apiVersion": "4.2.1"
    },
    "value": {
      "byIdentity": {},
      "range": {
        "firstSlot": 457056000,
        "lastSlot": 457254784
      }
    }
  }
}
```

## getInflationReward

Returns the inflation reward for a given address.

**Parameters**

<ParamField body="addresses" type="array[string]" required>
  An array of public keys to query, as base-58 encoded strings.
</ParamField>

<ParamField body="config" type="object">
  Configuration object for the query.

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="&#x22;processed&#x22; | &#x22;confirmed&#x22; | &#x22;finalized&#x22;">
      The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
    </ParamField>

    <ParamField body="epoch" type="integer">
      The epoch number to query.
    </ParamField>

    <ParamField body="minContextSlot" type="integer">
      The minimum context slot for the epoch.
    </ParamField>
  </Expandable>
</ParamField>

**Result**

<ResponseField name="result" type="array<RpcInflationReward>">
  getInflationReward - Returns inflation rewards for given addresses

  <Expandable title="properties" defaultOpen>
    <ResponseField name="amount" type="integer" />

    <ResponseField name="commission" type="integer" />

    <ResponseField name="effectiveSlot" type="integer" />

    <ResponseField name="epoch" type="integer" />

    <ResponseField name="postBalance" type="integer" />
  </Expandable>
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getInflationReward",
    "params": [
      [
        "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri"
      ],
      {
        "commitment": "confirmed"
      }
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "epoch": 1058,
      "effectiveSlot": 457254784,
      "amount": 0,
      "postBalance": 0,
      "commission": null
    }
  ]
}
```

## getRecentPerformanceSamples

Returns the recent performance samples.

**Parameters**

<ParamField body="limit" type="integer">
  The maximum number of samples to return.
</ParamField>

**Result**

<ResponseField name="result" type="array<RpcPerfSample>">
  getRecentPerformanceSamples - Returns recent performance samples

  <Expandable title="properties" defaultOpen>
    <ResponseField name="numNonVoteTransactions" type="integer" />

    <ResponseField name="numSlots" type="integer" />

    <ResponseField name="numTransactions" type="integer" />

    <ResponseField name="samplePeriodSecs" type="integer" />

    <ResponseField name="slot" type="integer" />
  </Expandable>
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getRecentPerformanceSamples",
    "params": [
      0
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": []
}
```

## getMaxRetransmitSlot

Returns the maximum retransmit slot.

**Result**

<ResponseField name="result" type="integer">
  getMaxRetransmitSlot - Returns maximum retransmit slot
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getMaxRetransmitSlot",
    "params": []
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 457254784
}
```

## getMaxShredInsertSlot

Returns the maximum shred insert slot.

**Result**

<ResponseField name="result" type="integer">
  getMaxShredInsertSlot - Returns maximum shred insert slot
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getMaxShredInsertSlot",
    "params": []
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 457254784
}
```

## minimumLedgerSlot

Returns the minimum ledger slot.

**Result**

<ResponseField name="result" type="integer">
  minimumLedgerSlot - Returns minimum ledger slot
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "minimumLedgerSlot",
    "params": []
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 457185054
}
```

## getBlock

Returns the block for a given slot.

This sample needs a Surfnet that forks a cluster (the default). With `--offline`, a slot before the first local slot returns `-32602`.

**Parameters**

<ParamField body="slot" type="integer" required>
  The slot to query for the block.
</ParamField>

<ParamField body="config" type="object">
  Configuration object for the query.

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="object">
      The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'.

      <Expandable title="properties">
        <ParamField body="commitment" type="&#x22;processed&#x22; | &#x22;confirmed&#x22; | &#x22;finalized&#x22;">
          The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="encoding" type="&#x22;binary&#x22; | &#x22;base58&#x22; | &#x22;base64&#x22; | &#x22;json&#x22; | &#x22;jsonParsed&#x22; | &#x22;base64+zstd&#x22;">
      Encoding for transaction data.
    </ParamField>

    <ParamField body="maxSupportedTransactionVersion" type="integer">
      The maximum transaction version to support.
    </ParamField>

    <ParamField body="rewards" type="boolean">
      Whether to return rewards.
    </ParamField>

    <ParamField body="transactionDetails" type="&#x22;full&#x22; | &#x22;accounts&#x22; | &#x22;signatures&#x22; | &#x22;none&#x22;">
      Level of transaction detail to return.
    </ParamField>
  </Expandable>
</ParamField>

**Result**

<ResponseField name="blockHeight" type="integer">
  Block height
</ResponseField>

<ResponseField name="blockTime" type="integer">
  Block time
</ResponseField>

<ResponseField name="blockhash" type="string">
  Block hash
</ResponseField>

<ResponseField name="parentSlot" type="integer">
  Parent slot
</ResponseField>

<ResponseField name="previousBlockhash" type="string">
  Previous block hash
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getBlock",
    "params": [
      1,
      {
        "encoding": "json",
        "maxSupportedTransactionVersion": 0,
        "rewards": false,
        "transactionDetails": "signatures"
      }
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "previousBlockhash": "4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZAMdL4VZHirAn",
    "blockhash": "AcknnkY4ok5BZuk69WijDETKVRUPZoMtniZHMe4ZaK1e",
    "parentSlot": 0,
    "signatures": [
      "39V8tR2Q8Ar3WwMBfVTRPFr7AakLHy5wp7skJNBL7ET6ARoikqc1TaMiuXEtHiNPLQKoeiVr5XnKH8QtjdonN4yM",
      "4hPVA21e1KLQsEQkpSHk1UfkBBUfotajpkqESuV4tgqEdtEyDufaczAdZzSLexLhjytczDdSUFgwCTancgUWFzym",
      "FAWA66fudpiwdRDDQ4DRxdJsRvawvauwg4vQkm98ZHFpXmW5N7xzRiTRpt8QiZ19s1aVbzKgXW6kEZanwHeDFNS"
    ],
    "blockTime": null,
    "blockHeight": null
  }
}
```

## getBlockTime

Returns the block time for a given slot.

**Parameters**

<ParamField body="slot" type="integer" required>
  The slot to query for the block time.
</ParamField>

**Result**

<ResponseField name="result" type="integer">
  getBlockTime - Returns block time for a given slot
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getBlockTime",
    "params": [
      1
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}
```

## getBlocks

Returns the blocks for a given range of slots.

Surfnet does not keep a block history, so the list is often empty.

**Parameters**

<ParamField body="startSlot" type="integer" required>
  The starting slot to query for blocks.
</ParamField>

<ParamField body="wrapper" type="integer | RpcContextConfig">
  Wrapper for end slot or context configuration.
</ParamField>

<ParamField body="config" type="object">
  Configuration object for the query.

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="&#x22;processed&#x22; | &#x22;confirmed&#x22; | &#x22;finalized&#x22;">
      The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
    </ParamField>

    <ParamField body="minContextSlot" type="integer">
      The minimum context slot for the context.
    </ParamField>
  </Expandable>
</ParamField>

**Result**

<ResponseField name="result" type="array<integer>">
  getBlocks - Returns blocks for a range of slots
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getBlocks",
    "params": [
      0,
      10
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    0,
    1,
    2
  ]
}
```

## getBlocksWithLimit

Returns the blocks for a given range of slots with a limit.

**Parameters**

<ParamField body="startSlot" type="integer" required>
  The starting slot to query for blocks.
</ParamField>

<ParamField body="limit" type="integer" required>
  The maximum number of blocks to return.
</ParamField>

<ParamField body="config" type="object">
  Configuration object for the query.

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="&#x22;processed&#x22; | &#x22;confirmed&#x22; | &#x22;finalized&#x22;">
      The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
    </ParamField>

    <ParamField body="minContextSlot" type="integer">
      The minimum context slot for the context.
    </ParamField>
  </Expandable>
</ParamField>

**Result**

<ResponseField name="result" type="array<integer>">
  getBlocksWithLimit - Returns blocks with limit
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getBlocksWithLimit",
    "params": [
      0,
      10
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    457254525,
    457254526,
    457254527
  ]
}
```

## getFirstAvailableBlock

Returns the first available block.

**Result**

<ResponseField name="result" type="integer">
  getFirstAvailableBlock - Returns first available block
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getFirstAvailableBlock",
    "params": []
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 0
}
```

## getLatestBlockhash

Returns the latest blockhash.

**Parameters**

<ParamField body="config" type="object">
  Configuration object for the query.

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="&#x22;processed&#x22; | &#x22;confirmed&#x22; | &#x22;finalized&#x22;">
      The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
    </ParamField>

    <ParamField body="minContextSlot" type="integer">
      The minimum context slot for the context.
    </ParamField>
  </Expandable>
</ParamField>

**Result**

<ResponseField name="context" type="object">
  <Expandable title="properties" defaultOpen>
    <ResponseField name="apiVersion" type="string">
      The API version
    </ResponseField>

    <ResponseField name="slot" type="integer">
      The current slot
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="value" type="object">
  <Expandable title="properties" defaultOpen>
    <ResponseField name="blockhash" type="string" />

    <ResponseField name="lastValidBlockHeight" type="integer" />
  </Expandable>
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getLatestBlockhash",
    "params": [
      {
        "commitment": "confirmed"
      }
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "context": {
      "slot": 457254785,
      "apiVersion": "4.2.1"
    },
    "value": {
      "blockhash": "SURFNETxSAFEHASHxxxxxxxxxxxxxxxxxxxxxxxx1x6",
      "lastValidBlockHeight": 413
    }
  }
}
```

## isBlockhashValid

Returns the blockhash validity.

**Parameters**

<ParamField body="blockhash" type="string" required>
  The blockhash to check, as a base-58 encoded string.
</ParamField>

<ParamField body="config" type="object">
  Configuration object for the query.

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="&#x22;processed&#x22; | &#x22;confirmed&#x22; | &#x22;finalized&#x22;">
      The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
    </ParamField>

    <ParamField body="minContextSlot" type="integer">
      The minimum context slot for the context.
    </ParamField>
  </Expandable>
</ParamField>

**Result**

<ResponseField name="context" type="object">
  <Expandable title="properties" defaultOpen>
    <ResponseField name="apiVersion" type="string">
      The API version
    </ResponseField>

    <ResponseField name="slot" type="integer">
      The current slot
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="value" type="boolean" />

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "isBlockhashValid",
    "params": [
      "EkSnNWid2cvwEVnVx9aBqawnmiCNiDgp3gUdkDPTKN1N",
      {
        "commitment": "processed"
      }
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "context": {
      "slot": 457254786,
      "apiVersion": "4.2.1"
    },
    "value": false
  }
}
```

## getRecentPrioritizationFees

Returns the recent prioritization fees.

**Parameters**

<ParamField body="pubkeys" type="array">
  An array of account public keys to query for prioritization fees, as base-58 encoded strings.
</ParamField>

**Result**

<ResponseField name="result" type="array<RpcPrioritizationFee>">
  getRecentPrioritizationFees - Returns recent prioritization fees

  <Expandable title="properties" defaultOpen>
    <ResponseField name="prioritizationFee" type="integer" />

    <ResponseField name="slot" type="integer" />
  </Expandable>
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getRecentPrioritizationFees",
    "params": [
      []
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": []
}
```

## getEpochInfo

Returns the epoch info.

**Parameters**

<ParamField body="config" type="object">
  Configuration object for the query.

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="&#x22;processed&#x22; | &#x22;confirmed&#x22; | &#x22;finalized&#x22;">
      The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
    </ParamField>

    <ParamField body="minContextSlot" type="integer">
      The minimum context slot for the context.
    </ParamField>
  </Expandable>
</ParamField>

**Result**

<ResponseField name="absoluteSlot" type="integer">
  Absolute root slot
</ResponseField>

<ResponseField name="blockHeight" type="integer">
  Block height
</ResponseField>

<ResponseField name="epoch" type="integer">
  Current epoch
</ResponseField>

<ResponseField name="slotIndex" type="integer">
  Current slot index within the epoch
</ResponseField>

<ResponseField name="slotsInEpoch" type="integer">
  Total number of slots in the epoch
</ResponseField>

<ResponseField name="transactionCount" type="integer">
  Current transaction count
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getEpochInfo",
    "params": [
      {
        "commitment": "confirmed"
      }
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "epoch": 1058,
    "slotIndex": 198786,
    "slotsInEpoch": 432000,
    "absoluteSlot": 457254786,
    "blockHeight": 263,
    "transactionCount": 1
  }
}
```

## getGenesisHash

Returns the genesis hash.

**Result**

<ResponseField name="result" type="string">
  getGenesisHash - Returns the genesis hash
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getGenesisHash",
    "params": []
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"
}
```

## getSlot

Returns the current slot.

**Parameters**

<ParamField body="config" type="object">
  Configuration object for the query.

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="&#x22;processed&#x22; | &#x22;confirmed&#x22; | &#x22;finalized&#x22;">
      The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
    </ParamField>

    <ParamField body="minContextSlot" type="integer">
      The minimum context slot for the context.
    </ParamField>
  </Expandable>
</ParamField>

**Result**

<ResponseField name="context" type="object">
  <Expandable title="properties" defaultOpen>
    <ResponseField name="apiVersion" type="string">
      The API version
    </ResponseField>

    <ResponseField name="slot" type="integer">
      The current slot
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="value" type="integer" />

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getSlot",
    "params": [
      {
        "commitment": "confirmed"
      }
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 457254785
}
```

## getBlockHeight

Returns the block height.

**Parameters**

<ParamField body="config" type="object">
  Configuration object for the query.

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="&#x22;processed&#x22; | &#x22;confirmed&#x22; | &#x22;finalized&#x22;">
      The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
    </ParamField>

    <ParamField body="minContextSlot" type="integer">
      The minimum context slot for the context.
    </ParamField>
  </Expandable>
</ParamField>

**Result**

<ResponseField name="context" type="object">
  <Expandable title="properties" defaultOpen>
    <ResponseField name="apiVersion" type="string">
      The API version
    </ResponseField>

    <ResponseField name="slot" type="integer">
      The current slot
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="value" type="integer" />

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getBlockHeight",
    "params": [
      {
        "commitment": "confirmed"
      }
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 262
}
```

## getHighestSnapshotSlot

Returns the highest snapshot slot.

Surfnet does not produce snapshots, so this method returns the error shown below.

**Result**

<ResponseField name="full" type="integer" />

<ResponseField name="incremental" type="integer" />

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getHighestSnapshotSlot",
    "params": []
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32008,
    "message": "No snapshot"
  }
}
```

## getTransactionCount

Returns the transaction count.

**Parameters**

<ParamField body="config" type="object">
  Configuration object for the query.

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="&#x22;processed&#x22; | &#x22;confirmed&#x22; | &#x22;finalized&#x22;">
      The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
    </ParamField>

    <ParamField body="minContextSlot" type="integer">
      The minimum context slot for the context.
    </ParamField>
  </Expandable>
</ParamField>

**Result**

<ResponseField name="result" type="integer">
  getTransactionCount - Returns the transaction count
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getTransactionCount",
    "params": [
      {
        "commitment": "confirmed"
      }
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 1
}
```

## getVersion

Returns the version of the cluster.

**Result**

<ResponseField name="feature-set" type="integer" />

<ResponseField name="solana-core" type="string" />

<ResponseField name="surfnet-version" type="string">
  Surfpool version running the Surfnet
</ResponseField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getVersion",
    "params": []
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "surfnet-version": "1.6.1",
    "solana-core": "4.2.1",
    "feature-set": 565236538
  }
}
```

## getLeaderSchedule

Returns the leader schedule.

Surfnet has no leader schedule, so the result is an empty object.

**Parameters**

<ParamField body="options" type="integer | RpcLeaderScheduleConfig">
  Wrapper for slot or configuration.
</ParamField>

<ParamField body="config" type="object">
  Configuration object for the query.

  <Expandable title="properties" defaultOpen>
    <ParamField body="commitment" type="object">
      The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'.

      <Expandable title="properties">
        <ParamField body="commitment" type="&#x22;processed&#x22; | &#x22;confirmed&#x22; | &#x22;finalized&#x22;">
          The commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="identity" type="string">
      Filter by validator identity.
    </ParamField>
  </Expandable>
</ParamField>

```bash Request
curl http://127.0.0.1:8899 -s -X POST \
  -H "Content-Type: application/json" \
  -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getLeaderSchedule",
    "params": [
      null,
      {
        "commitment": "confirmed"
      }
    ]
  }
'
```

```json Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {}
}
```
