Royco SDK

getBaseChains

Query for fetching list of all the supported chains

Declaration

get-base-chains

Import

import { getBaseChainsQueryOptions } from "royco/queries";

Usage

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

Return Type

  • queryKey : base_chains
  • queryFn : () => Promise<BaseChain[] | null>

Type Reference

Last updated on

On this page

Edit on Github