Skip to content

Commit

Permalink
add : verifyWebAuthnSignatureForMessageHash docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sherifahmed990 committed Dec 14, 2024
1 parent 563985f commit 3596376
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/account/Safe/SafeAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2338,6 +2338,20 @@ export class SafeAccount extends SmartAccount {
return dummySignerSignatures;
}

/**
* verify a webauthn signature against a signer and a message hash
* @note: this function works by constructing the bytecode of a webatuhn
* verifying contract proxy that represent the input signer, then overriding
* an arbitrary address code and caling "isValidSignature" using eth_call
* this way we can check a signature even if the verifying contract is not
* deployed
* @param nodeRpcUrl - The JSON-RPC API url for the target chain
* @param signer - a signer to check the signature against
* @param messageHash - a messageHash to check the signature against
* @param signature - a webauthn signature to check
* @param overrides - overrides for the default values
* @returns a promise of boolean - True if a valid signature
*/
public static async verifyWebAuthnSignatureForMessageHash(
nodeRpcUrl: string,
signer: WebauthnPublicKey,
Expand Down

0 comments on commit 3596376

Please sign in to comment.