# Generate / Recover normal wallet or HD wallet with password or passphrase

Request to generate a normal wallet or HD wallet. To generate an HD wallet instead of a single-address wallet, pass the `HD` parameter as `true`. The `index` parameter can only be used with HD wallet creation and references the HD wallet address to return in the JSON response.

**Request Body - `Content-Type: application/json;charset=utf-8`**

| Parameter    | Type    | Required | Description                                                                                                                         |
| ------------ | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `name`       | string  | Optional | The wallet name what you want to save.                                                                                              |
| `language`   | string  | Optional | Regional language to generate or to recover your wallet's mnemonic phrase. (*Default: English*)                                     |
| `mnemonic`   | string  | Optional | A 12- to 24-word BIP39 phrase to seed your wallet.                                                                                  |
| `password`   | string  | Optional | Password to encrypt your wallet.                                                                                                    |
| `passphrase` | string  | Optional | Passphrase for your wallet.                                                                                                         |
| `HD`         | boolean | Optional | When it is set as true, it will make or recover HD wallet.                                                                          |
| `index`      | number  | Optional | The index of the HD wallet to lookup. If present, a specific wallet address will be returned from this HDwallet (*HD Wallet only*). |

You can create an HD or normal wallet.\
\&#xNAN;*(You must give $name otherwise it generates random mnemonic)*&#x50;OST/api/v3/wallet

**Example request (HD Wallet)**

```
curl -X POST http://localhost:2442/api/v3/wallet \
-H 'Content-Type: application/json;charset=utf-8' \
--data '{"name": "HD_wallet","language": "korean", "HD": true, "passphrase": "is used with mnemonic to generate your wallet", "password": "is used to encrypt wallet file", "index": 3}`
```

**Example request (Single Address Wallet)**

```
curl -X POST http://localhost:2442/api/v3/wallet \
-H 'Content-Type: application/json;charset=utf-8' \
--data '{"name": "HD_wallet","language": "korean", "HD": true, "passphrase": "is used with mnemonic to generate your wallet", "password": "is used to encrypt wallet file", "index": 3}`
```


---

# 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://teamhycon.gitbook.io/docs/api-v3-3/untitled-2.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.
