UNPKG

@azuro-org/sdk

Version:

One-stop solution for building betting dApps on the Azuro Protocol.

20 lines (19 loc) 723 B
import React from 'react'; import { type Chain } from 'viem'; import { type ChainId, type ChainData } from '@azuro-org/toolkit'; export type ChainContextValue = ChainData & { appChain: Omit<Chain, 'id'> & { id: ChainId; }; walletChain: Chain | undefined; isRightNetwork: boolean; setAppChainId: (chainId: ChainId) => void; }; export declare const ChainContext: React.Context<ChainContextValue | null>; export declare const useChain: () => ChainContextValue; export declare const useOptionalChain: (chainId?: ChainId) => ChainData; export type ChainProviderProps = { children: React.ReactNode; initialChainId: ChainId; }; export declare const ChainProvider: React.FC<ChainProviderProps>;