hasActiveAccount
Check whether an account is currently active.
Import
ts
import { hasActiveAccount } from "@0xcurvy/curvy-sdk/actions";Usage
ts
if (hasActiveAccount()) { ... }Signature
ts
function hasActiveAccount(parameters?: HasActiveAccountParameters): booleanReturns
boolean
The action resolves or returns the value shown in the signature.
Parameters
config
- Type:
CurvyConfig - Required: no
Curvy config to use. Defaults to the ambient config.
ts
const result = hasActiveAccount({
config,
});Errors
Errors from config resolution and the underlying SDK operation are propagated to the caller.
Related
- Authentication guide
getAccounts— Get the serializable metadata for every known account.getAccountById— Get a single account's serializable metadata by id, or undefined if unknown.getActiveAccount— Get the active account's serializable metadata, or null if none is active.hasAccount— Check whether an account with the given id is known.
Source
packages/@0xcurvy/sdk/src/actions/account/hasActiveAccount.ts