import type { IAddress, IContractRunner, INormalizedNumber } from '../../types'; import type { IContractWriteOptions } from './write.actions'; /** * Function to fetch instant redemption fee * @param signer - signer / provider object * @param options - object including pool contract address, user wallet address * @returns normalized number object of the instant redemption fee */ export declare function fetchInstantRedemptionFee(signer: IContractRunner, options: IContractWriteOptions): Promise; /** * allowance checks user's current allowance per pool * @param signer - signer / provider object * @param options - object including pool contract address, user wallet address * @returns normalized number object of the user's current allowance */ export declare function vaultAllowance(signer: IContractRunner, options: IContractWriteOptions): Promise; /** * Fetches the senders whitelist contract address from a whitelisted allocation vault * @param signer - signer / provider object * @param options - object including vault contract address * @returns the senders whitelist contract address */ export declare function sendersWhitelistAddress(signer: IContractRunner, options: { vault: IAddress; }): Promise; /** * Checks if an address is whitelisted on a whitelist contract * @param signer - signer / provider object * @param options - object including whitelist contract address and wallet address to check * @returns boolean indicating if the address is whitelisted */ export declare function isWhitelisted(signer: IContractRunner, options: { whitelist: IAddress; wallet: IAddress; }): Promise; /** * Fetches the total amount deposited by an address on a whitelist contract * @param signer - signer / provider object * @param options - object including whitelist contract address, wallet address, and vault address * @returns normalized number of the deposited amount */ export declare function getDeposited(signer: IContractRunner, options: { whitelist: IAddress; wallet: IAddress; vault: IAddress; }): Promise; /** * Fetches the remaining allocation for an address on a whitelist contract * @param signer - signer / provider object * @param options - object including whitelist contract address, wallet address, vault address, and optional deposit cap amount * @returns the remaining allocation as normalized number */ export declare function getRemainingAllocations(signer: IContractRunner, options: { whitelist: IAddress; wallet: IAddress; vault: IAddress; depositCapAmount?: bigint; }): Promise; export type IPreviewRwaRedemptionOptions = { /** RwaRedeemSubaccount contract address */ target: IAddress; /** Redeemable asset address (e.g. USDC, USDT) */ asset: IAddress; /** Amount of vault shares to preview */ amount: string | bigint | number; /** Decimals of the vault share token */ decimals: number; /** Decimals of the output/redeemable asset */ outputDecimals: number; }; /** * Preview the output amount for an RWA instant redemption via the RwaRedeemSubaccount contract. * @param signer - signer / provider object * @param options - object including subaccount address, asset, amount, decimals, and outputDecimals * @returns normalized number of the expected output amount (in output asset decimals) */ export declare function previewRwaRedemption(signer: IContractRunner, options: IPreviewRwaRedemptionOptions): Promise; /** Options for {@link previewDeposit}. */ export type IPreviewDepositOptions = { /** Vault contract address. */ vault: IAddress; /** Deposit amount in the deposit asset's smallest unit (raw bigint-shaped). */ amount: string | bigint | number; /** * Optional deposit asset. Required for multi-asset vaults (EVM-2); ignored * for single-asset vaults where the underlying is implicit. */ asset?: IAddress; }; /** Options for {@link previewRedeem}. */ export type IPreviewRedeemOptions = { /** Vault contract address. */ vault: IAddress; /** Share amount in the vault share token's smallest unit (raw bigint-shaped). */ shares: string | bigint | number; }; /** Options for {@link allowance}. */ export type IAllowanceOptions = { /** Spender contract — usually the vault address. */ vault: IAddress; /** Owner whose ERC-20 allowance is being queried. */ owner: IAddress; /** * Token whose allowance is queried. Defaults to the vault's underlying * asset, resolved via `IERC4626.asset()`. */ asset?: IAddress; }; /** Options for {@link balanceOf}. */ export type IBalanceOfOptions = { /** ERC-20 token address. */ asset: IAddress; /** Owner whose balance is queried. */ owner: IAddress; }; /** Options for {@link maxDeposit}. */ export type IMaxDepositOptions = { /** Vault contract address. */ vault: IAddress; /** * Receiver address — passed to ERC-4626 `maxDeposit(address)` on single- * asset vaults. Ignored by EVM-2 multi-asset vaults which expose a vault- * level `maxDepositAmount()` without a receiver argument. */ receiver?: IAddress; }; /** * Preview the number of shares that would be minted for a deposit, without * touching on-chain state. Routes between single-asset ERC-4626 and EVM-2 * multi-asset vaults using the vault version detected from backend metadata. * * @returns The number of shares (raw on-chain units, share-token decimals). * @throws AugustValidationError on invalid vault address or amount. * @throws AugustSDKError when the underlying contract call fails. * * @example * ```ts * const shares = await augustSdk.evm.previewDeposit({ * vault: '0xE9B725010A9E419412ed67d0fA5f3A5f40159D32', * amount: 1_000_000n, // 1 USDC (6 decimals) * }); * ``` */ export declare function previewDeposit(signer: IContractRunner, options: IPreviewDepositOptions): Promise; /** * Preview the number of underlying assets returned by redeeming a given * number of shares, without touching on-chain state. Routes between single- * asset ERC-4626 (`previewRedeem`) and EVM-2 multi-asset * (`previewRedemption(shares, isInstant=false)`) using the vault version. * * @returns The assets that would be redeemed (raw on-chain units, asset * decimals). * @throws AugustValidationError on invalid vault or share input. * @throws AugustSDKError when the underlying contract call fails. * * @example * ```ts * const assets = await augustSdk.evm.previewRedeem({ * vault: '0xE9B725010A9E419412ed67d0fA5f3A5f40159D32', * shares: 1_000_000_000_000_000_000n, // 1 share (18 decimals) * }); * ``` */ export declare function previewRedeem(signer: IContractRunner, options: IPreviewRedeemOptions): Promise; /** * Read the ERC-20 allowance an `owner` has granted to a vault (the spender). * If `asset` is omitted, the vault's underlying asset is resolved via * `IERC4626.asset()` and used as the token. * * Returns a raw `bigint` to keep BigInt math precise — call * {@link toNormalizedBn} if you need a UI-shaped {@link INormalizedNumber}. * * @returns Allowance in raw on-chain units of `asset`. * @throws AugustValidationError on invalid addresses. * @throws AugustSDKError when the underlying contract call fails. * * @example * ```ts * const raw = await augustSdk.evm.allowance({ * vault: '0xE9B725010A9E419412ed67d0fA5f3A5f40159D32', * owner: walletAddress, * }); * if (raw < requiredAmount) { * await augustSdk.evm.vaultApprove({ * target: vault, * wallet: walletAddress, * amount: requiredAmount.toString(), * }); * } * ``` */ export declare function allowance(signer: IContractRunner, options: IAllowanceOptions): Promise; /** * Read an ERC-20 balance directly. Returns the raw on-chain value as * `bigint`; call {@link toNormalizedBn} if you need a {@link INormalizedNumber}. * * @returns Balance in raw on-chain units of `asset`. * @throws AugustValidationError on invalid asset / owner addresses. * @throws AugustSDKError when the underlying contract call fails. * * @example * ```ts * const raw = await augustSdk.evm.balanceOf({ * asset: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC * owner: walletAddress, * }); * ``` */ export declare function balanceOf(signer: IContractRunner, options: IBalanceOfOptions): Promise; /** * Read the maximum deposit currently accepted by a vault. Routes between * single-asset ERC-4626 (`maxDeposit(receiver)`) and EVM-2 multi-asset * (`maxDepositAmount()`, vault-level cap, no receiver dependence). * * @returns Max deposit in raw on-chain units of the deposit asset. * @throws AugustValidationError on invalid vault address. * @throws AugustSDKError when the underlying contract call fails. * * @example * ```ts * const cap = await augustSdk.evm.maxDeposit({ vault }); * if (cap === 0n) showVaultIsFullToast(); * ``` */ export declare function maxDeposit(signer: IContractRunner, options: IMaxDepositOptions): Promise; /** Options for {@link getIdleLiquidity}. */ export type IGetIdleLiquidityOptions = { /** EVM-2 (Tokenized Vault V2) vault contract address. */ vault: IAddress; }; /** * Read an EVM-2 vault's idle (uncommitted) liquidity — the balance available * to satisfy an instant redemption without a synchronous recall from the * settlement module, computed as `getTotalAssets() - externalAssets()`. * * EVM-2 only. Two on-chain reads with no caching — call it immediately * before sizing an instant redemption rather than reusing a stale value, and * size the redemption against the result rather than against total assets. * * @returns Idle liquidity, in the vault's reference-asset raw units. * @throws AugustValidationError on invalid vault address or a non-EVM-2 vault. * @throws AugustSDKError when either underlying contract read fails. * * @worstCaseRpcCalls 3 — vault-version lookup, `getTotalAssets`, `externalAssets`. * * @example * ```ts * const idle = await augustSdk.evm.getIdleLiquidity({ vault: vaultAddress }); * if (redeemAmount > idle) { * // fall back to a queued withdrawal instead of an instant one * } * ``` */ export declare function getIdleLiquidity(signer: IContractRunner, options: IGetIdleLiquidityOptions): Promise; /** Options for {@link lagDuration}. */ export type ILagDurationOptions = { /** EVM-2 (Tokenized Vault V2) vault contract address. */ vault: IAddress; }; /** * Read an EVM-2 vault's queued-withdrawal lag — the delay, in seconds, * between `requestRedeem` and the withdrawal epoch becoming claimable. * * EVM-2 only. This value is per-vault (259,200s / 3 days on sentUSD, but * shorter on other deployments) and can change after launch — read it live * rather than hardcoding it. * * @returns Lag duration, in seconds. * @throws AugustValidationError on invalid vault address or a non-EVM-2 vault. * @throws AugustSDKError when the underlying contract read fails. * * @worstCaseRpcCalls 2 — vault-version lookup, `lagDuration`. * * @example * ```ts * const seconds = await augustSdk.evm.lagDuration({ vault: vaultAddress }); * ``` */ export declare function lagDuration(signer: IContractRunner, options: ILagDurationOptions): Promise; /** Options for {@link getWithdrawalEpoch}. */ export type IGetWithdrawalEpochOptions = { /** EVM-2 (Tokenized Vault V2) vault contract address. */ vault: IAddress; }; /** An EVM-2 vault's current withdrawal epoch, as read from `getWithdrawalEpoch()`. */ export type IWithdrawalEpoch = { year: bigint; month: bigint; day: bigint; /** Unix timestamp at which the current epoch's queued withdrawals become claimable. */ claimableEpoch: bigint; }; /** * Read an EVM-2 vault's current withdrawal epoch. * * The on-chain return order is `(year, month, day, claimableEpoch)` — * `claimableEpoch` last, not first. This is the opposite order from what * `requestRedeem` returns (`(claimableEpoch, year, month, day)`, epoch * first); treat that call's return value, not this one, as the source of * truth for a specific withdrawal's claim date. * * @returns The vault's current withdrawal epoch, by named field. * @throws AugustValidationError on invalid vault address or a non-EVM-2 vault. * @throws AugustSDKError when the underlying contract read fails. * * @worstCaseRpcCalls 2 — vault-version lookup, `getWithdrawalEpoch`. * * @example * ```ts * const { year, month, day, claimableEpoch } = await augustSdk.evm.getWithdrawalEpoch({ * vault: vaultAddress, * }); * ``` */ export declare function getWithdrawalEpoch(signer: IContractRunner, options: IGetWithdrawalEpochOptions): Promise; /** Options shared by the EVM-2 queued-withdrawal-date reads. */ type IWithdrawalDateOptions = { /** EVM-2 (Tokenized Vault V2) vault contract address. */ vault: IAddress; /** Withdrawal-epoch year, as returned by `requestRedeem`/`getWithdrawalEpoch`. */ year: string | bigint | number; /** Withdrawal-epoch month, same source as `year`. */ month: string | bigint | number; /** Withdrawal-epoch day, same source as `year`. */ day: string | bigint | number; }; /** Options for {@link getBurnableAmountByReceiver}. */ export type IGetBurnableAmountByReceiverOptions = IWithdrawalDateOptions & { /** Address whose claimable amount for this date is being queried. */ receiver: IAddress; }; /** * Read how much of a withdrawal-epoch date's queue a given receiver can * currently claim via `claim`, before sending the claim transaction. * * EVM-2 only. * * @returns The claimable amount, in share-token raw units. * @throws AugustValidationError on invalid address input or a non-EVM-2 vault. * @throws AugustSDKError when the underlying contract read fails. * * @worstCaseRpcCalls 2 — vault-version lookup, `getBurnableAmountByReceiver`. * * @example * ```ts * const claimable = await augustSdk.evm.getBurnableAmountByReceiver({ * vault: vaultAddress, * receiver: walletAddress, * year, month, day, * }); * ``` */ export declare function getBurnableAmountByReceiver(signer: IContractRunner, options: IGetBurnableAmountByReceiverOptions): Promise; /** Options for {@link getRequirementByDate}. */ export type IGetRequirementByDateOptions = IWithdrawalDateOptions; /** * Read the total shares required to settle a withdrawal-epoch date's entire * queue. * * EVM-2 only. * * @returns Required shares, in share-token raw units. * @throws AugustValidationError on invalid vault address or a non-EVM-2 vault. * @throws AugustSDKError when the underlying contract read fails. * * @worstCaseRpcCalls 2 — vault-version lookup, `getRequirementByDate`. * * @example * ```ts * const shares = await augustSdk.evm.getRequirementByDate({ * vault: vaultAddress, * year, month, day, * }); * ``` */ export declare function getRequirementByDate(signer: IContractRunner, options: IGetRequirementByDateOptions): Promise; /** Options for {@link getScheduledTransactionsByDate}. */ export type IGetScheduledTransactionsByDateOptions = IWithdrawalDateOptions; /** Scheduled queued-withdrawal volume for a withdrawal-epoch date. */ export type IScheduledTransactionsByDate = { totalTransactions: bigint; /** Unix timestamp this date's queue is scheduled to execute. */ executionEpoch: bigint; }; /** * Read the scheduled queued-withdrawal volume for a withdrawal-epoch date. * * EVM-2 only. * * @returns Total scheduled transactions and their execution epoch. * @throws AugustValidationError on invalid vault address or a non-EVM-2 vault. * @throws AugustSDKError when the underlying contract read fails. * * @worstCaseRpcCalls 2 — vault-version lookup, `getScheduledTransactionsByDate`. * * @example * ```ts * const { totalTransactions, executionEpoch } = * await augustSdk.evm.getScheduledTransactionsByDate({ * vault: vaultAddress, * year, month, day, * }); * ``` */ export declare function getScheduledTransactionsByDate(signer: IContractRunner, options: IGetScheduledTransactionsByDateOptions): Promise; export {};