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

import {
  ethers,
  EventFilter,
  Signer,
  BigNumber,
  BigNumberish,
  PopulatedTransaction,
  BaseContract,
  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 PrivateIssuerInterface extends ethers.utils.Interface {
  functions: {
    "issuer()": FunctionFragment;
    "owner()": FunctionFragment;
    "registry()": FunctionFragment;
    "renounceOwnership()": FunctionFragment;
    "transferOwnership(address)": FunctionFragment;
    "upgradeTo(address)": FunctionFragment;
    "upgradeToAndCall(address,bytes)": FunctionFragment;
    "initialize(address)": FunctionFragment;
    "getCertificateCommitment(uint256)": FunctionFragment;
    "approveCertificationRequestPrivate(uint256,bytes32)": FunctionFragment;
    "issuePrivate(address,bytes32,bytes)": FunctionFragment;
    "requestPrivateTransfer(uint256,bytes32)": FunctionFragment;
    "approvePrivateTransfer(uint256,tuple[],bytes32,bytes32)": FunctionFragment;
    "requestMigrateToPublic(uint256,bytes32)": FunctionFragment;
    "requestMigrateToPublicFor(uint256,bytes32,address)": FunctionFragment;
    "getPrivateTransferRequest(uint256)": FunctionFragment;
    "getMigrationRequest(uint256)": FunctionFragment;
    "getMigrationRequestId(uint256)": FunctionFragment;
    "migrateToPublic(uint256,uint256,string,tuple[])": FunctionFragment;
    "getIssuerAddress()": FunctionFragment;
    "version()": FunctionFragment;
  };

  encodeFunctionData(functionFragment: "issuer", values?: undefined): string;
  encodeFunctionData(functionFragment: "owner", values?: undefined): string;
  encodeFunctionData(functionFragment: "registry", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "renounceOwnership",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "transferOwnership",
    values: [string]
  ): string;
  encodeFunctionData(functionFragment: "upgradeTo", values: [string]): string;
  encodeFunctionData(
    functionFragment: "upgradeToAndCall",
    values: [string, BytesLike]
  ): string;
  encodeFunctionData(functionFragment: "initialize", values: [string]): string;
  encodeFunctionData(
    functionFragment: "getCertificateCommitment",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "approveCertificationRequestPrivate",
    values: [BigNumberish, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "issuePrivate",
    values: [string, BytesLike, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "requestPrivateTransfer",
    values: [BigNumberish, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "approvePrivateTransfer",
    values: [
      BigNumberish,
      { left: boolean; hash: BytesLike }[],
      BytesLike,
      BytesLike
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "requestMigrateToPublic",
    values: [BigNumberish, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "requestMigrateToPublicFor",
    values: [BigNumberish, BytesLike, string]
  ): string;
  encodeFunctionData(
    functionFragment: "getPrivateTransferRequest",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getMigrationRequest",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getMigrationRequestId",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "migrateToPublic",
    values: [
      BigNumberish,
      BigNumberish,
      string,
      { left: boolean; hash: BytesLike }[]
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "getIssuerAddress",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "version", values?: undefined): string;

  decodeFunctionResult(functionFragment: "issuer", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "registry", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "renounceOwnership",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "transferOwnership",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "upgradeToAndCall",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getCertificateCommitment",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "approveCertificationRequestPrivate",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "issuePrivate",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "requestPrivateTransfer",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "approvePrivateTransfer",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "requestMigrateToPublic",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "requestMigrateToPublicFor",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getPrivateTransferRequest",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getMigrationRequest",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getMigrationRequestId",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "migrateToPublic",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getIssuerAddress",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "version", data: BytesLike): Result;

  events: {
    "AdminChanged(address,address)": EventFragment;
    "BeaconUpgraded(address)": EventFragment;
    "CertificateMigratedToPublic(uint256,address,uint256)": EventFragment;
    "CommitmentUpdated(address,uint256,bytes32)": EventFragment;
    "MigrateToPublicRequested(address,uint256)": EventFragment;
    "OwnershipTransferred(address,address)": EventFragment;
    "PrivateCertificationRequestApproved(address,uint256,uint256)": EventFragment;
    "PrivateTransferRequested(address,uint256)": EventFragment;
    "Upgraded(address)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment;
  getEvent(
    nameOrSignatureOrTopic: "CertificateMigratedToPublic"
  ): EventFragment;
  getEvent(nameOrSignatureOrTopic: "CommitmentUpdated"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "MigrateToPublicRequested"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment;
  getEvent(
    nameOrSignatureOrTopic: "PrivateCertificationRequestApproved"
  ): EventFragment;
  getEvent(nameOrSignatureOrTopic: "PrivateTransferRequested"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment;
}

export class PrivateIssuer 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: PrivateIssuerInterface;

  functions: {
    issuer(overrides?: CallOverrides): Promise<[string]>;

    /**
     * Returns the address of the current owner.
     */
    owner(overrides?: CallOverrides): Promise<[string]>;

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

    /**
     * Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
     */
    renounceOwnership(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    /**
     * Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.
     */
    transferOwnership(
      newOwner: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    /**
     * Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
     */
    upgradeTo(
      newImplementation: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    /**
     * Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
     */
    upgradeToAndCall(
      newImplementation: string,
      data: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    /**
     * Uses the OpenZeppelin `initializer` for upgradeability.`_issuer` cannot be the zero address.
     * Constructor.
     */
    initialize(
      _issuer: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    /**
     * Get the commitment (proof) for a specific certificate.
     */
    getCertificateCommitment(
      certificateId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[string]>;

    approveCertificationRequestPrivate(
      _requestId: BigNumberish,
      _commitment: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    /**
     * Directly issue a private certificate.
     */
    issuePrivate(
      _to: string,
      _commitment: BytesLike,
      _data: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    /**
     * Request transferring a certain amount of tokens.
     * @param _certificateId Certificate that you want to change the balances of.
     * @param _ownerAddressLeafHash New updated proof (balances per address).
     */
    requestPrivateTransfer(
      _certificateId: BigNumberish,
      _ownerAddressLeafHash: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    approvePrivateTransfer(
      _certificateId: BigNumberish,
      _proof: { left: boolean; hash: BytesLike }[],
      _previousCommitment: BytesLike,
      _commitment: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    /**
     * Request the certificate volumes to be migrated from private to public.
     * @param _certificateId Certificate that you want to migrate to public.
     * @param _ownerAddressLeafHash Final balance proof.
     */
    requestMigrateToPublic(
      _certificateId: BigNumberish,
      _ownerAddressLeafHash: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    /**
     * Request the certificate volumes to be migrated from private to public for someone else.
     * @param _certificateId Certificate that you want to migrate to public.
     * @param _forAddress Owner.
     * @param _ownerAddressLeafHash Final balance proof.
     */
    requestMigrateToPublicFor(
      _certificateId: BigNumberish,
      _ownerAddressLeafHash: BytesLike,
      _forAddress: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    /**
     * Get the private transfer request that is currently active for a specific certificate.
     */
    getPrivateTransferRequest(
      _certificateId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[[string, string] & { owner: string; hash: string }]>;

    /**
     * Get the migration request.
     */
    getMigrationRequest(
      _requestId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [
        [string, BigNumber, string, boolean] & {
          owner: string;
          certificateId: BigNumber;
          hash: string;
          approved: boolean;
        }
      ]
    >;

    /**
     * Get the migration request ID for a specific certificate.
     */
    getMigrationRequestId(
      _certificateId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber] & { _migrationRequestId: BigNumber }>;

    migrateToPublic(
      _requestId: BigNumberish,
      _volume: BigNumberish,
      _salt: string,
      _proof: { left: boolean; hash: BytesLike }[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

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

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

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

  /**
   * Returns the address of the current owner.
   */
  owner(overrides?: CallOverrides): Promise<string>;

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

  /**
   * Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
   */
  renounceOwnership(
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  /**
   * Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.
   */
  transferOwnership(
    newOwner: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  /**
   * Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
   */
  upgradeTo(
    newImplementation: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  /**
   * Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
   */
  upgradeToAndCall(
    newImplementation: string,
    data: BytesLike,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  /**
   * Uses the OpenZeppelin `initializer` for upgradeability.`_issuer` cannot be the zero address.
   * Constructor.
   */
  initialize(
    _issuer: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  /**
   * Get the commitment (proof) for a specific certificate.
   */
  getCertificateCommitment(
    certificateId: BigNumberish,
    overrides?: CallOverrides
  ): Promise<string>;

  approveCertificationRequestPrivate(
    _requestId: BigNumberish,
    _commitment: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  /**
   * Directly issue a private certificate.
   */
  issuePrivate(
    _to: string,
    _commitment: BytesLike,
    _data: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  /**
   * Request transferring a certain amount of tokens.
   * @param _certificateId Certificate that you want to change the balances of.
   * @param _ownerAddressLeafHash New updated proof (balances per address).
   */
  requestPrivateTransfer(
    _certificateId: BigNumberish,
    _ownerAddressLeafHash: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  approvePrivateTransfer(
    _certificateId: BigNumberish,
    _proof: { left: boolean; hash: BytesLike }[],
    _previousCommitment: BytesLike,
    _commitment: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  /**
   * Request the certificate volumes to be migrated from private to public.
   * @param _certificateId Certificate that you want to migrate to public.
   * @param _ownerAddressLeafHash Final balance proof.
   */
  requestMigrateToPublic(
    _certificateId: BigNumberish,
    _ownerAddressLeafHash: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  /**
   * Request the certificate volumes to be migrated from private to public for someone else.
   * @param _certificateId Certificate that you want to migrate to public.
   * @param _forAddress Owner.
   * @param _ownerAddressLeafHash Final balance proof.
   */
  requestMigrateToPublicFor(
    _certificateId: BigNumberish,
    _ownerAddressLeafHash: BytesLike,
    _forAddress: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  /**
   * Get the private transfer request that is currently active for a specific certificate.
   */
  getPrivateTransferRequest(
    _certificateId: BigNumberish,
    overrides?: CallOverrides
  ): Promise<[string, string] & { owner: string; hash: string }>;

  /**
   * Get the migration request.
   */
  getMigrationRequest(
    _requestId: BigNumberish,
    overrides?: CallOverrides
  ): Promise<
    [string, BigNumber, string, boolean] & {
      owner: string;
      certificateId: BigNumber;
      hash: string;
      approved: boolean;
    }
  >;

  /**
   * Get the migration request ID for a specific certificate.
   */
  getMigrationRequestId(
    _certificateId: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  migrateToPublic(
    _requestId: BigNumberish,
    _volume: BigNumberish,
    _salt: string,
    _proof: { left: boolean; hash: BytesLike }[],
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

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

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

  callStatic: {
    issuer(overrides?: CallOverrides): Promise<string>;

    /**
     * Returns the address of the current owner.
     */
    owner(overrides?: CallOverrides): Promise<string>;

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

    /**
     * Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
     */
    renounceOwnership(overrides?: CallOverrides): Promise<void>;

    /**
     * Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.
     */
    transferOwnership(
      newOwner: string,
      overrides?: CallOverrides
    ): Promise<void>;

    /**
     * Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
     */
    upgradeTo(
      newImplementation: string,
      overrides?: CallOverrides
    ): Promise<void>;

    /**
     * Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
     */
    upgradeToAndCall(
      newImplementation: string,
      data: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    /**
     * Uses the OpenZeppelin `initializer` for upgradeability.`_issuer` cannot be the zero address.
     * Constructor.
     */
    initialize(_issuer: string, overrides?: CallOverrides): Promise<void>;

    /**
     * Get the commitment (proof) for a specific certificate.
     */
    getCertificateCommitment(
      certificateId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<string>;

    approveCertificationRequestPrivate(
      _requestId: BigNumberish,
      _commitment: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    /**
     * Directly issue a private certificate.
     */
    issuePrivate(
      _to: string,
      _commitment: BytesLike,
      _data: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    /**
     * Request transferring a certain amount of tokens.
     * @param _certificateId Certificate that you want to change the balances of.
     * @param _ownerAddressLeafHash New updated proof (balances per address).
     */
    requestPrivateTransfer(
      _certificateId: BigNumberish,
      _ownerAddressLeafHash: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    approvePrivateTransfer(
      _certificateId: BigNumberish,
      _proof: { left: boolean; hash: BytesLike }[],
      _previousCommitment: BytesLike,
      _commitment: BytesLike,
      overrides?: CallOverrides
    ): Promise<boolean>;

    /**
     * Request the certificate volumes to be migrated from private to public.
     * @param _certificateId Certificate that you want to migrate to public.
     * @param _ownerAddressLeafHash Final balance proof.
     */
    requestMigrateToPublic(
      _certificateId: BigNumberish,
      _ownerAddressLeafHash: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    /**
     * Request the certificate volumes to be migrated from private to public for someone else.
     * @param _certificateId Certificate that you want to migrate to public.
     * @param _forAddress Owner.
     * @param _ownerAddressLeafHash Final balance proof.
     */
    requestMigrateToPublicFor(
      _certificateId: BigNumberish,
      _ownerAddressLeafHash: BytesLike,
      _forAddress: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    /**
     * Get the private transfer request that is currently active for a specific certificate.
     */
    getPrivateTransferRequest(
      _certificateId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[string, string] & { owner: string; hash: string }>;

    /**
     * Get the migration request.
     */
    getMigrationRequest(
      _requestId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [string, BigNumber, string, boolean] & {
        owner: string;
        certificateId: BigNumber;
        hash: string;
        approved: boolean;
      }
    >;

    /**
     * Get the migration request ID for a specific certificate.
     */
    getMigrationRequestId(
      _certificateId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    migrateToPublic(
      _requestId: BigNumberish,
      _volume: BigNumberish,
      _salt: string,
      _proof: { left: boolean; hash: BytesLike }[],
      overrides?: CallOverrides
    ): Promise<void>;

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

    version(overrides?: CallOverrides): Promise<string>;
  };

  filters: {
    AdminChanged(
      previousAdmin?: null,
      newAdmin?: null
    ): TypedEventFilter<
      [string, string],
      { previousAdmin: string; newAdmin: string }
    >;

    BeaconUpgraded(
      beacon?: string | null
    ): TypedEventFilter<[string], { beacon: string }>;

    CertificateMigratedToPublic(
      _certificateId?: BigNumberish | null,
      _owner?: string | null,
      _amount?: BigNumberish | null
    ): TypedEventFilter<
      [BigNumber, string, BigNumber],
      { _certificateId: BigNumber; _owner: string; _amount: BigNumber }
    >;

    CommitmentUpdated(
      _owner?: string | null,
      _id?: BigNumberish | null,
      _commitment?: null
    ): TypedEventFilter<
      [string, BigNumber, string],
      { _owner: string; _id: BigNumber; _commitment: string }
    >;

    MigrateToPublicRequested(
      _owner?: string | null,
      _id?: BigNumberish | null
    ): TypedEventFilter<
      [string, BigNumber],
      { _owner: string; _id: BigNumber }
    >;

    OwnershipTransferred(
      previousOwner?: string | null,
      newOwner?: string | null
    ): TypedEventFilter<
      [string, string],
      { previousOwner: string; newOwner: string }
    >;

    PrivateCertificationRequestApproved(
      _owner?: string | null,
      _id?: BigNumberish | null,
      _certificateId?: BigNumberish | null
    ): TypedEventFilter<
      [string, BigNumber, BigNumber],
      { _owner: string; _id: BigNumber; _certificateId: BigNumber }
    >;

    PrivateTransferRequested(
      _owner?: string | null,
      _certificateId?: BigNumberish | null
    ): TypedEventFilter<
      [string, BigNumber],
      { _owner: string; _certificateId: BigNumber }
    >;

    Upgraded(
      implementation?: string | null
    ): TypedEventFilter<[string], { implementation: string }>;
  };

  estimateGas: {
    issuer(overrides?: CallOverrides): Promise<BigNumber>;

    /**
     * Returns the address of the current owner.
     */
    owner(overrides?: CallOverrides): Promise<BigNumber>;

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

    /**
     * Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
     */
    renounceOwnership(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    /**
     * Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.
     */
    transferOwnership(
      newOwner: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    /**
     * Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
     */
    upgradeTo(
      newImplementation: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    /**
     * Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
     */
    upgradeToAndCall(
      newImplementation: string,
      data: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    /**
     * Uses the OpenZeppelin `initializer` for upgradeability.`_issuer` cannot be the zero address.
     * Constructor.
     */
    initialize(
      _issuer: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    /**
     * Get the commitment (proof) for a specific certificate.
     */
    getCertificateCommitment(
      certificateId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    approveCertificationRequestPrivate(
      _requestId: BigNumberish,
      _commitment: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    /**
     * Directly issue a private certificate.
     */
    issuePrivate(
      _to: string,
      _commitment: BytesLike,
      _data: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    /**
     * Request transferring a certain amount of tokens.
     * @param _certificateId Certificate that you want to change the balances of.
     * @param _ownerAddressLeafHash New updated proof (balances per address).
     */
    requestPrivateTransfer(
      _certificateId: BigNumberish,
      _ownerAddressLeafHash: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    approvePrivateTransfer(
      _certificateId: BigNumberish,
      _proof: { left: boolean; hash: BytesLike }[],
      _previousCommitment: BytesLike,
      _commitment: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    /**
     * Request the certificate volumes to be migrated from private to public.
     * @param _certificateId Certificate that you want to migrate to public.
     * @param _ownerAddressLeafHash Final balance proof.
     */
    requestMigrateToPublic(
      _certificateId: BigNumberish,
      _ownerAddressLeafHash: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    /**
     * Request the certificate volumes to be migrated from private to public for someone else.
     * @param _certificateId Certificate that you want to migrate to public.
     * @param _forAddress Owner.
     * @param _ownerAddressLeafHash Final balance proof.
     */
    requestMigrateToPublicFor(
      _certificateId: BigNumberish,
      _ownerAddressLeafHash: BytesLike,
      _forAddress: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    /**
     * Get the private transfer request that is currently active for a specific certificate.
     */
    getPrivateTransferRequest(
      _certificateId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    /**
     * Get the migration request.
     */
    getMigrationRequest(
      _requestId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    /**
     * Get the migration request ID for a specific certificate.
     */
    getMigrationRequestId(
      _certificateId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    migrateToPublic(
      _requestId: BigNumberish,
      _volume: BigNumberish,
      _salt: string,
      _proof: { left: boolean; hash: BytesLike }[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

    version(overrides?: CallOverrides): Promise<BigNumber>;
  };

  populateTransaction: {
    issuer(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    /**
     * Returns the address of the current owner.
     */
    owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;

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

    /**
     * Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
     */
    renounceOwnership(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    /**
     * Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.
     */
    transferOwnership(
      newOwner: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    /**
     * Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
     */
    upgradeTo(
      newImplementation: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    /**
     * Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
     */
    upgradeToAndCall(
      newImplementation: string,
      data: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    /**
     * Uses the OpenZeppelin `initializer` for upgradeability.`_issuer` cannot be the zero address.
     * Constructor.
     */
    initialize(
      _issuer: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    /**
     * Get the commitment (proof) for a specific certificate.
     */
    getCertificateCommitment(
      certificateId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    approveCertificationRequestPrivate(
      _requestId: BigNumberish,
      _commitment: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    /**
     * Directly issue a private certificate.
     */
    issuePrivate(
      _to: string,
      _commitment: BytesLike,
      _data: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    /**
     * Request transferring a certain amount of tokens.
     * @param _certificateId Certificate that you want to change the balances of.
     * @param _ownerAddressLeafHash New updated proof (balances per address).
     */
    requestPrivateTransfer(
      _certificateId: BigNumberish,
      _ownerAddressLeafHash: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    approvePrivateTransfer(
      _certificateId: BigNumberish,
      _proof: { left: boolean; hash: BytesLike }[],
      _previousCommitment: BytesLike,
      _commitment: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    /**
     * Request the certificate volumes to be migrated from private to public.
     * @param _certificateId Certificate that you want to migrate to public.
     * @param _ownerAddressLeafHash Final balance proof.
     */
    requestMigrateToPublic(
      _certificateId: BigNumberish,
      _ownerAddressLeafHash: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    /**
     * Request the certificate volumes to be migrated from private to public for someone else.
     * @param _certificateId Certificate that you want to migrate to public.
     * @param _forAddress Owner.
     * @param _ownerAddressLeafHash Final balance proof.
     */
    requestMigrateToPublicFor(
      _certificateId: BigNumberish,
      _ownerAddressLeafHash: BytesLike,
      _forAddress: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    /**
     * Get the private transfer request that is currently active for a specific certificate.
     */
    getPrivateTransferRequest(
      _certificateId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    /**
     * Get the migration request.
     */
    getMigrationRequest(
      _requestId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    /**
     * Get the migration request ID for a specific certificate.
     */
    getMigrationRequestId(
      _certificateId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    migrateToPublic(
      _requestId: BigNumberish,
      _volume: BigNumberish,
      _salt: string,
      _proof: { left: boolean; hash: BytesLike }[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

    version(overrides?: CallOverrides): Promise<PopulatedTransaction>;
  };
}
