pub static SECP256K1: &GlobalContext
Expand description
A global static context to avoid repeatedly creating contexts.
If rand-std
feature is enabled, context will have been randomized using thread_rng
.
use secp256k1::{PublicKey, SECP256K1};
use secp256k1::rand::thread_rng;
let _ = SECP256K1.generate_keypair(&mut thread_rng());