-
Notifications
You must be signed in to change notification settings - Fork 831
Rename xpub and xpriv types #2019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename xpub and xpriv types #2019
Conversation
The BIP-32 extended public key and extended private key exist in the Bitcoin vernacular as xpub and xpriv. We can use these terms with no loss of clarity. Rename our current BIP-32 types - `ExtendedPubKey` to `Xpub` - `ExtendedPrivKey` to `Xpriv` This patch is a mechanical search-and-replace, followed by running the formatter, no other manual changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK be05f9d
Just realized this clashes with pub enum DescriptorSecretKey {
/// Single private key.
Single(SinglePriv),
/// Extended private key (xpriv).
XPrv(DescriptorXKey<bip32::ExtendedPrivKey>),
/// Multiple extended private keys.
MultiXPrv(DescriptorMultiXKey<bip32::ExtendedPrivKey>),
} Shall we settle on one |
Where is the clash? |
The capital |
Oh. Yes, we should use a capital |
Well, now I'm unsure. Regardless, we should be consistent. |
ouch I was totally sure ... then I read "Well, now I'm unsure" and now I'm unsure :) "xpub" is a word implies pub enum DescriptorPublicKey {
/// Single public key.
Single(SinglePub),
/// Extended public key (xpub).
XPub(DescriptorXKey<bip32::ExtendedPubKey>),
/// Multiple extended public keys.
MultiXPub(DescriptorMultiXKey<bip32::ExtendedPubKey>),
} After writing all that I vote cc @sanket1729 if you have nothing more useful to do that debate the finer points of naming :) |
If we really want to name things unambiguously, Xpub can be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK be05f9d
That is slightly off topic but yes, I've been warming to these extra level of path lately since playing around in |
Ok, FWIW the idea behind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK be05f9d
Will hold of on merging to let @tcharding get one more word in about |
|
Damn two weeks merge window? I'd have NACKed this. xpub literally stands for I'm probably on one of the most archaic and unaided dev environments (vim..) and I don't mind typing |
The
We can't wait for ever bro, two weeks is long enough to take a holiday and still get your nacks in. |
I'm also using bare vim and don't mind typing |
The BIP-32 extended public key and extended private key exist in the Bitcoin vernacular as xpub and xpriv. We can use these terms with no loss of clarity.
Rename our current BIP-32 types
ExtendedPubKey
toXpub
ExtendedPrivKey
toXpriv
This patch is a mechanical search-and-replace, followed by running the formatter, no other manual changes.