<p>Bitcoin Core has a <code>scantxoutset</code> command. You give it <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md" rel="nofollow noreferrer">output script descriptors</a> (which specify <code>scriptPubKey</code>s) and it will scan the UTXO set and return the UTXOs that have <code>scriptPubKey</code>s that match the given descriptors.</p>

CC BY-SA 4.0
2020-04-27T16:57:16.553Z
Is there also an rpc endpoint for scantxoutset?
Bumblebee
CC BY-SA 4.0
2020-04-27T17:12:58.087Z
Yes. I found it: curl --data-binary '{"id":"1","jsonrpc":"1.0","method":"scantxoutset","params":["start", [{"desc":"addr(msJaKN7KCGARZrKWyy169GzztFLx7aTRBf)"}] ] }' -H 'content-type: text/plain;' http://user:password@127.0.0.1:8332
Bumblebee
CC BY-SA 4.0
2020-04-27T16:11:44.473Z
2020-04-27T16:11:44.473Z
Ava Chow
<p>In my application the private keys are created and stored on a HSM. When a new private key is created on the HSM, it returns the corresponding public key. With this public key I create a bitcoin address. Since these externally generated addresses are not part of a wallet, I'm unable to get the UTXOs of this address. Now my big questions is: How can I get the UTXOs of this address without importing it into a wallet?</p>

<bitcoin-core>
How to manage externally created addresses?
Bumblebee
# How to manage externally created addresses?

(Asked by: username_0 on 2020-04-27)

In my application the private keys are created and stored on a HSM. When a new private key is created on the HSM, it returns the corresponding public key. With this public key I create a bitcoin address. Since these externally generated addresses are not part of a wallet, I'm unable to get the UTXOs of this address. Now my big questions is: How can I get the UTXOs of this address without importing it into a wallet?

**Tags:** bitcoin-core


---

## 1 answers

### Answer by username_1 on 2020-04-27. Score: 2 | Accepted answer

Bitcoin Core has a `scantxoutset` command. You give it [output script descriptors](https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md) (which specify `scriptPubKey`s) and it will scan the UTXO set and return the UTXOs that have `scriptPubKey`s that match the given descriptors.

> **Comments:**
> **username_0**: Is there also an rpc endpoint for scantxoutset?  
> **username_0**: Yes. I found it: curl --data-binary '{"id":"1","jsonrpc":"1.0","method":"scantxoutset","params":["start", [{"desc":"addr(msJaKN7KCGARZrKWyy169GzztFLx7aTRBf)"}] ] }' -H 'content-type: text/plain;' http://user:password@127.0.0.1:8332  

---

