React & React Native Utility Hooks

Import hooks

In order to use the function below, you need to import the hooks for React or React native.

Import React Hooks

import { hooks } from '@paytweed/frontend-sdk-react'



Returns list of all the supported blockchains

Data type​

  chainId?: number
  coin: {
    decimals: number
    logo: string
    name: string
    symbol: string
  id: string
  name: string
  uriPrefix: string

Usage Example​

const { data, error, loading } = await hooks.useBlockchainList()

Get Exchange Rates​


Returns exchange rates between crypto and fiat (USD)

Return type​

Promise<{ cryptoCurrencyId: string, fiatCurrencyId: string, rate: string }[]>

Usage Example​​

const { data, error, loading } = await hooks.useCryptoExchangeRates()

Response Example​

[{ "cryptoCurrencyId": "ETH", "fiatCurrencyId": "usd", "rate": "1234" }]

Last updated