# 如何生成存款数据？

生成存款数据的简短指南

### **Prerequisites** 先决条件

**a.**  兼容的钱包（目前仅支持 [Metamask](https://metamask.io)），可容纳超过 32 个 Eth

**b.** 生成 deposit\_data-timestamp.json，可通过 [deposit-cli 工具](https://github.com/ethereum/staking-deposit-cli/releases/) 完成。

{% hint style="info" %}
具体来说，我们真正需要的是 deposit\_data-timestamp.json 中的 withdrawal\_credentials
{% endhint %}

### 步骤 1：生成 `deposit_data`/`withdrawal_credentials`

在此处安装 deposit-cli 工具应用程序，确保您已为您的操作系统选择了正确的应用程序。

{% hint style="warning" %}
请确保您是从以太坊基金会的官方 GitHub 帐户下载的 -  <https://github.com/ethereum/staking-deposit-cli/releases/>&#x20;
{% endhint %}

<figure><img src="https://content.gitbook.com/content/IQGs7tgkNqzmAzzSFmsJ/blobs/aKDY4KgNPBSVlf27PxfR/deposit.png" alt=""><figcaption><p>Select the corresponding executable for your operating system</p></figcaption></figure>

### 步骤 2：下载完成后，解压下载的文件。

### 步骤 3：打开您的命令行/终端 command line/terminal 。

<figure><img src="https://content.gitbook.com/content/IQGs7tgkNqzmAzzSFmsJ/blobs/CnYnraxC0gWwdYSy4yu0/terminal.PNG" alt=""><figcaption><p>Open a terminal</p></figcaption></figure>

步骤 4：导航（`cd`）到包含可执行存款文&#x4EF6;**`deposit`** 的目录。

<figure><img src="https://content.gitbook.com/content/IQGs7tgkNqzmAzzSFmsJ/blobs/wa7w0r9ay7RS3HVYuXnJ/cd.PNG" alt=""><figcaption><p><code>cd</code> to the directory containing the executable</p></figcaption></figure>

### 步骤 5：使用 deposit-cli new-keystore 命令生成新的 BLS 密钥库。

对于 Windows，使用以下命令 deposit.exe new-mnemonic --num\_validators 1 --chain mainnet 运行可执行文件；对于 Linux 或 MacOS，使用以下命令 ./deposit new-mnemonic --num\_validators 1 --chain mainnet。

使用以下命令运行可执行文件

{% tabs %}
{% tab title=" Linux or MacOS" %}
`./deposit new-mnemonic --num_validators 1 --chain mainnet for`
{% endtab %}

{% tab title="Windows " %}
&#x20;`deposit.exe new-mnemonic --num_validators 1 --chain mainnet`
{% endtab %}
{% endtabs %}

<figure><img src="https://content.gitbook.com/content/IQGs7tgkNqzmAzzSFmsJ/blobs/UBjZ0d6eHS1esVOLKn9q/gg.PNG" alt=""><figcaption><p>Generate keys &#x26; <code>deposit_data</code></p></figcaption></figure>

### &#x20;步骤 6：记下助记词。

{% hint style="info" %}
助记词是一个 16/24 字的短语，用于生成验证器密钥。请妥善保管，将其写在纸上或使用密码管理器，并将其存储在只有您可以访问的地方。
{% endhint %}

<figure><img src="https://content.gitbook.com/content/IQGs7tgkNqzmAzzSFmsJ/blobs/Rp0QD2bPB5u7v8sH6KUZ/depo.png" alt=""><figcaption></figcaption></figure>

&#x20;运行完所有提示和确认后，`deposit-cli` 工具将为每个验证器生成两个文件：

* &#x20;deposit\_data-xxx.json 文件
* &#x20;keystore-m\_12381\_3600\_0\_0\_n\_xxx.json 文件

请妥善保管这些文件。您将需要它们来管理您的验证器。

{% hint style="info" %}
You can find alternative key generating tools [here](https://ethereum.org/en/staking/solo/#key-generators) recommended by the Ethereum foundation. 您可以在此处找到以太坊基金会推荐的替代密钥生成工具。
{% endhint %}

### &#x20;步骤 7：存入 32 ETH

* 访问以太坊 Launchpad   <https://launchpad.ethereum.org/en/upload-deposit-data>.&#x20;
* 将您的钱包连接到 Launchpad。 按照 Launchpad 上的说明存入 32 ETH。此过程涉及提交由 deposit-cli 工具生成的 deposit\_data-xxx.json 文件。
* &#x20;按照 Launchpad 上的提示存入 32 ETH，此过程需要提交 deposit-cli 工具生成的 deposit\_data-xxx.json 文件。

### 步骤 8：保存生成的文件

* &#x20;存款后，Launchpad 将提供确认。确保您已保存 deposit\_data-xxx.json 文件，因为它包含验证器的重要信息。
