Socket
Book a DemoInstallSign in
Socket

@exodus/assets-feature

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exodus/assets-feature

This Exodus SDK feature provides access to instances of all blockchain asset adapters supported by the wallet, and enables you to search for and add custom tokens at runtime.

latest
Source
npmnpm
Version
8.5.0
Version published
Maintainers
1
Created
Source

@exodus/assets-feature

This Exodus SDK feature provides access to instances of all blockchain asset adapters supported by the wallet, and enables you to search for and add custom tokens at runtime. Added tokens persist across restarts.

Install

yarn add @exodus/assets-feature

Usage

@exodus/assets-feature is bundled with @exodus/headless. It injects the assetsAtom into the IOC, which you can then reference in your feature's dependencies to get all/any particular assets.

Example:

const myModule = {
  id: 'myModule',
  type: 'module,
  factory: ({ assetsAtom }) => {
    // get all assets known at this moment
    const { value: assets } = await assetsAtom.get()
    assetsAtom.observe(({ value }) => {
      // do something with updated assets
    })
  },
  dependencies: ['assetsAtom']
}

Play with it

  • Open the playground https://exodus-hydra.pages.dev/features/assets
  • Run await exodus.assets.getAsset('bitcoin') in the Dev Tools Console.
  • Run await exodus.assets.searchTokens({ lifecycleStatus: ['c', 'v'], baseAssetName: 'ethereum' }) in the Dev Tools Console.
  • Run await exodus.assets.addTokens({ assetIds: ['0x455e53CBB86018Ac2B8092FdCd39d8444aFFC3F6'], baseAssetName: 'ethereum', allowedStatusList: ['c', 'v'] }) in the Dev Tools Console to add the Polygon Ecosystem Token token on the ethereum chain (not financial advice).

See api/index.d.ts for more details on the API and token validation/curation status.

API Side

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

UI Side

See using the sdk for more details on basic UI-side setup.

import selectors from '~/ui/flux/selectors'

const MyComponent = () => {
  const bitcoin = useSelector(selectors.assets.createAssetByNameSelector('bitcoin'))
  const tx = await bitcoin.api.signTx({
    // ...,
  })
}

FAQs

Package last updated on 18 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts