# Keytool Instructions

Keytool is an auxiliary tool used for signing and sending transactions, as well as performing Miner-related operations such as change-beneficiary. It is a command-line lightweight wallet.

Due to the continuous iteration of Filecoin, the versions of Keytool will also continue to iterate. Please follow the official website to get the latest updates of Keytool. Keytool download link:&#x20;

{% embed url="<https://drive.google.com/file/d/1JW_sbMJ3Us7FKfL0K_Jrn5DdvFbwIyj1>" %}

**Before using Keytool, please read the following bullet point contents very carefully:**

* *The use of Keytool requires users to have basic computer skills and knowledge, including but not limited to file paths, command line operations, vim operations, VPN, and certain English reading abilities.*
* *The configuration environment of this article is the Calibration testnet. Calibration has a faucet (faucet) that can receive test coins TFIL. Test users can receive test coins for their own addresses after creating wallet addresses and miners. <https://faucet.calibration.fildev.network/funds.html>*
* *Access to this faucet website may require a VPN in global mode.*
* *This faucet can receive 100 TFIL at once, and each address can receive it twice every 24 hours.*
* *Keytool uses the platform to recommend Mac or Linux systems.*
* *Before starting, please confirm that your input method has been switched to the English input method.*
* *When entering commands, pay attention to the spaces between words.*

Here are the instructions for using Keytool for common operations:

#### **I. Configure environment**

1. Download and extract Keytool
2. Taking the MacOS system as an example, click "Launchpad".

<figure><img src="/files/HScPM2lpDcc8aYtFHl3G" alt=""><figcaption></figcaption></figure>

Enter "terminal" in the upper input box and click "endpoint."

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=ZTRjNTliNzViNmVjYzllOGQ1NmZhMTY3NTYxNzY0MzdfaXRmdzlSaFNxWXRVc0FnVjFQQzNoWUtabDNqOVVCYm1fVG9rZW46THlYYmI0TEE3bzR3elZ4dHlSbmw5Z0tmZ0VkXzE3MDc5OTUwNDM6MTcwNzk5ODY0M19WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/sXQ20JMqSe0RsbqtN0bo" alt=""><figcaption></figcaption></figure></div>

3. Enter the following at the endpoint to extract the path of the Keytool folder and press Enter, as shown in the figure.

`cd [space]`&#x20;

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=YTg3MDYwZTA2YzJiNzU1YjhhYjJmN2FiYTAzMjc2MjBfYVlhcmwyTkNONVc4Vnc3U2FTU2h5STJGcXlHVUZORnRfVG9rZW46SDVsYmJuSDRab0Jyckl4a0JYYWxySlFJZ2VoXzE3MDc5OTUwNjI6MTcwNzk5ODY2Ml9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/wP4YE3vK4i7HuoloSvXT" alt=""><figcaption></figcaption></figure></div>

4. If Vim is not installed, please install Vim. To confirm whether Vim is installed, enter the following at the endpoint and press Enter to observe the output.

`Vim --version`&#x20;

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=ZGY2ZDI5YWZmNmViNmJkZmE0OWE5OThhZGE4ZDczODdfdGg3ejJjRDdCMFAzaVp4cFRjdUNNNWZIUUtncTJBY1VfVG9rZW46V0pyV2JDSHlwb3FwT0x4SGxzNGxxUWxKZ3JiXzE3MDc5OTUxMTA6MTcwNzk5ODcxMF9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/ZHJ7ZY53m9zbk5h7tzWT" alt=""><figcaption></figcaption></figure></div>

5. Enter the following at the endpoint and press Enter. You can see the current network configuration. We need to modify this configuration next.

`./keytool config show`&#x20;

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=ZTg3NDBlNjYwMTE1NDA2MGZiNmYwNjA0NjkyNzczZGFfREtFQmE2V2lxcVMzdHAyV1UzMEJhWld5RXIzZGduYVJfVG9rZW46UDBSeGJSZWJIbzZTb3B4eWFqU2x6enhCZ1dmXzE3MDc5OTUxMzk6MTcwNzk5ODczOV9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/eND6Teeq8macjiRb2bJo" alt=""><figcaption></figcaption></figure></div>

6. Enter the following at the endpoint and press Enter.

`vim./.keytool/config.toml`&#x20;

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=NjUxODY0NWY3NzNkZWM2ODY2YjFlZjY0YzFmZGE5MjZfS0pJOU15Z3M4YnIwWlFJMVN6cUhEZlFWNlpWRzNwMFdfVG9rZW46RWNFeGJMb3pXb09TT3Z4a0I2WmxTd3NIZ1pnXzE3MDc5OTUxOTA6MTcwNzk5ODc5MF9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/tSb1RNdKicwv9CWaTxWO" alt=""><figcaption></figcaption></figure></div>

7. In the new interface, we can modify the configuration file.keytool/config.toml. The modification method is: first, click the i key on the keyboard to enter the editing mode

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=ZDA2ZjAzYzViM2U3ODJiZWIyMjNiYmM2ZDIxYTE1ZjlfbktHNHV1NjFhZ1VBTUVBZW1wd0k4WlE0Z2JmZFJZZUFfVG9rZW46WDZOVmJjRkpob3gxN0p4ZE02OWxRTzNVZ0JoXzE3MDc5OTUyMTM6MTcwNzk5ODgxM19WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/qWSN4GK5H6LmqNyUlgYv" alt=""><figcaption></figcaption></figure></div>

The keyboard arrow keys can adjust the cursor position. Move the cursor to the bottom line of the text and delete all content line by line.

Copy the following content to the end point. Taking Mac as an example, the shortcut to copy is Command key + C, and the shortcut to paste is Command key + V.

`Version = 3`&#x20;

`Path = "./.keytool"`&#x20;

`Author = "https://api.calibration.node.glif.io/rpc/v1"`

&#x20;`NodeAPIs = ["https://api.calibration.node.glif.io/rpc/v1"]`&#x20;

`Messenger = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIiwiYWRtaW4iXX0.CAr-tnT5Z-J3fRzpvVdNH74SNAzf9QWA9dqP8sSipqE;https://api.calibration.node.glif.io/rpc/v1" DustValue = "1000000000"`

`[DbCfg] Conn = "./keytool_calibration.sqlite" Dbg = false`

8. Click the Esc key on the keyboard to exit editing mode

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=YjcxMGQ1NjVlYzQyMTYxM2JjYzFmYWQxMWNmYTI3MGVfUkozaktQalNRaURveWtoUFp2cXFQWHR6SG4yTmN4TmJfVG9rZW46TFJ3Z2I4bWxYb0s5cVd4MnEyQ2xOYW5WZ2pjXzE3MDc5OTUyNzQ6MTcwNzk5ODg3NF9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/Os9zdwJHJPT3cityQ3zd" alt=""><figcaption></figcaption></figure></div>

9. Press and hold the Shift key while clicking the colon key.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=MDMzM2E3NTE1YzcxOGRmYjgyNWY0MTY4MTkyYzY5YzFfUXFUUE80NmpYSWEybXB3dlU5akg1SlpQNEZ4NXlzMUlfVG9rZW46Q0FMY2IzVEIwb1c5VGF4SWRSdmxKUGc5Z21iXzE3MDc5OTUyODM6MTcwNzk5ODg4M19WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/UfOrrIQ9iohVojejolwa" alt=""><figcaption></figcaption></figure></div>

10. Enter wq and press Enter to save the configuration file.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=MDQ2YzhmZTQxNjgzODdiODQ3MzdhMGU1NDYzY2Y1MzlfWGJOZlNoamVzVUJaMDUwT2ZPVGNPQThRUXZCQXB2VnJfVG9rZW46Q0tIbWJGZHNrb0d3bXZ4YlVoR2w1bW1YZ0djXzE3MDc5OTUyOTk6MTcwNzk5ODg5OV9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/jqVletdCyN1IeL1Nn3r1" alt=""><figcaption></figcaption></figure></div>

11. Enter./keytool config show to observe whether the modification result takes effect.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=NzVkYzc3ZGMzNDk0MGFiYjYxMjJlYjBiYmZhYTRhYmRfcUUyZDZENjl4bVJIbG93QTRuZDRwaW9nZmdqRmNrRHFfVG9rZW46WFFpZGJ0OWpYb2FDQWl4R0pXYmxPdkJOZ1plXzE3MDc5OTUzMTM6MTcwNzk5ODkxM19WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/tlywV6Gd0atvsE1QOYuz" alt=""><figcaption></figcaption></figure></div>

#### **II. Create a wallet address**

Enter

`./keytool wallet new --type bls`&#x20;

and press Enter.&#x20;

Follow the prompts to enter the wallet name, password, and confirmation password. **Remember this password** and use it frequently later.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=OGMzMmQ3YTdkMWEyZjYyYmMzYzc3NDEyNzhiMzJhYWRfeE5aY3hPWVZhVVpSMjVDTFVlbm5xRzlnSmpsanR0M3NfVG9rZW46Tzhjb2J3bmlmbzlJYnl4RnFXYmxvblk1ZzVjXzE3MDc5OTUzNjI6MTcwNzk5ODk2Ml9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/gxtI5u59xZ4Wsx6g8lZd" alt=""><figcaption></figcaption></figure></div>

Enter the./keytool wallet list command to view the newly generated wallet address.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=NWEyYmRmMDkzYWZiNjNhOGI4MDU3YjM3M2NjYjE2NDhfVWNDQWhMQXZWd3paUURrbjF6alhxbkZ4RHJHVTVpYnZfVG9rZW46VFZhZmJMaW9rb2k0Tnp4amt3Vmxza2VCZzJnXzE3MDc5OTUzNzM6MTcwNzk5ODk3M19WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/iviWQPT82SZ82XOubWgu" alt=""><figcaption></figcaption></figure></div>

#### **III. Apply for test coins for the wallet address**

The configuration environment of this article is the Calibration testnet.

Calibration has a faucet that can receive test coins TFIL. Test users can receive test coins for their own addresses after creating wallet addresses and miners.&#x20;

<https://faucet.calibration.fildev.network/funds.html>

Visiting this faucet website may require a VPN's global mode. This faucet can claim 100TFIL at once, and each address can claim it twice every 24 hours.

After entering the page, enter the wallet address generated in the previous step and click Send Funds. The address can be viewed through the./keytool wallet list command.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=YTgyNjBmZDA2YmUyMDBhZGE5YjZlMzJmOWZiZWNiNGZfa3VvTnFBUHp1blg0TU5kdHhaU0hNRU9ySXBQbkNOYVhfVG9rZW46Rm1ld2J5STV6b0dicE54Y28zeGxRR2tyZ3JmXzE3MDc5OTU0MTQ6MTcwNzk5OTAxNF9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/HWDHyJklRdBki8ndrppe" alt=""><figcaption></figcaption></figure></div>

Please wait one or two minutes until the transaction is on the chain. You can view the balance of the wallet address, the number of messages, and other information through the browser.&#x20;

The browser address is: <https://calibration.filfox.info>

After entering the browser, enter the wallet address in the search box in the upper right corner and press Enter.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=NDkyMTliYzQ2ODJlYjMzNTJkZjlhNjBkMDY3NGM4MDdfUHFuUGJGSlY3aUd2dkZXMUNnT0thdmUxM3U0dG9ONTZfVG9rZW46UW0zdWJYQW1sbzYwOGx4dGhBT2x4UXlyZ2FkXzE3MDc5OTU0NDA6MTcwNzk5OTA0MF9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/RpeT5tFko2ewexmJ1eUK" alt=""><figcaption></figcaption></figure></div>

You can see that the wallet address generated just now has a balance of 100 TFIL.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=MTkyMzVjNTgwY2JjYmVlYWM1MGUzZmVkYmU5ZmY1N2VfdjVmcXFrR3pBbW1tRUoyRHV4akdHUmp4aks0aGRod2ZfVG9rZW46TmZPMGJrWWs0b3E1VUF4TDBsdmw1b0I5Z3RkXzE3MDc5OTU0NTQ6MTcwNzk5OTA1NF9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/BciOZXCx5gSTwjGZLbur" alt=""><figcaption></figcaption></figure></div>

#### **IV. Set Address Nonce**

Each transaction in Filecoin has a nonce. This nonce starts from 0 and increases by 1 for each transaction. Before creating a transaction, we need to synchronize the address of the transaction sent in the local keytool with the corresponding nonce on the chain to ensure that the transaction can be sequentially uploaded to the chain.

Enter

`./keytool wallet balance -a [wallet address]`&#x20;

at the endpoint and remember to replace the items in square brackets. You can see the current nonce on the chain.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=MWQ1NDc2NDA4M2UzYzc5ZDNiZWIwYjAwYjNhNjM2Yzdfd01iSmxVNUc1bUJhQ0pPT1JOeEJJbU9PRzlETER3ZHpfVG9rZW46Wk0zWWJ3OHB1b2tBNFR4cUxnd2xKWjU3Z05lXzE3MDc5OTU1MDA6MTcwNzk5OTEwMF9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/TM1xZ5fBierZIhn6Nk2d" alt=""><figcaption></figcaption></figure></div>

Enter

`./keytool wallet set-nonce -a [wallet address] -n [new nonce]`&#x20;

at the endpoint, remember to replace the items in square brackets, as shown in the figure.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=ZDZmMTZkZjE0ZjNhNzg4Yzk2MmJkY2ZjZGNhZTUyODFfUWo2ZWRJbExsZzBqUldveDJ3VWxlWW8xYVNvZVo4T0RfVG9rZW46QlJkS2JHN1hRb204RUh4UzFZRWxIdTFvZ2JoXzE3MDc5OTU1MTE6MTcwNzk5OTExMV9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/ZYYjYcY6asAtJJKOmkBj" alt=""><figcaption></figcaption></figure></div>

**Before signing or sending a transaction, you need to manually synchronize the nonce.**

#### **V. Create Miners**

To create a miner, you need to send a transaction on the chain. Before performing the following steps, you need to synchronize the nonce. For detailed methods, please refer to Section 4 to set the address of the nonce.

Please note that if the following steps exit and restart midway, you need to resynchronize the nonce.

After synchronizing the nonce, enter at the endpoint:

`./keytool message build --from = [wallet address] --to = f04 --method = 2 --args = '{"Owner": "[wallet address]", "Worker": "[wallet address]", "WindowPoStProofType": 13, "Peer": null, "Multiaddrs": null}'`

Remember to replace the items in square brackets, as shown in the figure.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=OTlmMTJhNTYyOWI4ZTQ2NGZmNWMzMTM0NGVmNTlmMGNfUlVyRDNRdWJSNUhVNG1FYzZnTFE4YXpQWEQ3UzVFWnhfVG9rZW46QXpBbmJBcFhxb3NVcHB4aUhjZWx1V3NqZ2FoXzE3MDc5OTU2ODQ6MTcwNzk5OTI4NF9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/QHg8pBe19ZEVEL4uJdtU" alt=""><figcaption></figcaption></figure></div>

Pay attention to the file path in the red box, which is the message we just constructed. We need to sign this message now. Enter at the end point:

`./keytool message sign -f [file path in red box]`

Enter the wallet password as prompted, as shown in the figure.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=MzI1OTM1ZTU3YmZlMzcwNmU5MWNlOTEzZDUxYTgzMjNfSnpzUWQ2WXZac0RqQ3RUNUp4dHVXVEZ5MzZqcWdqVGdfVG9rZW46Q25KWmJEc3Jvb1Zpc2t4VDR6eGxUd282Z0VmXzE3MDc5OTU3MTQ6MTcwNzk5OTMxNF9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/h7kqBLg2IvPQm19TEnSi" alt=""><figcaption></figcaption></figure></div>

Pay attention to the file path in the red box, which is the signature file we just obtained. We need to send this message to the chain now. Enter at the end point:

`./Keytool message push -f [file path in red box]`

As shown in the figure.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=Mzk2NjVjMDJkYzMyODJhYjE5NGQ0YThiZjc3OGI0YTBfa1RZTXZWeTlhdEFwdmUyQjdRSE1rS3BuMFhZQnh6d09fVG9rZW46VTBOOGI3OUU5b0w3RnF4Nm4xUGxkb1ozZ3BlXzE3MDc5OTU3NDU6MTcwNzk5OTM0NV9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/9yw6NrLPNCMsCFyi8WiY" alt=""><figcaption></figcaption></figure></div>

Search for the wallet address in the browser, scroll down the page, and you can see that the message we just sent is waiting to be uploaded. Please wait patiently for one or two minutes.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=NTdlNGNmOGJiODRjNGE0NmZjNDYyY2U2OTI0MzMwMmFfNk1yanl2cW4zODl4a3VET1pxTlZ6bXJJeGR0Q0t0TlhfVG9rZW46WXp2TmJua1Nub1FxMzd4eUpwNWxWVXVrZ0hlXzE3MDc5OTU3NjE6MTcwNzk5OTM2MV9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/I5kY734eB2RTLqP1guZx" alt=""><figcaption></figcaption></figure></div>

Refresh the page, and you will find that the wallet address has a new Miner, as shown in the figure.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=OGY5MGY5YzZkMzg0NzE1Y2Y5N2ZkYTQyOWZhMTAwMmZfa1ZkaGxJbmF2bzFnVnNlVmhrR1NKYjhiZ3kyZzlyOTFfVG9rZW46TXF6QWJNdjdOb1hYZUZ4R3hrMmxDMnF2Z1NiXzE3MDc5OTU3NzA6MTcwNzk5OTM3MF9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/n1HPucDUM41pTncmsiH4" alt=""><figcaption></figcaption></figure></div>

**VI. Signature**

Synchronize the nonce before performing the following steps. For detailed methods, please refer to Section 4 for setting the address nonce.

Enter

`./keytool wallet sign [wallet address] [message to be signed]`

at the endpoint, as shown in the figure.

<div><figure><img src="https://j4etg0b7zhr.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=ODU0MjMwNTM1NDE5NzUzZmU5YTM4MmVlZDkxODY1MmFfR2lXOGZhdUZvUWsxTnJudEFPekVkQ1YycmE1cXVoeUpfVG9rZW46QWNzVWJrSmlBb203OFZ4U3lnTGxUYmFOZ3pkXzE3MDc5OTU4MjI6MTcwNzk5OTQyMl9WNA" alt=""><figcaption></figcaption></figure> <figure><img src="/files/Lc2FYeWHLfdpXqLEnq7C" alt=""><figcaption></figcaption></figure></div>

This way we get the result of the signature. You can use this method to perform the signature operation in the steps that need to be signed in Filliquid 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.filliquid.io/ko/testnet-user-manual/borrowing-usdfil/keytool-instructions.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.
