Static secp256k1::SECP256K1

source ยท
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};
let _ = SECP256K1.generate_keypair(&mut rand::thread_rng());