import { CreateOfferArgs, CreateSellerArgs, MetaTxConfig, Web3LibAdapter, TransactionRequest, TransactionResponse, MetadataStorage, CreateGroupArgs, ConditionStruct, UpdateSellerArgs, OptInToSellerUpdateArgs, abis, SellerOfferArgs, FullOfferArgs } from "@bosonprotocol/common";
import { BigNumberish } from "@ethersproject/bignumber";
import { BytesLike } from "@ethersproject/bytes";
import { StructuredData } from "../utils/signature";
import { GetRetriedHashesData } from "./biconomy";
import { TransferAuthorization } from "../erc20/handler";
import { ERC20ForwardRequest } from "../forwarder/biconomy-interface";
import { MockForwardRequest } from "../forwarder/mock-interface";
export type UnsignedMetaTx = StructuredData & {
    functionName: string;
    functionSignature: string;
};
export type BaseMetaTxArgs = {
    web3Lib: Web3LibAdapter;
    nonce: BigNumberish;
    metaTxHandlerAddress: string;
    chainId: number;
};
export type BaseVoucherMetaTxArgs = {
    web3Lib: Web3LibAdapter;
    bosonVoucherAddress: string;
    chainId: number;
};
export type SignedMetaTx = {
    functionName: string;
    functionSignature: string;
    r: string;
    s: string;
    v: number;
};
export type SignedVoucherMetaTx = Omit<SignedMetaTx, "functionName"> & {
    to: string;
    signature: string;
    request: ERC20ForwardRequest | MockForwardRequest;
    domainSeparator?: string;
};
export declare function signMetaTx(args: BaseMetaTxArgs & {
    functionName: string;
    functionSignature: string;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTx(args: BaseMetaTxArgs & {
    functionName: string;
    functionSignature: string;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signVoucherMetaTx(args: BaseVoucherMetaTxArgs & {
    forwarderAbi: typeof abis.MockForwarderABI;
    functionSignature: string;
    forwarderAddress: string;
}): Promise<SignedVoucherMetaTx>;
export declare function signBiconomyVoucherMetaTx(args: BaseVoucherMetaTxArgs & {
    functionSignature: string;
    batchId: BigNumberish;
    forwarderAbi: typeof abis.MockForwarderABI | typeof abis.BiconomyForwarderABI;
    txGas: BigNumberish;
    relayerUrl: string;
}): Promise<SignedVoucherMetaTx>;
export declare function relayBiconomyMetaTransaction(args: {
    web3LibAdapter: Web3LibAdapter;
    chainId: number;
    contractAddress: string;
    metaTx: {
        config: Omit<MetaTxConfig, "apiIds" | "forwarderAbi"> & {
            apiId: string;
        };
        params: {
            userAddress: string;
            request: ERC20ForwardRequest;
            domainSeparator: string;
            signature: string;
        };
    };
}): Promise<TransactionResponse>;
export declare function signMetaTxCreateSeller(args: BaseMetaTxArgs & {
    createSellerArgs: CreateSellerArgs;
    metadataStorage?: MetadataStorage;
    theGraphStorage?: MetadataStorage;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxCreateSeller(args: BaseMetaTxArgs & {
    createSellerArgs: CreateSellerArgs;
    metadataStorage?: MetadataStorage;
    theGraphStorage?: MetadataStorage;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxUpdateSeller(args: BaseMetaTxArgs & {
    updateSellerArgs: UpdateSellerArgs;
    metadataStorage?: MetadataStorage;
    theGraphStorage?: MetadataStorage;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxUpdateSeller(args: BaseMetaTxArgs & {
    updateSellerArgs: UpdateSellerArgs;
    metadataStorage?: MetadataStorage;
    theGraphStorage?: MetadataStorage;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxOptInToSellerUpdate(args: BaseMetaTxArgs & {
    optInToSellerUpdateArgs: OptInToSellerUpdateArgs;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxOptInToSellerUpdate(args: BaseMetaTxArgs & {
    optInToSellerUpdateArgs: OptInToSellerUpdateArgs;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxCreateOffer(args: BaseMetaTxArgs & {
    createOfferArgs: CreateOfferArgs;
    metadataStorage?: MetadataStorage;
    theGraphStorage?: MetadataStorage;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxCreateOffer(args: BaseMetaTxArgs & {
    createOfferArgs: CreateOfferArgs;
    metadataStorage?: MetadataStorage;
    theGraphStorage?: MetadataStorage;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxCreateOfferBatch(args: BaseMetaTxArgs & {
    createOffersArgs: CreateOfferArgs[];
    metadataStorage?: MetadataStorage;
    theGraphStorage?: MetadataStorage;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxCreateOfferBatch(args: BaseMetaTxArgs & {
    createOffersArgs: CreateOfferArgs[];
    metadataStorage?: MetadataStorage;
    theGraphStorage?: MetadataStorage;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxVoidOffer(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxVoidOffer(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxVoidOfferBatch(args: BaseMetaTxArgs & {
    offerIds: BigNumberish[];
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxVoidOfferBatch(args: BaseMetaTxArgs & {
    offerIds: BigNumberish[];
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxExtendOffer(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    validUntil: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxExtendOffer(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    validUntil: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxExtendOfferBatch(args: BaseMetaTxArgs & {
    offerIds: BigNumberish[];
    validUntil: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxExtendOfferBatch(args: BaseMetaTxArgs & {
    offerIds: BigNumberish[];
    validUntil: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxCompleteExchangeBatch(args: BaseMetaTxArgs & {
    exchangeIds: BigNumberish[];
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxCompleteExchangeBatch(args: BaseMetaTxArgs & {
    exchangeIds: BigNumberish[];
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxExpireVoucher(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxExpireVoucher(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxRevokeVoucher(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxRevokeVoucher(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxCreateGroup(args: BaseMetaTxArgs & {
    createGroupArgs: CreateGroupArgs;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxCreateGroup(args: BaseMetaTxArgs & {
    createGroupArgs: CreateGroupArgs;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxReserveRange(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    length: BigNumberish;
    to: string;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxReserveRange(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    length: BigNumberish;
    to: string;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxPreMint(args: BaseVoucherMetaTxArgs & {
    offerId: BigNumberish;
    amount: BigNumberish;
    batchId?: BigNumberish;
    forwarderAddress?: string;
    forwarderAbi: typeof abis.MockForwarderABI | typeof abis.BiconomyForwarderABI;
    relayerUrl: string;
}): Promise<SignedVoucherMetaTx>;
export declare function signMetaTxSetApprovalForAll(args: BaseVoucherMetaTxArgs & {
    operator: string;
    approved: boolean;
    batchId?: BigNumberish;
    forwarderAddress?: string;
    forwarderAbi: typeof abis.MockForwarderABI | typeof abis.BiconomyForwarderABI;
    relayerUrl: string;
}): Promise<SignedVoucherMetaTx>;
export declare function signMetaTxSetApprovalForAllToContract(args: BaseVoucherMetaTxArgs & {
    operator: string;
    approved: boolean;
    batchId?: BigNumberish;
    forwarderAddress?: string;
    forwarderAbi: typeof abis.MockForwarderABI | typeof abis.BiconomyForwarderABI;
    relayerUrl: string;
}, overrides?: {
    txGas?: number;
}): Promise<SignedVoucherMetaTx>;
export declare function signMetaTxCallExternalContract(args: BaseVoucherMetaTxArgs & {
    to: string;
    data: string;
    batchId?: BigNumberish;
    forwarderAddress?: string;
    forwarderAbi: typeof abis.MockForwarderABI | typeof abis.BiconomyForwarderABI;
    relayerUrl: string;
}, overrides?: {
    txGas?: number;
}): Promise<SignedVoucherMetaTx>;
export declare function signMetaTxCreateOfferWithCondition(args: BaseMetaTxArgs & {
    offerToCreate: CreateOfferArgs;
    condition: ConditionStruct;
    metadataStorage?: MetadataStorage;
    theGraphStorage?: MetadataStorage;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxCreateOfferWithCondition(args: BaseMetaTxArgs & {
    offerToCreate: CreateOfferArgs;
    condition: ConditionStruct;
    metadataStorage?: MetadataStorage;
    theGraphStorage?: MetadataStorage;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxCommitToOffer(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxCommitToOffer(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxCommitToConditionalOffer(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    tokenId: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxCommitToConditionalOffer(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    tokenId: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxCommitToBuyerOffer(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    sellerParams: SellerOfferArgs;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxCommitToBuyerOffer(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    sellerParams: SellerOfferArgs;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxCreateOfferAndCommit(args: BaseMetaTxArgs & {
    createOfferAndCommitArgs: FullOfferArgs;
    metadataStorage?: MetadataStorage;
    theGraphStorage?: MetadataStorage;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxCreateOfferAndCommit(args: BaseMetaTxArgs & {
    createOfferAndCommitArgs: FullOfferArgs;
    metadataStorage?: MetadataStorage;
    theGraphStorage?: MetadataStorage;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxCommitToOfferAndRedeemVoucher(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxCommitToOfferAndRedeemVoucher(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxCommitToConditionalOfferAndRedeemVoucher(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    tokenId: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxCommitToConditionalOfferAndRedeemVoucher(args: BaseMetaTxArgs & {
    offerId: BigNumberish;
    tokenId: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxCreateOfferCommitAndRedeem(args: BaseMetaTxArgs & {
    createOfferAndCommitArgs: FullOfferArgs;
    metadataStorage?: MetadataStorage;
    theGraphStorage?: MetadataStorage;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxCreateOfferCommitAndRedeem(args: BaseMetaTxArgs & {
    createOfferAndCommitArgs: FullOfferArgs;
    metadataStorage?: MetadataStorage;
    theGraphStorage?: MetadataStorage;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxCancelVoucher(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxCancelVoucher(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxRedeemVoucher(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxRedeemVoucher(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxCompleteExchange(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxCompleteExchange(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxRetractDispute(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxRetractDispute(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxEscalateDispute(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxEscalateDispute(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxRaiseDispute(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxRaiseDispute(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxResolveDispute(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    buyerPercent: BigNumberish;
    counterpartySig: {
        r: string;
        s: string;
        v: number;
    } | string;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxResolveDispute(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    buyerPercent: BigNumberish;
    counterpartySig: {
        r: string;
        s: string;
        v: number;
    } | string;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxExtendDisputeTimeout(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    newTimeout: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxExtendDisputeTimeout(args: BaseMetaTxArgs & {
    exchangeId: BigNumberish;
    newTimeout: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxWithdrawFunds(args: BaseMetaTxArgs & {
    entityId: BigNumberish;
    tokenList: string[];
    tokenAmounts: BigNumberish[];
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxWithdrawFunds(args: BaseMetaTxArgs & {
    entityId: BigNumberish;
    tokenList: string[];
    tokenAmounts: BigNumberish[];
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function signMetaTxDepositFunds(args: BaseMetaTxArgs & {
    entityId: BigNumberish;
    fundsTokenAddress: string;
    fundsAmount: BigNumberish;
    returnTypedDataToSign: true;
}): Promise<UnsignedMetaTx>;
export declare function signMetaTxDepositFunds(args: BaseMetaTxArgs & {
    entityId: BigNumberish;
    fundsTokenAddress: string;
    fundsAmount: BigNumberish;
    returnTypedDataToSign?: false | undefined;
}): Promise<SignedMetaTx>;
export declare function relayMetaTransaction(args: {
    web3LibAdapter: Web3LibAdapter;
    chainId: number;
    contractAddress: string;
    metaTx: {
        config: Omit<MetaTxConfig, "apiIds" | "forwarderAbi"> & {
            apiId: string;
        };
        params: {
            userAddress: string;
            functionName: string;
            functionSignature: BytesLike;
            nonce: BigNumberish;
            sigR: BytesLike;
            sigS: BytesLike;
            sigV: BigNumberish;
            transferAuthorizations?: TransferAuthorization[];
        };
    };
}): Promise<TransactionResponse>;
export type ExecuteMetaTxBaseArgs = {
    contractAddress: string;
    web3Lib: Web3LibAdapter;
    userAddress: string;
    functionName: string;
    functionSignature: BytesLike;
    nonce: BigNumberish;
    sigR: BytesLike;
    sigS: BytesLike;
    sigV: BigNumberish;
};
export declare function executeMetaTransaction(args: ExecuteMetaTxBaseArgs & {
    returnTxInfo: true;
}): Promise<TransactionRequest>;
export declare function executeMetaTransaction(args: ExecuteMetaTxBaseArgs & {
    returnTxInfo?: false | undefined;
}): Promise<TransactionResponse>;
export type ExecuteMetaTxWithAuthArgs = ExecuteMetaTxBaseArgs & {
    transferAuthorizations: TransferAuthorization[];
};
export declare function executeMetaTransactionWithTokenTransferAuthorization(args: ExecuteMetaTxWithAuthArgs & {
    returnTxInfo: true;
}): Promise<TransactionRequest>;
export declare function executeMetaTransactionWithTokenTransferAuthorization(args: ExecuteMetaTxWithAuthArgs & {
    returnTxInfo?: false | undefined;
}): Promise<TransactionResponse>;
export declare function getResubmitted(args: {
    chainId: number;
    metaTx: {
        config: Partial<Omit<MetaTxConfig, "apiIds"> & {
            apiId: string;
        }>;
        originalHash: string;
    };
}): Promise<GetRetriedHashesData>;
//# sourceMappingURL=handler.d.ts.map