Skip to main content

@exodus/profile

This Exodus SDK feature provides a way to store metadata for a user profile, e.g. their wallet name/label and nft.

Install

yarn add @exodus/profile

Usage

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

Play with it

  1. Open the playground https://exodus-hydra.pages.dev/features/profile
  2. Run await exodus.profile.set({ name: 'Lord Voldemort' }) in the Dev Tools Console.
  3. Run await exodus.profile.get() in the Dev Tools Console.
  4. Run selectors.profile.data(store.getState()) 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.

If you're building a feature that requires profile data, add a dependency on the profileAtom atom.

UI Side

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

import { useSelector } from 'react-redux'
import selectors from '~/ui/flux/selectors'

const MyComponent = () => {
const profile = useSelector(selectors.profile.data)
console.log('>>> profile', profile)
}