Skip to main content

reallyme_openid4vci_types/
lib.rs

1// SPDX-FileCopyrightText: Copyright © 2026 ReallyMe Technologies Limited. All rights reserved
2//
3// SPDX-License-Identifier: MIT OR Apache-2.0
4
5//! OpenID4VCI 1.0 final wire types and validation helpers.
6//!
7//! This crate owns JSON-facing data structures only. Issuer storage, signing,
8//! proof verification, wallet HTTP transport, and profile policy live in
9//! sibling crates so the wire model remains stable and auditable.
10
11pub mod credential_error;
12pub mod error;
13pub mod format;
14pub mod jwk;
15pub mod metadata;
16pub mod nonce;
17pub mod notification;
18pub mod offer;
19pub mod problem;
20pub mod request;
21pub mod response;
22
23mod validation;
24
25pub use credential_error::{
26    CredentialErrorCode, CredentialErrorResponse, DeferredCredentialErrorCode,
27    DeferredCredentialErrorResponse, NotificationErrorCode, NotificationErrorResponse,
28};
29pub use error::{OpenId4VciError, OpenId4VciResult, Reason};
30pub use format::CredentialFormat;
31pub use jwk::{PublicJwk, PublicJwkSet};
32pub use metadata::{
33    BatchCredentialIssuance, CredentialConfiguration, CredentialRequestEncryptionMetadata,
34    CredentialResponseEncryptionMetadata, CredentialSigningAlg, IssuerDisplay, IssuerInformation,
35    IssuerLogo, IssuerMetadata, IssuerMetadataBuilder, KeyAttestationsRequired, ProofTypeMetadata,
36    MIN_BATCH_SIZE,
37};
38pub use nonce::{NonceRequest, NonceResponse};
39pub use notification::{NotificationEvent, NotificationRequest};
40pub use offer::{
41    build_credential_offer_reference_uri, build_credential_offer_uri, parse_credential_offer_uri,
42    AuthorizationCodeGrant, CredentialOffer, CredentialOfferGrant, ParsedCredentialOffer,
43    PreAuthorizedCodeGrant, TxCode, TxCodeInputMode, DEFAULT_CREDENTIAL_OFFER_SCHEME,
44    MAX_CREDENTIAL_OFFER_URI_BYTES,
45};
46pub use problem::{IssuerProblemStatus, ProblemDetails, ProblemType};
47pub use request::{
48    CredentialRequest, CredentialResponseEncryption, CredentialSelector, Proofs,
49    ReallyMeZkV1IssuanceRequest, MAX_REALLYME_ZK_V1_ISSUANCE_REQUEST_BYTES,
50};
51pub use response::{
52    CredentialEnvelope, CredentialPayload, CredentialResponse, DeferredCredentialRequest,
53    MAX_CREDENTIAL_RESPONSE_JSON_BYTES,
54};