Skip to main content

reallyme_openid4vp_dc_api/
lib.rs

1// SPDX-FileCopyrightText: 2026 ReallyMe Technologies Limited
2//
3// SPDX-License-Identifier: MIT OR Apache-2.0
4
5//! OpenID4VP bindings for the W3C Digital Credentials API and ISO 18013-7 Annex B.
6//!
7//! The W3C Digital Credentials API is an Editor's Draft, so wire details here
8//! are deliberately small, typed, and isolated behind this crate. OpenID4VP
9//! profile and transport crates should depend on these models rather than
10//! duplicating draft-specific strings.
11//!
12//! Serde implementations in this crate exist only for bounded internal
13//! protocol parsing. They are not stable SDK DTO contracts. Cross-language and
14//! SDK boundaries must use the generated OpenID4VP protobuf messages and
15//! generated ProtoJSON.
16
17mod error;
18mod mdoc;
19mod request;
20mod request_deserialize;
21mod response;
22
23pub use error::{DcApiError, DcApiErrorReason};
24pub use mdoc::{
25    build_dc_api_handover_digest, build_dc_api_session_transcript, build_redirect_handover_digest,
26    build_redirect_session_transcript, CanonicalMdocHandoverCborEncoder, EncodedHandoverInfo,
27    EncodedMdocSessionTranscript, HandoverDigest, HandoverDigestInput, HandoverKind,
28    MdocDeviceResponseB64, MdocHandoverCborEncoder, OpenId4VpDcApiHandover,
29    OpenId4VpRedirectHandover, MAX_MDOC_HANDOVER_TEXT_BYTES, SHA256_DIGEST_BYTES,
30};
31pub use request::{
32    DcApiProtocol, DcApiRequestKind, DigitalCredentialGetRequest, DigitalCredentialGetRequestData,
33    DigitalCredentialRequestOptions, JwsJsonGeneral, JwsJsonSignature, MAX_JWS_JSON_GENERAL_BYTES,
34    MAX_JWS_JSON_SIGNATURES, OPENID4VP_PROTOCOL_PREFIX,
35};
36pub use response::{DcApiAuthorizationResponse, EncryptedDcApiAuthorizationResponse};