Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 23 additions & 17 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,19 @@ extern crate core;
#[cfg(bench)]
extern crate test;

#[cfg(feature = "rand")]
pub extern crate rand;
#[cfg(feature = "serde")]
pub extern crate serde;

#[macro_use]
mod macros;
#[macro_use]
mod secret;
mod context;
mod key;
#[cfg(feature = "serde")]
mod serde_util;

pub mod constants;
pub mod ecdh;
Expand All @@ -177,32 +184,31 @@ pub mod ellswift;
pub mod musig;
pub mod scalar;
pub mod schnorr;
#[cfg(feature = "serde")]
mod serde_util;

use core::marker::PhantomData;
use core::ptr::NonNull;
use core::{fmt, mem, str};

#[cfg(all(feature = "global-context", feature = "std"))]
pub use context::global::{self, SECP256K1};
#[cfg(feature = "rand")]
pub use rand;
use crate::ffi::types::AlignedType;
use crate::ffi::CPtr;

#[rustfmt::skip] // Keep public re-exports separate.
pub use secp256k1_sys as ffi;
#[cfg(feature = "serde")]
pub use serde;

pub use crate::context::{
rerandomize_global_context, with_global_context, with_raw_global_context, AllPreallocated,
Context, PreallocatedContext, SignOnlyPreallocated, Signing, Verification,
VerifyOnlyPreallocated,
};
#[cfg(all(feature = "global-context", feature = "std"))]
pub use crate::context::global::{self, SECP256K1};
#[cfg(feature = "alloc")]
pub use crate::context::{All, SignOnly, VerifyOnly};
use crate::ffi::types::AlignedType;
use crate::ffi::CPtr;
pub use crate::key::{InvalidParityValue, Keypair, Parity, PublicKey, SecretKey, XOnlyPublicKey};
pub use crate::scalar::Scalar;
#[doc(inline)]
pub use crate::{
context::{
rerandomize_global_context, with_global_context, with_raw_global_context, AllPreallocated,
Context, PreallocatedContext, SignOnlyPreallocated, Signing, Verification,
VerifyOnlyPreallocated,
},
key::{InvalidParityValue, Keypair, Parity, PublicKey, SecretKey, XOnlyPublicKey},
scalar::Scalar,
};

/// Trait describing something that promises to be a 32-byte uniformly random number.
///
Expand Down
Loading