<p>From my experience the bitcoin wallet can only use listunspend with known addresses and keys. One can import keys or addresses, addresses without keys will be watch-only addresses. I am not sure if txindex=1 is required though (with a rescan of the blockchain). <a href="https://bitcoin.org/en/developer-reference#listunspent" rel="nofollow noreferrer">See here</a> and for txindex also <a href="https://en.bitcoin.it/wiki/Running_Bitcoin" rel="nofollow noreferrer">here</a>.</p>

CC BY-SA 4.0
2018-06-18T21:34:51.590Z
2018-06-18T21:34:51.590Z
pebwindkraft
<blockquote>
  <p>If I created an address without using bitcoin core then can I get the
  unspents of the address?</p>
</blockquote>

<p>No you cant see them using command <code>listunspent</code></p>

<blockquote>
  <p>I tried using dumpprivkey and it is returning Error message</p>
</blockquote>

<p>This is because your node doesnt identify the address that is not generated by it. It has inbuilt wallet configuration that allow you to  send and recive fund in addresses generated by your full node . As It doesnt  have any info about address created outside <strong>your</strong> <strong>full node</strong>  it gives you error message when you call for private key.
 You cant even transfer fund from such addresses as you dont have private key to do so. </p>

<p>You can use bitcoin libraries to generate address, and store their pvt key to sign transaction . Full node has nothing to do in process.</p>

CC BY-SA 4.0
2018-06-25T12:31:14.680Z
2018-06-25T12:31:14.680Z
Parishilan Rayamajhi
<p>I installed bitcoin core and I am generating an address using <strong>getnewaddress</strong>. To get the private_key of the address I am using <strong>dumpprivkey</strong>. To get the unspents I am using <strong>listunspent</strong>. Till here everything is working perfectly. Now the problem is let's say If I created an address without using bitcoin core then can I get the unspents of the address? I tried using <strong>dumpprivkey</strong> and it is returning</p>

<pre><code>unspent = host.call('listunspent',0,9999999,['msjK2Az65fzqzUDA6yB6QeNi42ssUAxG93'])
</code></pre>

<p>Error:</p>

<pre><code>Exception: Error in RPC call: {'code': -4, 'message': 'Private key for address msjK2Az65fzqzUDA6yB6QeNi42ssUAxG93 is not known'}
</code></pre>

<p>I tried <strong>listunspent</strong> and it is returning empty list. How to get the unspent of the address created without using bitcoin core?</p>

<transactions><bitcoin-core><address-generation><listunspent>
How to generate an address for bitcoin?
merklexy
# How to generate an address for bitcoin?

(Asked by: username_0 on 2018-06-18)

I installed bitcoin core and I am generating an address using **getnewaddress**. To get the private\_key of the address I am using **dumpprivkey**. To get the unspents I am using **listunspent**. Till here everything is working perfectly. Now the problem is let's say If I created an address without using bitcoin core then can I get the unspents of the address? I tried using **dumpprivkey** and it is returning

```
unspent = host.call('listunspent',0,9999999,['msjK2Az65fzqzUDA6yB6QeNi42ssUAxG93'])

```

Error:

```
Exception: Error in RPC call: {'code': -4, 'message': 'Private key for address msjK2Az65fzqzUDA6yB6QeNi42ssUAxG93 is not known'}

```

I tried **listunspent** and it is returning empty list. How to get the unspent of the address created without using bitcoin core?

**Tags:** transactions, bitcoin-core, address-generation, listunspent


---

## 2 answers

### Answer by username_1 on 2018-06-18. Score: 0 | Accepted answer

From my experience the bitcoin wallet can only use listunspend with known addresses and keys. One can import keys or addresses, addresses without keys will be watch-only addresses. I am not sure if txindex=1 is required though (with a rescan of the blockchain). [See here](https://bitcoin.org/en/developer-reference#listunspent) and for txindex also [here](https://en.bitcoin.it/wiki/Running_Bitcoin).


---

### Answer by username_2 on 2018-06-25. Score: 0

> If I created an address without using bitcoin core then can I get the
> unspents of the address?

No you cant see them using command `listunspent`

> I tried using dumpprivkey and it is returning Error message

This is because your node doesnt identify the address that is not generated by it. It has inbuilt wallet configuration that allow you to send and recive fund in addresses generated by your full node . As It doesnt have any info about address created outside **your** **full node** it gives you error message when you call for private key.
You cant even transfer fund from such addresses as you dont have private key to do so.

You can use bitcoin libraries to generate address, and store their pvt key to sign transaction . Full node has nothing to do in process.


---

