/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
  BaseContract,
  BigNumberish,
  BytesLike,
  FunctionFragment,
  Result,
  Interface,
  EventFragment,
  AddressLike,
  ContractRunner,
  ContractMethod,
  Listener,
} from "ethers";
import type {
  TypedContractEvent,
  TypedDeferredTopicFilter,
  TypedEventLog,
  TypedLogDescription,
  TypedListener,
  TypedContractMethod,
} from "../../common";

export interface IAuthorizableInterface extends Interface {
  getFunction(
    nameOrSignature:
      | "REVOKE_AUTHORIZATION_THAWING_PERIOD"
      | "authorizeSigner"
      | "cancelThawSigner"
      | "getThawEnd"
      | "isAuthorized"
      | "revokeAuthorizedSigner"
      | "thawSigner",
  ): FunctionFragment;

  getEvent(
    nameOrSignatureOrTopic:
      | "SignerAuthorized"
      | "SignerRevoked"
      | "SignerThawCanceled"
      | "SignerThawing",
  ): EventFragment;

  encodeFunctionData(
    functionFragment: "REVOKE_AUTHORIZATION_THAWING_PERIOD",
    values?: undefined,
  ): string;
  encodeFunctionData(
    functionFragment: "authorizeSigner",
    values: [AddressLike, BigNumberish, BytesLike],
  ): string;
  encodeFunctionData(
    functionFragment: "cancelThawSigner",
    values: [AddressLike],
  ): string;
  encodeFunctionData(
    functionFragment: "getThawEnd",
    values: [AddressLike],
  ): string;
  encodeFunctionData(
    functionFragment: "isAuthorized",
    values: [AddressLike, AddressLike],
  ): string;
  encodeFunctionData(
    functionFragment: "revokeAuthorizedSigner",
    values: [AddressLike],
  ): string;
  encodeFunctionData(
    functionFragment: "thawSigner",
    values: [AddressLike],
  ): string;

  decodeFunctionResult(
    functionFragment: "REVOKE_AUTHORIZATION_THAWING_PERIOD",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "authorizeSigner",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "cancelThawSigner",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(functionFragment: "getThawEnd", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "isAuthorized",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "revokeAuthorizedSigner",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(functionFragment: "thawSigner", data: BytesLike): Result;
}

export namespace SignerAuthorizedEvent {
  export type InputTuple = [authorizer: AddressLike, signer: AddressLike];
  export type OutputTuple = [authorizer: string, signer: string];
  export interface OutputObject {
    authorizer: string;
    signer: string;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export namespace SignerRevokedEvent {
  export type InputTuple = [authorizer: AddressLike, signer: AddressLike];
  export type OutputTuple = [authorizer: string, signer: string];
  export interface OutputObject {
    authorizer: string;
    signer: string;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export namespace SignerThawCanceledEvent {
  export type InputTuple = [
    authorizer: AddressLike,
    signer: AddressLike,
    thawEndTimestamp: BigNumberish,
  ];
  export type OutputTuple = [
    authorizer: string,
    signer: string,
    thawEndTimestamp: bigint,
  ];
  export interface OutputObject {
    authorizer: string;
    signer: string;
    thawEndTimestamp: bigint;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export namespace SignerThawingEvent {
  export type InputTuple = [
    authorizer: AddressLike,
    signer: AddressLike,
    thawEndTimestamp: BigNumberish,
  ];
  export type OutputTuple = [
    authorizer: string,
    signer: string,
    thawEndTimestamp: bigint,
  ];
  export interface OutputObject {
    authorizer: string;
    signer: string;
    thawEndTimestamp: bigint;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export interface IAuthorizable extends BaseContract {
  connect(runner?: ContractRunner | null): IAuthorizable;
  waitForDeployment(): Promise<this>;

  interface: IAuthorizableInterface;

  queryFilter<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined,
  ): Promise<Array<TypedEventLog<TCEvent>>>;
  queryFilter<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined,
  ): Promise<Array<TypedEventLog<TCEvent>>>;

  on<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    listener: TypedListener<TCEvent>,
  ): Promise<this>;
  on<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    listener: TypedListener<TCEvent>,
  ): Promise<this>;

  once<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    listener: TypedListener<TCEvent>,
  ): Promise<this>;
  once<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    listener: TypedListener<TCEvent>,
  ): Promise<this>;

  listeners<TCEvent extends TypedContractEvent>(
    event: TCEvent,
  ): Promise<Array<TypedListener<TCEvent>>>;
  listeners(eventName?: string): Promise<Array<Listener>>;
  removeAllListeners<TCEvent extends TypedContractEvent>(
    event?: TCEvent,
  ): Promise<this>;

  REVOKE_AUTHORIZATION_THAWING_PERIOD: TypedContractMethod<
    [],
    [bigint],
    "view"
  >;

  authorizeSigner: TypedContractMethod<
    [signer: AddressLike, proofDeadline: BigNumberish, proof: BytesLike],
    [void],
    "nonpayable"
  >;

  cancelThawSigner: TypedContractMethod<
    [signer: AddressLike],
    [void],
    "nonpayable"
  >;

  getThawEnd: TypedContractMethod<[signer: AddressLike], [bigint], "view">;

  isAuthorized: TypedContractMethod<
    [authorizer: AddressLike, signer: AddressLike],
    [boolean],
    "view"
  >;

  revokeAuthorizedSigner: TypedContractMethod<
    [signer: AddressLike],
    [void],
    "nonpayable"
  >;

  thawSigner: TypedContractMethod<[signer: AddressLike], [void], "nonpayable">;

  getFunction<T extends ContractMethod = ContractMethod>(
    key: string | FunctionFragment,
  ): T;

  getFunction(
    nameOrSignature: "REVOKE_AUTHORIZATION_THAWING_PERIOD",
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "authorizeSigner",
  ): TypedContractMethod<
    [signer: AddressLike, proofDeadline: BigNumberish, proof: BytesLike],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "cancelThawSigner",
  ): TypedContractMethod<[signer: AddressLike], [void], "nonpayable">;
  getFunction(
    nameOrSignature: "getThawEnd",
  ): TypedContractMethod<[signer: AddressLike], [bigint], "view">;
  getFunction(
    nameOrSignature: "isAuthorized",
  ): TypedContractMethod<
    [authorizer: AddressLike, signer: AddressLike],
    [boolean],
    "view"
  >;
  getFunction(
    nameOrSignature: "revokeAuthorizedSigner",
  ): TypedContractMethod<[signer: AddressLike], [void], "nonpayable">;
  getFunction(
    nameOrSignature: "thawSigner",
  ): TypedContractMethod<[signer: AddressLike], [void], "nonpayable">;

  getEvent(
    key: "SignerAuthorized",
  ): TypedContractEvent<
    SignerAuthorizedEvent.InputTuple,
    SignerAuthorizedEvent.OutputTuple,
    SignerAuthorizedEvent.OutputObject
  >;
  getEvent(
    key: "SignerRevoked",
  ): TypedContractEvent<
    SignerRevokedEvent.InputTuple,
    SignerRevokedEvent.OutputTuple,
    SignerRevokedEvent.OutputObject
  >;
  getEvent(
    key: "SignerThawCanceled",
  ): TypedContractEvent<
    SignerThawCanceledEvent.InputTuple,
    SignerThawCanceledEvent.OutputTuple,
    SignerThawCanceledEvent.OutputObject
  >;
  getEvent(
    key: "SignerThawing",
  ): TypedContractEvent<
    SignerThawingEvent.InputTuple,
    SignerThawingEvent.OutputTuple,
    SignerThawingEvent.OutputObject
  >;

  filters: {
    "SignerAuthorized(address,address)": TypedContractEvent<
      SignerAuthorizedEvent.InputTuple,
      SignerAuthorizedEvent.OutputTuple,
      SignerAuthorizedEvent.OutputObject
    >;
    SignerAuthorized: TypedContractEvent<
      SignerAuthorizedEvent.InputTuple,
      SignerAuthorizedEvent.OutputTuple,
      SignerAuthorizedEvent.OutputObject
    >;

    "SignerRevoked(address,address)": TypedContractEvent<
      SignerRevokedEvent.InputTuple,
      SignerRevokedEvent.OutputTuple,
      SignerRevokedEvent.OutputObject
    >;
    SignerRevoked: TypedContractEvent<
      SignerRevokedEvent.InputTuple,
      SignerRevokedEvent.OutputTuple,
      SignerRevokedEvent.OutputObject
    >;

    "SignerThawCanceled(address,address,uint256)": TypedContractEvent<
      SignerThawCanceledEvent.InputTuple,
      SignerThawCanceledEvent.OutputTuple,
      SignerThawCanceledEvent.OutputObject
    >;
    SignerThawCanceled: TypedContractEvent<
      SignerThawCanceledEvent.InputTuple,
      SignerThawCanceledEvent.OutputTuple,
      SignerThawCanceledEvent.OutputObject
    >;

    "SignerThawing(address,address,uint256)": TypedContractEvent<
      SignerThawingEvent.InputTuple,
      SignerThawingEvent.OutputTuple,
      SignerThawingEvent.OutputObject
    >;
    SignerThawing: TypedContractEvent<
      SignerThawingEvent.InputTuple,
      SignerThawingEvent.OutputTuple,
      SignerThawingEvent.OutputObject
    >;
  };
}
