Protocol Kit Reference
Passkeys
createPasskeySigner

createPasskeySigner

Creates a new passkey signer using a WebAuthn credential (opens in a new tab).

Usage


_10
const rpcUrl = "https://..."
_10
const credential = window.navigator.credentials.create({ ... })
_10
_10
const passkeySigner = await Safe.createPasskeySigner(credential)
_10
_10
const protocolKit = await Safe.init({
_10
provider: rpcURL,
_10
signer: passkeySigner,
_10
safeAddress
_10
})

Parameters

credential

  • Type: Credential

The WebAuthn credential to use for signing.

Returns

Promise<Pick<PasskeyArgType, 'rawId' | 'coordinates'>>

An object containing the passkey signer that should be stored securely containing:

  • rawId: The rawId of the credential.
  • coordinates: The coordinates of the credential. The coordinates are used to sign using Safe smart contracts

Was this page helpful?