# suix_getCommitteeInfo{deprecated} - Sui

> Example code for the suix_getCommitteeInfo JSON-RPC method. Complete guide on how to use suix_getCommitteeInfo JSON-RPC in GetBlock Web3 documentation.

This method returns the committee information for a specified epoch on the SUI network. The committee consists of validators who participate in consensus for that epoch, along with their voting power (stake weight). This is useful for understanding network decentralization and validator distribution.

> **Warning:** This method is deprecated

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| epoch | BigInt_for_uint64 | No | Epoch number (defaults to current epoch) |

## Request Example

#### cURL

#### cURL

```bash
curl -X POST https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "method": "suix_getCommitteeInfo",
  "params": ["5000"]
}'
```

#### JavaScript (Axios)

#### request.js

```javascript
const axios = require('axios');

const payload = {
  jsonrpc: '2.0',
  id: 'getblock.io',
  method: 'suix_getCommitteeInfo',
  params: ['5000']
};

axios.post('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/', payload)
.then(response => console.log(response.data));
```

#### Python

#### request.py

```python
import requests

payload = {
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "method": "suix_getCommitteeInfo",
    "params": ["5000"]
}

response = requests.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/", json=payload)
print(response.json())
```

#### Rust

#### request.rs

```rust
use reqwest::Client;
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();
    let payload = json!({
        "jsonrpc": "2.0",
        "id": "getblock.io",
        "method": "suix_getCommitteeInfo",
        "params": ["5000"]
    });
    let response = client.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
        .json(&payload).send().await?;
    println!("{}", response.text().await?);
    Ok(())
}
```

## Response Example

#### response.json

```json
{
  "jsonrpc": "2.0",
  "result": {
    "epoch": "5000",
    "validators": [
      ["jc/20VUECmVvSBmxMRG1LFdGqGunLzlfuSOYGNLSNKY=", "2500000000000000"],
      ["DgDsdbrNH0oq6JHFXVBXHZFQ1XtSNc6bx8v2T8PvhAM=", "1800000000000000"]
    ]
  },
  "id": "getblock.io"
}
```

## Response Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| epoch | string | Epoch number |
| validators | array | Array of [publicKey, stakeWeight] tuples |

## Use Cases

* Analyze validator stake distribution
* Monitor network decentralization
* Track validator participation history
* Build governance dashboards

## Error Handling

| Error Code | Description |
| --- | --- |
| -32602 | Invalid params - invalid epoch |
| -32603 | Internal error - node issues |

## SDK Integration

#### Sui TypeScript SDK

#### sdk.ts

```typescript
import { SuiClient } from '@mysten/sui/client';

const client = new SuiClient({ url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' });
const committee = await client.getCommitteeInfo({ epoch: '5000' });
console.log(committee);
```

#### Sui Rust SDK

#### sdk.rs

```rust
use sui_sdk::SuiClientBuilder;

#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
    let sui = SuiClientBuilder::default().build("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/").await?;
    let committee = sui.governance_api().get_committee_info(Some(5000)).await?;
    println!("{:?}", committee);
    Ok(())
}
```
