githubEdit

book-openUsage

How to install and use @tetherto/wdk-protocol-lending-aave-evm on EVM

Installation

npm install @tetherto/wdk-protocol-lending-aave-evm

Quick Start

Setting Up the Lending Service

import AaveProtocolEvm from '@tetherto/wdk-protocol-lending-aave-evm'
import { WalletAccountEvm } from '@tetherto/wdk-wallet-evm'

const seedPhrase = 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about';

// Create account (m/44'/60'/0'/0/0)
const account = new WalletAccountEvm(seedPhrase, "0'/0/0", {
    provider: 'https://ethereum-rpc.publicnode.com'
})

// Create lending service
const aave = new AaveProtocolEvm(account)

Supply / Withdraw / Borrow / Repay

circle-info

Prerequisites: To use supply, withdraw, borrow, or repay operations, your wallet needs:

  1. Token balance — hold the token you want to supply or repay

  2. Native token for gas fees — ETH (or the chain's native token) to pay transaction fees

This module only supports mainnet deployments. See Supported Networks for the full list.

Use the contract address of any Aave-supported tokenarrow-up-right. For example, USD₮ on Ethereum Mainnet:

Quotes Before Sending

ERC‑4337 Smart Accounts

Reading Account Data

Error Handling

Complete Example


Need Help?