@mysten/sui v2.0 and a new dApp Kit are here! Check out the migration guide
Mysten Labs SDKs
ReferenceAdapters

PasskeySignerAdapter

Uses WebAuthn/Passkeys for account creation and signing. Each signing operation triggers a biometric prompt or PIN dialog from the operating system.

Usage

import { PasskeySignerAdapter } from '@mysten/dev-wallet/adapters';

const adapter = new PasskeySignerAdapter();
await adapter.initialize(); // Loads passkey metadata from IndexedDB

// Creating an account triggers a WebAuthn registration ceremony
const account = await adapter.createAccount({ label: 'My Passkey' });

The constructor accepts optional dbName, storeName, and provider (a custom PasskeyProvider, useful for testing). Defaults: 'dev-wallet-passkey' and 'accounts'.

Key Behavior

  • Private keys never enter JavaScript — the browser/OS manages the credential entirely
  • Signing always requires user interaction — biometric scan, PIN, or security key touch
  • allowAutoSign is false — auto-approval policies are bypassed for passkey accounts because signing physically requires user interaction
  • Metadata stored in IndexedDB (dev-wallet-passkey) — credential IDs and account info are stored, but not the keys themselves

API

Property / MethodDescription
id'passkey'
name'Passkey Signer'
allowAutoSignfalse
initialize()Load passkey metadata from IndexedDB
createAccount(options?)Trigger WebAuthn registration ceremony
removeAccount(address)Remove metadata (passkey remains in OS)
renameAccount(address, label)Update label
getAccounts()List all managed accounts
getAccount(address)Look up a single account
onAccountsChanged(callback)Subscribe to account list changes
destroy()Clean up listeners and state

The WebAuthn ceremony works on localhost without HTTPS, so no special setup is needed for local development.

Requirements

  • Browser with WebAuthn support
  • Platform authenticator (fingerprint reader, Face ID, Windows Hello) or security key

On this page