How do I obtain a checksum for a Taproot descriptor so that I can import it using importmulti?

Thanks to darosior for answering this on IRC.

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.