@0xfutbol/id
Version:
React component library with shared providers for 0xFutbol ID
45 lines (44 loc) • 2.17 kB
TypeScript
import { ChainName } from "@0xfutbol/constants";
import React, { ReactNode } from "react";
import { Wallet } from "thirdweb/wallets";
import { BigNumber, Signer } from "ethers";
type ThirdwebContextProviderProps = {
chains: Array<ChainName>;
children: ReactNode;
};
export declare const ThirdwebContext: React.Context<{
address: string | undefined;
signer: Record<"base" | "boba" | "matchain" | "polygon" | "skaleNebula" | "xdc", Signer> | undefined;
status: import("thirdweb/wallets").ConnectionStatus;
userDetails: {
provider: "line" | "google" | "apple" | "facebook" | "discord" | "x" | "coinbase" | "farcaster" | "telegram" | "github" | "twitch" | "steam" | "guest" | "backend" | "email" | "phone" | "passkey" | "wallet";
id?: string;
email?: string;
phone?: string;
address?: import("thirdweb").Address;
}[] | undefined;
web3Ready: boolean;
connect: (wallet: Wallet) => Promise<void>;
disconnect: () => Promise<void>;
nativeBalanceOf: (address: string, chainId: number) => Promise<BigNumber>;
switchChain: (chain: ChainName) => Promise<void>;
} | undefined>;
export declare function ThirdwebContextProvider({ chains, children }: ThirdwebContextProviderProps): import("react/jsx-runtime").JSX.Element;
export declare const useThirdwebContext: () => {
address: string | undefined;
signer: Record<"base" | "boba" | "matchain" | "polygon" | "skaleNebula" | "xdc", Signer> | undefined;
status: import("thirdweb/wallets").ConnectionStatus;
userDetails: {
provider: "line" | "google" | "apple" | "facebook" | "discord" | "x" | "coinbase" | "farcaster" | "telegram" | "github" | "twitch" | "steam" | "guest" | "backend" | "email" | "phone" | "passkey" | "wallet";
id?: string;
email?: string;
phone?: string;
address?: import("thirdweb").Address;
}[] | undefined;
web3Ready: boolean;
connect: (wallet: Wallet) => Promise<void>;
disconnect: () => Promise<void>;
nativeBalanceOf: (address: string, chainId: number) => Promise<BigNumber>;
switchChain: (chain: ChainName) => Promise<void>;
};
export {};