iiamhuman Developer Docsv1.0

PERSONHOOD CREDENTIAL INTEGRATION · STEP 5

Add the SDK and Load the App Config

Install the backend and frontend packages, then load configuration safely.

Add the SDK and Load the App Config

Add the backend Presentation Exchange SDK to your app server. The SDK creates signed presentation request envelopes, verifies wallet submissions, and checks credential state.

Add the frontend request SDK to your web app if you want its Vue QR-code and wallet-link component. It turns the backend-owned Presentation Definition fetch URL into a wallet link or QR code.

Your app backend remains responsible for sessions, storage, replay protection, and the final authorization decision.

Install the SDKs

Install the backend SDK in your app server:

npm install @iamhuman.link/presentation-exchange-sdk

Install the frontend SDK in your web app:

npm install @iamhuman.link/presentation-request-frontend-sdk qrcode.vue

Load App Config on the Backend

After registering your app, download the app config from PEP and store it with your backend deployment configuration. Store the complete request-issuer DID in secret storage. Do not send its private-key material to the browser.

import { PresentationService } from '@iamhuman.link/presentation-exchange-sdk';
import appConfig from './presentation-app-config.json' assert { type: 'json' };
import type { RequestIssuerDid } from '@iamhuman.link/presentation-exchange-sdk';

function loadRequestIssuerDidFromSecretManager(): RequestIssuerDid {
  const raw = process.env.PRESENTATION_REQUEST_ISSUER_DID_JSON;
  if (!raw) throw new Error('Missing request issuer DID');
  return JSON.parse(raw) as RequestIssuerDid;
}

export const presentation = new PresentationService({
  appConfig,
  requestIssuerDid: loadRequestIssuerDidFromSecretManager(),
});

Frontend SDK

The frontend SDK is optional. It provides a Vue component, but you can build your own interface. For details, see Display and Scan the Request.

Next Step

Continue to Create a request.