Configuration
Configuration options and settings for @tetherto/wdk-protocol-lending-aave-evm
Service Setup
import AaveProtocolEvm from '@tetherto/wdk-protocol-lending-aave-evm'
import { WalletAccountEvm } from '@tetherto/wdk-wallet-evm'
// Create wallet account first
const account = new WalletAccountEvm(seedPhrase, "0'/0/0", {
provider: 'https://ethereum-rpc.publicnode.com'
})
// Create lending service
const aave = new AaveProtocolEvm(account)Account Configuration
The service uses the wallet account configuration to connect to the target network and sign transactions.
import { WalletAccountEvm, WalletAccountReadOnlyEvm } from '@tetherto/wdk-wallet-evm'
// Full access account
const account = new WalletAccountEvm(seedPhrase, "0'/0/0", {
provider: 'https://ethereum-rpc.publicnode.com'
})
// Read-only account (quotes, reads)
const readOnly = new WalletAccountReadOnlyEvm('0xYourAddress', {
provider: 'https://ethereum-rpc.publicnode.com'
})
const aave = new AaveProtocolEvm(account)ERC‑4337 (Account Abstraction)
When using ERC‑4337 smart accounts, you can optionally specify a paymasterToken per operation to sponsor gas.
Network Support
Aave V3 spans multiple EVM chains (Ethereum, Arbitrum, Base, Optimism, Polygon, Avalanche, BNB, Celo, Gnosis, Linea, Scroll, Soneium, Sonic, ZkSync, Metis). Ensure the correct RPC and token addresses for the target chain.
Operation Options
Each operation accepts a simple options object:
Common Parameters
token(string): ERC‑20 token addressamount(bigint): token amount in base unitsonBehalfOf(string, optional): another address to act for (supply/borrow/repay)to(string, optional): destination address (withdraw)
Note:
amountmust be > 0. Addresses must be valid/non‑zero. A provider is required for any write.

