import { CosmWasmClient } from '@cosmjs/cosmwasm-stargate'; import { GranteeSignerClient, StorageStrategy, RedirectStrategy, AbstraxionAuth, SignArbSecp256k1HdWallet } from '@burnt-labs/abstraxion-core'; import * as react from 'react'; import { GasPrice } from '@cosmjs/stargate'; interface AbstraxionAccount { bech32Address: string; } interface AbstraxionAccountState { data: AbstraxionAccount; isConnected: boolean; isConnecting: boolean; isInitializing: boolean; isLoading: boolean; isReturningFromAuth: boolean; isLoggingIn: boolean; isError: boolean; error: string; login: () => Promise; logout: () => void; } declare const useAbstraxionAccount: () => AbstraxionAccountState; declare const useAbstraxionClient: () => { readonly client: CosmWasmClient | undefined; }; declare const useAbstraxionSigningClient: () => { readonly client: GranteeSignerClient | undefined; readonly signArb: ((signerAddress: string, message: string | Uint8Array) => Promise) | undefined; }; /** * React Native implementation of the StorageStrategy using AsyncStorage */ declare class ReactNativeStorageStrategy implements StorageStrategy { getItem(key: string): Promise; setItem(key: string, value: string): Promise; removeItem(key: string): Promise; } /** * React Native implementation of the RedirectStrategy using Expo WebBrowser */ declare class ReactNativeRedirectStrategy implements RedirectStrategy { private redirectCallback?; private reactStateCallback?; getCurrentUrl(): Promise; redirect(url: string): Promise; onRedirectComplete(callback: (params: { granter?: string | null; }) => void): Promise; removeRedirectHandler(): Promise; setReactStateCallback(callback: (params: { granter?: string | null; }) => void): void; getUrlParameter(param: string): Promise; cleanUrlParameters(paramsToRemove: string[]): Promise; } declare const abstraxionAuth: AbstraxionAuth; type SpendLimit = { denom: string; amount: string; }; type ContractGrantDescription = string | { address: string; amounts: SpendLimit[]; }; interface AbstraxionContextProps { isConnected: boolean; setIsConnected: React.Dispatch>; isConnecting: boolean; setIsConnecting: React.Dispatch>; isInitializing: boolean; isReturningFromAuth: boolean; isLoggingIn: boolean; abstraxionError: string; setAbstraxionError: React.Dispatch>; abstraxionAccount: SignArbSecp256k1HdWallet | undefined; setAbstraxionAccount: React.Dispatch; granterAddress: string; showModal: boolean; setShowModal: React.Dispatch>; setGranterAddress: React.Dispatch>; contracts?: ContractGrantDescription[]; dashboardUrl?: string; setDashboardUrl: React.Dispatch>; rpcUrl: string; stake?: boolean; bank?: SpendLimit[]; treasury?: string; indexerUrl?: string; gasPrice: GasPrice; logout: () => void; login: () => Promise; } interface AbstraxionConfig { contracts?: ContractGrantDescription[]; rpcUrl?: string; stake?: boolean; bank?: SpendLimit[]; callbackUrl?: string; treasury?: string; indexerUrl?: string; gasPrice?: string; } declare function AbstraxionProvider({ children, config: { contracts, rpcUrl, stake, bank, callbackUrl, treasury, indexerUrl, gasPrice, }, }: { children: React.ReactNode; config: AbstraxionConfig; }): JSX.Element; declare const AbstraxionContext: react.Context; export { AbstraxionAccount, AbstraxionAccountState, AbstraxionConfig, AbstraxionContext, AbstraxionContextProps, AbstraxionProvider, ContractGrantDescription, ReactNativeRedirectStrategy, ReactNativeStorageStrategy, SpendLimit, abstraxionAuth, useAbstraxionAccount, useAbstraxionClient, useAbstraxionSigningClient };