Skip to content
Alchemy Logo

isSmartAccountWithSigner

function isSmartAccountWithSigner(
  account,
): account is SmartContractAccountWithSigner<
  string,
  SmartAccountSigner<any>,
  keyof EntryPointRegistryBase<unknown>
>;

Defined in: aa-sdk/core/src/account/smartContractAccount.ts:113

Determines if the given SmartContractAccount has a signer associated with it.

import { toSmartContractAccount } from "@aa-sdk/core";
 
const account = await toSmartContractAccount(...);
 
console.log(isSmartAccountWithSigner(account)); // false: the base account does not have a publicly accessible signer

ParameterTypeDescription

account

SmartContractAccount

The account to check.

account is SmartContractAccountWithSigner<string, SmartAccountSigner<any>, keyof EntryPointRegistryBase<unknown>>

true if the account has a signer, otherwise false.

Was this page helpful?