import { BigNumber, BigNumberish, Contract, ContractReceipt, ContractTransaction, Signer } from 'ethers';
import { ApprovalPermit } from './utils';
export type ApprovalContract = Contract | {
    readonly signer: Signer;
    allowance(owner: string, spender: string): Promise<BigNumber>;
    approve(spender: string, amount: BigNumberish): Promise<ContractTransaction>;
} | null;
export type VestingContract = Contract | {
    approveProtocol(): Promise<ContractTransaction>;
} | null;
export type PermitApprovalInput = {
    /** Chain ID to do approval on */
    permitApprovalChain: number;
    /** @example https://github.com/graphprotocol/contracts/blob/dev/contracts/token/GraphToken.sol#L37 */
    l1TokenDomainSalt: string;
};
export interface ApprovalFlowMachineCtx {
    ethereumAccount: string | null;
    approvalContract: ApprovalContract;
    spender: string | null;
    approvalConfirmations?: number;
    vestingContract: VestingContract;
    vestingContractAddress: string | null;
    allowedAmount: BigNumber;
    allowedPermitAmount: BigNumber;
    approvalAmount: BigNumber | null;
    approvalTxResponse?: ContractTransaction;
    approvalTxReceipt?: ContractReceipt;
    approvalPermit?: ApprovalPermit | null;
    permitApprovalInput?: PermitApprovalInput;
}
export type ApprovalFlowMachineEvent = {
    type: 'SET_SPENDER';
    payload: string;
} | {
    type: 'SET_ETHEREUM_ACCOUNT';
    payload: string;
} | {
    type: 'SET_APPROVAL_CONTRACT';
    payload: ApprovalContract;
} | {
    type: 'RETRIEVE_ALLOWANCE';
} | {
    type: 'UPDATE_ALLOWANCE';
    payload: BigNumber;
} | {
    type: 'UPDATE_ALLOWANCE_PERMIT';
    payload: BigNumber;
};
export type ApprovalFlowMachineServices = {
    handleRetrieveAllowance: {
        data: BigNumber;
    };
    handleUpdateAllowance: {
        payload: BigNumber;
        data: ContractTransaction;
    };
    handleUpdatePermitAllowance: {
        payload: BigNumber;
        data: ApprovalPermit;
    };
    handleWaitForUpdateAllowanceToComplete: {
        data: ContractReceipt | null;
    };
};
export declare const approvalFlowMachine: import('xstate').StateMachine<ApprovalFlowMachineCtx, any, {
    type: "SET_SPENDER";
    payload: string;
} | {
    type: "SET_ETHEREUM_ACCOUNT";
    payload: string;
} | {
    type: "SET_APPROVAL_CONTRACT";
    payload: ApprovalContract;
} | {
    type: "RETRIEVE_ALLOWANCE";
} | {
    type: "UPDATE_ALLOWANCE";
    payload: BigNumber;
} | {
    type: "UPDATE_ALLOWANCE_PERMIT";
    payload: BigNumber;
}, {
    value: any;
    context: ApprovalFlowMachineCtx;
}, import('xstate').BaseActionObject, ApprovalFlowMachineServices, import('xstate').ResolveTypegenMeta<import('./approval-flow.machine.typegen').Typegen0, {
    type: "SET_SPENDER";
    payload: string;
} | {
    type: "SET_ETHEREUM_ACCOUNT";
    payload: string;
} | {
    type: "SET_APPROVAL_CONTRACT";
    payload: ApprovalContract;
} | {
    type: "RETRIEVE_ALLOWANCE";
} | {
    type: "UPDATE_ALLOWANCE";
    payload: BigNumber;
} | {
    type: "UPDATE_ALLOWANCE_PERMIT";
    payload: BigNumber;
}, import('xstate').BaseActionObject, ApprovalFlowMachineServices>>;
//# sourceMappingURL=approval-flow.machine.d.ts.map