Revi

Overview

Each Revibase accessory has a passkey tied to an on-chain token. A tap proves the holder is present — you decide what that unlocks.

Install

pnpm add phygital-token-sdk @solana/kit

Authenticate

  1. Issue a message (e.g. randomUUID())
  2. startAuthentication(message) — user taps the accessory
  3. verifyResponse({ expectedMessage, response }){ isVerified, secp256r1PublicKey }
  4. Your logic
import { randomUUID } from "crypto"; import { startAuthentication, verifyResponse } from "phygital-token-sdk"; const message = randomUUID(); const response = await startAuthentication(message); const { isVerified, secp256r1PublicKey } = verifyResponse({ expectedMessage: message, response, }); if (!isVerified) throw new Error("Access denied");

For kiosk or native apps, pass a custom transceive function as the second argument to startAuthentication.

Gate access

After verification, apply your rules to secp256r1PublicKey:

PatternWhen to use
On-chain ownership lookupFetch the token after the tap and gate on owner (the linked wallet). Optionally also gate on mint when it is set. Simple to ship; one RPC per check-in.
Pre-synced whitelistSync eligible passkeys on a schedule, then check membership at tap time with no RPC. Best for high-throughput check-in.

You can also gate against your own off-chain data (membership lists, allowlists, etc.) using secp256r1PublicKey directly.