/* 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 declare namespace IASRegistry {
  export type ASRecordStruct = {
    uuid: BytesLike;
    resolver: AddressLike;
    index: BigNumberish;
    schema: BytesLike;
  };

  export type ASRecordStructOutput = [
    uuid: string,
    resolver: string,
    index: bigint,
    schema: string
  ] & { uuid: string; resolver: string; index: bigint; schema: string };
}

export interface IASRegistryInterface extends Interface {
  getFunction(
    nameOrSignature: "getAS" | "getASCount" | "register"
  ): FunctionFragment;

  getEvent(nameOrSignatureOrTopic: "Registered"): EventFragment;

  encodeFunctionData(functionFragment: "getAS", values: [BytesLike]): string;
  encodeFunctionData(
    functionFragment: "getASCount",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "register",
    values: [BytesLike, AddressLike]
  ): string;

  decodeFunctionResult(functionFragment: "getAS", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "getASCount", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "register", data: BytesLike): Result;
}

export namespace RegisteredEvent {
  export type InputTuple = [
    uuid: BytesLike,
    index: BigNumberish,
    schema: BytesLike,
    resolver: AddressLike,
    attester: AddressLike
  ];
  export type OutputTuple = [
    uuid: string,
    index: bigint,
    schema: string,
    resolver: string,
    attester: string
  ];
  export interface OutputObject {
    uuid: string;
    index: bigint;
    schema: string;
    resolver: string;
    attester: string;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

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

  interface: IASRegistryInterface;

  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>;

  getAS: TypedContractMethod<
    [uuid: BytesLike],
    [IASRegistry.ASRecordStructOutput],
    "view"
  >;

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

  register: TypedContractMethod<
    [schema: BytesLike, resolver: AddressLike],
    [string],
    "nonpayable"
  >;

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

  getFunction(
    nameOrSignature: "getAS"
  ): TypedContractMethod<
    [uuid: BytesLike],
    [IASRegistry.ASRecordStructOutput],
    "view"
  >;
  getFunction(
    nameOrSignature: "getASCount"
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "register"
  ): TypedContractMethod<
    [schema: BytesLike, resolver: AddressLike],
    [string],
    "nonpayable"
  >;

  getEvent(
    key: "Registered"
  ): TypedContractEvent<
    RegisteredEvent.InputTuple,
    RegisteredEvent.OutputTuple,
    RegisteredEvent.OutputObject
  >;

  filters: {
    "Registered(bytes32,uint256,bytes,address,address)": TypedContractEvent<
      RegisteredEvent.InputTuple,
      RegisteredEvent.OutputTuple,
      RegisteredEvent.OutputObject
    >;
    Registered: TypedContractEvent<
      RegisteredEvent.InputTuple,
      RegisteredEvent.OutputTuple,
      RegisteredEvent.OutputObject
    >;
  };
}
