Open darosior opened 2 years ago
Can look into this once we begin the partial descriptors journey.
Sorry for the year+ late response. The checksum function is fairly stable, we can make this public for other uses for checksum algorithm too.
Made a PR to make checksum pub, keeping this open for more discussion.
I am not sure if we (ever) want to support addr
descriptors. cc @apoelstra
Making checksum pub
sounds good to me. This may even be useful for elements-miniscript.
+1 to revisiting the addr
descriptor once we have partial descriptors. For now though we should not support it.
We use address descriptors downstream (because bitcoind doesn't support Miniscript descriptors yet), and we can't compute the address descriptor checksum without bitcoind short of copying the checksum code from here. (See https://github.com/revault/revaultd/pull/364.)
If rust-miniscript had support for address or scriptPubKey descriptors this would also solve the issue as we could just leverage their
Display
implem. It would be a preferable route if we think the checksum computation should be considered internal.