
/* Autogenerated file, do not edit! */

/* eslint-disable */
import {
  type AbiType,
  AztecAddress,
  type AztecAddressLike,
  CompleteAddress,
  Contract,
  type ContractArtifact,
  ContractBase,
  ContractFunctionInteraction,
  type ContractInstanceWithAddress,
  type ContractMethod,
  type ContractStorageLayout,
  decodeFromAbi,
  DeployMethod,
  EthAddress,
  type EthAddressLike,
  EventSelector,
  type FieldLike,
  Fr,
  type FunctionSelectorLike,
  loadContractArtifact,
  loadContractArtifactForPublic,
  type NoirCompiledContract,
  Point,
  type PublicKey,
  PublicKeys,
  type Wallet,
  type U128Like,
  type WrappedFieldLike,
} from '@aztec/aztec.js';
import ChildContractArtifactJson from '../artifacts/child_contract-Child.json' with { type: 'json' };
export const ChildContractArtifact = loadContractArtifact(ChildContractArtifactJson as NoirCompiledContract);



/**
 * Type-safe interface for contract Child;
 */
export class ChildContract extends ContractBase {
  
  private constructor(
    instance: ContractInstanceWithAddress,
    wallet: Wallet,
  ) {
    super(instance, ChildContractArtifact, 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 promise that resolves to a new Contract instance.
   */
  public static async at(
    address: AztecAddress,
    wallet: Wallet,
  ) {
    return Contract.at(address, ChildContract.artifact, wallet) as Promise<ChildContract>;
  }

  
  /**
   * Creates a tx to deploy a new instance of this contract.
   */
  public static deploy(wallet: Wallet, ) {
    return new DeployMethod<ChildContract>(PublicKeys.default(), wallet, ChildContractArtifact, ChildContract.at, Array.from(arguments).slice(1));
  }

  /**
   * Creates a tx to deploy a new instance of this contract using the specified public keys hash to derive the address.
   */
  public static deployWithPublicKeys(publicKeys: PublicKeys, wallet: Wallet, ) {
    return new DeployMethod<ChildContract>(publicKeys, wallet, ChildContractArtifact, ChildContract.at, Array.from(arguments).slice(2));
  }

  /**
   * Creates a tx to deploy a new instance of this contract using the specified constructor method.
   */
  public static deployWithOpts<M extends keyof ChildContract['methods']>(
    opts: { publicKeys?: PublicKeys; method?: M; wallet: Wallet },
    ...args: Parameters<ChildContract['methods'][M]>
  ) {
    return new DeployMethod<ChildContract>(
      opts.publicKeys ?? PublicKeys.default(),
      opts.wallet,
      ChildContractArtifact,
      ChildContract.at,
      Array.from(arguments).slice(1),
      opts.method ?? 'constructor',
    );
  }
  

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

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

  public static get storage(): ContractStorageLayout<'current_value' | 'a_map_with_private_values'> {
      return {
        current_value: {
      slot: new Fr(1n),
    },
a_map_with_private_values: {
      slot: new Fr(2n),
    }
      } as ContractStorageLayout<'current_value' | 'a_map_with_private_values'>;
    }
    

  /** Type-safe wrappers for the public methods exposed by the contract. */
  public declare methods: {
    
    /** private_get_value(amount: field, owner: struct) */
    private_get_value: ((amount: FieldLike, owner: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

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

    /** process_message(message_ciphertext: struct, message_context: struct) */
    process_message: ((message_ciphertext: FieldLike[], message_context: { tx_hash: FieldLike, unique_note_hashes_in_tx: FieldLike[], first_nullifier_in_tx: FieldLike, recipient: AztecAddressLike }) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

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

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

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

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

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

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

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

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

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

  
}
