Skip to main content

Crate reallyme_openid4vp_formats

Crate reallyme_openid4vp_formats 

Source
Expand description

Format-specific presentation adapters for SD-JWT VC, mdoc, and ZK proofs.

Serde implementations in this crate exist only for bounded internal protocol parsing of format-native presentation values. They are not stable SDK DTO contracts. Cross-language and SDK boundaries must use generated OpenID4VP protobuf messages and validated canonical JSON byte fields.

Modules§

mdoc
ISO mdoc presentation glue for OpenID4VP.
sd_jwt
RFC 9901 SD-JWT VC verification for OpenID4VP presentations.

Structs§

DerivedClaimStatement
Statement proven by a derived ZK presentation.
PreparedOpenId4VpRequestHashes
Digests inserted into the ZK protobuf ZkPreparedVerifierRequestV1.
PreparedOpenId4VpRequestInput
The authenticated OpenID4VP values that both sides retain for one query. The issued_at_unix and expires_at_unix values must come from the same request; prepared profiles require both even for unsigned DC API requests.
ZkFormatError
ZK presentation format error.
ZkPresentation
JSON-native ZK vp_token presentation entry.
ZkPresentationBinding
Binding hashes embedded in the ZK presentation envelope.
ZkPresentationCircuitRef
Exact imported circuit source used for an artifact-backed proof.
ZkPresentationStage
One exact circuit proof inside the production presentation bundle.

Enums§

ZkFormatErrorReason
Stable ZK presentation error taxonomy.
ZkPresentationArtifactIdentity
Explicit artifact construction carried by a presentation stage.
ZkPresentationProfile
Production credential-proof profile carried by a ZK presentation.
ZkPresentationProofSuite
Fully specified proof suite carried by a ZK presentation envelope.
ZkPresentationStageKind
Required production stage carried in a ZK presentation bundle.

Constants§

FORMAT_DC_SD_JWT
OpenID4VP final SD-JWT VC format identifier.
FORMAT_MSO_MDOC
OpenID4VP final ISO mdoc format identifier.
FORMAT_REALLYME_ZK
ReallyMe ZK presentation format marker.
MAX_ZK_CIRCUIT_LABEL_BYTES
Maximum bytes accepted for a circuit identifier or circuit-ref label.
MAX_ZK_PREPARED_PERSONA_BYTES
Cap the encoded prepared object before protobuf decoding or proof work.
MAX_ZK_PRESENTATION_DERIVED_CLAIMS
Maximum derived claims accepted in one ZK presentation.
MAX_ZK_PRESENTATION_PROOF_BYTES
Maximum proof bytes accepted before invoking an external ZK verifier.
MAX_ZK_PRESENTATION_PUBLIC_INPUT_BYTES
Maximum public-input bytes accepted before invoking an external ZK verifier.
MAX_ZK_STATEMENT_BYTES
Maximum bytes accepted for a derived-claim semantic label.
MAX_ZK_STATEMENT_ID_BYTES
Maximum bytes accepted for a derived-claim statement identifier.
ZK_COMMON_CREDENTIAL_ROOT_PRESENTATION_STAGE_COUNT
Exact number of proofs in the common-credential-root v1 presentation contract.
ZK_PREPARED_PERSONA_TYPE
Versioned marker for a prepared-persona vp_token entry.
ZK_PRESENTATION_STAGE_COUNT
Exact number of stages in the production proof-bundle contract.
ZK_PRESENTATION_TYPE
ZK presentation marker used inside JSON-native vp_token entries.

Functions§

build_zk_presentation_binding
Build the session-binding hashes required in a ZK presentation envelope.
derive_prepared_openid4vp_request_hashes
Derive the six ZK request inputs from one independently authenticated OpenID4VP request/session projection. This helper is shared by wallet and verifier adapters so their byte-level signature transcript cannot drift.
encode_zk_prepared_persona_value
Encode the ZK SDK’s canonical prepared presentation as a JSON vp_token.
encode_zk_presentation_value
Validate and encode an externally produced ZK envelope as a vp_token value.
hash_openid4vp_audience
Hash an OpenID4VP verifier audience for ZK public-input binding.
hash_openid4vp_nonce
Hash an OpenID4VP nonce for ZK public-input binding.
is_zk_presentation_value
Return whether a presentation value is marked as a ReallyMe ZK presentation.
parse_zk_prepared_persona_value
Parse only the canonical two-field transport envelope when marked.
parse_zk_presentation_value
Parse a vp_token presentation value as a ZK presentation when marked.
validate_zk_presentation_binding
Validate the unencrypted OpenID4VP binding carried by a ZK envelope.
validate_zk_presentation_shape
Validate the backend-neutral ZK presentation envelope.