# 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}`
```
