// SPDX-License-Identifier: MIT pragma solidity ^0.8.30; /// @title IAPN /// @notice Redemption surface of an Amish Position Note. An APN is an ERC-4626-style share of a /// single loan: its NAV is the loan's outstanding principal plus the lender's mark-to-market /// accrued interest (read live from the LoanManager) plus the principal-token cash already /// repaid into the note. Redeeming burns shares at `NAV / totalSupply` and pays the /// proportional assets, capped by the cash on hand. interface IAPN { /// @notice The note's net asset value in principal-token base units: illiquid loan claim /// (outstanding principal + lender accrued interest) plus liquid repaid cash. function totalAssets() external view returns (uint256); /// @notice Assets `shares` are currently worth at the mark-to-market share price (uncapped by /// cash; the actual redeemable amount is bounded by {maxRedeem}). function convertToAssets(uint256 shares) external view returns (uint256); /// @notice Shares that `assets` are worth at the current share price — the inverse of /// {convertToAssets}. Applied to the cash on hand, it is the share count {maxRedeem} caps to. function convertToShares(uint256 assets) external view returns (uint256); /// @notice The largest number of shares `owner` can redeem right now — the lesser of their /// balance and the shares whose value the cash on hand can cover. function maxRedeem(address owner) external view returns (uint256); /// @notice Burn `shares` and receive `shares · NAV / totalSupply` of the principal token. Reverts /// if the payout exceeds the cash on hand (redeem fewer, or wait for more repayments). /// @return assets Principal token paid to the caller. function redeem(uint256 shares) external returns (uint256 assets); /// @notice Redeem the caller's full currently-redeemable amount ({maxRedeem}) in one call. /// @return assets Principal token paid to the caller. function redeemMax() external returns (uint256 assets); }