U-net Docs
quickstart

Request an attestation verification

Ask the U-net app for a proof of a predicate, such as age eligibility, without receiving the underlying credential.

@union-networks/verification@union-networks/react

Verification flow

A verifier creates a verification session with one or more requested checks. The user scans or receives the request, chooses which checks to approve, and the U-net app generates proofs locally.

The verifier polls for a result. Multi-check sessions can return `passed`, `warning`, or `failed`, with per-check details in `checkResults`.

Create an over-18 verification

This is the standard website flow for a QR verification request.

tsOver-18 QR
import {
  createVerificationSession,
  pollVerificationResult,
} from '@union-networks/verification';

const session = await createVerificationSession(
  {
    verifierId: 'shop.example.checkout',
    verifierDisplayName: 'Example Shop',
    requestedChecks: [{ requestType: 'age_over_18' }],
    ttlSeconds: 120,
  },
  { verifierBaseUrl: 'https://verifier.egress.live' },
);

renderQr(session.qrPayload);

const result = await pollVerificationResult(session.sessionId, {
  verifierBaseUrl: 'https://verifier.egress.live',
});

if (result.aggregateOutcome === 'passed') {
  allowRestrictedAction();
}
Representation

Verifier UI shows QR, then status card with per-check result.

Handle every terminal state

Production integrations should handle user denial, expiration, missing attestations, revoked attestations, and unavailable proof engines.

  • `passed`: all approved checks proved successfully.
  • `warning`: user declined optional checks, but the flow can continue if your policy allows it.
  • `failed`: required check failed, was missing, expired, revoked, or could not be proven.