VeilPass

Browser boundary

Client SDK

The client SDK opens a dedicated login window and accepts only a response from the configured login origin and the exact popup it created.

Public surface

VeilPass.login accepts a gateId and optional timeout. It resolves to VerifiedLogin or throws a typed VeilPassError. It never exposes the proof payload to host application code.

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 address

Channel rules

Always use an exact targetOrigin. Reject source mismatches, origin mismatches, stale state, malformed data, closed windows, and timeouts. Remove message listeners after every terminal outcome.