Use a passkey with MetaMask Smart Accounts
Passkeys eliminate the need for traditional seed phrases that are difficult to remember, enabling a more seamless and secure way for users to access their Externally Owned Accounts (EOAs). Compared to traditional EOAs which use secp256k1 elliptic curve to generate key pairs and signatures, a passkey-based EOA uses the secp256r1 (P-256) elliptic curve.
MetaMask Smart Accounts is signer agnostic and natively supports passkeys (P-256 elliptic curve signatures), so you can use a passkey as the signer.
Prerequisites
Steps
1. Install dependencies
Install the Smart Accounts Kit and other dependencies in your project:
- npm
- Yarn
- pnpm
- Bun
npm install @metamask/smart-accounts-kit ox
yarn add @metamask/smart-accounts-kit ox
pnpm add @metamask/smart-accounts-kit ox
bun add @metamask/smart-accounts-kit ox