iiamhuman Developer Docsv1

PERSONHOOD CREDENTIAL INTEGRATION · STEP 5

Add the SDK and Load the App Config

Load server configuration and install the Vue frontend SDK.

Add the SDK and Load the App Config

Journal uses the backend Presentation Exchange SDK to create signed requests, verify wallet submissions, and check stored credentials. Journal’s deployed React frontend generates a QR code with qrcode. The frontend example in this guide uses the Vue Presentation Request SDK with the same backend flow.

The backend owns requests, sessions, replay protection, storage, and authorization.

Install the packages

Install the backend SDK on your app server:

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

For the Vue frontend example in this guide:

npm install @iamhuman.link/presentation-exchange-vue qrcode.vue

Use Node.js 22 or later for this walkthrough, matching Journal’s runtime requirement.

Load app config on the backend

Download your app config from the public PEP developer console. Store the complete request-issuer DID in backend secret storage and supply it as PRESENTATION_REQUEST_ISSUER_DID_JSON. Never import the signing secret into client code.

This server-only module adapts Journal’s configuration loader. The JSON imports are public app configs, not signing keys.

import {
  PresentationService,
  type PresentationAppConfig,
  type RequestIssuerDid,
} from '@iamhuman.link/presentation-exchange-sdk';
import config from './config/your-app-presentation-config.json';

const appConfig = config as PresentationAppConfig;
const raw = process.env.PRESENTATION_REQUEST_ISSUER_DID_JSON;
if (!raw) throw new Error('Missing request issuer DID');
const requestIssuerDid = JSON.parse(raw) as RequestIssuerDid;
if (requestIssuerDid.uri !== appConfig.appDid) {
  throw new Error('Request issuer DID does not match app config');
}
if (!appConfig.scopes.some((scope) => scope.requestCredentialTypes.some(
  (request) => request.type === 'BasicAccessRequestVerifiableCredential',
))) {
  throw new Error('Missing basic access request scope');
}

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

Use your own downloaded config filename and pair it with its request-issuer signing secret. This example bundles the config with the server, so rebuild and redeploy after replacing it.

Journal sets statusListTtlMs: 0 to avoid a positive cache lifetime for mutable status lists before comment publication. Sealed lists retain the SDK’s final-state semantics.

Frontend SDK

The frontend SDK provides the Vue PresentationRequestQr component and wallet-opening helpers. Use it to show the backend request without exposing signing secrets. See Display and Scan the Request for the Vue example. Apps using other frameworks can build their own interface with the same backend contracts.

Next Step

Continue to Create a request.

Both SDKs also provide fetchIssuerMetadata. The Vue SDK includes the bilingual IssuerBanner card. See Public issuer information.