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
97524b2 Deprecate generate_schnorrsig_keypair (Tobin Harding)
389abdd Add method KeyPair::public_key (Tobin Harding)
Pull request description:
Recently we deprecated a bunch of functions/methods that used the term `schnorrsig`. Seems we left `generate_schnorrsig_keypair` in there, along with some stale docs on it.
- Patch 1: Adds method `KeyPair::public_key` that calls through to `XOnlyPublicKey::from_keypair`.
- Patch 2: Deprecates `generate_schnorrsig_keypair` and uses the newly defined `pk.public_key()` everywhere.
### Note to reviewers
Please note, this PR has been totally re-written using the suggestions below by @apoelstra.
ACKs for top commit:
apoelstra:
ACK 97524b2
Tree-SHA512: a10255d04b86c0031d5cfe4b6357224bc7bcd31c7e278d28af414a34ba4f158dd05d712c4878dfdc327ff8cb42b4421cc0a4b2605c6781691a3158b237fda2d3
// In fuzzing mode secret->public key derivation is different, so
451
454
// hard-code the epected result.
452
455
#[cfg(not(fuzzing))]
453
-
let pk = XOnlyPublicKey::from_keypair(&sk);
456
+
let pk = kp.public_key();
454
457
#[cfg(fuzzing)]
455
458
let pk = XOnlyPublicKey::from_slice(&[0x18,0x84,0x57,0x81,0xf6,0x31,0xc4,0x8f,0x1c,0x97,0x09,0xe2,0x30,0x92,0x06,0x7d,0x06,0x83,0x7f,0x30,0xaa,0x0c,0xd0,0x54,0x4a,0xc8,0x87,0xfe,0x91,0xdd,0xd1,0x66]).expect("pk");
0 commit comments