Present a Verifiable Credential

Receive and present a SD-JWT Verifiable Credential, signed by a did:cheqd Decentralized Identifier (DID), using Credo and OpenID4VP.

Using the OpenID4VC module, you can receive and present a OpenID compatible SD-JWT Credentials signed by a did:cheqd identifier. This guide walks through the flow of presentation using the Credo Agent.

Prerequisites

Before you being, ensure you have:

Step 1: Configure the Holder Agent

Configure the holder with cheqd and OpenID4VC Modules

import { Agent, DidsModule } from '@credo-ts/core';
import { agentDependencies } from '@credo-ts/node';
import { CheqdModule } from '@credo-ts/cheqd';
import { OpenId4VcHolderModule } from '@credo-ts/openid4vc';

const holder = new Agent({
  config,
  dependencies: agentDependencies,
  modules: {
    dids: new DidsModule({
      resolvers: [new CheqdDidResolver()],
    }),
    openId4VcHolderModule: new OpenId4VcHolderModule(),
  },
});

Step 2: Resolve and Accept Credential Offer

This method:

  1. Resolves the offer.

  2. Accepts it via pre-authorized code flow.

  3. Selects a binding method—did:key (preferred) or JWK—for the SD-JWT, depending on issuer capabilities

Step 3: Store the Credentials

Step 4: Resolve and Accept Authorization Request

Once you have a credential in your wallet, you can present it by responding to a receive authorization request, which includes an OpenID4VP presentation request. This request can be generated either by the verifier module or an external OpenID4VC verifier. First, resolve the authorization request, then accept it to present the credential in your wallet.

Last updated

Was this helpful?