Safe Account Setup, Owners and Modules
Every AbstractionKit Safe account class has these methods: Safe Unified Account (SafeMultiChainSigAccountV1 and SafeMultiChainSigAccountV2, the recommended classes), Safe Account V3 (SafeAccountV0_3_0) and Safe Account V2 (SafeAccountV0_2_0). Calldata, signing and sending methods are on Safe Account Transactions and Signing.
The examples import SafeMultiChainSigAccountV1 as SafeAccount, the recommended class for new Safes. Each method is called the same way on SafeMultiChainSigAccountV2, SafeAccountV0_3_0 and SafeAccountV0_2_0: change the import to your class. Where a class differs (UserOperation type, default addresses, example output), the section says so.
Methods at a Glance
| Method | Signature | Returns |
|---|---|---|
| isDeployed (static) | isDeployed(accountAddress: string, nodeRpcUrl: string | Transport | JsonRpcNode) | Promise<boolean> |
| createAccountAddress (static) | createAccountAddress(owners: Signer[], overrides?: InitCodeOverrides) | string |
| createInitializerCallData (static) | createInitializerCallData(owners: Signer[], threshold: number, overrides?) | string |
| getSafeVersion | getSafeVersion(nodeRpcUrl: string | Transport | JsonRpcNode) | Promise<string> |
| getFallbackHandler | getFallbackHandler(nodeRpcUrl: string | Transport | JsonRpcNode) | Promise<string> |
| isModuleEnabled | isModuleEnabled(nodeRpcUrl: string | Transport | JsonRpcNode, moduleAddress: string) | Promise<boolean> |
| createDisableModuleMetaTransaction | createDisableModuleMetaTransaction(nodeRpcUrl, moduleToDisableAddress: string, accountAddress: string, overrides?: { prevModuleAddress?; modulesStart?; modulesPageSize? }) | Promise<MetaTransaction> |
| createAddOwnerWithThresholdMetaTransactions | createAddOwnerWithThresholdMetaTransactions(newOwner: Signer, threshold: number, overrides?) | Promise<MetaTransaction[]> |
| createStandardAddOwnerWithThresholdMetaTransaction | createStandardAddOwnerWithThresholdMetaTransaction(newOwner: string, threshold: number) | MetaTransaction |
| createSwapOwnerMetaTransactions | createSwapOwnerMetaTransactions(nodeRpcUrl, newOwner: Signer, oldOwner: Signer, overrides?) | Promise<MetaTransaction[]> |
| createRemoveOwnerMetaTransaction | createRemoveOwnerMetaTransaction(nodeRpcUrl, ownerToDelete: Signer, threshold: number, overrides?) | Promise<MetaTransaction> |
| verifyWebAuthnSignatureForMessageHash (static) | verifyWebAuthnSignatureForMessageHash(nodeRpcUrl, signer: WebauthnPublicKey, messageHash: string, signature: string, overrides?) | Promise<boolean> |
WebAuthn owners are derived with the Passkey module defaults of the class the method is called on: v0.2.1 on the Safe Unified Account classes. Per-call overrides win.
Account Address and State
isDeployed
Static method that checks whether a Safe account is already deployed on-chain. Use it to decide between connecting to an existing account (new SafeMultiChainSigAccountV1(address)) and initializing a counterfactual one (SafeAccountV0_3_0.initializeNewAccount(owners)). Once an account is deployed, the factory data carried by initializeNewAccount is no longer needed and including it would waste gas.
The same static method exists on every Safe class, for example SafeMultiChainSigAccountV1.isDeployed(...).
This only checks for non-empty bytecode at accountAddress. It does not verify that the deployed code is a Safe or that its on-chain configuration matches a given owner set.
Usage
- example.ts
- Param Types
- Return Type
import { SafeMultiChainSigAccountV1 as SafeAccount } from "abstractionkit";
const accountAddress = "0x1a02592A3484c2077d2E5D24482497F85e1980C6";
const nodeRpcUrl = "https://ethereum-sepolia-rpc.publicnode.com";
const account = (await SafeAccount.isDeployed(accountAddress, nodeRpcUrl))
? new SafeAccount(accountAddress)
: SafeAccount.initializeNewAccount([ownerPublicAddress]);
| key | type | description |
|---|---|---|
accountAddress | string | The Safe account address to check. |
nodeRpcUrl | string | Transport | JsonRpcNode | The JSON-RPC API URL for the target chain. |
| key | type | description |
|---|---|---|
isDeployed | Promise<boolean> | Resolves to true if non-empty bytecode is deployed at accountAddress, false otherwise. |
Source code
createAccountAddress
Calculates the Account address from the initial owners
Usage
In this example, we initiate a single owner account.
- example.ts
- Param Types
- Return Type
import { SafeMultiChainSigAccountV1 as SafeAccount } from "abstractionkit";
const ownerPublicAddress = "0xBdbc5FBC9cA8C3F514D073eC3de840Ac84FC6D31";
const safeAddress = SafeAccount.createAccountAddress(
[ownerPublicAddress],
);
console.log("Account address (sender): " + safeAddress);
| key | type | description |
|---|---|---|
owners[] | object | Pass the owner(s) address(es) of the account. It can be a single owner account, a multi-sig, or a WebAuthn |
owners[].Signer | ECDSAPublicAddress | WebauthnPublicKey | Signer type which can be either an ECDSA public address or a Webauthn public key |
initCodeOverrides | object | Override values to change the initialization default values |
initCodeOverrides.threshold? | number | Signature threshold, defines how many signatures are required. Default is 1. |
initCodeOverrides.c2Nonce? | bigint | Create2 nonce used to generate different sender addresses from the same owners. Default is 0. |
initCodeOverrides.entrypointAddress? | string | Address of the entry point for transactions or contracts. |
initCodeOverrides.safe4337ModuleAddress? | string | Address of the Safe 4337 module. |
initCodeOverrides.safeModuleSetupAddress? | string | Address used for setting up the Safe module. |
initCodeOverrides.safeAccountSingleton? | SafeAccountSingleton | Safe singleton address and init hash. Default is Safe L2 v1.4.1 ("0x29fcB43b46531BcA003ddC8FCB67FFE91900C762"), or Safe L2 v1.5.0 ("0xEdd160fEBBD92E350D4D398fb636302fccd67C7e") for SafeMultiChainSigAccountV2. Pass the exported Safe_L2_V1_4_1 or Safe_L2_V1_5_0 to pick one explicitly. |
initCodeOverrides.safeAccountFactoryAddress? | string | Address of the Safe Factory. Default is "0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67". |
initCodeOverrides.multisendContractAddress? | string | Address of the Safe MultiSend contract. Default is "0x38869bf66a61cF6bDB996A6aE40D5853Fd43B526". |
initCodeOverrides.webAuthnSharedSigner? | string | Shared signer used for WebAuthn-based authentication. |
initCodeOverrides.eip7212WebAuthnPrecompileVerifierForSharedSigner? | string | Verifier contract for WebAuthn precompile, related to the shared signer. |
initCodeOverrides.eip7212WebAuthnContractVerifierForSharedSigner? | string | Contract verifier for WebAuthn-based shared signer, compliant with EIP-7212. |
initCodeOverrides.onChainIdentifierParams? | OnChainIdentifierParamsType | Parameters for on-chain identifier tracking. |
initCodeOverrides.onChainIdentifier? | string | Pre-computed on-chain identifier string. |
| key | type | description |
|---|---|---|
ECDSAPublicAddress | string | Public address of an ECDSA (EOA) owner |
WebauthnPublicKey
| key | type | description |
|---|---|---|
x | bigint | The x coordinate of the webAuthn public key |
y | bigint | The y coordinate of the webAuthn public key |
| key | type | description |
|---|---|---|
Smart Account Address | string | Smart Account Address |
Example Response
Account address (sender): 0x75cFD34827377361f08652A6528A76614c693C89
With SafeAccountV0_3_0, the same owner gives 0xd785Bb8A95A6a08aCE0Aa2e54aeE5cF04694b1db, and with SafeAccountV0_2_0, 0xb8741a449D50ed0Dcfe395287F85BE152884c8d9.
Each class derives the address from its own default Safe 4337 module, module setup contract and Passkey module defaults, so the same owners give a different address on each class. SafeMultiChainSigAccountV2 uses the Safe L2 v1.5.0 singleton by default; see V1 or V2.
Source code
- SafeMultiChainSigAccountV1: createAccountAddress
- SafeMultiChainSigAccountV2: createAccountAddress
- SafeAccountV0_3_0: createAccountAddress
- SafeAccountV0_2_0: createAccountAddress
createInitializerCallData
Creates the initializer calldata
Usage
- Example
- Param Types
- Return Types
import { SafeMultiChainSigAccountV1 as SafeAccount } from "abstractionkit";
const initializeCallData = SafeAccount.createInitializerCallData(
[ownerPublicAddress], // owners
1, //threshold
);
console.log("initializeCallData: " + initializeCallData);
| key | type | description |
|---|---|---|
owners[] | object | Pass the owner(s) address(es) of the account. It can be a single owner account, a multi-sig, or a WebAuthn |
owners[].Signer | ECDSAPublicAddress | WebauthnPublicKey | Signer type which can be either an ECDSA public address or a Webauthn public key |
threshold | number | Signature threshold: how many owner signatures are required |
overrides? | object | Override values to change the initialization default values |
overrides?.safe4337ModuleAddress? | string | Address of the Safe 4337 module. |
overrides?.safeModuleSetupAddress? | string | Address used for setting up the Safe module. |
overrides?.multisendContractAddress? | string | Address of the Safe MultiSend contract. Default is "0x38869bf66a61cF6bDB996A6aE40D5853Fd43B526". |
overrides?.webAuthnSharedSigner? | string | Shared signer used for WebAuthn-based authentication. |
overrides?.eip7212WebAuthnPrecompileVerifierForSharedSigner? | string | Verifier contract for WebAuthn precompile, related to the shared signer. |
overrides?.eip7212WebAuthnContractVerifierForSharedSigner? | string | Contract verifier for WebAuthn-based shared signer, compliant with EIP-7212. |
| key | type | description |
|---|---|---|
ECDSAPublicAddress | string | Public address of an ECDSA (EOA) owner |
WebauthnPublicKey
| key | type | description |
|---|---|---|
x | bigint | The x coordinate of the webAuthn public key |
y | bigint | The y coordinate of the webAuthn public key |
| key | type | description |
|---|---|---|
calldata | string | The initializer calldata |
Example Response
initializeCallData: 0xb63e800d000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000002dd68b007b46fbe91b9a7c3eda5a7a1063cb5b47000000000000000000000000000000000000000000000000000000000000014000000000000000000000000022939e839e3c0f479b713eaf95e0df128554aead0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bdbc5fbc9ca8c3f514d073ec3de840ac84fc6d3100000000000000000000000000000000000000000000000000000000000000648d0dc49f0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000022939e839e3c0f479b713eaf95e0df128554aead00000000000000000000000000000000000000000000000000000000
With SafeAccountV0_3_0:
initializeCallData: 0xb63e800d000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000002dd68b007b46fbe91b9a7c3eda5a7a1063cb5b47000000000000000000000000000000000000000000000000000000000000014000000000000000000000000075cf11467937ce3f2f357ce24ffc3dbf8fd5c2260000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bdbc5fbc9ca8c3f514d073ec3de840ac84fc6d3100000000000000000000000000000000000000000000000000000000000000648d0dc49f0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000075cf11467937ce3f2f357ce24ffc3dbf8fd5c22600000000000000000000000000000000000000000000000000000000
With SafeAccountV0_2_0, which uses its own Safe 4337 module and module setup addresses:
initializeCallData: 0xb63e800d000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008ecd4ec46d4d2a6b64fe960b3d64e8b94b2234eb0000000000000000000000000000000000000000000000000000000000000140000000000000000000000000a581c4a4db7175302464ff3c06380bc3270b40370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bdbc5fbc9ca8c3f514d073ec3de840ac84fc6d3100000000000000000000000000000000000000000000000000000000000000648d0dc49f00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a581c4a4db7175302464ff3c06380bc3270b403700000000000000000000000000000000000000000000000000000000
Source code
- SafeMultiChainSigAccountV1 / V2: createInitializerCallData
- SafeAccountV0_3_0: createInitializerCallData
- SafeAccountV0_2_0: createInitializerCallData
getSafeVersion
Reads the Safe singleton version string via VERSION(), for example "1.4.1".
Usage
import { SafeMultiChainSigAccountV1 as SafeAccount } from "abstractionkit";
const accountAddress = "0x1a02592A3484c2077d2E5D24482497F85e1980C6";
const nodeRpcUrl = "https://ethereum-sepolia-rpc.publicnode.com";
const smartAccount = new SafeAccount(accountAddress);
const version = await smartAccount.getSafeVersion(nodeRpcUrl);
- Param Types
- Return Types
| key | type | description |
|---|---|---|
nodeRpcUrl | string | Transport | JsonRpcNode | The JSON-RPC API URL for the target chain. |
| key | type | description |
|---|---|---|
version | Promise<string> | Resolves to the Safe singleton version string read from VERSION(), e.g. "1.4.1". |
Source code
getFallbackHandler
Reads the active ERC-4337 fallback handler (the 4337 module) currently set on the Safe.
Usage
import { SafeMultiChainSigAccountV1 as SafeAccount } from "abstractionkit";
const accountAddress = "0x1a02592A3484c2077d2E5D24482497F85e1980C6";
const nodeRpcUrl = "https://ethereum-sepolia-rpc.publicnode.com";
const smartAccount = new SafeAccount(accountAddress);
const fallbackHandler = await smartAccount.getFallbackHandler(nodeRpcUrl);
- Param Types
- Return Types
| key | type | description |
|---|---|---|
nodeRpcUrl | string | Transport | JsonRpcNode | The JSON-RPC API URL for the target chain. |
| key | type | description |
|---|---|---|
fallbackHandler | Promise<string> | Resolves to the address of the active ERC-4337 fallback handler (module) set on the Safe. |
Source code
Modules
isModuleEnabled
Checks if a specified module is enabled for a given Safe account. This function returns a boolean indicating the module's status.
- Param Types
- Return Types
| key | type | description |
|---|---|---|
nodeRpcUrl | string | Transport | JsonRpcNode | The JSON-RPC API url for the target chain. |
moduleAddress | string | The module address to check if enabled. |
| key | type | description |
|---|---|---|
isEnabled | Promise<boolean> | Indicates whether the specified module is enabled. |
Source code
createDisableModuleMetaTransaction
Creates a meta-transaction to disable a module from the Safe account. The function automatically fetches the previous module address in the linked list if not provided in the overrides. This function returns a promise that resolves to a meta-transaction object containing the necessary details for disabling the module.
- Param Types
- Return Types
| key | type | description |
|---|---|---|
nodeRpcUrl | string | Transport | JsonRpcNode | The JSON-RPC API URL for the target chain to fetch the previous module address. |
moduleToDisableAddress | string | The address of the module to be disabled. |
accountAddress | string | The Safe account address for which to disable the module. |
overrides | object | Optional overrides for the default values used in the transaction. |
overrides.prevModuleAddress | string | If set, it will be used as the previous module address instead of fetching it. |
overrides.modulesStart | string | Starting address for the module pagination query. |
overrides.modulesPageSize | bigint | Page size for the module pagination query. |
| key | type | description |
|---|---|---|
MetaTransaction | object | A promise that resolves to the meta-transaction object for disabling the specified module. |
MetaTransaction.to | string | The target address for the meta-transaction (Safe account address). |
MetaTransaction.data | string | The encoded function call data for disabling the module. |
MetaTransaction.value | bigint | The value to be sent with the meta-transaction, set to zero for this function. |
Source code
createDisableModuleMetaTransaction
Owners
createAddOwnerWithThresholdMetaTransactions
Builds the MetaTransactions needed to add a new owner (an ECDSA address or a WebAuthn public key) and set a new threshold. If the new owner is a WebAuthn signer whose verifier contract is not yet deployed, the returned list starts with a MetaTransaction that deploys the verifier, followed by the add-owner call, so it resolves to one or two MetaTransactions.
createAddOwnerWithThresholdMetaTransactions(
newOwner: Signer,
threshold: number,
overrides?: {
nodeRpcUrl?: string | Transport | JsonRpcNode;
eip7212WebAuthnPrecompileVerifier?: string;
eip7212WebAuthnContractVerifier?: string;
webAuthnSignerFactory?: string;
webAuthnSignerSingleton?: string;
webAuthnSignerProxyCreationCode?: string;
},
): Promise<MetaTransaction[]>
overrides.nodeRpcUrl is required when adding a WebAuthn owner, so the SDK can check whether the new owner's verifier is already deployed.
On SafeMultiChainSigAccountV1 and SafeMultiChainSigAccountV2, a passkey owner is derived with the class's own Safe Passkey module v0.2.1 defaults, so the added owner is the signer the account signs with. Pass WebAuthn overrides only if you created the account with custom WebAuthn values.
- example.ts
- Param Types
- Return Type
const newOwnerPublicAddress = "0xNewOwnerAddress";
const addOwnerMetaTransactions =
await smartAccount.createAddOwnerWithThresholdMetaTransactions(
newOwnerPublicAddress,
2, // new threshold
);
const userOperation = await smartAccount.createUserOperation(
addOwnerMetaTransactions,
nodeRpcUrl,
bundlerUrl,
);
| key | type | description |
|---|---|---|
newOwner | object | The public address of the new owner to be added |
newOwner.Signer | ECDSAPublicAddress | WebauthnPublicKey | Signer type which can be either an ECDSA public address or a Webauthn public key |
threshold | number | The new threshold value for owner confirmations. |
overrides | object | Optional Overrides for the default values used in the transaction. |
overrides.nodeRpcUrl | (string | Transport | JsonRpcNode)? | The JSON-RPC API url for the target chain, to check if the new webauthn owner is deployed or not |
overrides.eip7212WebAuthnPrecompileVerifier | string? | Address for the EIP-7212 WebAuthn precompile verifier. |
overrides.eip7212WebAuthnContractVerifier | string? | Address for the EIP-7212 WebAuthn contract verifier. |
overrides.webAuthnSignerFactory | string? | Address for the WebAuthn signer factory. |
overrides.webAuthnSignerSingleton | string? | Address for the WebAuthn signer singleton. |
overrides.webAuthnSignerProxyCreationCode | string? | Creation code of the WebAuthn signer proxy. |
| key | type | description |
|---|---|---|
Promise<MetaTransaction[]> | object | The meta-transaction object for adding a new owner with the specified threshold. |
Promise<MetaTransaction[]>.to | string | The target address for the meta-transaction (Safe account address). |
Promise<MetaTransaction[]>.data | string | The encoded function call data for adding an owner. |
Promise<MetaTransaction[]>.value | bigint | The value to be sent with the meta-transaction, set to zero for this function. |
Source code
createAddOwnerWithThresholdMetaTransactions
createStandardAddOwnerWithThresholdMetaTransaction
Builds the single standard addOwnerWithThreshold MetaTransaction for an owner public address. Unlike the plural variant above, it takes a plain address, performs no WebAuthn verifier handling, and returns synchronously.
createStandardAddOwnerWithThresholdMetaTransaction(
newOwner: string,
threshold: number,
): MetaTransaction
const addOwnerMetaTransaction =
smartAccount.createStandardAddOwnerWithThresholdMetaTransaction(
"0xNewOwnerAddress",
2, // new threshold
);
Source code
createStandardAddOwnerWithThresholdMetaTransaction
createSwapOwnerMetaTransactions
Creates a meta-transaction to swap an owner in the Safe account. If a new owner verifier is not already deployed, it will deploy one and fetch the previous owner automatically. This function returns a promise that resolves to a list of meta-transactions containing the necessary details for the swap and deployment.
- Param Types
- Return Types
| key | type | description |
|---|---|---|
nodeRpcUrl | string | Transport | JsonRpcNode | The JSON-RPC API URL for the target chain to fetch the previous owner. |
newOwner | object | The public address of the new owner to be added. |
newOwner.Signer | ECDSAPublicAddress | WebauthnPublicKey | Signer type which can be either an ECDSA public address or a Webauthn public key |
oldOwner | Signer | The public address of the owner to be replaced. |
overrides | object | Overrides for the default values used in the transaction. |
overrides.prevOwner | string | If set, it will be used as the previous owner instead of fetching it. |
overrides.eip7212WebAuthnPrecompileVerifier | string | Address for the EIP-7212 WebAuthn precompile verifier. |
overrides.eip7212WebAuthnContractVerifier | string | Address for the EIP-7212 WebAuthn contract verifier. |
overrides.webAuthnSignerFactory | string | Address for the WebAuthn signer factory. |
overrides.webAuthnSignerSingleton | string | Address for the WebAuthn signer singleton. |
overrides.webAuthnSignerProxyCreationCode | string | Creation code of the WebAuthn signer proxy. |
| key | type | description |
|---|---|---|
MetaTransaction[] | object | A promise that resolves to a list of meta-transactions for swapping the specified owner and deploying the verifier if necessary. |
MetaTransaction[].to | string | The target address for each meta-transaction (Safe account address). |
MetaTransaction[].data | string | The encoded function call data for the swap owner transaction. |
MetaTransaction[].value | bigint | The value to be sent with the meta-transaction, set to zero for these functions. |
Source code
createSwapOwnerMetaTransactions
createRemoveOwnerMetaTransaction
Creates a meta-transaction to remove an owner from the Safe account, fetching the previous owner if not provided. This function returns a promise that resolves to a meta-transaction object containing the necessary details for the removal.
- Param Types
- Return Types
| key | type | description |
|---|---|---|
nodeRpcUrl | string | Transport | JsonRpcNode | The JSON-RPC API URL for the target chain to fetch the previous owner. |
ownerToDelete | object | The public address of the owner to be deleted. |
ownerToDelete.Signer | ECDSAPublicAddress | WebauthnPublicKey | Signer type which can be either an ECDSA public address or a Webauthn public key |
threshold | number | The new threshold value for owner confirmations after removal. |
overrides | object | Optional Overrides for the default values used in the transaction. |
overrides.prevOwner | string | If set, it will be used as the previous owner instead of fetching it. |
overrides.eip7212WebAuthnPrecompileVerifier | string | Address for the EIP-7212 WebAuthn precompile verifier. |
overrides.eip7212WebAuthnContractVerifier | string | Address for the EIP-7212 WebAuthn contract verifier. |
overrides.webAuthnSignerFactory | string | Address for the WebAuthn signer factory. |
overrides.webAuthnSignerSingleton | string | Address for the WebAuthn signer singleton. |
overrides.webAuthnSignerProxyCreationCode | string | Creation code of the WebAuthn signer proxy. |
| key | type | description |
|---|---|---|
MetaTransaction | object | A promise that resolves to the meta-transaction object for removing the specified owner. |
MetaTransaction.to | string | The target address for the meta-transaction (Safe account address). |
MetaTransaction.data | string | The encoded function call data for removing the owner. |
MetaTransaction.value | bigint | The value to be sent with the meta-transaction, set to zero for this function. |
Source code
createRemoveOwnerMetaTransaction
verifyWebAuthnSignatureForMessageHash
A static method that verifies a webAuthn signed hash message for Passkeys, and can be also used even if the safe account hasn't been deployed yet.
- Param Types
- Return Types
| key | type | description |
|---|---|---|
nodeRpcUrl | string | Transport | JsonRpcNode | The JSON-RPC API url for the target chain. |
signer | object | The x and y coordinates of the webAuthn public key |
signer.x | bigint | The x coordinate of the webAuthn public key |
signer.y | bigint | The y coordinate of the webAuthn public key |
messageHash | string | The 0x-prefixed 32-byte hash of the message to verify |
signature | string | The signed message |
overrides | object | Optional overrides for webAuthn verify signature message |
overrides.webAuthnSignerSingleton | string | Specify the WebAuthn signer singleton |
overrides.eip7212WebAuthnPrecompileVerifier | string | Specify the EIP-7212 WebAuthn precompile verifier |
overrides.eip7212WebAuthnContractVerifier | string | Specify the EIP-7212 WebAuthn contract verifier |
| key | type | description |
|---|---|---|
isValid | Promise<boolean> | Returns true if the message is valid signature |
On the Safe Unified Account classes, the default verifier addresses come from the class's Safe Passkey module v0.2.1 defaults.
Source code
- SafeMultiChainSigAccountV1 / V2: verifyWebAuthnSignatureForMessageHash
- SafeAccountV0_3_0 and SafeAccountV0_2_0: verifyWebAuthnSignatureForMessageHash