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

# getBlockCommitment

> Returns commitment for particular block

## Parameters

<ParamField query="slot" type="number" required>
  Block number, identified by Slot
</ParamField>

## Response

<ResponseField name="result" type="object">
  <Expandable title="result fields">
    <ResponseField name="commitment" type="array | null">
      Array of u64 integers logging the amount of cluster stake in lamports that has voted on the block at each depth from 0 to `MAX_LOCKOUT_HISTORY`.
    </ResponseField>

    <ResponseField name="totalStake" type="number">
      Total active stake, in lamports, of the current epoch.
    </ResponseField>
  </Expandable>
</ResponseField>

## Code Examples

### Basic Request

```bash theme={null}
curl http://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlockCommitment",
  "params": [5]
}'
```

### Using web3.js

```typescript theme={null}
import { Connection } from '@solana/web3.js';

const connection = new Connection('http://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY');
const commitment = await connection.getBlockCommitment(5);
console.log(commitment);
```

### Using Python

```python theme={null}
from solana.rpc.api import Client

client = Client("http://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY")
response = client.get_block_commitment(5)
print(response)
```

## Notes

1. Returns commitment information for a specific block
2. The commitment array indicates stake weight distribution
3. The totalStake value represents the total active stake in the current epoch
4. The response is immediate as it reads from the current state

## Best Practices

1. Use this method to verify block confirmation status
2. Compare commitment values to understand consensus levels
3. Handle network errors and retry when appropriate
