# 快速上手指南

### 一、获取访问凭证

在使用服务前，你需要获取 **TRON 节点专用的 API Key**（⚠️ 注意：不同于平台其他服务的 API Key）：

#### 获取路径：

**用户中心 → 波场节点 → 套餐 → 在列表中获取对应节点的 API 秘钥**

> 📌 请确保使用的是“节点对应的 API Key”，否则会导致认证失败。

***

### 二、连接节点

CatFee 提供基于 **gRPC + TLS（HTTPS/2）** 的安全连接方式：

* **协议**：gRPC（HTTP/2）
* **端口**：443
* **安全要求**：必须启用 TLS（SSL）
* **请求头认证**：

  ```
  X-CATFEE-TOKEN: YOUR_API_KEY
  ```

***

### 三、选择服务接口

TRON 节点提供两个核心服务：

* **wallet**
  * 用于查询未确认交易
  * 实时性更高
* **walletSolidity**
  * 用于查询已确认链上数据
  * 数据更稳定可靠

👉 一般建议：

* 查余额 / 状态 → 使用 `walletSolidity`
* 发送交易 / 实时查询 → 使用 `wallet`

***

### 四、发起第一个请求

以下是一个示例流程（以查询账户为例）：

#### 1. 建立 gRPC 连接

* 使用支持 HTTP/2 的 gRPC 客户端
* 启用 TLS
* 设置请求头 `X-CATFEE-TOKEN`

#### 2. 调用接口

常用方法：

* `GetAccount` → 查询账户信息
* `CreateTransaction` → 创建交易
* `BroadcastTransaction` → 广播交易
* `TriggerSmartContract` → 调用智能合约

***

### 五、最佳实践

* ⏱ **超时设置**：建议 5–10 秒
* 🔐 **安全性**：不要暴露 API Key，建议配合 IP 白名单使用
* 🚀 **性能优化**：
  * 合理控制请求频率（RPS）
  * 根据业务选择合适套餐
* 🔁 **重试机制**：
  * 对偶发失败请求进行指数退避重试

***

### 六、常见问题排查

* ❌ **连接失败**
  * 检查是否启用 TLS
  * 确认客户端支持 HTTP/2
* ❌ **认证错误**
  * 确认 `X-CATFEE-TOKEN` 是否正确
  * 确认是否使用了“节点对应的 API Key”（不是其他服务的 Key）
  * 检查是否启用了 IP 白名单限制
* ❌ **请求超时**
  * 调整 timeout 设置
  * 检查网络延迟或节点负载

***

### 七、下一步

* 查看完整 API 文档
* 根据业务选择合适[套餐（Pricing Plans）](/getting-started/tron-node-guide/pricing-plan.md)
* 在生产环境中启用监控与告警

***

完成以上步骤后，你就可以开始构建基于 TRON 的 DApp 或区块链服务了 🚀


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.catfee.io/getting-started/tron-node-guide/quick-start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
