import { CeloTokenContract, ContractKit } from '@celo/contractkit'; import { WalletTypes } from './constants'; import { Connector, Dapp, Network } from './types'; export interface UseContractKit { dapp: Dapp; kit: ContractKit; walletType: WalletTypes; feeCurrency: CeloTokenContract; /** * Name of the account. */ account: string | null; address: string | null; connect: () => Promise; destroy: () => Promise; network: Network; updateNetwork: (network: Network) => Promise; updateFeeCurrency: (newFeeCurrency: CeloTokenContract) => Promise; /** * Helper function for handling any interaction with a Celo wallet. Perform action will * - open the action modal * - handle multiple transactions in order */ performActions: (...operations: ((kit: ContractKit) => unknown | Promise)[]) => Promise; /** * Whether or not the connector has been fully loaded. */ initialised: boolean; /** * Initialisation error, if applicable. */ initError: Error | null; /** * Gets the connected instance of ContractKit. * If the user is not connected, this opens up the connection modal. */ getConnectedKit: () => Promise; } export declare const useContractKit: () => UseContractKit; interface UseContractKitInternal extends UseContractKit { connectionCallback: ((connector: Connector | false) => void) | null; initConnector: (connector: Connector) => Promise; pendingActionCount: number; } /** * useContractKit with internal methods exposed. Package use only. */ export declare const useContractKitInternal: () => UseContractKitInternal; export {}; //# sourceMappingURL=use-contractkit.d.ts.map