SDK
SDK Overview
JavaScript SDK for integrating Verifiables verification and issuance into your application
The @verifiables/eudi-sdk package provides a typed JavaScript client for the Verifiables API, QR code generation, and a drop-in web component for credential verification and issuance.
Installation
npm install @verifiables/eudi-sdkQuick example
import { createVerifierClient } from '@verifiables/eudi-sdk'
const client = createVerifierClient({
apiUrl: 'https://api.verifiables.com',
headers: { Authorization: 'Bearer oat_your_publishable_key' },
})
// Create a verification request
const { url, id } = await client.createAuthorizationRequest({
version: 'v1',
dcql_query: {
credentials: [{
id: 'pid',
format: 'mso_mdoc',
meta: { doctype_value: 'eu.europa.ec.eudi.pid.1' },
claims: [
{ path: ['eu.europa.ec.eudi.pid.1', 'given_name'] },
{ path: ['eu.europa.ec.eudi.pid.1', 'family_name'] },
],
}],
},
})
// Display `url` as a QR code for the user's wallet to scan
// Poll for results
const result = await client.pollAuthorizationStatus(id)
if (result.status === 'valid') {
console.log(result.presentation)
}What's included
| Export | Description |
|---|---|
VerifierClient | API client for verification requests, status polling, and the DC API |
IssuerClient | API client for issuance claim flows and offer polling |
generateQRCode | Render styled QR codes to a canvas |
VerifierElement | Drop-in <verifier-element> web component |
| Proximity | BLE proximity verification (reader + session manager) |
Platform support
The SDK works in any JavaScript environment:
- Browser: Frontend apps (React, Vue, Svelte, etc.)
- Node.js: Server-side integrations and backends
- Edge runtimes: Cloudflare Workers, Vercel Edge, Deno