rust-bitcoin / rust-miniscript

Support for Miniscript and Output Descriptors for rust-bitcoin
Creative Commons Zero v1.0 Universal
351 stars 137 forks source link

Support for address / scriptPubKey descriptors, or expose the descriptor checksum helper #294

Open darosior opened 2 years ago

darosior commented 2 years ago

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.

sanket1729 commented 1 year ago

Can look into this once we begin the partial descriptors journey.

sanket1729 commented 1 year ago

Sorry for the year+ late response. The checksum function is fairly stable, we can make this public for other uses for checksum algorithm too.

sanket1729 commented 1 year ago

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

apoelstra commented 1 year ago

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.