# ETH 质押 API

此 API 允许您与以太坊区块链的质押流程进行交互。以下是主要功能的细分：

&#x20;以下是 ETH 质押/取消质押的步骤：

<figure><img src="/files/HvHWgIOWFb4u27wDIvLI" alt=""><figcaption><p>Creates new validator keys and returns a staking transaction to deposit ETH to those validators. A maximum of 100 validators can be created per request.</p></figcaption></figure>

### 以下是质押流程的五个步骤：

### **1.  创建验证者：**

* 使用质押 API 创建称为验证者的特殊帐户，一次最多可创建 100 个。
* 该 API 提供未签名的交易，将 ETH 存入这些验证者。

### **2.  签署交易：**

* &#x20;使用您的私钥（如秘密密码）批准从 API 收到的未签名交易。**切勿与任何人共享此密钥！**
* &#x20;签名的代码示例可在 GitHub 上找到：\[<https://github.com/chainupcloud/staking-demo-go/blob/main/examples/signed_tx_deposit_test.go>  ]（仅查看示例 TestSignAndBroadcastTx，请勿执行来自未知来源的代码）。

### **3.** 签署交易：

* 广播已签名交易的两种方式：
  1. **手动广播：**&#x4F7F;用提供的代码作为参考，但只有具备技术专长才能继续。
  2. **API 广播：**&#x4F7F;用 Staking API 端点  `POST /api/v1/validator/broadcast` 简化流程。

### **4.** 查询奖励：

* 使用 Staking 奖励 API 跟踪您的收入。
* &#x20;使用 Staking API 端点  `POST /api/v1/validator/details` 获取有关特定验证器的更多信息。

### **5.** 退出（可选）：

* 要停止与验证器的质押并提取您的 ETH，请使用 Staking API 端点  `POST /api/v1/validator/exit` 。
* 预计资金到位需要等待一段时间。


---

# 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.chainupcloud.com/zhong-wen/chainupcloud-kai-fang-api/eth-zhi-ya-api.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.
