Closed dr-orlovsky closed 3 months ago
There is no trivial way of converting this two things; and since descriptor-wallet
will be eventually replaced by bp-wallet
, I do not think it worth spending a lot of time on this.
Currently you can use conversion between ExtendedPubkey
and Xpub
not through a string but through a fixed-size array serialization, which is supported by both and is ultra-performant. This PR makes field non-private and unlocks ability to use it.
Thanks for the suggestion, I'm now able to get an XpubDerivable
starting from a DerivationAccount
without having to manipulate any string. It requires quite a lot of code but since this should be temporary I think it's acceptable.
Just a couple of requests:
&'static
lifetime from the keychains
param?is it possible to remove the &'static lifetime from the keychains param?
no, since it uses From<'static ...> for DervationSeg
, which requires static since it panics if the length is wrong - and it means that I would need to change it to TryFrom
and return error from with
if a static type is not used. Why do you need it to be removed?
could you move this PR on top of the master branch please?
done
@zoedberg I have added XpubDerivable::try_custom
constructor which doesn't require a static argument, but which can fail. I have also renamed other constructor methods
Closes #27