ElementsProject / elements-miniscript

Creative Commons Zero v1.0 Universal
11 stars 14 forks source link

Add ELIP-deterministic-descriptor-blinding-key module #61

Closed LeoComandini closed 8 months ago

LeoComandini commented 9 months ago

Reference implementation for https://github.com/ElementsProject/ELIPs/pull/8

LeoComandini commented 9 months ago

Implementing FromStr for "ct(elipxxxx,DESC)" (ie with "elipxxxx" instead of the actual key) is a bit tricky because of the network. View keys are in WIF format which includes the (bitcoin) network. I think we have 3 options:

Anyway independently from the choice this will be a separate commit, and perhaps a separate PR.

apoelstra commented 9 months ago

Is there any way we can change the viewkey format from WIF (which includes a network) to hex? Or to bech32 with a custom viewkey/elipxxx/whatever prefix?

LeoComandini commented 9 months ago

Is there any way we can change the viewkey format from WIF (which includes a network) to hex? Or to bech32 with a custom viewkey/elipxxx/whatever prefix?

I think that implies amending ELIP-150. Which I'm supportive of, and I think we're still in time to do it.

apoelstra commented 9 months ago

I think we should. Having network bytes inside descriptors is a huge pain and I definitely didn't intend to cause that to happen.

It is Thanksgiving here and I should not be at work :) but happy to review/merge such a change next week, if it makes sense on your end.

LeoComandini commented 9 months ago

I think we should. Having network bytes inside descriptors is a huge pain and I definitely didn't intend to cause that to happen.

It is Thanksgiving here and I should not be at work :) but happy to review/merge such a change next week, if it makes sense on your end.

ELIP changes: https://github.com/ElementsProject/ELIPs/pull/9

Reference impl changes: https://github.com/ElementsProject/elements-miniscript/pull/64