<p>Running Bitcoin Core (bitcoind or bitcoin-qt) already means running a node.
You don't need to set it up.</p>
<p>The <code>addnode</code> function is used to manually add a connection to another node.
This is not something necessary, unless you have specific reasons to connect to a particular node (e.g. a node you trust).
This function does not return any object (although executed successfully), which is why get null in return.</p>
<p><code>getnodeaddresses</code> returns a random subset of node addresses known to your node.</p>
<p>As for the RPC methods, <code>generateprivkey</code> does not exist, while the error for <code>createrawtransaction</code> is probably due to a wrong input format (you are missing the squared brackets in the second object)
The correct format is:</p>
<pre><code>[{&quot;txid&quot;:&quot;id&quot;,&quot;vout&quot;:n},...] [{&quot;address&quot;:amount},{&quot;data&quot;:&quot;hex&quot;},...]
</code></pre>
<p>Also note that you won't be able to create a transaction without having the corresponding keys in your wallet.</p>

CC BY-SA 4.0
2020-09-10T04:36:05.837Z
Thanks for correcting my mistakes and explain that I don't need to set up a node in it. As for the createrawtransaction format, I would like to ask the following: 

createrawtransaction [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] 

Okay, as for the "sequence" is the private key right? (this one I'm stuck with error in the command line in Console using "importprivkey") and the "data" --> it said as "key-value pair" where can I get this?
Jsim
CC BY-SA 4.0
2020-09-11T11:09:24.307Z
A basic transaction has 1 or more inputs of the type (txid:vout), corresponding to unspent outputs from previous transactions sent to your address, and 1 or more outputs of the type (address:amount). The correct sequence of actions you need is: 1. create the raw transaction, 2. sign it, 3. broadcast it.

You might want to take a look at some step-by-step guide, like this one: https://medium.com/coinmonks/how-to-create-a-raw-bitcoin-transaction-step-by-step-239b888e87f2 . You will find many on the Internet.
FedFranz
CC BY-SA 4.0
2020-09-11T11:13:10.680Z
When you import a private key, the client should rescan the blockchain to see what transactions are spendable with such a key.  You can then check the list of unspent outputs to create a new transaction.
Please consider using testnet to learn, instead of mainnet. You can obtain testnet coins for free from any "faucet" on the internet
FedFranz
CC BY-SA 4.0
2020-09-11T14:00:16.123Z
thanks for the clear explanation. I have checked out on the link https://medium.com/coinmonks/how-to-create-a-raw-bitcoin-transaction-step-by-step-239b888e87f2 sorry as I'm no expert and non-developer. those script of Create a raw transaction, where can I run it? Like Atom Editor? Command Prompt? But I don't think I can run that script in Bitcoin Core right? Correct me and guide me, many thanks.
Jsim
CC BY-SA 4.0
2020-09-11T14:21:35.270Z
Those are command line instructions (so from the prompt). I don't know the console, I guess it works the same way. But if you are no expert and you do not need to use the console to send transactions. Just look for the corresponding function in the software interface.
FedFranz
CC BY-SA 4.0
2020-09-12T15:49:08.033Z
thanks for your reply. I can use the Console provided with the right command line. Sorry, you mentioned the software interface with the corresponding function-which one are you referring to?
Jsim
CC BY-SA 4.0
2020-09-14T10:02:43.623Z
I refer to the "Send" function of the Bitcoin-qt interface
FedFranz
CC BY-SA 4.0
2020-09-09T11:03:38.640Z
2020-09-09T11:03:38.640Z
FedFranz
<p>I would like to ask the following. I've downloaded Bitcoin Core and just start using their &quot;Console&quot;. Before I can createrawtransaction, I need to first set up a node in Bitcoin Core, right? If yes, I did follow the instruction in <a href="https://developer.bitcoin.org/reference/rpc/index.html" rel="nofollow noreferrer">https://developer.bitcoin.org/reference/rpc/index.html</a>.</p>
<p>However, when I want to apply a node for myself that is using --&gt; addnode &quot;167.172.250.161:8333&quot; &quot;onetry&quot;</p>
<p>but end up is Null although I have requested for &quot;getnodeaddresses&quot; as per the screenshot:</p>
<p><a href="https://i.sstatic.net/dCTUT.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/dCTUT.png" alt="enter image description here" /></a></p>
<p>Please advise as I need to &quot;importprivkey&quot; in order to perform the createrawtransaction.</p>
<p>Also, my apology I would like to ask this as well. Why when I send createrawtransaction in the Bitcoin Core Console, the error it states here that the error - Method not found (code -32601). Anyone can advise or provide guidance to me? I'm no expert in this. Thanks in advance.</p>
<p><a href="https://i.sstatic.net/r0Sn7.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/r0Sn7.png" alt="enter image description here" /></a></p>

<bitcoin-core>
Need Help about Console in Bitcoin Core
Jsim
# Need Help about Console in Bitcoin Core

(Asked by: username_0 on 2020-09-09)

I would like to ask the following. I've downloaded Bitcoin Core and just start using their "Console". Before I can createrawtransaction, I need to first set up a node in Bitcoin Core, right? If yes, I did follow the instruction in <https://developer.bitcoin.org/reference/rpc/index.html>.

However, when I want to apply a node for myself that is using --> addnode "167.172.250.161:8333" "onetry"

but end up is Null although I have requested for "getnodeaddresses" as per the screenshot:

[![enter image description here](https://i.sstatic.net/dCTUT.png)](https://i.sstatic.net/dCTUT.png)

Please advise as I need to "importprivkey" in order to perform the createrawtransaction.

Also, my apology I would like to ask this as well. Why when I send createrawtransaction in the Bitcoin Core Console, the error it states here that the error - Method not found (code -32601). Anyone can advise or provide guidance to me? I'm no expert in this. Thanks in advance.

[![enter image description here](https://i.sstatic.net/r0Sn7.png)](https://i.sstatic.net/r0Sn7.png)

**Tags:** bitcoin-core


---

## 1 answers

### Answer by username_1 on 2020-09-09. Score: 1

Running Bitcoin Core (bitcoind or bitcoin-qt) already means running a node.
You don't need to set it up.

The `addnode` function is used to manually add a connection to another node.
This is not something necessary, unless you have specific reasons to connect to a particular node (e.g. a node you trust).
This function does not return any object (although executed successfully), which is why get null in return.

`getnodeaddresses` returns a random subset of node addresses known to your node.

As for the RPC methods, `generateprivkey` does not exist, while the error for `createrawtransaction` is probably due to a wrong input format (you are missing the squared brackets in the second object)
The correct format is:

```
[{"txid":"id","vout":n},...] [{"address":amount},{"data":"hex"},...]

```

Also note that you won't be able to create a transaction without having the corresponding keys in your wallet.

> **Comments:**
> **username_0**: Thanks for correcting my mistakes and explain that I don't need to set up a node in it. As for the createrawtransaction format, I would like to ask the following:   createrawtransaction [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...]   Okay, as for the "sequence" is the private key right? (this one I'm stuck with error in the command line in Console using "importprivkey") and the "data" --> it said as "key-value pair" where can I get this?  
> **username_1**: A basic transaction has 1 or more inputs of the type (txid:vout), corresponding to unspent outputs from previous transactions sent to your address, and 1 or more outputs of the type (address:amount). The correct sequence of actions you need is: 1. create the raw transaction, 2. sign it, 3. broadcast it.  You might want to take a look at some step-by-step guide, like this one: https://medium.com/coinmonks/how-to-create-a-raw-bitcoin-transaction-step-by-step-239b888e87f2 . You will find many on the Internet.  
> **username_1**: When you import a private key, the client should rescan the blockchain to see what transactions are spendable with such a key.  You can then check the list of unspent outputs to create a new transaction. Please consider using testnet to learn, instead of mainnet. You can obtain testnet coins for free from any "faucet" on the internet  
> **username_0**: thanks for the clear explanation. I have checked out on the link https://medium.com/coinmonks/how-to-create-a-raw-bitcoin-transaction-step-by-step-239b888e87f2 sorry as I'm no expert and non-developer. those script of Create a raw transaction, where can I run it? Like Atom Editor? Command Prompt? But I don't think I can run that script in Bitcoin Core right? Correct me and guide me, many thanks.  
> **username_1**: Those are command line instructions (so from the prompt). I don't know the console, I guess it works the same way. But if you are no expert and you do not need to use the console to send transactions. Just look for the corresponding function in the software interface.  
> **username_0**: thanks for your reply. I can use the Console provided with the right command line. Sorry, you mentioned the software interface with the corresponding function-which one are you referring to?  
> **username_1**: I refer to the "Send" function of the Bitcoin-qt interface  

---

