
/* Autogenerated file, do not edit! */

/* eslint-disable */
import { AztecAddress, CompleteAddress } from '@aztec/aztec.js/addresses';
import { type AbiType, type AztecAddressLike, type ContractArtifact, EventSelector, decodeFromAbi, type EthAddressLike, type FieldLike, type FunctionSelectorLike, loadContractArtifact, loadContractArtifactForPublic, type NoirCompiledContract, type OptionLike, type U128Like, type WrappedFieldLike } from '@aztec/aztec.js/abi';
import { Contract, ContractBase, ContractFunctionInteraction, type ContractMethod, type ContractStorageLayout, type DeployInstantiationOptions, DeployMethod } from '@aztec/aztec.js/contracts';
import { EthAddress } from '@aztec/aztec.js/addresses';
import { Fr, Point } from '@aztec/aztec.js/fields';
import { type PublicKey, PublicKeys } from '@aztec/aztec.js/keys';
import type { Wallet } from '@aztec/aztec.js/wallet';
import InitTestContractArtifactJson from '../artifacts/init_test_contract-InitTest.json' with { type: 'json' };
export const InitTestContractArtifact = loadContractArtifact(InitTestContractArtifactJson as NoirCompiledContract);



/**
 * Type-safe interface for contract InitTest;
 */
export class InitTestContract extends ContractBase {
  
  private constructor(
    address: AztecAddress,
    wallet: Wallet,
  ) {
    super(address, InitTestContractArtifact, wallet);
  }
  

  
  /**
   * Creates a contract instance.
   * @param address - The deployed contract's address.
   * @param wallet - The wallet to use when interacting with the contract.
   * @returns A new Contract instance.
   */
  public static at(
    address: AztecAddress,
    wallet: Wallet,
  ): InitTestContract {
    return Contract.at(address, InitTestContract.artifact, wallet) as InitTestContract;
  }

  
  /**
   * Creates a tx to deploy a new instance of this contract.
   * @param instantiation - Optional address-affecting parameters (salt, deployer / universalDeploy, publicKeys).
   *                       Salt defaults to a random value; the deployer is locked lazily from the first send-time `from`.
   */
  public static deploy(wallet: Wallet, owner: AztecAddressLike, value: FieldLike, instantiation?: DeployInstantiationOptions) {
    return DeployMethod.create<InitTestContract>(
      wallet,
      {
        artifact: InitTestContractArtifact,
        postDeployCtor: (instance, wallet) => InitTestContract.at(instance.address, wallet),
        args: [owner, value],
      },
      instantiation,
    );
  }

  /**
   * Creates a tx to deploy a new instance of this contract using the specified constructor method.
   */
  public static deployWithOpts<M extends keyof InitTestContract['methods']>(
    opts: { method?: M; wallet: Wallet; instantiation?: DeployInstantiationOptions },
    ...args: Parameters<InitTestContract['methods'][M]>
  ) {
    return DeployMethod.create<InitTestContract>(
      opts.wallet,
      {
        artifact: InitTestContractArtifact,
        postDeployCtor: (instance, wallet) => InitTestContract.at(instance.address, wallet),
        args,
        constructorNameOrArtifact: opts.method ?? 'constructor',
      },
      opts.instantiation,
    );
  }
  

  
  /**
   * Returns this contract's artifact.
   */
  public static get artifact(): ContractArtifact {
    return InitTestContractArtifact;
  }

  /**
   * Returns this contract's artifact with public bytecode.
   */
  public static get artifactForPublic(): ContractArtifact {
    return loadContractArtifactForPublic(InitTestContractArtifactJson as NoirCompiledContract);
  }
  

  

  /** Type-safe wrappers for the public methods exposed by the contract. */
  public declare methods: {
    
    /** __emit_public_init_nullifier() */
    __emit_public_init_nullifier: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** constructor(owner: struct, value: field) */
    constructor: ((owner: AztecAddressLike, value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** initializer_calling_only_self(owner: struct, value: field) */
    initializer_calling_only_self: ((owner: AztecAddressLike, value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** initializer_enqueuing_public_init_checked(owner: struct, value: field) */
    initializer_enqueuing_public_init_checked: ((owner: AztecAddressLike, value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** initializer_self_calling_private_init_checked(owner: struct, value: field) */
    initializer_self_calling_private_init_checked: ((owner: AztecAddressLike, value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** initializer_self_calling_private_not_init_checked(owner: struct, value: field) */
    initializer_self_calling_private_not_init_checked: ((owner: AztecAddressLike, value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** offchain_receive(messages: struct) */
    offchain_receive: ((messages: { ciphertext: FieldLike[], recipient: AztecAddressLike, tx_hash: OptionLike<FieldLike>, anchor_block_timestamp: (bigint | number) }[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** priv_init_check(owner: struct, value: field) */
    priv_init_check: ((owner: AztecAddressLike, value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** priv_no_init_check(owner: struct, value: field) */
    priv_no_init_check: ((owner: AztecAddressLike, value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** pub_init_check(owner: struct, value: field) */
    pub_init_check: ((owner: AztecAddressLike, value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** pub_no_init_check(owner: struct) */
    pub_no_init_check: ((owner: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** public_dispatch(selector: field) */
    public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** public_initializer_self_calling_init_checked(owner: struct, value: field) */
    public_initializer_self_calling_init_checked: ((owner: AztecAddressLike, value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** sync_state(scope: struct) */
    sync_state: ((scope: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** utility_init_check(owner: struct) */
    utility_init_check: ((owner: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
  };

  
}
