> For the complete documentation index, see [llms.txt](https://docs.bitcoinq.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bitcoinq.xyz/btq-node/btq-node-cli-wallet/btq-node-cli-wallet-slave-keys.md).

# BTQ Node CLI Wallet - Slave Keys

## BTQ Node CLI Wallet - Slave Keys

The BTQ wallet is an XMSS Merkle tree constructed using the private key to generate leaves. Each "leaf" can also generate a tree of OTS Slave keys that can be used to sign transactions. This allows further expansion of a BTQ wallet, extending the number of transactions you can process before needing to regenerate a new wallet.

To create a `slaves.json` file, you will need a BTQ `wallet.json` file and a working installation of BTQ. See the guide for creating a BTQ CLI Wallet.

Currently, the only way to generate a `slaves.json` file is by using the command line utility `btq`. This can be installed by following the BTQ Node Guide. You will need shell access and be logged into the computer running `btq`.

### **Create a `slaves.json`**

To generate a `slaves.json` file, you need to be connected to an active and synced node. This can be a local node or any of the peers shown in your node's peer list. You also need a wallet to use for the slaves file.

Assuming you have a synced node running on the local computer and a `wallet.json` file in the local directory, you can simply enter:

```bash
btq slave_tx_generate
```

You will be asked a few questions. You can generate a maximum of 100 slaves with a single master OTS key, which is used to sign the `slaves.json` file onto the network, validating the keys.

Example prompts:

```plaintext
Src []: 0              # Which address to use in the wallet file. 0 is the first address.
Master []:             # Master Address
Number of slaves [0]:  # Number of slaves * OTS_key_height (e.g., for tree height 10, this * 1024)
Access type [0]:       # Enter 0 to allow transactions, 1 for secure mining only
Fee [0.0]:             # Fee to pay to broadcast this across the network.
```

### **Number of Slaves**

| **Tree Height** | **Available Keys** | **With `slaves.json`** |
| --------------- | ------------------ | ---------------------- |
| 8               | 256                | 6,553,600              |
| 10              | 1,024              | 104,857,600            |
| 12              | 4,096              | 1,677,721,600          |
| 14              | 16,384             | 26,843,545,600         |
| 16              | 65,536             | 429,496,729,600        |
| 18              | 262,144            | 6.871947674×10¹²       |

This guide ensures you can effectively manage and expand your BTQ CLI wallet using Slave keys.


---

# 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://docs.bitcoinq.xyz/btq-node/btq-node-cli-wallet/btq-node-cli-wallet-slave-keys.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.
