Request Connect QR Code

Step 1: Import Required Modules

Import the necessary modules at the beginning of your script:

import { DIDAccount, QRGenerator } from "@didpass/issuer-sdk";

Step 2: Set Up Connection Details

Replace the placeholder values with your actual connection details:

const privateKey = "YOUR_PRIVATE_KEY";
const callbackUrl = "YOUR_CALLBACK_URL";
const sessionId = "YOUR_SESSION_ID";

const issuerDetail = {
  fullName: "Your Issuer Name",
  shortName: "IssuerShortName",
  logo: `url/images/logo.png`,
  restoreUrl: `url/to/restore`,
}; // your issuer detail (optional)

Step 3: Generate QR Code

Generate the QR code for connection:

Step 4: Return QR Code

Return the generated QR code:

Final Code

Here's the complete code:

Last updated