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

# Các phương thức RPC về khối và mạng Solana

> Các phương thức RPC Solana về khối, slot, epoch, nguồn cung, phí và mạng — getBlock, getSlot, getEpochInfo, getLatestBlockhash, getFeeForMessage và nhiều phương thức khác.

## Nội dung tại đây

Ngoài [giao dịch](/docs/vi/rpc/historical-data), [tài khoản](/docs/vi/rpc/accounts) và [token & NFT](/docs/vi/das-api), Solana còn cung cấp các phương thức RPC cho khối, slot, epoch, nguồn cung, phí và trạng thái nút. Trang này nhóm các phương thức hữu ích nhất; mỗi thẻ đều liên kết đến hướng dẫn đầy đủ tương ứng.

## Khối & slot

<CardGroup cols={2}>
  <Card title="getBlock" icon="cube" href="/docs/vi/rpc/guides/getblock">
    Tất cả giao dịch và siêu dữ liệu của một khối đã được xác nhận.
  </Card>

  <Card title="getBlocks" icon="cubes" href="/docs/vi/rpc/guides/getblocks">
    Danh sách các khối đã được xác nhận giữa hai slot.
  </Card>

  <Card title="getBlockTime" icon="clock" href="/docs/vi/rpc/guides/getblocktime">
    Thời gian tạo ước tính của một khối, dưới dạng dấu thời gian Unix.
  </Card>

  <Card title="getSlot" icon="gauge" href="/docs/vi/rpc/guides/getslot">
    Slot đã đạt mức cam kết được chỉ định hoặc mặc định.
  </Card>
</CardGroup>

## Epoch & mạng

<CardGroup cols={2}>
  <Card title="getEpochInfo" icon="calendar" href="/docs/vi/rpc/guides/getepochinfo">
    Thông tin về epoch hiện tại, bao gồm tiến độ slot.
  </Card>

  <Card title="getClusterNodes" icon="network-wired" href="/docs/vi/rpc/guides/getclusternodes">
    Chi tiết về tất cả các nút tham gia cụm.
  </Card>

  <Card title="getVersion" icon="tag" href="/docs/vi/rpc/guides/getversion">
    Phiên bản Solana đang chạy trên nút.
  </Card>

  <Card title="getHealth" icon="heart-pulse" href="/docs/vi/rpc/guides/gethealth">
    Tình trạng hiện tại của nút.
  </Card>
</CardGroup>

## Nguồn cung & phí

<CardGroup cols={2}>
  <Card title="getSupply" icon="coins" href="/docs/vi/rpc/guides/getsupply">
    Thông tin về nguồn cung SOL đang lưu hành và tổng nguồn cung hiện tại.
  </Card>

  <Card title="getLatestBlockhash" icon="hashtag" href="/docs/vi/rpc/guides/getlatestblockhash">
    Một blockhash gần đây, cần thiết để tạo và ký giao dịch.
  </Card>

  <Card title="getFeeForMessage" icon="money-bill" href="/docs/vi/rpc/guides/getfeeformessage">
    Khoản phí phải trả cho một thông điệp cụ thể khi được gửi.
  </Card>

  <Card title="getRecentPrioritizationFees" icon="gauge-high" href="/docs/vi/rpc/guides/getrecentprioritizationfees">
    Các khoản phí ưu tiên gần đây, hữu ích khi thiết lập phí ưu tiên. Xem thêm [API Phí ưu tiên](/docs/vi/priority-fee-api).
  </Card>
</CardGroup>

## Bắt đầu nhanh

Nhiều phương thức trong số này không nhận tham số. Ví dụ: `getLatestBlockhash` trả về một blockhash mà bạn có thể dùng để tạo giao dịch:

<CodeGroup>
  ```typescript TypeScript theme={"system"}
  const response = await fetch(`https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      jsonrpc: '2.0',
      id: '1',
      method: 'getLatestBlockhash',
      params: [{ commitment: 'finalized' }],
    }),
  });

  const { result } = await response.json();
  console.log(result.value.blockhash);
  ```

  ```python Python theme={"system"}
  import requests

  url = "https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY"
  payload = {
      "jsonrpc": "2.0",
      "id": "1",
      "method": "getLatestBlockhash",
      "params": [{"commitment": "finalized"}],
  }
  print(requests.post(url, json=payload).json()["result"]["value"]["blockhash"])
  ```

  ```bash cURL theme={"system"}
  curl https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "id": "1",
      "method": "getLatestBlockhash",
      "params": [{ "commitment": "finalized" }]
    }'
  ```
</CodeGroup>

## Các bước tiếp theo

<CardGroup cols={2}>
  <Card title="All RPC methods" icon="server" href="/docs/vi/rpc/guides/overview">
    Xem tài liệu tham khảo đầy đủ về các phương thức RPC Solana, kèm hướng dẫn cho từng phương thức.
  </Card>

  <Card title="HTTP method reference" icon="code" href="/docs/vi/api-reference/rpc/http-methods">
    Các lược đồ yêu cầu và phản hồi chính thức cho tất cả phương thức HTTP RPC.
  </Card>

  <Card title="Accounts" icon="circle-info" href="/docs/vi/rpc/accounts">
    Đọc trạng thái tài khoản bằng getAccountInfo và các phương thức liên quan.
  </Card>

  <Card title="Transactions" icon="clock-rotate-left" href="/docs/vi/rpc/historical-data">
    Truy vấn lịch sử giao dịch và chuyển khoản của một địa chỉ.
  </Card>
</CardGroup>
