<p>There are lots of address types (P2PKH, P2SH, P2WSH etc), some are multisigs, some are BIP32. Descriptors help the wallet software figure out what the address string actually is. If this is abstracted away from the user then the user doesn’t need to know but they are really useful for the wallet software. They let the wallet software figure out how to spend from it basically. You have some funds at an address, you import those keys to a new wallet, the descriptor helps the wallet figure out how it can spend from that address. If the existing wallet generated the address then the descriptor isn’t needed but if it didn’t it needs to know how to spend from it.</p>
<blockquote>
<p>As a user, is there anything I need to do extra?</p>
</blockquote>
<p>I don’t think so. Maybe the descriptor could be useful for the user to see in some cases if they want to know more about the funds in individual addresses or in individual UTXOs. But as I said if that is all abstracted away and the user just sees an overall balance they don’t need to do anything. Other than to upgrade to the new version of a wallet that uses descriptors</p>
<blockquote>
<p>What data is needed to figure out the address type is stored in the seed? Or how is that managed?</p>
</blockquote>
<p>The address type is not stored in the seed. That is private material that you’d need to know to spend from an address of any type. So the seed is generally referred to as the list of words you store that allow you to spend from any address in a HD wallet. A HD (hierarchical deterministic) wallet generates a tree of addresses that can all be spent from if you know that seed. However, you could have multiple HD wallets with different seeds and completely independent trees of addresses. Or you could have addresses that aren’t part of a HD tree and are just standalone addressses. So the descriptors help the wallet (or the technical user) keep track of what addresses are part of which HD trees, which addresses are standalone and not part of any HD tree, which are multisig etc etc. It can get very messy without descriptors.</p>
<blockquote>
<p>I guess my question is how descriptors are stored?</p>
</blockquote>
<p>You mean the location in the filesystem? Or the format in which it is stored? I’d need to check on these.</p>
<blockquote>
<p>When a wallet looks at an address, how does it know which descriptor was used to generate it? Does it just go through all possible options and see if something matches, like what happens during during the initial discovery of used addresses?</p>
</blockquote>
<p>If there is a descriptor e.g. wpkh this will tell the wallet what kind of address it is. If there isn’t a descriptor then sometimes the wallet will be able to recognize what kind of address it is and sometimes it won’t. If it is a pre-SegWit wallet then it won’t recognize bech32 addresses for example. With no descriptors and a HD tree of addresses then it will go through like 10 different addresses to assess if there are any funds before it gives up and assumes there are no more funds at any further addresses in the tree. If there is a descriptor you can literally tell the wallet don’t stop at 10 because I’ve got some funds sent to the 100th address in the tree.</p>
<blockquote>
<p>What would be situations when there is a descriptor and when there isn’t one?</p>
</blockquote>
<p>If the wallet that generated the addresses uses descriptors. If the wallet that generated the addresses doesn’t have descriptors implemented/doesn’t use descriptors then it doesn’t matter if new wallet you’re uploading keys to has implemented descriptors because it won’t receive any descriptors. For descriptors to be passed between two wallets the wallet that generated the addresses needs to use descriptors/have descriptors implemented and the wallet the addresses are being transferred to needs to recognize those descriptors.</p>
<blockquote>
<p>So the wallet that generated the addresses needs to store them and users need to also back up the descriptors? Or at least have them available if they switch wallets?</p>
</blockquote>
<p>Descriptors are like additional metadata to be stored with each address. If a wallet you are transferring to wants to take advantage of descriptors they need to receive the descriptor with the address. It is like handing over an address and a short description of that address rather than just the address and telling the new wallet to figure it out.</p>
<blockquote>
<p>And if I don’t transfer the descriptors, I can still import the wallet and use it as normal? Or do I lose something?</p>
</blockquote>
<p>Yeah you can throw away the descriptor at any point and not use it from that point forward. (Go back to a world before descriptors existed.) You only lose the benefits of descriptors that we’ve been discussing.</p>
<blockquote>
<p>Anyone know of any wallets using descriptors as a default wallet creation option?</p>
</blockquote>
<p>Wallets supporting output descriptors are listed <a href="https://outputdescriptors.org/" rel="noreferrer">here</a>.</p>
<p>For more information on descriptor wallets see Andrew Chow's <a href="https://diyhpl.us/wiki/transcripts/advancing-bitcoin/2020/2020-02-06-andrew-chow-descriptor-wallets/" rel="noreferrer">presentation</a> at Advancing Bitcoin 2020 or his <a href="https://achow101.com/2020/10/0.21-wallets" rel="noreferrer">blog post</a> on what's coming to the Bitcoin Core wallet in 0.21.</p>
<p>These questions were asked by members of the Bitcoin Design community.</p>

CC BY-SA 4.0
2020-10-22T09:52:07.723Z
2021-02-13T15:58:25.873Z
2021-02-13T15:58:25.873Z
Michael Folkson
<p>An output descriptor (note that output descriptor and wallet descriptor refer to the same thing) is a human readable string that represents an output script (a scriptPubKey) and everything needed in order to solve¹ for that script. Descriptors also have a bech32-like checksum which allows for the descriptor to be given to others with less risk of accidentally mistyping or losing some characters in the descriptor string.</p>
<p>Descriptors are unambiguous as to the public keys to use (derivation paths for extended keys are explicit) and the scripts to use. This makes them suitable for importing to other wallets without confusion. In contrast, traditional import mechanisms support only keys with special versioning to indicate the scripts to produce, and don't provide the derivation paths. This creates a situation where a user imports an extended key into a wallet but is unable to see their addresses because that wallet uses a different derivation path than the original wallet. Descriptors avoids this issue entirely by specifying the derivation paths (if any) and the scripts to produce.</p>
<p>A descriptor wallet is one which stores output descriptors and uses them to create addresses and sign transactions. By abstracting away address creation and transaction signing to a largely standalone module, such wallets can upgrade to using new address types much more easily.</p>
<p>For most users, the only visible effects will be in wallet import/export. Descriptors will only be shown during exporting, and descriptors should only be handled by the user when they want to import their wallet. Wallets that use descriptors internally shouldn't have any noticeable effect to the user.</p>
<hr />
<p><sup>¹: Solve - Solving a script means that one would be able to create a final scriptSig/witness with valid signatures if they had a private key. This means that all public keys and other scripts are available.</sup></p>

CC BY-SA 4.0
2020-10-19T15:16:20.093Z
2020-10-19T16:27:40.000Z
2020-10-19T16:27:40.000Z
Ava Chow
<p>I have heard about output descriptors or wallet descriptors. It is not clear to me what they are. What do they allow me to do? How does that improve my experience using Bitcoin?</p>

<wallet><output-script-descriptors>
What are output descriptors?
Murch
# What are output descriptors?

(Asked by: username_0 on 2020-10-19)

I have heard about output descriptors or wallet descriptors. It is not clear to me what they are. What do they allow me to do? How does that improve my experience using Bitcoin?

**Tags:** wallet, output-script-descriptors


---

## 2 answers

### Answer by username_2 on 2020-10-19. Score: 14 | Accepted answer

An output descriptor (note that output descriptor and wallet descriptor refer to the same thing) is a human readable string that represents an output script (a scriptPubKey) and everything needed in order to solve¹ for that script. Descriptors also have a bech32-like checksum which allows for the descriptor to be given to others with less risk of accidentally mistyping or losing some characters in the descriptor string.

Descriptors are unambiguous as to the public keys to use (derivation paths for extended keys are explicit) and the scripts to use. This makes them suitable for importing to other wallets without confusion. In contrast, traditional import mechanisms support only keys with special versioning to indicate the scripts to produce, and don't provide the derivation paths. This creates a situation where a user imports an extended key into a wallet but is unable to see their addresses because that wallet uses a different derivation path than the original wallet. Descriptors avoids this issue entirely by specifying the derivation paths (if any) and the scripts to produce.

A descriptor wallet is one which stores output descriptors and uses them to create addresses and sign transactions. By abstracting away address creation and transaction signing to a largely standalone module, such wallets can upgrade to using new address types much more easily.

For most users, the only visible effects will be in wallet import/export. Descriptors will only be shown during exporting, and descriptors should only be handled by the user when they want to import their wallet. Wallets that use descriptors internally shouldn't have any noticeable effect to the user.

---

¹: Solve - Solving a script means that one would be able to create a final scriptSig/witness with valid signatures if they had a private key. This means that all public keys and other scripts are available.


---

### Answer by username_1 on 2020-10-22. Score: 7

There are lots of address types (P2PKH, P2SH, P2WSH etc), some are multisigs, some are BIP32. Descriptors help the wallet software figure out what the address string actually is. If this is abstracted away from the user then the user doesn’t need to know but they are really useful for the wallet software. They let the wallet software figure out how to spend from it basically. You have some funds at an address, you import those keys to a new wallet, the descriptor helps the wallet figure out how it can spend from that address. If the existing wallet generated the address then the descriptor isn’t needed but if it didn’t it needs to know how to spend from it.

> As a user, is there anything I need to do extra?

I don’t think so. Maybe the descriptor could be useful for the user to see in some cases if they want to know more about the funds in individual addresses or in individual UTXOs. But as I said if that is all abstracted away and the user just sees an overall balance they don’t need to do anything. Other than to upgrade to the new version of a wallet that uses descriptors

> What data is needed to figure out the address type is stored in the seed? Or how is that managed?

The address type is not stored in the seed. That is private material that you’d need to know to spend from an address of any type. So the seed is generally referred to as the list of words you store that allow you to spend from any address in a HD wallet. A HD (hierarchical deterministic) wallet generates a tree of addresses that can all be spent from if you know that seed. However, you could have multiple HD wallets with different seeds and completely independent trees of addresses. Or you could have addresses that aren’t part of a HD tree and are just standalone addressses. So the descriptors help the wallet (or the technical user) keep track of what addresses are part of which HD trees, which addresses are standalone and not part of any HD tree, which are multisig etc etc. It can get very messy without descriptors.

> I guess my question is how descriptors are stored?

You mean the location in the filesystem? Or the format in which it is stored? I’d need to check on these.

> When a wallet looks at an address, how does it know which descriptor was used to generate it? Does it just go through all possible options and see if something matches, like what happens during during the initial discovery of used addresses?

If there is a descriptor e.g. wpkh this will tell the wallet what kind of address it is. If there isn’t a descriptor then sometimes the wallet will be able to recognize what kind of address it is and sometimes it won’t. If it is a pre-SegWit wallet then it won’t recognize bech32 addresses for example. With no descriptors and a HD tree of addresses then it will go through like 10 different addresses to assess if there are any funds before it gives up and assumes there are no more funds at any further addresses in the tree. If there is a descriptor you can literally tell the wallet don’t stop at 10 because I’ve got some funds sent to the 100th address in the tree.

> What would be situations when there is a descriptor and when there isn’t one?

If the wallet that generated the addresses uses descriptors. If the wallet that generated the addresses doesn’t have descriptors implemented/doesn’t use descriptors then it doesn’t matter if new wallet you’re uploading keys to has implemented descriptors because it won’t receive any descriptors. For descriptors to be passed between two wallets the wallet that generated the addresses needs to use descriptors/have descriptors implemented and the wallet the addresses are being transferred to needs to recognize those descriptors.

> So the wallet that generated the addresses needs to store them and users need to also back up the descriptors? Or at least have them available if they switch wallets?

Descriptors are like additional metadata to be stored with each address. If a wallet you are transferring to wants to take advantage of descriptors they need to receive the descriptor with the address. It is like handing over an address and a short description of that address rather than just the address and telling the new wallet to figure it out.

> And if I don’t transfer the descriptors, I can still import the wallet and use it as normal? Or do I lose something?

Yeah you can throw away the descriptor at any point and not use it from that point forward. (Go back to a world before descriptors existed.) You only lose the benefits of descriptors that we’ve been discussing.

> Anyone know of any wallets using descriptors as a default wallet creation option?

Wallets supporting output descriptors are listed [here](https://outputdescriptors.org/).

For more information on descriptor wallets see Andrew username_2's [presentation](https://diyhpl.us/wiki/transcripts/advancing-bitcoin/2020/2020-02-06-andrew-username_2-descriptor-wallets/) at Advancing Bitcoin 2020 or his [blog post](https://achow101.com/2020/10/0.21-wallets) on what's coming to the Bitcoin Core wallet in 0.21.

These questions were asked by members of the Bitcoin Design community.


---

