createPasskeySigner
Creates a new passkey signer using a WebAuthn credential (opens in a new tab).
Usage
_10const rpcUrl = "https://..."_10const credential = window.navigator.credentials.create({ ... })_10_10const passkeySigner = await Safe.createPasskeySigner(credential)_10_10const 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
: TherawId
of the credential.coordinates
: The coordinates of the credential. The coordinates are used to sign using Safe smart contracts