Protocol Kit Reference
Passkeys
createPasskeySigner

createPasskeySigner

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

Usage

const rpcUrl = "https://..."
const credential = window.navigator.credentials.create({ ... })

const passkeySigner = await Safe.createPasskeySigner(credential)

const protocolKit = await Safe.init({
provider: rpcURL,
signer: passkeySigner,
safeAddress
})

Parameters

credential

  • Type: Credential

The WebAuthn credential to use for signing.

const passkeySigner = await Safe.createPasskeySigner(
credential
)

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
Last updated on

Was this page helpful?

We use cookies to provide you with the best experience and to help improve our website and application. Please read our Cookie Policy for more information. By clicking "Accept all", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage and provide customer support.