> For the complete documentation index, see [llms.txt](https://apexpool.gitbook.io/stake-pool-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apexpool.gitbook.io/stake-pool-scripts/stake-pool-registration/wallet.md).

# Wallet

Create a wallet starting from a 24 words seed phrase (cardano-cli and cardano-address or cardano-wallet binaries are required for this script).&#x20;

Save the following script as `wallet.sh` inside the `~/stake-pool-files/keys` folder and execute it:

```bash
#!/bin/bash


NET="testnet"
NET_WITH_MAGIC="--testnet-magic 2"

# create a new wallet
cardano-address recovery-phrase generate > phrase.prv
chmod 400 phrase.prv

cat phrase.prv | cardano-address key from-recovery-phrase Shelley > rootkey.prv
chmod 400 rootkey.prv

cat rootkey.prv | cardano-address key child 1852H/1815H/0H/2/0 > stake.prv
cardano-cli key convert-cardano-address-key --signing-key-file stake.prv --shelley-stake-key --out-file stake.skey
cardano-cli key verification-key --signing-key-file stake.skey --verification-key-file Ext_ShelleyStake.vkey
cardano-cli key non-extended-key --extended-verification-key-file Ext_ShelleyStake.vkey --verification-key-file stake.vkey
cardano-cli stake-address build --stake-verification-key-file stake.vkey --out-file stake.addr ${NET_WITH_MAGIC}
rm Ext_ShelleyStake.vkey stake.prv


cat rootkey.prv | cardano-address key child 1852H/1815H/0H/0/0 > payment.prv
cardano-cli key convert-cardano-address-key --signing-key-file payment.prv --shelley-payment-key --out-file payment.skey
cardano-cli key verification-key --signing-key-file payment.skey --verification-key-file Ext_ShelleyPayment.vkey
cardano-cli key non-extended-key --extended-verification-key-file Ext_ShelleyPayment.vkey --verification-key-file payment.vkey
cardano-cli address build --payment-verification-key-file payment.vkey  --stake-verification-key-file stake.vkey --out-file payment.addr ${NET_WITH_MAGIC}
rm Ext_ShelleyPayment.vkey payment.prv
```

The recovery words will be saved in the `phrase.prv` file. Write them down somewhere safe for future reference and as backup.


---

# 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://apexpool.gitbook.io/stake-pool-scripts/stake-pool-registration/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.
