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