Start here
Quickstart
Create one challenge on the host, open the VeilPass login surface, verify once, then establish an opaque cookie session.
Prerequisites
Use Node.js 20 or later, a Freighter wallet connected to Stellar Testnet, and a testnet account funded with the asset required by your gate. Before starting a live service, run npm run env:validate; it reports configuration names only and never prints secret values.
Install
The SDK package is currently a pre-release workspace package, not a public npm release.
bash
npm install @veilpass/sdk
# Pre-release local package in this repository: packages/sdkClient
The popup channel validates the exact login origin, window source, request state, and response schema.
ts
import { VeilPass } from "@veilpass/sdk";
const veilpass = new VeilPass({
loginOrigin: "https://login.veilpass.example",
});
const result = await veilpass.login({ gateId: "premium-holder" });
// result never contains the wallet addressServer
Verification must happen on the host server. Supply a durable challenge/nullifier store and the pinned Noir verifier; a browser verdict is never sufficient.
ts
import { verifyVeilPassProof } from "@veilpass/server";
const verified = await verifyVeilPassProof({
proofResult,
expectedOrigin: "https://app.example",
expectedGateId: "premium-holder",
policy,
store: durableChallengeStore,
verifyProof: verifyNoirMembershipProof,
requestId,
});