import { type AuthenticatePasskeyOptions } from "./passkey/authenticate.js"; import { type AuthenticationResponseJSON } from "./passkey/webauthn.js"; export type { AuthenticationResponseJSON } from "./passkey/webauthn.js"; /** * **Authentication (client)** — prompt an NFC tap for `message`. * * Browser: opens the system WebAuthn/NFC modal. Pass `rpc` to recover a * placeholder credential id on-chain, or `allowList` to recover it locally; * when `allowList` is passed, a tag outside it throws `PASSKEY_NOT_RECOGNIZED`. */ export declare function startAuthentication(message: string, options?: AuthenticatePasskeyOptions): Promise; /** * **Authentication (server)** — verify a fresh tap signature. * * Pass the same `expectedMessage` you issued as the challenge, or — when the * challenge is raw bytes rather than text (e.g. a hash) — the base64url * `expectedChallenge` exactly as it was given to the authenticator. Treats * `response.id` as the compressed secp256r1 public key. * * `expectedOrigin` is the origin (or origins) of the page that prompted the * tap, e.g. `https://app.example.com`. The browser writes it into the signed * `clientDataJSON`, so checking it stops another site from relaying your * challenge to a user and logging in with their tap. * * Throws `MESSAGE_MISMATCH` when the signed challenge differs from * `expectedMessage`, `ORIGIN_MISMATCH` when the tap came from another origin, * and `INVALID_ASSERTION` for a malformed response; a bad signature returns * `isVerified: false`. No RPC lookup is performed. */ export declare function verifyResponse(input: { response: AuthenticationResponseJSON; expectedOrigin: string | readonly string[]; /** The relying party the tap must be for (authenticatorData's rpIdHash). Recommended. */ expectedRpId?: string; } & ({ expectedMessage: string; expectedChallenge?: never; } | { expectedChallenge: string; expectedMessage?: never; })): Promise<{ isVerified: boolean; secp256r1PublicKey: string; }>; //# sourceMappingURL=verify.d.ts.map