UNPKG

@alchemy/aa-core

Version:

viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts

17 lines (14 loc) 440 B
import { z } from "zod"; import type { SmartAccountSigner } from "./types"; export const isSigner = (signer: any): signer is SmartAccountSigner => { return ( signer != null && typeof signer === "object" && "signerType" in signer && "signMessage" in signer && "signTypedData" in signer && "getAddress" in signer && "inner" in signer ); }; export const SignerSchema = z.custom<SmartAccountSigner>(isSigner);