Claiming JWS Credential
Step 1: Import Required Modules
import { Credential, DIDAccount } from "@didpass/issuer-sdk";
import { QRTypes } from "@didpass/issuer-sdk/lib/types/QRTypes";
import {
JwksEndpoint,
TokenizePayload,
} from "@didpass/issuer-sdk/lib/types/JWSDetailsDTO";Step 2: Set Up Credential Payload
// this is the payload sent by wallet
const credentialPayload = {
credentialId: "YOUR_CREDENTIAL_ID",
did: "USER_DID",
qrType: QRTypes.TYPE_CREDENTIAL_JWT,
message: "MESSAGE_FROM_WALLET",
signature: "SIGNATURE_FROM_WALLET",
};Step 3: Set Up Credential Verification Key
Step 4: Set Up JWS Credential Data
Step 5: Claim JWS Credential
Step 6: Return Signed Credential
Final Code
Last updated