Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 891 Bytes

createpasskeysigner.mdx

File metadata and controls

37 lines (23 loc) · 891 Bytes

import { Tabs } from 'nextra/components'

createPasskeySigner

Creates a new passkey signer using a WebAuthn credential.

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.

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