Closed LeoComandini closed 8 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:
FromStr
for ConfidentialDescriptor
s with "elipxxxx"
as view key stringFromStr
for (ConfidentialDescriptor, Network)
FromStr
for ConfidentialDescriptor
deducing the network from the ordinary decriptor (which we can do if eg it has one xpub), if no network can be deduced, we default to eg mainnet.Anyway independently from the choice this will be a separate commit, and perhaps a separate PR.
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?
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.
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.
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
Reference implementation for https://github.com/ElementsProject/ELIPs/pull/8