Skip to content

useAnsTokenFromApi

Hook for getting Token information from ANS.

Import

import { useAnsTokenFromApi } from '@abstract-money/react'

Usage

index.tsx
import { useAnsTokenFromApi } from '@abstract-money/react'
 
function App() {
  const ansTokenFromAPIQuery = useAnsTokenFromApi({
    args: {
      id: '...',
      chainName: 'pion'
    }
  })
}

Parameters

args

Arguments passed to the hook

chainName

string

Name of the chain to query.

id

string

ANS Id of the token.

extra

{ apiUrl?: string | undefined; } | undefined

Extra options to override decorated parameters.

query

QueryOptions | undefined

QueryOptions to use.