UNPKG

@0xfutbol/id

Version:

React component library with shared providers for 0xFutbol ID

43 lines (42 loc) 1.35 kB
import { ChainName } from "@0xfutbol/constants"; import React from "react"; import { AuthStatus } from "@/providers/types"; type AuthContextProviderProps = { backendUrl: string; chainToSign: ChainName; children: React.ReactNode; }; export declare const AuthContext: React.Context<{ authStatus: AuthStatus; isClaimPending: boolean; isWaitingForSignature: boolean; username: any; userClaims: any; backendUrl: string; claim: (username: string, email?: string) => Promise<void>; loginWithWaas: (params: { jwt: string; walletId: string; walletAddress: string; waasBaseUrl: string; waasSessionToken: string; }) => Promise<void>; } | undefined>; export declare const AuthContextProvider: ({ backendUrl, chainToSign, children }: AuthContextProviderProps) => import("react/jsx-runtime").JSX.Element; export declare const useAuthContext: () => { authStatus: AuthStatus; isClaimPending: boolean; isWaitingForSignature: boolean; username: any; userClaims: any; backendUrl: string; claim: (username: string, email?: string) => Promise<void>; loginWithWaas: (params: { jwt: string; walletId: string; walletAddress: string; waasBaseUrl: string; waasSessionToken: string; }) => Promise<void>; }; export {};