SDK API Reference
Reference for the public @walletgate/eudi SDK surface.
Constructor
ts
new WalletGate(config)Creates a client for the WalletGate API.
Methods
startVerification(input, opts?)
ts
await client.startVerification({
checks: [{ type: 'age_over', value: 18 }],
});Creates a verification session and returns:
idstatushostedUrlverificationUrlexpiresAt
getResult(sessionId)
ts
const result = await client.getResult(session.id);Returns the current session status and any completed verification results.
verifyWebhook(rawBody, signature, secret, timestamp)
Node-only helper for validating WalletGate webhook signatures.
makeQrDataUrl(url)
Optional helper for generating a QR image from verificationUrl.
Errors
The SDK throws WalletGateApiError for API failures.
Useful fields:
statuscodedetailsbody
Core Types
VerificationSession
ts
type VerificationSession = {
id: string;
status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'expired' | 'canceled';
checks: Array<{ type: 'age_over' | 'residency_eu' | 'identity_verified'; value?: number | string }>;
hostedUrl?: string;
verificationUrl?: string;
expiresAt: string;
createdAt: string;
}VerificationResult
ts
type VerificationResult = {
id: string;
status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'expired' | 'canceled';
results?: Record<string, boolean>;
riskScore?: number;
aiInsights?: string[];
}