<p><strong>1. Creating a new wallet</strong></p>
<blockquote>
<p>$ bitcoin-cli createwallet &quot;my-wallet&quot;</p>
</blockquote>
<p><strong>2. Get new Address</strong></p>
<p>Generate a new address from the wallet which you can share and use to receive coins</p>
<blockquote>
<p>bitcoin-cli -rpcwallet=&quot;my-wallet&quot; getnewaddress</p>
</blockquote>
<p><strong>3. Sending Money</strong></p>
<p>(<em>After loading money to the wallet</em>) Send money from my-wallet to bitcoin address &quot;tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx&quot;</p>
<blockquote>
<p>bitcoin-cli -rpcwallet=&quot;my-wallet&quot; sendtoaddress &quot;tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx&quot; 0.01</p>
</blockquote>
<p>More information on using and managing the wallet can be found on <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/managing-wallets.md" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/master/doc/managing-wallets.md</a></p>

CC BY-SA 4.0
2024-01-23T15:05:48.427Z
Thanks, @brandon-odiwuor. 


`>> Generate a new address from the wallet which you can share and use to receive coins`

But what about anothers addresses whic I get from deriveaddresses?


`>> (After loading money to the wallet) Send money from my-wallet to bitcoin address "tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx"`

What is this address? Why I can't use another?


`>> More information on using and managing the wallet can be found on https://github.com/bitcoin/bitcoin/blob/master/doc/managing-wallets.md`

Thanks. But there is so
Valentin Borisenko
CC BY-SA 4.0
2024-01-23T17:52:06.257Z
The getnewaddress RPC is generally used to get a new address while the deriveaddress RPC is used more specifically to derive addresses corresponding to an output descriptor
Brandon Odiwuor
CC BY-SA 4.0
2024-01-23T17:52:32.770Z
> bitcoin-cli deriveaddresses "descriptor" ( range )
Brandon Odiwuor
CC BY-SA 4.0
2024-01-23T19:06:51.137Z
`>> The getnewaddress RPC is generally used to get a new address while the deriveaddress RPC is used more specifically to derive addresses corresponding to an output descriptor`  
  
What it's mean? Should I use it? Or not?
Valentin Borisenko
CC BY-SA 4.0
2024-01-23T19:33:42.923Z
You should use the getnewaddress RPC to generate a new address to use from the wallet
Brandon Odiwuor
CC BY-SA 4.0
2024-03-10T16:08:09.107Z
Thanks, @brandon-odiwuor.  

`>> bitcoin-cli -rpcwallet="my-wallet" sendtoaddress "tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx" 0.01`  

And what about tx fee in this case?
Valentin Borisenko
CC BY-SA 4.0
2024-01-23T14:48:22.730Z
2024-01-23T14:48:22.730Z
Brandon Odiwuor
<p>Please explain to me what should be the procedure for working with a <strong>bitcoin-cli</strong> / <strong>RPC</strong> wallet.</p>
<p>For example:</p>
<ol>
<li>Create a wallet</li>
<li>Get a new address</li>
<li>Sending BTC: creating a transaction, signing a transaction, sending a transaction or some else?</li>
</ol>
<br>
<p><strong>Creating a wallet<br>
--------------------</strong><br>
Everything is more or less clear here, we use:</p>
<pre><code>curl --data-binary '{&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: &quot;curltest&quot;, &quot;method&quot;: &quot;createwallet&quot;, &quot;params&quot;: {&quot;wallet_name&quot;:&quot;WalletName&quot;, &quot;avoid_reuse&quot;:true , &quot;descriptors&quot;:true, &quot;load_on_startup&quot;:true}}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
</code></pre>
<p>or</p>
<pre><code>bitcoin-cli -named createwallet wallet_name=descriptors avoid_reuse=true descriptors=true load_on_startup=true
</code></pre>
<br>
<p><strong>Getting a new address<br>
------------------------</strong><br>
Here we use <strong>getnewaddress</strong>, and the questions begin: if we use <strong>deriveaddresses</strong>, then we get several addresses. What do these addresses refer to, how many of them can I receive?</p>
<p>From the documentation:</p>
<pre><code>Arguments:
1. descriptor (string, required) The descriptor.
2. range (numeric or array, optional) If a ranged descriptor is used, this specifies the end or the range (in [begin,end] notation) to derive.
</code></pre>
<p>What is <strong>end</strong> equal to? How can I find out?</p>
<br>
<p><strong>Sending BTC<br>
--------------</strong><br>
There are several ways:</p>
<ul>
<li><strong>send</strong></li>
<li><strong>sendtoaddress</strong></li>
</ul>
<p>I received the transaction Id, what should I do after that? Use <strong>createrawtransaction</strong>, then <strong>signrawtransactionwithwallet</strong>, and then <strong>sendrawtransaction</strong>? Or something else?</p>
<p>Thank you.</p>

<transactions><transaction-fees><json-rpc><bitcoin-cli><fee-estimation>
Create transaction and so on
Valentin Borisenko
# Create transaction and so on

(Asked by: username_0 on 2024-01-23)

Please explain to me what should be the procedure for working with a **bitcoin-cli** / **RPC** wallet.

For example:

1. Create a wallet
2. Get a new address
3. Sending BTC: creating a transaction, signing a transaction, sending a transaction or some else?

  

**Creating a wallet  
--------------------**  
Everything is more or less clear here, we use:

```
curl --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "createwallet", "params": {"wallet_name":"WalletName", "avoid_reuse":true , "descriptors":true, "load_on_startup":true}}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

```

or

```
bitcoin-cli -named createwallet wallet_name=descriptors avoid_reuse=true descriptors=true load_on_startup=true

```

  

**Getting a new address  
------------------------**  
Here we use **getnewaddress**, and the questions begin: if we use **deriveaddresses**, then we get several addresses. What do these addresses refer to, how many of them can I receive?

From the documentation:

```
Arguments:
1. descriptor (string, required) The descriptor.
2. range (numeric or array, optional) If a ranged descriptor is used, this specifies the end or the range (in [begin,end] notation) to derive.

```

What is **end** equal to? How can I find out?

  

**Sending BTC  
--------------**  
There are several ways:

* **send**
* **sendtoaddress**

I received the transaction Id, what should I do after that? Use **createrawtransaction**, then **signrawtransactionwithwallet**, and then **sendrawtransaction**? Or something else?

Thank you.

**Tags:** transactions, transaction-fees, json-rpc, bitcoin-cli, fee-estimation


---

## 1 answers

### Answer by username_1 on 2024-01-23. Score: 1

**1. Creating a new wallet**

> $ bitcoin-cli createwallet "my-wallet"

**2. Get new Address**

Generate a new address from the wallet which you can share and use to receive coins

> bitcoin-cli -rpcwallet="my-wallet" getnewaddress

**3. Sending Money**

(*After loading money to the wallet*) Send money from my-wallet to bitcoin address "tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx"

> bitcoin-cli -rpcwallet="my-wallet" sendtoaddress "tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx" 0.01

More information on using and managing the wallet can be found on <https://github.com/bitcoin/bitcoin/blob/master/doc/managing-wallets.md>

> **Comments:**
> **username_0**: Thanks, @username_1-username_1.    `>> Generate a new address from the wallet which you can share and use to receive coins`  But what about anothers addresses whic I get from deriveaddresses?   `>> (After loading money to the wallet) Send money from my-wallet to bitcoin address "tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx"`  What is this address? Why I can't use another?   `>> More information on using and managing the wallet can be found on https://github.com/bitcoin/bitcoin/blob/master/doc/managing-wallets.md`  Thanks. But there is so  
> **username_1**: The getnewaddress RPC is generally used to get a new address while the deriveaddress RPC is used more specifically to derive addresses corresponding to an output descriptor  
> **username_1**: > bitcoin-cli deriveaddresses "descriptor" ( range )  
> **username_0**: `>> The getnewaddress RPC is generally used to get a new address while the deriveaddress RPC is used more specifically to derive addresses corresponding to an output descriptor`      What it's mean? Should I use it? Or not?  
> **username_1**: You should use the getnewaddress RPC to generate a new address to use from the wallet  
> **username_0**: Thanks, @username_1-username_1.    `>> bitcoin-cli -rpcwallet="my-wallet" sendtoaddress "tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx" 0.01`    And what about tx fee in this case?  

---

