You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
be5e042 Re-factor DescriptorSecretKey::to_public (Tobin C. Harding)
d179959 Re-factor DescriptorXKey to_public method (Tobin C. Harding)
5c0ecd7 Remove unused error return (Tobin C. Harding)
ab6e1d8 Re-name as_public -> to_public (Tobin C. Harding)
5c1614a Use 'master' instead of 'root' (Tobin C. Harding)
6c96ddc Refactor DescriptorPublicKey::derive method (Tobin C. Harding)
Pull request description:
As we have been doing in `rust-bitcoin` attempt to use idiomatic names for our conversion functions.
Re-name the key conversion functions `as_public` to be `to_public` because they take a borrowed type and return an owned, non-Copy type.
While we are it at do a bunch of refactoring to the individual functions. Each done as a separate patch, can drop any not wanted.
ACKs for top commit:
apoelstra:
ACK be5e042
Tree-SHA512: 3169122f4d783808314ae486c210fc1886d7340ab6089f16ee3615ef38e1babe33abf809572899b0b32a15f77d3eabb4423c32aae8f163114b469da80121b396
let secret_key = DescriptorSecretKey::from_str("tprv8ZgxMBicQKsPcwcD4gSnMti126ZiETsuX7qwrtMypr6FBwAP65puFn4v6c3jrN9VwtMRMph6nyT63NrfUL4C3nBzPcduzVSuHD7zbX2JKVc/0'/1'/2").unwrap();
839
-
let public_key = secret_key.as_public(&secp).unwrap();
847
+
let public_key = secret_key.to_public(&secp).unwrap();
let secret_key = DescriptorSecretKey::from_str("tprv8ZgxMBicQKsPcwcD4gSnMti126ZiETsuX7qwrtMypr6FBwAP65puFn4v6c3jrN9VwtMRMph6nyT63NrfUL4C3nBzPcduzVSuHD7zbX2JKVc/0'/1'/2'").unwrap();
846
-
let public_key = secret_key.as_public(&secp).unwrap();
854
+
let public_key = secret_key.to_public(&secp).unwrap();
let secret_key = DescriptorSecretKey::from_str("tprv8ZgxMBicQKsPcwcD4gSnMti126ZiETsuX7qwrtMypr6FBwAP65puFn4v6c3jrN9VwtMRMph6nyT63NrfUL4C3nBzPcduzVSuHD7zbX2JKVc/0/1/2").unwrap();
852
-
let public_key = secret_key.as_public(&secp).unwrap();
860
+
let public_key = secret_key.to_public(&secp).unwrap();
let secret_key = DescriptorSecretKey::from_str("[aabbccdd]tprv8ZgxMBicQKsPcwcD4gSnMti126ZiETsuX7qwrtMypr6FBwAP65puFn4v6c3jrN9VwtMRMph6nyT63NrfUL4C3nBzPcduzVSuHD7zbX2JKVc/0/1/2").unwrap();
858
-
let public_key = secret_key.as_public(&secp).unwrap();
866
+
let public_key = secret_key.to_public(&secp).unwrap();
let secret_key = DescriptorSecretKey::from_str("[aabbccdd/90']tprv8ZgxMBicQKsPcwcD4gSnMti126ZiETsuX7qwrtMypr6FBwAP65puFn4v6c3jrN9VwtMRMph6nyT63NrfUL4C3nBzPcduzVSuHD7zbX2JKVc/0'/1'/2").unwrap();
864
-
let public_key = secret_key.as_public(&secp).unwrap();
872
+
let public_key = secret_key.to_public(&secp).unwrap();
0 commit comments