/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */

import Contract, { CustomOptions, contractOptions } from "web3/eth/contract";
import { TransactionObject, BlockType } from "web3/eth/types";
import { Callback, EventLog } from "web3/types";
import { EventEmitter } from "events";
import { Provider } from "web3/providers";

export class Expiry {
  constructor(jsonInterface: any[], address?: string, options?: CustomOptions);
  _address: string;
  options: contractOptions;
  methods: {
    g_approvedSender(arg0: string, arg1: string): TransactionObject<string>;

    getExpiry(
      account: { owner: string; number: number | string },
      marketId: number | string
    ): TransactionObject<string>;

    getLiquidationSpreadAdjustedPrices(
      liquidAccount: { owner: string; number: number | string },
      heldMarketId: number | string,
      owedMarketId: number | string,
      expiry: number | string
    ): TransactionObject<{
      0: { value: string };
      1: { value: string };
    }>;

    getSpreadAdjustedPrices(
      heldMarketId: number | string,
      owedMarketId: number | string,
      expiry: number | string
    ): TransactionObject<{
      0: { value: string };
      1: { value: string };
    }>;

    ownerSetExpiryRampTime(
      newExpiryRampTime: number | string
    ): TransactionObject<void>;

    approveSender(
      sender: string,
      minTimeDelta: number | string
    ): TransactionObject<void>;

    callFunction(
      arg0: string,
      account: { owner: string; number: number | string },
      data: (string | number[])[]
    ): TransactionObject<void>;

    getTradeCost(
      inputMarketId: number | string,
      outputMarketId: number | string,
      makerAccount: { owner: string; number: number | string },
      arg3: { owner: string; number: number | string },
      oldInputPar: { sign: boolean; value: number | string },
      newInputPar: { sign: boolean; value: number | string },
      inputWei: { sign: boolean; value: number | string },
      data: (string | number[])[]
    ): TransactionObject<{
      sign: boolean;
      denomination: string;
      ref: string;
      value: string;
    }>;

    DOLOMITE_MARGIN(): TransactionObject<string>;
    g_expiryRampTime(): TransactionObject<string>;
  };
  deploy(options: {
    data: string;
    arguments: any[];
  }): TransactionObject<Contract>;
  events: {
    ExpirySet(
      options?: {
        filter?: object;
        fromBlock?: BlockType;
        topics?: (null | string)[];
      },
      cb?: Callback<EventLog>
    ): EventEmitter;

    LogExpiryRampTimeSet(
      options?: {
        filter?: object;
        fromBlock?: BlockType;
        topics?: (null | string)[];
      },
      cb?: Callback<EventLog>
    ): EventEmitter;

    LogSenderApproved(
      options?: {
        filter?: object;
        fromBlock?: BlockType;
        topics?: (null | string)[];
      },
      cb?: Callback<EventLog>
    ): EventEmitter;

    allEvents: (
      options?: {
        filter?: object;
        fromBlock?: BlockType;
        topics?: (null | string)[];
      },
      cb?: Callback<EventLog>
    ) => EventEmitter;
  };
  getPastEvents(
    event: string,
    options?: {
      filter?: object;
      fromBlock?: BlockType;
      toBlock?: BlockType;
      topics?: (null | string)[];
    },
    cb?: Callback<EventLog[]>
  ): Promise<EventLog[]>;
  setProvider(provider: Provider): void;
  clone(): Expiry;
}
