Package web5.sdk.vc

Object VerifiableCredential.Companion

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • create

         final VerifiableCredential create(Issuer issuer, CredentialSubject credentialSubject, VerifiableCredentialCreateOptions options)

        Creates a new Verifiable Credential with the specified issuer, subject, and optional creation options.

        Parameters:
        issuer - The entity issuing the credential.
        credentialSubject - The subject of the credential containing claims.
        options - Optional parameters for creating the credential, such as schema or status.
        Returns:

        The newly created Verifiable Credential.

      • fromVcJwt

         final VerifiableCredential fromVcJwt(String vcJwt, Boolean verify)

        Constructs a Verifiable Credential from a VC JWT (JSON Web Token).

        Parameters:
        vcJwt - The Verifiable Credential in JWT format, serialized as a compact JWS.
        verify - If true, verifies the integrity of the JWT by performing cryptographic verification against the signature, validating the VC Data Model, and validating the JSON Schema if present.
        Returns:

        The deserialized and validated Verifiable Credential.