Optional
signer: Ed25519AccountBuilds a transaction for the specified user, function, and arguments.
The account address of the user initiating the transaction.
The identifier of the Move function to be called.
An array of arguments for the entry function.
A promise that resolves to a SimpleTransaction object.
Calculates the current liquidity rate and current variable borrow rate for a given reserve.
The amount of unbacked assets.
The amount of liquidity added to the reserve.
The amount of liquidity taken from the reserve.
The reserve factor.
The address of the reserve account.
The virtual balance of the aToken underlying.
An object containing the current liquidity rate and current variable borrow rate.
Calls a view method on the Aptos blockchain.
The identifier of the function to call.
The arguments to pass to the function.
Optional generic type arguments for the function (e.g. ["0x1::aptos_coin::AptosCoin"]
).
Funds an account with a specified amount.
The address of the account to be funded.
The amount to fund the account with, in bigint.
A promise that resolves to a UserTransactionResponse.
Retrieves the Aptos balance of a specified account.
The Ed25519 account object.
The address of the account to retrieve the balance for.
Optional
versionToWaitFor: bigint(Optional) The specific version to wait for before retrieving the balance.
A promise that resolves to the balance of the account in bigint.
Retrieves the base variable borrow rate for a given asset.
The account address of the asset.
A promise that resolves to the base variable borrow rate as a bigint.
Retrieves events associated with a specific account.
The address of the account to retrieve events for.
The maximum number of events to retrieve.
A promise that resolves to an array of event objects, each containing:
account_address
: The address of the account.creation_number
: The creation number of the event.data
: The data associated with the event.event_index
: The index of the event.sequence_number
: The sequence number of the event.transaction_block_height
: The block height of the transaction.transaction_version
: The version of the transaction.type
: The type of the event.indexed_type
: The indexed type of the event.Retrieves the maximum variable borrow rate for a given asset.
The account address of the asset.
A promise that resolves to the maximum variable borrow rate as a bigint.
Retrieves the optimal usage ratio for a given asset.
The account address of the asset for which to get the optimal usage ratio.
A promise that resolves to the optimal usage ratio as a bigint.
Returns the full InterestRateData object for the given reserve, in ray
The address of the reserve account.
The InterestRateDataRay object for the given reserve.
Returns the full InterestRateData object for the given reserve, in bps
The address of the reserve account.
The InterestRateDataRay object for the given reserve.
Retrieves the current Ed25519Account signer.
The current signer.
Retrieves the events associated with a given transaction hash.
The hash of the transaction to retrieve events for.
A promise that resolves to an array of objects containing the event data.
Retrieves the variable rate slope 1 for a given asset.
The address of the asset for which to get the variable rate slope 1.
A promise that resolves to a bigint representing the variable rate slope 1 of the specified asset.
Retrieves the variable rate slope 2 for a given asset.
The address of the asset for which to get the variable rate slope 2.
A promise that resolves to the variable rate slope 2 as a bigint.
Sends a transaction and awaits the response.
The ID of the Move function to be called.
An array of arguments for the entry function.
A promise that resolves to the committed transaction response.
Sets the interest rate strategy for a given reserve asset.
The address of the reserve asset.
The optimal usage ratio for the reserve.
The base variable borrow rate for the reserve.
The first slope of the variable rate for the reserve.
The second slope of the variable rate for the reserve.
A promise that resolves to a CommittedTransactionResponse
object.
Sets the signer for the client.
The Ed25519 account to be used as the signer.
Sets the signer to the module signer and returns the current instance.
The current instance with the module signer set.
Sets the signer for the current instance using the provided Ed25519 account.
The Ed25519 account to be used as the signer.
The current instance with the signer set.
Static
buildCreates an instance of InterestRateClient
using the default signer provided by the AptosProvider
.
An instance of AptosProvider
which provides the necessary configurations and signer.
A new instance of InterestRateClient
initialized with the default signer.
The
InterestRateClient
class provides methods to interact with the interest rate management system of the Aave protocol on the Aptos blockchain. It extends theAptosContractWrapperBaseClass
and includes functionalities for configuring and calculating interest rates, managing rate strategies, and retrieving rate parameters for assets.Remarks
This client is designed to work with the interest rate contracts and provides a high-level API for interest rate operations. The client can be instantiated in two ways:
Example
Param: provider
The AptosProvider instance used to interact with the Aptos blockchain.
Param: signer
Optional Ed25519Account signer for transaction signing.