import { type AuthenticationResponseJSON } from "../utils/passkey/webauthn.js"; import type { Address, Instruction, Rpc, SolanaRpcApi } from "@solana/kit"; import { type Secp256r1VerifyEntry } from "../utils/passkey/secp256r1.js"; import { type Secp256r1VerifyArgsArgs } from "../generated/index.js"; /** SHA-256 `message` to a 32-byte digest for on-chain `verify`. */ export declare function buildMessageHash(message: Uint8Array): Uint8Array; /** * The WebAuthn challenge `verify` checks for `messageHash`: * `SHA256("phygital-token/verify/v1" || messageHash)`. The domain tag keeps a * `verify` tap from being accepted by any other instruction, and theirs here. */ export declare function buildVerifyChallenge(messageHash: Uint8Array): Uint8Array; /** * Prompt an NFC / WebAuthn tap for on-chain `verify`. * * The tap signs {@link buildVerifyChallenge}(`messageHash`); your program * passes the same 32-byte `messageHash` to `VerifyCpiBuilder.message_hash`. * Hash with {@link buildMessageHash} first. * * @param input.allowList - Base64url compressed secp256r1 public keys. The tapped credential id must be in it; recovers a placeholder id locally when `rpc` is omitted. * @param input.rpc - Kit `Rpc` to recover a placeholder id on-chain (preferred over `allowList` for recovery). * @param input.messageHash - SHA-256 of the message you bind on-chain (32 bytes). * @param input.rpId - Relying party ID. Defaults to the page hostname. */ export declare function authenticatePasskeyForSecp256r1Verify(input: { allowList?: ReadonlySet; rpc?: Rpc; messageHash: Uint8Array; rpId?: string; }): Promise; /** * After the tap: secp256r1_verify instruction to prepend, plus the phygital * token PDA (`phygitalTokenPda`) and `secp256r1VerifyArgs` for * `VerifyCpiBuilder`. * * `message_hash`, the instructions sysvar, and optional `expected_rp_id` / * `expected_origins` come from your program instruction — not this return * value. When `expected_origins` is set, the signed origin must match one * listed origin; omit it to skip the origin check. * * @param verifyArgsRelativeIndex - Index of the secp instruction relative to * yours. Default `-1` (secp immediately precedes your instruction). */ export declare function buildSecp256r1VerifyInstruction(response: AuthenticationResponseJSON, existingSecp256r1VerifyInputs?: Secp256r1VerifyEntry[], verifyArgsRelativeIndex?: number): Promise<{ secp256r1VerifyInstruction: Instruction; phygitalTokenPda: Address; secp256r1VerifyArgs: Secp256r1VerifyArgsArgs; }>; //# sourceMappingURL=verify.d.ts.map