Skip to main content

lexe_connect/
lib.rs

1//! LexeConnect: one-tap sharing of a Lexe client credential with an app or
2//! service. Implements the protocol parts of the [LexeConnect spec]; UI and
3//! credential creation are left to the WALLET.
4//!
5//! 1. The REQUESTER builds a `PendingRequest` and shows its connection string
6//!    as a link or QR code.
7//! 2. The WALLET [parses] it, shows the user a [`RequesterDisplay`], and
8//!    responds with a [`DeliveryAction`].
9//! 3. The REQUESTER accepts the delivered bytes, which yields the verified
10//!    [`CredentialResponse`].
11//!
12//! - Comments cite the spec by section heading, e.g. `// Spec: Encryption`.
13//! - Everything is I/O-free except the `http` module.
14//! - The REQUESTER side and `respond` need the `crypto` feature; without it the
15//!   crate is types only, e.g. for parsing connection strings.
16//!
17//! [LexeConnect spec]: https://github.com/lexe-app/lexe-connect
18//! [parses]: request::CredentialRequest::parse
19//! [`RequesterDisplay`]: wallet::RequesterDisplay
20//! [`DeliveryAction`]: wallet::DeliveryAction
21//! [`CredentialResponse`]: response::CredentialResponse
22
23/// HTTP delivery and a mailbox client.
24#[cfg(feature = "http")]
25pub mod http;
26
27/// The mailbox address and an in-memory mailbox store.
28pub mod mailbox;
29/// The credential request and its connection string.
30pub mod request;
31/// The REQUESTER side: build requests, accept and verify responses.
32#[cfg(feature = "crypto")]
33pub mod requester;
34/// The credential response and its JSON form.
35pub mod response;
36/// HPKE sealing of responses.
37pub mod seal;
38/// The WALLET side: approval screen model and response delivery.
39pub mod wallet;
40
41/// Lexe's public mailbox.
42//
43// Spec: `mailbox_url` delivery.
44pub const LEXE_MAILBOX_URL: &str = "https://lexe.app/mailbox";