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

import {
  ethers,
  EventFilter,
  Signer,
  BigNumber,
  BigNumberish,
  PopulatedTransaction,
  BaseContract,
  ContractTransaction,
  Overrides,
  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 EthereumDIDRegistryInterface extends ethers.utils.Interface {
  functions: {
    "addDelegate(address,bytes32,address,uint256)": FunctionFragment;
    "addDelegateSigned(address,uint8,bytes32,bytes32,bytes32,address,uint256)": FunctionFragment;
    "changeOwner(address,address)": FunctionFragment;
    "changeOwnerSigned(address,uint8,bytes32,bytes32,address)": FunctionFragment;
    "changed(address)": FunctionFragment;
    "delegates(address,bytes32,address)": FunctionFragment;
    "identityOwner(address)": FunctionFragment;
    "nonce(address)": FunctionFragment;
    "owners(address)": FunctionFragment;
    "revokeAttribute(address,bytes32,bytes)": FunctionFragment;
    "revokeAttributeSigned(address,uint8,bytes32,bytes32,bytes32,bytes)": FunctionFragment;
    "revokeDelegate(address,bytes32,address)": FunctionFragment;
    "revokeDelegateSigned(address,uint8,bytes32,bytes32,bytes32,address)": FunctionFragment;
    "setAttribute(address,bytes32,bytes,uint256)": FunctionFragment;
    "setAttributeSigned(address,uint8,bytes32,bytes32,bytes32,bytes,uint256)": FunctionFragment;
    "validDelegate(address,bytes32,address)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "addDelegate",
    values: [string, BytesLike, string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "addDelegateSigned",
    values: [
      string,
      BigNumberish,
      BytesLike,
      BytesLike,
      BytesLike,
      string,
      BigNumberish
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "changeOwner",
    values: [string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "changeOwnerSigned",
    values: [string, BigNumberish, BytesLike, BytesLike, string]
  ): string;
  encodeFunctionData(functionFragment: "changed", values: [string]): string;
  encodeFunctionData(
    functionFragment: "delegates",
    values: [string, BytesLike, string]
  ): string;
  encodeFunctionData(
    functionFragment: "identityOwner",
    values: [string]
  ): string;
  encodeFunctionData(functionFragment: "nonce", values: [string]): string;
  encodeFunctionData(functionFragment: "owners", values: [string]): string;
  encodeFunctionData(
    functionFragment: "revokeAttribute",
    values: [string, BytesLike, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "revokeAttributeSigned",
    values: [string, BigNumberish, BytesLike, BytesLike, BytesLike, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "revokeDelegate",
    values: [string, BytesLike, string]
  ): string;
  encodeFunctionData(
    functionFragment: "revokeDelegateSigned",
    values: [string, BigNumberish, BytesLike, BytesLike, BytesLike, string]
  ): string;
  encodeFunctionData(
    functionFragment: "setAttribute",
    values: [string, BytesLike, BytesLike, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "setAttributeSigned",
    values: [
      string,
      BigNumberish,
      BytesLike,
      BytesLike,
      BytesLike,
      BytesLike,
      BigNumberish
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "validDelegate",
    values: [string, BytesLike, string]
  ): string;

  decodeFunctionResult(
    functionFragment: "addDelegate",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "addDelegateSigned",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "changeOwner",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "changeOwnerSigned",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "changed", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "delegates", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "identityOwner",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "nonce", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "owners", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "revokeAttribute",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "revokeAttributeSigned",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "revokeDelegate",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "revokeDelegateSigned",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "setAttribute",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "setAttributeSigned",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "validDelegate",
    data: BytesLike
  ): Result;

  events: {
    "DIDAttributeChanged(address,bytes32,bytes,uint256,uint256)": EventFragment;
    "DIDDelegateChanged(address,bytes32,address,uint256,uint256)": EventFragment;
    "DIDOwnerChanged(address,address,uint256)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "DIDAttributeChanged"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "DIDDelegateChanged"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "DIDOwnerChanged"): EventFragment;
}

export class EthereumDIDRegistry extends BaseContract {
  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: EthereumDIDRegistryInterface;

  functions: {
    addDelegate(
      identity: string,
      delegateType: BytesLike,
      delegate: string,
      validity: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    addDelegateSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      delegateType: BytesLike,
      delegate: string,
      validity: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    changeOwner(
      identity: string,
      newOwner: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    changeOwnerSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      newOwner: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    changed(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>;

    delegates(
      arg0: string,
      arg1: BytesLike,
      arg2: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    identityOwner(
      identity: string,
      overrides?: CallOverrides
    ): Promise<[string]>;

    nonce(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>;

    owners(arg0: string, overrides?: CallOverrides): Promise<[string]>;

    revokeAttribute(
      identity: string,
      name: BytesLike,
      value: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    revokeAttributeSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      name: BytesLike,
      value: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    revokeDelegate(
      identity: string,
      delegateType: BytesLike,
      delegate: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    revokeDelegateSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      delegateType: BytesLike,
      delegate: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    setAttribute(
      identity: string,
      name: BytesLike,
      value: BytesLike,
      validity: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    setAttributeSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      name: BytesLike,
      value: BytesLike,
      validity: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    validDelegate(
      identity: string,
      delegateType: BytesLike,
      delegate: string,
      overrides?: CallOverrides
    ): Promise<[boolean]>;
  };

  addDelegate(
    identity: string,
    delegateType: BytesLike,
    delegate: string,
    validity: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  addDelegateSigned(
    identity: string,
    sigV: BigNumberish,
    sigR: BytesLike,
    sigS: BytesLike,
    delegateType: BytesLike,
    delegate: string,
    validity: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  changeOwner(
    identity: string,
    newOwner: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  changeOwnerSigned(
    identity: string,
    sigV: BigNumberish,
    sigR: BytesLike,
    sigS: BytesLike,
    newOwner: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  changed(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

  delegates(
    arg0: string,
    arg1: BytesLike,
    arg2: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  identityOwner(identity: string, overrides?: CallOverrides): Promise<string>;

  nonce(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

  owners(arg0: string, overrides?: CallOverrides): Promise<string>;

  revokeAttribute(
    identity: string,
    name: BytesLike,
    value: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  revokeAttributeSigned(
    identity: string,
    sigV: BigNumberish,
    sigR: BytesLike,
    sigS: BytesLike,
    name: BytesLike,
    value: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  revokeDelegate(
    identity: string,
    delegateType: BytesLike,
    delegate: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  revokeDelegateSigned(
    identity: string,
    sigV: BigNumberish,
    sigR: BytesLike,
    sigS: BytesLike,
    delegateType: BytesLike,
    delegate: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  setAttribute(
    identity: string,
    name: BytesLike,
    value: BytesLike,
    validity: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  setAttributeSigned(
    identity: string,
    sigV: BigNumberish,
    sigR: BytesLike,
    sigS: BytesLike,
    name: BytesLike,
    value: BytesLike,
    validity: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  validDelegate(
    identity: string,
    delegateType: BytesLike,
    delegate: string,
    overrides?: CallOverrides
  ): Promise<boolean>;

  callStatic: {
    addDelegate(
      identity: string,
      delegateType: BytesLike,
      delegate: string,
      validity: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    addDelegateSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      delegateType: BytesLike,
      delegate: string,
      validity: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    changeOwner(
      identity: string,
      newOwner: string,
      overrides?: CallOverrides
    ): Promise<void>;

    changeOwnerSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      newOwner: string,
      overrides?: CallOverrides
    ): Promise<void>;

    changed(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

    delegates(
      arg0: string,
      arg1: BytesLike,
      arg2: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    identityOwner(identity: string, overrides?: CallOverrides): Promise<string>;

    nonce(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

    owners(arg0: string, overrides?: CallOverrides): Promise<string>;

    revokeAttribute(
      identity: string,
      name: BytesLike,
      value: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    revokeAttributeSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      name: BytesLike,
      value: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    revokeDelegate(
      identity: string,
      delegateType: BytesLike,
      delegate: string,
      overrides?: CallOverrides
    ): Promise<void>;

    revokeDelegateSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      delegateType: BytesLike,
      delegate: string,
      overrides?: CallOverrides
    ): Promise<void>;

    setAttribute(
      identity: string,
      name: BytesLike,
      value: BytesLike,
      validity: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    setAttributeSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      name: BytesLike,
      value: BytesLike,
      validity: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    validDelegate(
      identity: string,
      delegateType: BytesLike,
      delegate: string,
      overrides?: CallOverrides
    ): Promise<boolean>;
  };

  filters: {
    DIDAttributeChanged(
      identity?: string | null,
      name?: null,
      value?: null,
      validTo?: null,
      previousChange?: null
    ): TypedEventFilter<
      [string, string, string, BigNumber, BigNumber],
      {
        identity: string;
        name: string;
        value: string;
        validTo: BigNumber;
        previousChange: BigNumber;
      }
    >;

    DIDDelegateChanged(
      identity?: string | null,
      delegateType?: null,
      delegate?: null,
      validTo?: null,
      previousChange?: null
    ): TypedEventFilter<
      [string, string, string, BigNumber, BigNumber],
      {
        identity: string;
        delegateType: string;
        delegate: string;
        validTo: BigNumber;
        previousChange: BigNumber;
      }
    >;

    DIDOwnerChanged(
      identity?: string | null,
      owner?: null,
      previousChange?: null
    ): TypedEventFilter<
      [string, string, BigNumber],
      { identity: string; owner: string; previousChange: BigNumber }
    >;
  };

  estimateGas: {
    addDelegate(
      identity: string,
      delegateType: BytesLike,
      delegate: string,
      validity: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    addDelegateSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      delegateType: BytesLike,
      delegate: string,
      validity: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    changeOwner(
      identity: string,
      newOwner: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    changeOwnerSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      newOwner: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    changed(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

    delegates(
      arg0: string,
      arg1: BytesLike,
      arg2: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    identityOwner(
      identity: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    nonce(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

    owners(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

    revokeAttribute(
      identity: string,
      name: BytesLike,
      value: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    revokeAttributeSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      name: BytesLike,
      value: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    revokeDelegate(
      identity: string,
      delegateType: BytesLike,
      delegate: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    revokeDelegateSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      delegateType: BytesLike,
      delegate: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    setAttribute(
      identity: string,
      name: BytesLike,
      value: BytesLike,
      validity: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    setAttributeSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      name: BytesLike,
      value: BytesLike,
      validity: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    validDelegate(
      identity: string,
      delegateType: BytesLike,
      delegate: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    addDelegate(
      identity: string,
      delegateType: BytesLike,
      delegate: string,
      validity: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    addDelegateSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      delegateType: BytesLike,
      delegate: string,
      validity: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    changeOwner(
      identity: string,
      newOwner: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    changeOwnerSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      newOwner: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    changed(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    delegates(
      arg0: string,
      arg1: BytesLike,
      arg2: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    identityOwner(
      identity: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    nonce(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    owners(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    revokeAttribute(
      identity: string,
      name: BytesLike,
      value: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    revokeAttributeSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      name: BytesLike,
      value: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    revokeDelegate(
      identity: string,
      delegateType: BytesLike,
      delegate: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    revokeDelegateSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      delegateType: BytesLike,
      delegate: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    setAttribute(
      identity: string,
      name: BytesLike,
      value: BytesLike,
      validity: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    setAttributeSigned(
      identity: string,
      sigV: BigNumberish,
      sigR: BytesLike,
      sigS: BytesLike,
      name: BytesLike,
      value: BytesLike,
      validity: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    validDelegate(
      identity: string,
      delegateType: BytesLike,
      delegate: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;
  };
}
