Skip to main content

Introduction

A Secp256r1 authority lets a passkey or P-256 signer approve operations for a Solana wallet.
  • Use when: you want wallet authorization through a passkey or another P-256 signing service.
  • For: apps connecting an existing passkey registration and authentication flow to Swig.

How it works

  1. Obtain the compressed public key from your passkey registration flow.
  2. Register it as a wallet authority and retain the credential ID.
  3. Use the WebAuthn callback to approve the SDK’s operation challenge.
  4. Submit the returned verification and execution instructions with a Solana fee payer.

Inputs

The credential ID and registration response are not substitutes for the public key.

SDK example

  • Pass authorityInfo to Create a wallet or Add a role.
  • Pass signingFn, the payer, and the current slot to Signing.
  • Request the passkey assertion from a user action and handle cancellation before sending.
  • Keep every returned instruction in order, including signature verification.
  • For repeated app operations after one approval, use a limited session.