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