world_id_core/
lib.rs

1//! The core library for the World ID Protocol.
2//!
3//! Read more in: <https://docs.world.org/world-id>
4
5#![deny(
6    clippy::all,
7    clippy::pedantic,
8    clippy::nursery,
9    missing_docs,
10    dead_code
11)]
12pub use eddsa_babyjubjub::{EdDSAPrivateKey, EdDSAPublicKey, EdDSASignature};
13
14#[cfg(feature = "authenticator")]
15pub mod account_registry;
16
17#[cfg(feature = "authenticator")]
18mod authenticator;
19#[cfg(feature = "authenticator")]
20pub use crate::authenticator::{Authenticator, AuthenticatorError, OnchainKeyRepresentable};
21
22pub use world_id_primitives::{Credential, CredentialVersion};
23
24#[cfg(any(feature = "authenticator", feature = "issuer"))]
25mod credential;
26#[cfg(any(feature = "authenticator", feature = "issuer"))]
27pub use credential::HashableCredential;
28
29#[cfg(feature = "issuer")]
30mod issuer;
31#[cfg(feature = "issuer")]
32pub use issuer::Issuer;
33
34#[cfg(any(feature = "authenticator", feature = "issuer"))]
35mod signer;
36#[cfg(any(feature = "authenticator", feature = "issuer"))]
37pub(crate) use signer::Signer;
38
39#[cfg(feature = "authenticator")]
40pub mod oprf;
41#[cfg(feature = "authenticator")]
42pub use oprf::ProofError;
43
44#[cfg(feature = "authenticator")]
45pub mod proof;
46
47/// Generic re-usable types
48pub mod types;
49pub use world_id_primitives::FieldElement;
50
51/// Re-export of all the World ID primitives
52pub mod primitives {
53    pub use world_id_primitives::*;
54}