Closed pkova closed 3 years ago
Also, the wallet output references the UP8 HD Wallet spec at https://github.com/urbit/urbit-key-generation/blob/master/test/assets/wallet0.json#L7 (located here) which is not going the be accurate after this change. Do we need a new spec for this?
exciting
Two things come to mind:
Per your comment, this library is, or at least has in practice become, the canonical JS implementation of UP8. So it feels like it should implement the UP8 spec faithfully.
It feels a little weird to add a specific bitcoin branch to the UP8 wallet itself. But if we do, and update UP8 accordingly, then that has implications on other UP8 libraries that are floating around, e.g., in Hoon and Haskell.
(Updating those certainly seems to be outside the scope of the grant deliverables, of course.)
After mulling it over, I think it's probably fine to just add the functionality here, i.e. without updating the spec, since this library doesn't strictly claim to be a precise no-more-and-no-less implementation of UP8.
If we do want to make a bitcoin branch a permanent fixture of the UP8 wallet, so that all proper UP8 wallet implementations must handle a bitcoin branch, then that can just be handled as a separate matter.
@jtobin it appears you've already given this a look, so formally requesting your review just to get this moving towards a merge.
My initial mental model regarding this was that we just generate a single bitcoin address like we do for the ethereum stuff. In actuality we're gonna need a real bip32 HD wallet here, but luckily we're dealing with HD wallets already as per the UP8 spec.
Changed the derivation path to the more appropriate m/84'/0'/0'
for this reason.
As per the bounty at https://grants.urbit.org/bounties/794126751-bitcoin-key-derivation.