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
According to Rust naming convention this method should use the `to_`
prefix because it converts from a borrowed->owned (non-`Copy`) type.
Re-name the conversion methods for converting from various
private/secret keys to the associated public keys to `to_public`.
let secret_key = DescriptorSecretKey::from_str("tprv8ZgxMBicQKsPcwcD4gSnMti126ZiETsuX7qwrtMypr6FBwAP65puFn4v6c3jrN9VwtMRMph6nyT63NrfUL4C3nBzPcduzVSuHD7zbX2JKVc/0'/1'/2").unwrap();
849
-
let public_key = secret_key.as_public(&secp).unwrap();
849
+
let public_key = secret_key.to_public(&secp).unwrap();
let secret_key = DescriptorSecretKey::from_str("tprv8ZgxMBicQKsPcwcD4gSnMti126ZiETsuX7qwrtMypr6FBwAP65puFn4v6c3jrN9VwtMRMph6nyT63NrfUL4C3nBzPcduzVSuHD7zbX2JKVc/0'/1'/2'").unwrap();
856
-
let public_key = secret_key.as_public(&secp).unwrap();
856
+
let public_key = secret_key.to_public(&secp).unwrap();
let secret_key = DescriptorSecretKey::from_str("tprv8ZgxMBicQKsPcwcD4gSnMti126ZiETsuX7qwrtMypr6FBwAP65puFn4v6c3jrN9VwtMRMph6nyT63NrfUL4C3nBzPcduzVSuHD7zbX2JKVc/0/1/2").unwrap();
862
-
let public_key = secret_key.as_public(&secp).unwrap();
862
+
let public_key = secret_key.to_public(&secp).unwrap();
let secret_key = DescriptorSecretKey::from_str("[aabbccdd]tprv8ZgxMBicQKsPcwcD4gSnMti126ZiETsuX7qwrtMypr6FBwAP65puFn4v6c3jrN9VwtMRMph6nyT63NrfUL4C3nBzPcduzVSuHD7zbX2JKVc/0/1/2").unwrap();
868
-
let public_key = secret_key.as_public(&secp).unwrap();
868
+
let public_key = secret_key.to_public(&secp).unwrap();
let secret_key = DescriptorSecretKey::from_str("[aabbccdd/90']tprv8ZgxMBicQKsPcwcD4gSnMti126ZiETsuX7qwrtMypr6FBwAP65puFn4v6c3jrN9VwtMRMph6nyT63NrfUL4C3nBzPcduzVSuHD7zbX2JKVc/0'/1'/2").unwrap();
874
-
let public_key = secret_key.as_public(&secp).unwrap();
874
+
let public_key = secret_key.to_public(&secp).unwrap();
0 commit comments