Royco SDK

getBaseTokens

Query for fetching list of all the supported tokens that can be used in royco pools

Declaration

get-base-tokens

Import

import { getBaseTokensQueryOptions } from "royco/queries";

Usage

Component.tsx
import { useRoycoClient } from "royco/client";
import { getBaseTokensQueryOptions } from "royco/queries";
import { useQuery } from "@tanstack/react-query";
 
const Component = () => {
  const client = useRoycoClient();
 
  const {
    data: chains,
    isLoading,
    isError,
    isRefetching,
  } = useQuery(getBaseTokensQueryOptions(client));
};

Return Type

  • queryKey : base_tokens
  • queryFn : () => Promise<BaseTokens | null>

Type Reference

@TODO Add separation for BaseToken & BaseToken(s) via Tabs

Last updated on

On this page

Edit on Github