EarnClient class abstract
Yield vault discovery, positions, rewards, deposits, withdrawals, and reward claims. Implemented by EarnClientImpl; hosts can substitute this interface in tests.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
claimRewards(
String vaultId, String ownerAddress, [bool? sponsored]) → Future< YieldTransactionResult> - Claims accrued vault rewards and returns the transaction hash.
-
configure(
) → void - Installs Earn with its EVM transaction executor.
-
deposit(
String vaultId, String ownerAddress, String amount, [String? receiverAddress, bool? sponsored]) → Future< YieldTransactionResult> - Deposits into a yield vault and returns the transaction hash.
-
getDetails(
String vaultId) → Future< YieldVaultDetails> - Gets registry and live protocol data for one vault.
-
getEarnings(
String ownerAddress, String chainId) → Future< YieldEarnings> - Gets a wallet's indexed earnings on one EVM chain.
-
getPerformance(
String vaultId, String ownerAddress) → Future< YieldVaultPositionPerformance> - Gets a wallet's indexed performance in one vault.
-
getPosition(
String vaultId, String ownerAddress) → Future< YieldVaultPosition> - Gets a wallet's live position in one vault.
-
getRewards(
String vaultId, String ownerAddress) → Future< List< YieldVaultReward> > - Gets a wallet's accrued rewards in one vault.
-
listVaults(
) → Future< List< YieldVaultSummary> > - Lists yield vaults available to this environment.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withdraw(
String vaultId, String ownerAddress, String amount, [String? receiverAddress, bool? sponsored]) → Future< YieldTransactionResult> - Withdraws from a yield vault and returns the transaction hash.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited