<p>Once you have your <code>cardano-wallet</code> runnig, you can create a new wallet using CLI with the following command:</p>
<pre><code>$ cardano-wallet wallet create from-recovery-phrase &quot;My Wallet&quot;
Please enter a 15–24 word recovery-phrase sentence: &lt;enter generated recovery-phrase words here&gt;
(Enter a blank line if you do not wish to use a second factor.)
Please enter a 9–12 word recovery-phrase second factor: &lt;skip or enter new recovery-phrase words here&gt;
Please enter a passphrase: ****************
Enter the passphrase a second time: ****************
$
</code></pre>
<p>See <a href="https://github.com/input-output-hk/cardano-wallet/wiki/Wallet-command-line-interface#wallet-create-from-recovery-phrase" rel="nofollow noreferrer">more <code>cardano-wallet</code> cli commands</a>.</p>
<hr />
<p>To create a new wallet using <code>cardano-wallet</code> REST API, you can use the following command:</p>
<pre><code>$ curl -vX POST http://localhost:8090/v2/wallets \
   -H &quot;Content-Type: application/json; charset=utf-8&quot; \
   -d '{
        &quot;name&quot;: &quot;Shelley&quot;,
        &quot;mnemonic_sentence&quot;: [&quot;identify&quot;, &quot;screen&quot;, &quot;lock&quot;, &quot;bargain&quot;, &quot;inch&quot;, &quot;drop&quot;, &quot;canyon&quot;, &quot;flock&quot;, &quot;dry&quot;, &quot;zone&quot;, &quot;wash&quot;, &quot;argue&quot;, &quot;system&quot;, &quot;glory&quot;, &quot;light&quot;],
        &quot;passphrase&quot;: &quot;Secure Passphrase&quot;,
        &quot;address_pool_gap&quot;: 20
        }'
</code></pre>
<p>See <a href="https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/postWallet" rel="nofollow noreferrer">REST API documentation</a> for more information about this call.</p>

CC BY-SA 4.0
2021-06-02T07:56:53.513Z
I know how to create wallet, I have already read the documentation. I want to know how to generate new address when you created your own wallet, there is 20 address in your wallet after created, I want to generate more.
mackie
CC BY-SA 4.0
2021-06-02T10:08:35.327Z
This is what `address_pool_gap` is for, you can specify more than 20 address, but be careful!  Using values other than 20 automatically makes your wallet invalid with regards to BIP-44 address discovery (https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki). It means that you will not be able to fully restore your wallet in a different software which is strictly following BIP-44.
Marek Mahut - StakeNuts
CC BY-SA 4.0
2021-06-02T07:44:44.987Z
2021-06-02T07:44:44.987Z
Marek Mahut - StakeNuts
<p>Do you mean something like that?</p>
<pre><code># generate keys
cardano-cli address key-gen --verification-key-file payment.vkey --signing-key-file payment.skey
# build address from pubkey
cardano-cli address build --payment-verification-key-file payment.vkey --out-file payment.addr --mainnet
</code></pre>

CC BY-SA 4.0
2021-06-02T06:57:24.643Z
yeah, but instead of using cardano-cli, i'm using cardano-wallet cli and wallet backend restful api.
mackie
CC BY-SA 4.0
2021-06-02T06:55:35.110Z
2021-06-02T06:55:35.110Z
wutzebaer
<p>yoroi and daedalus provide UI to generate new wallet address, how can i use cardano-wallet cli and cardano rest api to generate new address?</p>

<wallet><cardano-cli><cardano-node><api>
How can i generate new wallet address using cardano-wallet cli and cardano wallet api after created my wallet?
# How can i generate new wallet address using cardano-wallet cli and cardano wallet api after created my wallet?

(Asked by: username_0 on 2021-06-02)

yoroi and daedalus provide UI to generate new wallet address, how can i use cardano-wallet cli and cardano rest api to generate new address?

**Tags:** wallet, cardano-cli, cardano-node, api

---

## 2 answers

### Answer by username_1 on 2021-06-02. Score: 3

Once you have your cardano-wallet runnig, you can create a new wallet using CLI with the following command:
$ cardano-wallet wallet create from-recovery-phrase "My Wallet"
Please enter a 15–24 word recovery-phrase sentence: 
(Enter a blank line if you do not wish to use a second factor.)
Please enter a 9–12 word recovery-phrase second factor: 
Please enter a passphrase: ****************
Enter the passphrase a second time: ****************
$

See more cardano-wallet cli commands.

To create a new wallet using cardano-wallet REST API, you can use the following command:
$ curl -vX POST http://localhost:8090/v2/wallets \
   -H "Content-Type: application/json; charset=utf-8" \
   -d '{
        "name": "Shelley",
        "mnemonic_sentence": ["identify", "screen", "lock", "bargain", "inch", "drop", "canyon", "flock", "dry", "zone", "wash", "argue", "system", "glory", "light"],
        "passphrase": "Secure Passphrase",
        "address_pool_gap": 20
        }'

See REST API documentation for more information about this call.

> **Comments:**
> **username_0**: I know how to create wallet, I have already read the documentation. I want to know how to generate new address when you created your own wallet, there is 20 address in your wallet after created, I want to generate more.  
> **username_1**: This is what `address_pool_gap` is for, you can specify more than 20 address, but be careful!  Using values other than 20 automatically makes your wallet invalid with regards to BIP-44 address discovery (https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki). It means that you will not be able to fully restore your wallet in a different software which is strictly following BIP-44.  

---

### Answer by username_2 on 2021-06-02. Score: 2

Do you mean something like that?
# generate keys
cardano-cli address key-gen --verification-key-file payment.vkey --signing-key-file payment.skey
# build address from pubkey
cardano-cli address build --payment-verification-key-file payment.vkey --out-file payment.addr --mainnet

> **Comments:**
> **username_0**: yeah, but instead of using cardano-cli, i'm using cardano-wallet cli and wallet backend restful api.  

---

