PPIL client — Node.js
@aithne/ppil-client — a lightweight, high-throughput client for the Age Verification Provider (AVP) surface.
SDK overview
Install
# install the verified ecosystem client
npm install @aithne/ppil-client
# configure from environment only
import PPIL from "@aithne/ppil-client";
npm install @aithne/ppil-client
# configure from environment only
import PPIL from "@aithne/ppil-client";
Example only — no real keys here. Configure secrets from environment, never commit or log them.
API surface
issue({ attestationRef, correlationId })
rotateOtp({ pptId, correlationId })
verify({ pptToken, otpAlias, requiredCategories, correlationId })
get({ pptId, correlationId })
revoke({ pptId, correlationId })
getVerificationModal({ pptScope, correlationId })
rotateOtp({ pptId, correlationId })
verify({ pptToken, otpAlias, requiredCategories, correlationId })
get({ pptId, correlationId })
revoke({ pptId, correlationId })
getVerificationModal({ pptScope, correlationId })
What it does
- Age-verification middleware that redirects unverified users to the wallet dialog.
- Required merchant hooks (
authenticatePIC,getSignedPIC, session + correlation hooks) enforced at registration. - CTS callback wiring via
setCorrelationand optionalsignalCorrelation. maskSensitive()masking and heuristictokenSanityCheck()— no token is ever logged or persisted.- Idempotent-operation retry policy and configurable timeout.