isSmartAccountWithSigner

1function isSmartAccountWithSigner(
2 account,
3): account is SmartContractAccountWithSigner<
4 string,
5 SmartAccountSigner<any>,
6 keyof EntryPointRegistryBase<unknown>
7>;

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

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

Example

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

Parameters

ParameterTypeDescription

account

SmartContractAccount

The account to check.

Returns

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

true if the account has a signer, otherwise false.