parse_issued_credential

Function parse_issued_credential 

Source
pub fn parse_issued_credential(
    credential_value: &Value,
    format_hint: &str,
) -> Result<AnyCredential>
Expand description

Parse a credential value from an OID4VCI response into an AnyCredential.

Uses format_hint to determine parsing strategy:

  • "jwt_vc_json": JWT string -> decode -> parse VerifiableCredential from vc claim
  • "dc+sd-jwt" or "vc+sd-jwt": compact SD-JWT string -> SdJwt::parse()
  • Other: attempt W3C VC JSON parsing as fallback