> For the complete documentation index, see [llms.txt](https://prosperitytech.gitbook.io/final-layer-blockchain-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://prosperitytech.gitbook.io/final-layer-blockchain-docs/technical-documentation/command-line-wallet.md).

# Command Line Wallet

## Command-Line Wallet

The Final Layer wallet CLI is a single Java program, `finallayer-wallet.jar`, that runs on your own machine. It creates post-quantum wallets, shows balances, sends FL, and exports your keys. Your private key is generated locally, stored encrypted, and never leaves your machine. Signing happens on your computer; the node only receives the finished, signed transaction.

### What you need

All downloadable objects needed can be found - <https://finallayerblockchain.com/downloads-4dc1e5debe995d5896470fa2>

* Java 8 or newer. Check with `java -version`.
* `finallayer-wallet.jar` (from the Final Layer team or the docs).
* Put the jar in a folder and open a terminal in that folder.

By default the wallet is saved as `finallayer-wallet.secret.json` in the current folder, and the CLI talks to the public node over gRPC at `207.148.16.239:50051`.

{% hint style="danger" %}
Anyone who has your key file password, your private key, or your 24-word seed phrase can spend your FL. There is no password reset and no support line that can recover funds. Keep backups offline and never paste a key or seed into a website.
{% endhint %}

### Create a wallet

Falcon-512 (smallest fees, no seed phrase, you back up the key file):

```
java -jar finallayer-wallet.jar new
```

ML-DSA-44 (gives you a 24-word seed phrase you can write down):

```
java -jar finallayer-wallet.jar new mldsa
```

You will be asked to set a password. It encrypts the private key on disk (PBKDF2-HMAC-SHA512 to AES-256-GCM). Write down your address, your password, and, for ML-DSA, the 24 words. For a Falcon wallet, back up the key file itself, since Falcon has no seed phrase.

To run non-interactively (scripts), set the password in the `FL_PASSWORD` environment variable instead of typing it.

### Show your address (to receive FL)

```
java -jar finallayer-wallet.jar address
```

Share the `T...` address so others can send you FL. This does not need your password.

### Check a balance

Your own balance:

```
java -jar finallayer-wallet.jar balance
```

Any address, no wallet needed (the HTTP API returns sun, where 1 FL = 1,000,000 sun):

{% tabs %}
{% tab title="bash" %}

```
curl -s -X POST http://207.148.16.239:8090/wallet/getaccount \
  -d '{"address":"<T address>","visible":true}'
```

{% endtab %}

{% tab title="Windows cmd / PowerShell" %}

```
curl -s -X POST http://207.148.16.239:8090/wallet/getaccount -d "{\"address\":\"<T address>\",\"visible\":true}"
```

{% endtab %}
{% endtabs %}

### Send FL

```
java -jar finallayer-wallet.jar send <toAddress> <amountFL>
```

Example:

```
java -jar finallayer-wallet.jar send TJRMfQPMUySjcX4WTe57qjsDD2eyThoAVA 12.5
```

You will be asked for your password so the CLI can decrypt your key and sign. Amounts are in FL and may have decimals. The transaction is signed locally with your post-quantum key, and before signing the CLI checks that the transaction the node built pays exactly the address and amount you entered.

### Get your private key or seed phrase

To back up or move your wallet, export the secret. This asks for your password, then prints your private key and, for ML-DSA wallets, your 24-word seed phrase.

```
java -jar finallayer-wallet.jar export
```

`reveal` and `key` are aliases for the same command.

{% hint style="danger" %}
Anything this prints is a full spending key. Do it only on a machine you trust, clear your terminal history afterward, and never send it to anyone or paste it into a website. Final Layer staff will never ask for it.
{% endhint %}

Either backup restores your wallet:

* ML-DSA: the 24-word seed phrase **or** the private key.
* Falcon: the private key (or the key file). Falcon has no seed phrase.

### Restore or import a wallet

From a 24-word ML-DSA seed phrase:

```
java -jar finallayer-wallet.jar restore "word1 word2 word3 ... word24"
```

From an existing key file:

```
java -jar finallayer-wallet.jar import path/to/wallet.secret.json
```

Both ask you to set a password for the new encrypted key file.

### Use more than one wallet

Point the CLI at a different key file with `FL_WALLET`, then run any command as usual:

{% tabs %}
{% tab title="bash" %}

```
export FL_WALLET=savings.secret.json
java -jar finallayer-wallet.jar balance
```

{% endtab %}

{% tab title="Windows cmd" %}

```
set FL_WALLET=savings.secret.json
java -jar finallayer-wallet.jar balance
```

{% endtab %}
{% endtabs %}

### Encrypt an older key file

If you have an older wallet file that stored the key in plain text, protect it with a password:

```
java -jar finallayer-wallet.jar encrypt
```

It writes the encrypted file in place and keeps the old one as `finallayer-wallet.secret.json.plaintext.bak`. Delete that backup once you have confirmed you can unlock the new file.

### Point at a different node

The CLI uses the public gRPC node by default. To use another:

{% tabs %}
{% tab title="bash" %}

```
export FL_RPC=your.node.host:50051
```

{% endtab %}

{% tab title="Windows cmd" %}

```
set FL_RPC=your.node.host:50051
```

{% endtab %}
{% endtabs %}

Set `FL_RPC_TLS=1` to use a TLS gRPC connection when your node exposes one.

### Command summary

| Command                       | What it does                                               |
| ----------------------------- | ---------------------------------------------------------- |
| `new [falcon\|mldsa]`         | Create a wallet (Falcon default)                           |
| `address` \| `receive`        | Show your address                                          |
| `balance`                     | Show your FL balance                                       |
| `send <to> <FL>`              | Send FL (asks for password)                                |
| `export` \| `reveal` \| `key` | Print your private key and seed phrase (asks for password) |
| `restore "<24 words>"`        | Restore an ML-DSA wallet from its seed phrase              |
| `import <keyfile.json>`       | Load an existing key file                                  |
| `encrypt`                     | Encrypt an older plain-text key file                       |

| Environment variable | Purpose                                                   |
| -------------------- | --------------------------------------------------------- |
| `FL_WALLET`          | Key file to use (default `finallayer-wallet.secret.json`) |
| `FL_PASSWORD`        | Password for non-interactive use                          |
| `FL_RPC`             | gRPC node (default `207.148.16.239:50051`)                |
| `FL_RPC_TLS`         | Set to `1` for a TLS gRPC connection                      |

For building your own wallet or integrating Final Layer signing into software, see Wallet Integration.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://prosperitytech.gitbook.io/final-layer-blockchain-docs/technical-documentation/command-line-wallet.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
