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)]
12#![allow(clippy::option_if_let_else)]
13
14pub use eddsa_babyjubjub::{EdDSAPrivateKey, EdDSAPublicKey, EdDSASignature};
15
16#[cfg(feature = "authenticator")]
17pub mod world_id_registry;
18
19#[cfg(feature = "authenticator")]
20mod authenticator;
21#[cfg(feature = "authenticator")]
22pub use crate::authenticator::{
23    Authenticator, AuthenticatorError, InitializingAuthenticator, OnchainKeyRepresentable,
24};
25
26pub use world_id_primitives::{Credential, CredentialVersion};
27
28#[cfg(any(feature = "authenticator", feature = "issuer"))]
29mod credential;
30#[cfg(any(feature = "authenticator", feature = "issuer"))]
31pub use credential::HashableCredential;
32
33#[cfg(feature = "issuer")]
34mod issuer;
35#[cfg(feature = "issuer")]
36pub use issuer::Issuer;
37
38#[cfg(any(feature = "authenticator", feature = "issuer"))]
39mod signer;
40#[cfg(any(feature = "authenticator", feature = "issuer"))]
41pub(crate) use signer::Signer;
42
43#[cfg(feature = "authenticator")]
44pub mod proof;
45
46#[cfg(any(feature = "authenticator", feature = "rp"))]
47pub mod requests;
48
49/// Generic re-usable types
50pub mod types;
51pub use world_id_primitives::FieldElement;
52
53/// Re-export of all the World ID primitives
54pub mod primitives {
55    pub use world_id_primitives::*;
56}