AeternumAeternum
Back to App

Read Functions

All view functions — isRegistered, getRecoveryConfig, isRecoveryDue, getTimeUntilRecovery, and more.


All functions on this page are view — they read state without modifying it and cost no gas when called off-chain. They are safe to call at any frequency from a frontend or indexer.


view

isRegistered

isRegistered(address wallet) external view returns (bool)

Returns true if the given address currently has an active, registered vault. Returns false for unregistered addresses, abandoned vaults, and canceled vaults.

Returns

bool — true if the wallet has an active vault, false otherwise.


view

getRecoveryConfig

getRecoveryConfig(address wallet) external view returns (RecoveryConfig memory)

Returns the full vault configuration for the given address. This is the primary data-fetch function for frontends — one call returns all vault state. Returns a zero-value struct (all fields at their default values) for unregistered addresses.

Returns

RecoveryConfig struct: { backupAddress, inactivityPeriod, lastActivity, balance, isActive, failedRecoveryAttempts, isAbandoned }


view

isRecoveryDue

isRecoveryDue(address wallet) external view returns (bool)

Returns true if a vault is currently eligible for recovery — meaning it is active, holds a non-zero ETH balance, and the inactivity period has fully elapsed since the last interaction. This is the function the Aeternum keeper bot calls, batched via multicall, to re-validate database candidates on-chain before submitting triggerRecovery. It's also useful directly for frontends, dashboards, and monitoring tools that want to surface a vault's status without decoding the full config.

Returns

bool — true if the vault is due for recovery, false otherwise.


view

getTimeUntilRecovery

getTimeUntilRecovery(address wallet) external view returns (uint256)

Returns the number of seconds remaining before the vault becomes eligible for recovery. Returns 0 if recovery is already due or if the vault is not registered/has no balance. Used by the frontend to drive the countdown timer display.

Returns

uint256 — seconds remaining until recovery eligibility. 0 if already due or vault is inactive/empty.


view

isBackupAbandoned

isBackupAbandoned(address backup) external view returns (bool)

Returns true if the given address has been permanently blocked as a backup address after failing to receive ETH across MAX_RECOVERY_ATTEMPTS consecutive recovery attempts. Any registration or backup update pointing to a blocked address will be rejected by the contract.

Returns

bool — true if permanently blocked, false if safe to use.


view

getRegisteredWallets

getRegisteredWallets(uint256 start, uint256 end) external view returns (address[] memory)

Returns a paginated slice of the registered wallets array. The end index is clamped to the array length if out of bounds, so passing a large end value safely returns everything from start to the last element. Used by off-chain tools and indexers to enumerate all currently monitored vaults.

Returns

address[] — slice of registered wallet addresses from index start to end.


view

getTotalRegistered

getTotalRegistered() external view returns (uint256)

Returns the total number of wallets currently registered and active in the protocol. This is the length of the internal registry array.

Returns

uint256 — count of active registered vaults.


view

getTriggerableVaultsBatch

getTriggerableVaultsBatch(uint256 startIndex, uint256 batchSize) external view returns (address[] memory triggerable)

Returns the subset of registered wallets — within the given index window — that are currently eligible for recovery. Stateless and permissionless: each call is explicitly parameterized by the caller, with no persistent scan position tracked on-chain. It is available to any tool that wants due-wallet data sourced directly from chain state without running an indexer.

Returns

address[] — wallet addresses currently eligible for recovery within [startIndex, startIndex + batchSize). Empty array if none are due in the requested range.