isAccount
Checks if an object is an account resolver.
Import
You can import the entire package and access the function:
_10import * as sdk from "@onflow/sdk"_10_10sdk.isAccount(account)
Or import directly the specific function:
_10import { isAccount } from "@onflow/sdk"_10_10isAccount(account)
Usage
_10import { isAccount, authorization } from "@onflow/sdk"_10_10const authz = authorization("0x123", signingFunction);_10const accountResolver = { kind: "ACCOUNT", addr: "0x123" };_10const regularObject = { name: "test" };_10_10console.log(isAccount(accountResolver)); // true_10console.log(isAccount(regularObject)); // false
Parameters
account
- Type:
Record<string, any>
- Description: The object to check
Returns
boolean