Key
The Porto Key
provides key management for Porto Account
s with support
for various key types including WebAuthn (passkeys),
WebCrypto-P256, P256, and Secp256k1.

Usage
example.ts
import { Account, Key, RelayActions } from 'porto/viem'
import { client } from './config'
const passkey = await Key.createWebAuthnP256({
label: 'My Passkey',
})
const account = Account.fromPrivateKey('0x...', {
keys: [passkey]
})
await RelayActions.upgradeAccount(client, {
account,
})