import { AztecAddress } from '@aztec/aztec.js/addresses'; import { type AztecAddressLike, type ContractArtifact, type FieldLike, type OptionLike } from '@aztec/aztec.js/abi'; import { ContractBase, ContractFunctionInteraction, type ContractMethod, type ContractStorageLayout, DeployMethod } from '@aztec/aztec.js/contracts'; import { PublicKeys } from '@aztec/aztec.js/keys'; import type { Wallet } from '@aztec/aztec.js/wallet'; export declare const VaultContractArtifact: ContractArtifact; /** * Type-safe interface for contract Vault; */ export declare class VaultContract extends ContractBase { private constructor(); /** * 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. */ static at(address: AztecAddress, wallet: Wallet): VaultContract; /** * Creates a tx to deploy a new instance of this contract. */ static deploy(wallet: Wallet, admin: AztecAddressLike, asset: AztecAddressLike, vault_offset: (bigint | number)): DeployMethod; /** * Creates a tx to deploy a new instance of this contract using the specified public keys hash to derive the address. */ static deployWithPublicKeys(publicKeys: PublicKeys, wallet: Wallet, admin: AztecAddressLike, asset: AztecAddressLike, vault_offset: (bigint | number)): DeployMethod; /** * Creates a tx to deploy a new instance of this contract using the specified constructor method. */ static deployWithOpts(opts: { publicKeys?: PublicKeys; method?: M; wallet: Wallet; }, ...args: Parameters): DeployMethod; /** * Returns this contract's artifact. */ static get artifact(): ContractArtifact; /** * Returns this contract's artifact with public bytecode. */ static get artifactForPublic(): ContractArtifact; static get storage(): ContractStorageLayout<'admin' | 'asset' | 'shares' | 'vault_offset'>; /** Type-safe wrappers for the public methods exposed by the contract. */ methods: { /** admin() */ admin: (() => ContractFunctionInteraction) & Pick; /** asset() */ asset: (() => ContractFunctionInteraction) & Pick; /** constructor(admin: struct, asset: struct, vault_offset: integer) */ constructor: ((admin: AztecAddressLike, asset: AztecAddressLike, vault_offset: (bigint | number)) => ContractFunctionInteraction) & Pick; /** convert_to_assets(shares: integer) */ convert_to_assets: ((shares: (bigint | number)) => ContractFunctionInteraction) & Pick; /** convert_to_shares(assets: integer) */ convert_to_shares: ((assets: (bigint | number)) => ContractFunctionInteraction) & Pick; /** deposit_private_to_private(from: struct, to: struct, assets: integer, shares: integer, nonce: field) */ deposit_private_to_private: ((from: AztecAddressLike, to: AztecAddressLike, assets: (bigint | number), shares: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** deposit_private_to_private_exact(from: struct, to: struct, assets: integer, min_shares: integer, nonce: field) */ deposit_private_to_private_exact: ((from: AztecAddressLike, to: AztecAddressLike, assets: (bigint | number), min_shares: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** deposit_private_to_public(from: struct, to: struct, assets: integer, nonce: field) */ deposit_private_to_public: ((from: AztecAddressLike, to: AztecAddressLike, assets: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** deposit_public_to_private(from: struct, to: struct, assets: integer, shares: integer, nonce: field) */ deposit_public_to_private: ((from: AztecAddressLike, to: AztecAddressLike, assets: (bigint | number), shares: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** deposit_public_to_private_exact(from: struct, to: struct, assets: integer, min_shares: integer, nonce: field) */ deposit_public_to_private_exact: ((from: AztecAddressLike, to: AztecAddressLike, assets: (bigint | number), min_shares: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** deposit_public_to_public(from: struct, to: struct, assets: integer, nonce: field) */ deposit_public_to_public: ((from: AztecAddressLike, to: AztecAddressLike, assets: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** get_vault_offset() */ get_vault_offset: (() => ContractFunctionInteraction) & Pick; /** issue_private_to_private_exact(from: struct, to: struct, shares: integer, max_assets: integer, nonce: field) */ issue_private_to_private_exact: ((from: AztecAddressLike, to: AztecAddressLike, shares: (bigint | number), max_assets: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** issue_private_to_public_exact(from: struct, to: struct, shares: integer, max_assets: integer, nonce: field) */ issue_private_to_public_exact: ((from: AztecAddressLike, to: AztecAddressLike, shares: (bigint | number), max_assets: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** issue_public_to_private(from: struct, to: struct, shares: integer, max_assets: integer, nonce: field) */ issue_public_to_private: ((from: AztecAddressLike, to: AztecAddressLike, shares: (bigint | number), max_assets: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** issue_public_to_public(from: struct, to: struct, shares: integer, max_assets: integer, nonce: field) */ issue_public_to_public: ((from: AztecAddressLike, to: AztecAddressLike, shares: (bigint | number), max_assets: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** max_deposit(_receiver: struct) */ max_deposit: ((_receiver: AztecAddressLike) => ContractFunctionInteraction) & Pick; /** max_issue(_receiver: struct) */ max_issue: ((_receiver: AztecAddressLike) => ContractFunctionInteraction) & Pick; /** max_redeem(owner: struct) */ max_redeem: ((owner: AztecAddressLike) => ContractFunctionInteraction) & Pick; /** max_withdraw(owner: struct) */ max_withdraw: ((owner: AztecAddressLike) => ContractFunctionInteraction) & Pick; /** offchain_receive(messages: struct) */ offchain_receive: ((messages: { ciphertext: FieldLike[]; recipient: AztecAddressLike; tx_hash: OptionLike; anchor_block_timestamp: (bigint | number); }[]) => ContractFunctionInteraction) & Pick; /** preview_deposit(assets: integer) */ preview_deposit: ((assets: (bigint | number)) => ContractFunctionInteraction) & Pick; /** preview_issue(shares: integer) */ preview_issue: ((shares: (bigint | number)) => ContractFunctionInteraction) & Pick; /** preview_redeem(shares: integer) */ preview_redeem: ((shares: (bigint | number)) => ContractFunctionInteraction) & Pick; /** preview_withdraw(assets: integer) */ preview_withdraw: ((assets: (bigint | number)) => ContractFunctionInteraction) & Pick; /** public_dispatch(selector: field) */ public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick; /** redeem_private_to_private_exact(from: struct, to: struct, shares: integer, min_assets: integer, nonce: field) */ redeem_private_to_private_exact: ((from: AztecAddressLike, to: AztecAddressLike, shares: (bigint | number), min_assets: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** redeem_private_to_public(from: struct, to: struct, shares: integer, nonce: field) */ redeem_private_to_public: ((from: AztecAddressLike, to: AztecAddressLike, shares: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** redeem_public_to_private_exact(from: struct, to: struct, shares: integer, min_assets: integer, nonce: field) */ redeem_public_to_private_exact: ((from: AztecAddressLike, to: AztecAddressLike, shares: (bigint | number), min_assets: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** redeem_public_to_public(from: struct, to: struct, shares: integer, nonce: field) */ redeem_public_to_public: ((from: AztecAddressLike, to: AztecAddressLike, shares: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** set_shares_token(shares: struct) */ set_shares_token: ((shares: AztecAddressLike) => ContractFunctionInteraction) & Pick; /** set_shares_token_with_initial_deposit(shares: struct, initial_deposit: integer, depositor: struct, nonce: field) */ set_shares_token_with_initial_deposit: ((shares: AztecAddressLike, initial_deposit: (bigint | number), depositor: AztecAddressLike, nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** shares() */ shares: (() => ContractFunctionInteraction) & Pick; /** sync_state(scope: struct) */ sync_state: ((scope: AztecAddressLike) => ContractFunctionInteraction) & Pick; /** total_assets() */ total_assets: (() => ContractFunctionInteraction) & Pick; /** withdraw_private_to_private(from: struct, to: struct, assets: integer, shares: integer, nonce: field) */ withdraw_private_to_private: ((from: AztecAddressLike, to: AztecAddressLike, assets: (bigint | number), shares: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** withdraw_private_to_private_exact(from: struct, to: struct, assets: integer, max_shares: integer, nonce: field) */ withdraw_private_to_private_exact: ((from: AztecAddressLike, to: AztecAddressLike, assets: (bigint | number), max_shares: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** withdraw_private_to_public_exact(from: struct, to: struct, assets: integer, max_shares: integer, nonce: field) */ withdraw_private_to_public_exact: ((from: AztecAddressLike, to: AztecAddressLike, assets: (bigint | number), max_shares: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** withdraw_public_to_private(from: struct, to: struct, assets: integer, nonce: field) */ withdraw_public_to_private: ((from: AztecAddressLike, to: AztecAddressLike, assets: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; /** withdraw_public_to_public(from: struct, to: struct, assets: integer, nonce: field) */ withdraw_public_to_public: ((from: AztecAddressLike, to: AztecAddressLike, assets: (bigint | number), nonce: FieldLike) => ContractFunctionInteraction) & Pick; }; }