Skip to Content
Open SourceHydraFeatures@exodus/wallet-accounts

@exodus/wallet-accounts

This feature offers a CRUD interface for wallet accounts, also known as portfolios from an end-user perspective.

Install

npm i @exodus/wallet-accounts

Usage

This feature is designed to be used together with @exodus/headless. See using the sdk.

Play with it

  1. Open the playground
  2. Try out some methods via the UI. These correspond 1:1 with the exodus.walletAccounts API.
  3. Run await exodus.walletAccounts.getEnabled() in the Dev Tools Console.

API Side

See using the sdk for more details on how features plug into the SDK and the API interface in the type declaration.

await exodus.walletAccounts.create({ source: WalletAccount.EXODUS_SRC });
 
const { exodus_1: created } = await exodus.walletAccounts.getEnabled();
await exodus.walletAccounts.disable(created.toString());
 
await exodus.walletAccounts.enable(created.toString());

If you’re building a feature that requires readonly access to wallet accounts, add a dependency on walletAccountsAtom. See legos for more information on how atoms work.

UI Side

See using the sdk for more details on basic UI-side setup.
Example: active selector

import { selectors } from '~/ui/flux';
 
const MyComponent = () => {
  const activeWalletAccount = useSelector(selectors.walletAccounts.active);
  // ...
};
Last updated on

Start building

XO

Request Demo

Schedule a call with our team

Select a product
Arrow right