/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */

import {
  ethers,
  EventFilter,
  Signer,
  BigNumber,
  BigNumberish,
  PopulatedTransaction,
  Contract,
  ContractTransaction,
  Overrides,
  PayableOverrides,
  CallOverrides,
} from "ethers";
import { BytesLike } from "@ethersproject/bytes";
import { Listener, Provider } from "@ethersproject/providers";
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";
import { TypedEventFilter, TypedEvent, TypedListener } from "./commons";

interface ITestChannelInterface extends ethers.utils.Interface {
  functions: {
    "defundChannel(tuple,address[],uint256[])": FunctionFragment;
    "defundTransfer(tuple,bytes,bytes,bytes)": FunctionFragment;
    "depositAlice(address,uint256)": FunctionFragment;
    "disputeChannel(tuple,bytes,bytes)": FunctionFragment;
    "disputeTransfer(tuple,bytes32[])": FunctionFragment;
    "exit(address,address,address)": FunctionFragment;
    "getAlice()": FunctionFragment;
    "getBob()": FunctionFragment;
    "getChannelDispute()": FunctionFragment;
    "getDefundNonce(address)": FunctionFragment;
    "getExitableAmount(address,address)": FunctionFragment;
    "getTotalDepositsAlice(address)": FunctionFragment;
    "getTotalDepositsBob(address)": FunctionFragment;
    "getTotalTransferred(address)": FunctionFragment;
    "getTransferDispute(bytes32)": FunctionFragment;
    "getWithdrawalTransactionRecord(tuple)": FunctionFragment;
    "setup(address,address)": FunctionFragment;
    "testMakeBalanceExitable(address,tuple)": FunctionFragment;
    "testMakeExitable(address,address,uint256)": FunctionFragment;
    "withdraw(tuple,bytes,bytes)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "defundChannel",
    values: [
      {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      string[],
      BigNumberish[]
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "defundTransfer",
    values: [
      {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      BytesLike,
      BytesLike,
      BytesLike
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "depositAlice",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "disputeChannel",
    values: [
      {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      BytesLike,
      BytesLike
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "disputeTransfer",
    values: [
      {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      BytesLike[]
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "exit",
    values: [string, string, string]
  ): string;
  encodeFunctionData(functionFragment: "getAlice", values?: undefined): string;
  encodeFunctionData(functionFragment: "getBob", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "getChannelDispute",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getDefundNonce",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "getExitableAmount",
    values: [string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "getTotalDepositsAlice",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "getTotalDepositsBob",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "getTotalTransferred",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "getTransferDispute",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "getWithdrawalTransactionRecord",
    values: [
      {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      }
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "setup",
    values: [string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "testMakeBalanceExitable",
    values: [
      string,
      { amount: [BigNumberish, BigNumberish]; to: [string, string] }
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "testMakeExitable",
    values: [string, string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "withdraw",
    values: [
      {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      BytesLike,
      BytesLike
    ]
  ): string;

  decodeFunctionResult(
    functionFragment: "defundChannel",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "defundTransfer",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "depositAlice",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "disputeChannel",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "disputeTransfer",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "exit", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "getAlice", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "getBob", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getChannelDispute",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getDefundNonce",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getExitableAmount",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getTotalDepositsAlice",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getTotalDepositsBob",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getTotalTransferred",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getTransferDispute",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getWithdrawalTransactionRecord",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "setup", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "testMakeBalanceExitable",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "testMakeExitable",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;

  events: {
    "AliceDeposited(address,uint256)": EventFragment;
    "ChannelDefunded(address,tuple,tuple,address[])": EventFragment;
    "ChannelDisputed(address,tuple,tuple)": EventFragment;
    "TransferDefunded(address,tuple,tuple,bytes,bytes,tuple)": EventFragment;
    "TransferDisputed(address,tuple,tuple)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "AliceDeposited"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "ChannelDefunded"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "ChannelDisputed"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "TransferDefunded"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "TransferDisputed"): EventFragment;
}

export class ITestChannel extends Contract {
  connect(signerOrProvider: Signer | Provider | string): this;
  attach(addressOrName: string): this;
  deployed(): Promise<this>;

  listeners<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject>
  ): Array<TypedListener<EventArgsArray, EventArgsObject>>;
  off<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  on<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  once<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  removeListener<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>
  ): this;

  listeners(eventName?: string): Array<Listener>;
  off(eventName: string, listener: Listener): this;
  on(eventName: string, listener: Listener): this;
  once(eventName: string, listener: Listener): this;
  removeListener(eventName: string, listener: Listener): this;
  removeAllListeners(eventName?: string): this;

  queryFilter<EventArgsArray extends Array<any>, EventArgsObject>(
    event: TypedEventFilter<EventArgsArray, EventArgsObject>,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined
  ): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>;

  interface: ITestChannelInterface;

  functions: {
    defundChannel(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      assetIds: string[],
      indices: BigNumberish[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "defundChannel((address,address,address,address[],tuple[],uint256[],uint256[],uint256[],uint256,uint256,bytes32),address[],uint256[])"(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      assetIds: string[],
      indices: BigNumberish[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    defundTransfer(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      encodedInitialTransferState: BytesLike,
      encodedTransferResolver: BytesLike,
      responderSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "defundTransfer((address,bytes32,address,address,address,address,(uint256[2],address[2]),uint256,bytes32),bytes,bytes,bytes)"(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      encodedInitialTransferState: BytesLike,
      encodedTransferResolver: BytesLike,
      responderSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    depositAlice(
      assetId: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "depositAlice(address,uint256)"(
      assetId: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    disputeChannel(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "disputeChannel((address,address,address,address[],tuple[],uint256[],uint256[],uint256[],uint256,uint256,bytes32),bytes,bytes)"(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    disputeTransfer(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      merkleProofData: BytesLike[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "disputeTransfer((address,bytes32,address,address,address,address,(uint256[2],address[2]),uint256,bytes32),bytes32[])"(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      merkleProofData: BytesLike[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    exit(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "exit(address,address,address)"(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    getAlice(overrides?: CallOverrides): Promise<[string]>;

    "getAlice()"(overrides?: CallOverrides): Promise<[string]>;

    getBob(overrides?: CallOverrides): Promise<[string]>;

    "getBob()"(overrides?: CallOverrides): Promise<[string]>;

    getChannelDispute(
      overrides?: CallOverrides
    ): Promise<
      [
        [string, BigNumber, string, BigNumber, BigNumber] & {
          channelStateHash: string;
          nonce: BigNumber;
          merkleRoot: string;
          consensusExpiry: BigNumber;
          defundExpiry: BigNumber;
        }
      ]
    >;

    "getChannelDispute()"(
      overrides?: CallOverrides
    ): Promise<
      [
        [string, BigNumber, string, BigNumber, BigNumber] & {
          channelStateHash: string;
          nonce: BigNumber;
          merkleRoot: string;
          consensusExpiry: BigNumber;
          defundExpiry: BigNumber;
        }
      ]
    >;

    getDefundNonce(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    "getDefundNonce(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    getExitableAmount(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    "getExitableAmount(address,address)"(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    getTotalDepositsAlice(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    "getTotalDepositsAlice(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    getTotalDepositsBob(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    "getTotalDepositsBob(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    getTotalTransferred(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    "getTotalTransferred(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    getTransferDispute(
      transferId: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [
        [string, BigNumber, boolean] & {
          transferStateHash: string;
          transferDisputeExpiry: BigNumber;
          isDefunded: boolean;
        }
      ]
    >;

    "getTransferDispute(bytes32)"(
      transferId: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [
        [string, BigNumber, boolean] & {
          transferStateHash: string;
          transferDisputeExpiry: BigNumber;
          isDefunded: boolean;
        }
      ]
    >;

    getWithdrawalTransactionRecord(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    "getWithdrawalTransactionRecord((address,address,address,uint256,uint256,address,bytes))"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    setup(
      _alice: string,
      _bob: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "setup(address,address)"(
      _alice: string,
      _bob: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    testMakeBalanceExitable(
      assetId: string,
      balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "testMakeBalanceExitable(address,(uint256[2],address[2]))"(
      assetId: string,
      balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    testMakeExitable(
      assetId: string,
      recipient: string,
      maxAmount: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "testMakeExitable(address,address,uint256)"(
      assetId: string,
      recipient: string,
      maxAmount: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    withdraw(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "withdraw((address,address,address,uint256,uint256,address,bytes),bytes,bytes)"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;
  };

  defundChannel(
    ccs: {
      channelAddress: string;
      alice: string;
      bob: string;
      assetIds: string[];
      balances: {
        amount: [BigNumberish, BigNumberish];
        to: [string, string];
      }[];
      processedDepositsA: BigNumberish[];
      processedDepositsB: BigNumberish[];
      defundNonces: BigNumberish[];
      timeout: BigNumberish;
      nonce: BigNumberish;
      merkleRoot: BytesLike;
    },
    assetIds: string[],
    indices: BigNumberish[],
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "defundChannel((address,address,address,address[],tuple[],uint256[],uint256[],uint256[],uint256,uint256,bytes32),address[],uint256[])"(
    ccs: {
      channelAddress: string;
      alice: string;
      bob: string;
      assetIds: string[];
      balances: {
        amount: [BigNumberish, BigNumberish];
        to: [string, string];
      }[];
      processedDepositsA: BigNumberish[];
      processedDepositsB: BigNumberish[];
      defundNonces: BigNumberish[];
      timeout: BigNumberish;
      nonce: BigNumberish;
      merkleRoot: BytesLike;
    },
    assetIds: string[],
    indices: BigNumberish[],
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  defundTransfer(
    cts: {
      channelAddress: string;
      transferId: BytesLike;
      transferDefinition: string;
      initiator: string;
      responder: string;
      assetId: string;
      balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
      transferTimeout: BigNumberish;
      initialStateHash: BytesLike;
    },
    encodedInitialTransferState: BytesLike,
    encodedTransferResolver: BytesLike,
    responderSignature: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "defundTransfer((address,bytes32,address,address,address,address,(uint256[2],address[2]),uint256,bytes32),bytes,bytes,bytes)"(
    cts: {
      channelAddress: string;
      transferId: BytesLike;
      transferDefinition: string;
      initiator: string;
      responder: string;
      assetId: string;
      balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
      transferTimeout: BigNumberish;
      initialStateHash: BytesLike;
    },
    encodedInitialTransferState: BytesLike,
    encodedTransferResolver: BytesLike,
    responderSignature: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  depositAlice(
    assetId: string,
    amount: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "depositAlice(address,uint256)"(
    assetId: string,
    amount: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  disputeChannel(
    ccs: {
      channelAddress: string;
      alice: string;
      bob: string;
      assetIds: string[];
      balances: {
        amount: [BigNumberish, BigNumberish];
        to: [string, string];
      }[];
      processedDepositsA: BigNumberish[];
      processedDepositsB: BigNumberish[];
      defundNonces: BigNumberish[];
      timeout: BigNumberish;
      nonce: BigNumberish;
      merkleRoot: BytesLike;
    },
    aliceSignature: BytesLike,
    bobSignature: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "disputeChannel((address,address,address,address[],tuple[],uint256[],uint256[],uint256[],uint256,uint256,bytes32),bytes,bytes)"(
    ccs: {
      channelAddress: string;
      alice: string;
      bob: string;
      assetIds: string[];
      balances: {
        amount: [BigNumberish, BigNumberish];
        to: [string, string];
      }[];
      processedDepositsA: BigNumberish[];
      processedDepositsB: BigNumberish[];
      defundNonces: BigNumberish[];
      timeout: BigNumberish;
      nonce: BigNumberish;
      merkleRoot: BytesLike;
    },
    aliceSignature: BytesLike,
    bobSignature: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  disputeTransfer(
    cts: {
      channelAddress: string;
      transferId: BytesLike;
      transferDefinition: string;
      initiator: string;
      responder: string;
      assetId: string;
      balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
      transferTimeout: BigNumberish;
      initialStateHash: BytesLike;
    },
    merkleProofData: BytesLike[],
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "disputeTransfer((address,bytes32,address,address,address,address,(uint256[2],address[2]),uint256,bytes32),bytes32[])"(
    cts: {
      channelAddress: string;
      transferId: BytesLike;
      transferDefinition: string;
      initiator: string;
      responder: string;
      assetId: string;
      balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
      transferTimeout: BigNumberish;
      initialStateHash: BytesLike;
    },
    merkleProofData: BytesLike[],
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  exit(
    assetId: string,
    owner: string,
    recipient: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "exit(address,address,address)"(
    assetId: string,
    owner: string,
    recipient: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  getAlice(overrides?: CallOverrides): Promise<string>;

  "getAlice()"(overrides?: CallOverrides): Promise<string>;

  getBob(overrides?: CallOverrides): Promise<string>;

  "getBob()"(overrides?: CallOverrides): Promise<string>;

  getChannelDispute(
    overrides?: CallOverrides
  ): Promise<
    [string, BigNumber, string, BigNumber, BigNumber] & {
      channelStateHash: string;
      nonce: BigNumber;
      merkleRoot: string;
      consensusExpiry: BigNumber;
      defundExpiry: BigNumber;
    }
  >;

  "getChannelDispute()"(
    overrides?: CallOverrides
  ): Promise<
    [string, BigNumber, string, BigNumber, BigNumber] & {
      channelStateHash: string;
      nonce: BigNumber;
      merkleRoot: string;
      consensusExpiry: BigNumber;
      defundExpiry: BigNumber;
    }
  >;

  getDefundNonce(
    assetId: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  "getDefundNonce(address)"(
    assetId: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  getExitableAmount(
    assetId: string,
    owner: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  "getExitableAmount(address,address)"(
    assetId: string,
    owner: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  getTotalDepositsAlice(
    assetId: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  "getTotalDepositsAlice(address)"(
    assetId: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  getTotalDepositsBob(
    assetId: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  "getTotalDepositsBob(address)"(
    assetId: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  getTotalTransferred(
    assetId: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  "getTotalTransferred(address)"(
    assetId: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  getTransferDispute(
    transferId: BytesLike,
    overrides?: CallOverrides
  ): Promise<
    [string, BigNumber, boolean] & {
      transferStateHash: string;
      transferDisputeExpiry: BigNumber;
      isDefunded: boolean;
    }
  >;

  "getTransferDispute(bytes32)"(
    transferId: BytesLike,
    overrides?: CallOverrides
  ): Promise<
    [string, BigNumber, boolean] & {
      transferStateHash: string;
      transferDisputeExpiry: BigNumber;
      isDefunded: boolean;
    }
  >;

  getWithdrawalTransactionRecord(
    wd: {
      channelAddress: string;
      assetId: string;
      recipient: string;
      amount: BigNumberish;
      nonce: BigNumberish;
      callTo: string;
      callData: BytesLike;
    },
    overrides?: CallOverrides
  ): Promise<boolean>;

  "getWithdrawalTransactionRecord((address,address,address,uint256,uint256,address,bytes))"(
    wd: {
      channelAddress: string;
      assetId: string;
      recipient: string;
      amount: BigNumberish;
      nonce: BigNumberish;
      callTo: string;
      callData: BytesLike;
    },
    overrides?: CallOverrides
  ): Promise<boolean>;

  setup(
    _alice: string,
    _bob: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "setup(address,address)"(
    _alice: string,
    _bob: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  testMakeBalanceExitable(
    assetId: string,
    balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] },
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "testMakeBalanceExitable(address,(uint256[2],address[2]))"(
    assetId: string,
    balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] },
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  testMakeExitable(
    assetId: string,
    recipient: string,
    maxAmount: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "testMakeExitable(address,address,uint256)"(
    assetId: string,
    recipient: string,
    maxAmount: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  withdraw(
    wd: {
      channelAddress: string;
      assetId: string;
      recipient: string;
      amount: BigNumberish;
      nonce: BigNumberish;
      callTo: string;
      callData: BytesLike;
    },
    aliceSignature: BytesLike,
    bobSignature: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "withdraw((address,address,address,uint256,uint256,address,bytes),bytes,bytes)"(
    wd: {
      channelAddress: string;
      assetId: string;
      recipient: string;
      amount: BigNumberish;
      nonce: BigNumberish;
      callTo: string;
      callData: BytesLike;
    },
    aliceSignature: BytesLike,
    bobSignature: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  callStatic: {
    defundChannel(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      assetIds: string[],
      indices: BigNumberish[],
      overrides?: CallOverrides
    ): Promise<void>;

    "defundChannel((address,address,address,address[],tuple[],uint256[],uint256[],uint256[],uint256,uint256,bytes32),address[],uint256[])"(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      assetIds: string[],
      indices: BigNumberish[],
      overrides?: CallOverrides
    ): Promise<void>;

    defundTransfer(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      encodedInitialTransferState: BytesLike,
      encodedTransferResolver: BytesLike,
      responderSignature: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    "defundTransfer((address,bytes32,address,address,address,address,(uint256[2],address[2]),uint256,bytes32),bytes,bytes,bytes)"(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      encodedInitialTransferState: BytesLike,
      encodedTransferResolver: BytesLike,
      responderSignature: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    depositAlice(
      assetId: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    "depositAlice(address,uint256)"(
      assetId: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    disputeChannel(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    "disputeChannel((address,address,address,address[],tuple[],uint256[],uint256[],uint256[],uint256,uint256,bytes32),bytes,bytes)"(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    disputeTransfer(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      merkleProofData: BytesLike[],
      overrides?: CallOverrides
    ): Promise<void>;

    "disputeTransfer((address,bytes32,address,address,address,address,(uint256[2],address[2]),uint256,bytes32),bytes32[])"(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      merkleProofData: BytesLike[],
      overrides?: CallOverrides
    ): Promise<void>;

    exit(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: CallOverrides
    ): Promise<void>;

    "exit(address,address,address)"(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: CallOverrides
    ): Promise<void>;

    getAlice(overrides?: CallOverrides): Promise<string>;

    "getAlice()"(overrides?: CallOverrides): Promise<string>;

    getBob(overrides?: CallOverrides): Promise<string>;

    "getBob()"(overrides?: CallOverrides): Promise<string>;

    getChannelDispute(
      overrides?: CallOverrides
    ): Promise<
      [string, BigNumber, string, BigNumber, BigNumber] & {
        channelStateHash: string;
        nonce: BigNumber;
        merkleRoot: string;
        consensusExpiry: BigNumber;
        defundExpiry: BigNumber;
      }
    >;

    "getChannelDispute()"(
      overrides?: CallOverrides
    ): Promise<
      [string, BigNumber, string, BigNumber, BigNumber] & {
        channelStateHash: string;
        nonce: BigNumber;
        merkleRoot: string;
        consensusExpiry: BigNumber;
        defundExpiry: BigNumber;
      }
    >;

    getDefundNonce(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getDefundNonce(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getExitableAmount(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getExitableAmount(address,address)"(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getTotalDepositsAlice(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getTotalDepositsAlice(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getTotalDepositsBob(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getTotalDepositsBob(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getTotalTransferred(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getTotalTransferred(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getTransferDispute(
      transferId: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [string, BigNumber, boolean] & {
        transferStateHash: string;
        transferDisputeExpiry: BigNumber;
        isDefunded: boolean;
      }
    >;

    "getTransferDispute(bytes32)"(
      transferId: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [string, BigNumber, boolean] & {
        transferStateHash: string;
        transferDisputeExpiry: BigNumber;
        isDefunded: boolean;
      }
    >;

    getWithdrawalTransactionRecord(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<boolean>;

    "getWithdrawalTransactionRecord((address,address,address,uint256,uint256,address,bytes))"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<boolean>;

    setup(
      _alice: string,
      _bob: string,
      overrides?: CallOverrides
    ): Promise<void>;

    "setup(address,address)"(
      _alice: string,
      _bob: string,
      overrides?: CallOverrides
    ): Promise<void>;

    testMakeBalanceExitable(
      assetId: string,
      balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] },
      overrides?: CallOverrides
    ): Promise<void>;

    "testMakeBalanceExitable(address,(uint256[2],address[2]))"(
      assetId: string,
      balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] },
      overrides?: CallOverrides
    ): Promise<void>;

    testMakeExitable(
      assetId: string,
      recipient: string,
      maxAmount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    "testMakeExitable(address,address,uint256)"(
      assetId: string,
      recipient: string,
      maxAmount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    withdraw(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    "withdraw((address,address,address,uint256,uint256,address,bytes),bytes,bytes)"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;
  };

  filters: {
    AliceDeposited(
      assetId: null,
      amount: null
    ): TypedEventFilter<
      [string, BigNumber],
      { assetId: string; amount: BigNumber }
    >;

    ChannelDefunded(
      defunder: null,
      state: null,
      dispute: null,
      assetIds: null
    ): TypedEventFilter<
      [
        string,
        [
          string,
          string,
          string,
          string[],
          ([[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          })[],
          BigNumber[],
          BigNumber[],
          BigNumber[],
          BigNumber,
          BigNumber,
          string
        ] & {
          channelAddress: string;
          alice: string;
          bob: string;
          assetIds: string[];
          balances: ([[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          })[];
          processedDepositsA: BigNumber[];
          processedDepositsB: BigNumber[];
          defundNonces: BigNumber[];
          timeout: BigNumber;
          nonce: BigNumber;
          merkleRoot: string;
        },
        [string, BigNumber, string, BigNumber, BigNumber] & {
          channelStateHash: string;
          nonce: BigNumber;
          merkleRoot: string;
          consensusExpiry: BigNumber;
          defundExpiry: BigNumber;
        },
        string[]
      ],
      {
        defunder: string;
        state: [
          string,
          string,
          string,
          string[],
          ([[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          })[],
          BigNumber[],
          BigNumber[],
          BigNumber[],
          BigNumber,
          BigNumber,
          string
        ] & {
          channelAddress: string;
          alice: string;
          bob: string;
          assetIds: string[];
          balances: ([[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          })[];
          processedDepositsA: BigNumber[];
          processedDepositsB: BigNumber[];
          defundNonces: BigNumber[];
          timeout: BigNumber;
          nonce: BigNumber;
          merkleRoot: string;
        };
        dispute: [string, BigNumber, string, BigNumber, BigNumber] & {
          channelStateHash: string;
          nonce: BigNumber;
          merkleRoot: string;
          consensusExpiry: BigNumber;
          defundExpiry: BigNumber;
        };
        assetIds: string[];
      }
    >;

    ChannelDisputed(
      disputer: null,
      state: null,
      dispute: null
    ): TypedEventFilter<
      [
        string,
        [
          string,
          string,
          string,
          string[],
          ([[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          })[],
          BigNumber[],
          BigNumber[],
          BigNumber[],
          BigNumber,
          BigNumber,
          string
        ] & {
          channelAddress: string;
          alice: string;
          bob: string;
          assetIds: string[];
          balances: ([[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          })[];
          processedDepositsA: BigNumber[];
          processedDepositsB: BigNumber[];
          defundNonces: BigNumber[];
          timeout: BigNumber;
          nonce: BigNumber;
          merkleRoot: string;
        },
        [string, BigNumber, string, BigNumber, BigNumber] & {
          channelStateHash: string;
          nonce: BigNumber;
          merkleRoot: string;
          consensusExpiry: BigNumber;
          defundExpiry: BigNumber;
        }
      ],
      {
        disputer: string;
        state: [
          string,
          string,
          string,
          string[],
          ([[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          })[],
          BigNumber[],
          BigNumber[],
          BigNumber[],
          BigNumber,
          BigNumber,
          string
        ] & {
          channelAddress: string;
          alice: string;
          bob: string;
          assetIds: string[];
          balances: ([[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          })[];
          processedDepositsA: BigNumber[];
          processedDepositsB: BigNumber[];
          defundNonces: BigNumber[];
          timeout: BigNumber;
          nonce: BigNumber;
          merkleRoot: string;
        };
        dispute: [string, BigNumber, string, BigNumber, BigNumber] & {
          channelStateHash: string;
          nonce: BigNumber;
          merkleRoot: string;
          consensusExpiry: BigNumber;
          defundExpiry: BigNumber;
        };
      }
    >;

    TransferDefunded(
      defunder: null,
      state: null,
      dispute: null,
      encodedInitialState: null,
      encodedResolver: null,
      balance: null
    ): TypedEventFilter<
      [
        string,
        [
          string,
          string,
          string,
          string,
          string,
          string,
          [[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          },
          BigNumber,
          string
        ] & {
          channelAddress: string;
          transferId: string;
          transferDefinition: string;
          initiator: string;
          responder: string;
          assetId: string;
          balance: [[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          };
          transferTimeout: BigNumber;
          initialStateHash: string;
        },
        [string, BigNumber, boolean] & {
          transferStateHash: string;
          transferDisputeExpiry: BigNumber;
          isDefunded: boolean;
        },
        string,
        string,
        [[BigNumber, BigNumber], [string, string]] & {
          amount: [BigNumber, BigNumber];
          to: [string, string];
        }
      ],
      {
        defunder: string;
        state: [
          string,
          string,
          string,
          string,
          string,
          string,
          [[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          },
          BigNumber,
          string
        ] & {
          channelAddress: string;
          transferId: string;
          transferDefinition: string;
          initiator: string;
          responder: string;
          assetId: string;
          balance: [[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          };
          transferTimeout: BigNumber;
          initialStateHash: string;
        };
        dispute: [string, BigNumber, boolean] & {
          transferStateHash: string;
          transferDisputeExpiry: BigNumber;
          isDefunded: boolean;
        };
        encodedInitialState: string;
        encodedResolver: string;
        balance: [[BigNumber, BigNumber], [string, string]] & {
          amount: [BigNumber, BigNumber];
          to: [string, string];
        };
      }
    >;

    TransferDisputed(
      disputer: null,
      state: null,
      dispute: null
    ): TypedEventFilter<
      [
        string,
        [
          string,
          string,
          string,
          string,
          string,
          string,
          [[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          },
          BigNumber,
          string
        ] & {
          channelAddress: string;
          transferId: string;
          transferDefinition: string;
          initiator: string;
          responder: string;
          assetId: string;
          balance: [[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          };
          transferTimeout: BigNumber;
          initialStateHash: string;
        },
        [string, BigNumber, boolean] & {
          transferStateHash: string;
          transferDisputeExpiry: BigNumber;
          isDefunded: boolean;
        }
      ],
      {
        disputer: string;
        state: [
          string,
          string,
          string,
          string,
          string,
          string,
          [[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          },
          BigNumber,
          string
        ] & {
          channelAddress: string;
          transferId: string;
          transferDefinition: string;
          initiator: string;
          responder: string;
          assetId: string;
          balance: [[BigNumber, BigNumber], [string, string]] & {
            amount: [BigNumber, BigNumber];
            to: [string, string];
          };
          transferTimeout: BigNumber;
          initialStateHash: string;
        };
        dispute: [string, BigNumber, boolean] & {
          transferStateHash: string;
          transferDisputeExpiry: BigNumber;
          isDefunded: boolean;
        };
      }
    >;
  };

  estimateGas: {
    defundChannel(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      assetIds: string[],
      indices: BigNumberish[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "defundChannel((address,address,address,address[],tuple[],uint256[],uint256[],uint256[],uint256,uint256,bytes32),address[],uint256[])"(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      assetIds: string[],
      indices: BigNumberish[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    defundTransfer(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      encodedInitialTransferState: BytesLike,
      encodedTransferResolver: BytesLike,
      responderSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "defundTransfer((address,bytes32,address,address,address,address,(uint256[2],address[2]),uint256,bytes32),bytes,bytes,bytes)"(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      encodedInitialTransferState: BytesLike,
      encodedTransferResolver: BytesLike,
      responderSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    depositAlice(
      assetId: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "depositAlice(address,uint256)"(
      assetId: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    disputeChannel(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "disputeChannel((address,address,address,address[],tuple[],uint256[],uint256[],uint256[],uint256,uint256,bytes32),bytes,bytes)"(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    disputeTransfer(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      merkleProofData: BytesLike[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "disputeTransfer((address,bytes32,address,address,address,address,(uint256[2],address[2]),uint256,bytes32),bytes32[])"(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      merkleProofData: BytesLike[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    exit(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "exit(address,address,address)"(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    getAlice(overrides?: CallOverrides): Promise<BigNumber>;

    "getAlice()"(overrides?: CallOverrides): Promise<BigNumber>;

    getBob(overrides?: CallOverrides): Promise<BigNumber>;

    "getBob()"(overrides?: CallOverrides): Promise<BigNumber>;

    getChannelDispute(overrides?: CallOverrides): Promise<BigNumber>;

    "getChannelDispute()"(overrides?: CallOverrides): Promise<BigNumber>;

    getDefundNonce(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getDefundNonce(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getExitableAmount(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getExitableAmount(address,address)"(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getTotalDepositsAlice(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getTotalDepositsAlice(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getTotalDepositsBob(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getTotalDepositsBob(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getTotalTransferred(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getTotalTransferred(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getTransferDispute(
      transferId: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getTransferDispute(bytes32)"(
      transferId: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getWithdrawalTransactionRecord(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getWithdrawalTransactionRecord((address,address,address,uint256,uint256,address,bytes))"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    setup(
      _alice: string,
      _bob: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "setup(address,address)"(
      _alice: string,
      _bob: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    testMakeBalanceExitable(
      assetId: string,
      balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "testMakeBalanceExitable(address,(uint256[2],address[2]))"(
      assetId: string,
      balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    testMakeExitable(
      assetId: string,
      recipient: string,
      maxAmount: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "testMakeExitable(address,address,uint256)"(
      assetId: string,
      recipient: string,
      maxAmount: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    withdraw(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "withdraw((address,address,address,uint256,uint256,address,bytes),bytes,bytes)"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    defundChannel(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      assetIds: string[],
      indices: BigNumberish[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "defundChannel((address,address,address,address[],tuple[],uint256[],uint256[],uint256[],uint256,uint256,bytes32),address[],uint256[])"(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      assetIds: string[],
      indices: BigNumberish[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    defundTransfer(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      encodedInitialTransferState: BytesLike,
      encodedTransferResolver: BytesLike,
      responderSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "defundTransfer((address,bytes32,address,address,address,address,(uint256[2],address[2]),uint256,bytes32),bytes,bytes,bytes)"(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      encodedInitialTransferState: BytesLike,
      encodedTransferResolver: BytesLike,
      responderSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    depositAlice(
      assetId: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "depositAlice(address,uint256)"(
      assetId: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    disputeChannel(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "disputeChannel((address,address,address,address[],tuple[],uint256[],uint256[],uint256[],uint256,uint256,bytes32),bytes,bytes)"(
      ccs: {
        channelAddress: string;
        alice: string;
        bob: string;
        assetIds: string[];
        balances: {
          amount: [BigNumberish, BigNumberish];
          to: [string, string];
        }[];
        processedDepositsA: BigNumberish[];
        processedDepositsB: BigNumberish[];
        defundNonces: BigNumberish[];
        timeout: BigNumberish;
        nonce: BigNumberish;
        merkleRoot: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    disputeTransfer(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      merkleProofData: BytesLike[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "disputeTransfer((address,bytes32,address,address,address,address,(uint256[2],address[2]),uint256,bytes32),bytes32[])"(
      cts: {
        channelAddress: string;
        transferId: BytesLike;
        transferDefinition: string;
        initiator: string;
        responder: string;
        assetId: string;
        balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] };
        transferTimeout: BigNumberish;
        initialStateHash: BytesLike;
      },
      merkleProofData: BytesLike[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    exit(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "exit(address,address,address)"(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    getAlice(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    "getAlice()"(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    getBob(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    "getBob()"(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    getChannelDispute(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    "getChannelDispute()"(
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getDefundNonce(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getDefundNonce(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getExitableAmount(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getExitableAmount(address,address)"(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getTotalDepositsAlice(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getTotalDepositsAlice(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getTotalDepositsBob(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getTotalDepositsBob(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getTotalTransferred(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getTotalTransferred(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getTransferDispute(
      transferId: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getTransferDispute(bytes32)"(
      transferId: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getWithdrawalTransactionRecord(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getWithdrawalTransactionRecord((address,address,address,uint256,uint256,address,bytes))"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    setup(
      _alice: string,
      _bob: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "setup(address,address)"(
      _alice: string,
      _bob: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    testMakeBalanceExitable(
      assetId: string,
      balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "testMakeBalanceExitable(address,(uint256[2],address[2]))"(
      assetId: string,
      balance: { amount: [BigNumberish, BigNumberish]; to: [string, string] },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    testMakeExitable(
      assetId: string,
      recipient: string,
      maxAmount: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "testMakeExitable(address,address,uint256)"(
      assetId: string,
      recipient: string,
      maxAmount: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    withdraw(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "withdraw((address,address,address,uint256,uint256,address,bytes),bytes,bytes)"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;
  };
}
