<p>You can obtain the checksum using:</p>
<p><code>bitcoin-cli getdescriptorinfo insert_descriptor_here</code>.</p>
<p>This outputs the descriptor with the checksum appended at the end under &quot;descriptor&quot; and a separate &quot;checksum&quot; field with the checksum on its own.</p>
<pre><code>{
  &quot;descriptor&quot;: &quot;tr(c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5,{pk(fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556),pk(e493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd13)})#2rqrdjrh&quot;,
  &quot;checksum&quot;: &quot;2rqrdjrh&quot;,
  &quot;isrange&quot;: false,
  &quot;issolvable&quot;: true,
  &quot;hasprivatekeys&quot;: false
}
</code></pre>
<p>You can then use <code>bitcoin-cli importmulti</code> on that descriptor.</p>
<p>More guidance is in the <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md#checksums" rel="nofollow noreferrer">descriptor doc</a>.</p>
<p>Thanks to darosior for answering this on IRC.</p>

CC BY-SA 4.0
2022-09-13T14:59:44.597Z
As an aside, I think that if you call `getdescriptorinfo` on a descriptor that contains a privkey, it will return the descriptor with the corresponding pubkey in the `descriptor` field. But the checksum verifies this modified descriptor, not the one you passed (with privkey). The checksum for the descriptor containing the privkey would be in the `checksum` field.

I was confused by that at first (and is still very confused by descriptors so far).
Sosthène
CC BY-SA 4.0
2021-06-11T12:51:37.573Z
2021-06-21T13:40:24.907Z
2021-06-21T13:40:24.907Z
Michael Folkson
<p>I tried to import an <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md#examples" rel="nofollow noreferrer">example</a> Taproot descriptor using <code>bitcoin-cli importmulti</code></p>
<p><code>tr(c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5,{pk(fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556),pk(e493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd13)})</code></p>
<p>I got the error &quot;Missing checksum&quot;. How do I generate the checksum and where do I append it to the descriptor?</p>
<p>A checksum was added to descriptors in this <a href="https://github.com/bitcoin/bitcoin/pull/15368" rel="nofollow noreferrer">PR</a>.</p>

<taproot><output-script-descriptors><checksum>
How do I obtain a checksum for a Taproot descriptor so that I can import it using importmulti?
Michael Folkson
# How do I obtain a checksum for a Taproot descriptor so that I can import it using importmulti?

(Asked by: username_0 on 2021-06-11)

I tried to import an [example](https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md#examples) Taproot descriptor using `bitcoin-cli importmulti`

`tr(c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5,{pk(fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556),pk(e493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd13)})`

I got the error "Missing checksum". How do I generate the checksum and where do I append it to the descriptor?

A checksum was added to descriptors in this [PR](https://github.com/bitcoin/bitcoin/pull/15368).

**Tags:** taproot, output-script-descriptors, checksum


---

## 1 answers

### Answer by username_0 on 2021-06-11. Score: 1 | Accepted answer

You can obtain the checksum using:

`bitcoin-cli getdescriptorinfo insert_descriptor_here`.

This outputs the descriptor with the checksum appended at the end under "descriptor" and a separate "checksum" field with the checksum on its own.

```
{
  "descriptor": "tr(c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5,{pk(fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556),pk(e493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd13)})#2rqrdjrh",
  "checksum": "2rqrdjrh",
  "isrange": false,
  "issolvable": true,
  "hasprivatekeys": false
}

```

You can then use `bitcoin-cli importmulti` on that descriptor.

More guidance is in the [descriptor doc](https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md#checksums).

Thanks to darosior for answering this on IRC.

> **Comments:**
> **username_1**: As an aside, I think that if you call `getdescriptorinfo` on a descriptor that contains a privkey, it will return the descriptor with the corresponding pubkey in the `descriptor` field. But the checksum verifies this modified descriptor, not the one you passed (with privkey). The checksum for the descriptor containing the privkey would be in the `checksum` field.  I was confused by that at first (and is still very confused by descriptors so far).  

---

