翻译:
与 AaveKit API 互动的 CLI
使用量
$ npm install -g @aave/cli
$ aave COMMAND
running command...
$ aave (--version)
@aave/cli/4.2.0 linux-x64 node-v22.22.2
$ aave --help [COMMAND]
USAGE
$ aave COMMAND
...
图标
aave action borrowaave action claim-rewardsaave action repayaave action supplyaave action swap tokenaave action withdrawaave hubs listaave reserveaave reserves holdersaave reserves listaave spokes listaave user balanceaave user borrowsaave user positionsaave user rewardsaave user summaryaave user supplies
aave action borrow
从准备金借入ERC20令牌
USAGE
$ aave action borrow --reserve-id <value> --amount <value> [--json] [-k <private-key>]
FLAGS
-k, --private-key=<private-key> Private key to sign transactions (overrides PRIVATE_KEY env var)
--amount=<value> (required) Amount of the token to borrow
--reserve-id=<value> (required) Reserve ID of the reserve to borrow from
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Borrow ERC20 tokens from a reserve
参见代码 : src/命令/动作/借阅. ts
aave action claim-rewards
当前钱包的索赔奖励
USAGE
$ aave action claim-rewards -c <chain-id> [--json] [--ids <value>] [-k <private-key>]
FLAGS
-c, --chain_id=<chain-id> (required) Chain ID to claim rewards on
-k, --private-key=<private-key> Private key to sign transactions (overrides PRIVATE_KEY env var)
--ids=<value> Comma-separated reward IDs to claim (defaults to all claimable rewards for the wallet
on this chain)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Claim rewards for the current wallet
参见代码 : src/commands/action/claim-rewards.ts (中文(简体) )
aave action repay
将ERC20债务还给准备金
USAGE
$ aave action repay --reserve-id <value> --amount <value> [--json] [-k <private-key>]
FLAGS
-k, --private-key=<private-key> Private key to sign transactions (overrides PRIVATE_KEY env var)
--amount=<value> (required) Amount of the token to repay
--reserve-id=<value> (required) Reserve ID of the reserve to repay
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Repay ERC20 debt to a reserve
参见代码 : src/命令/动作/还款
aave action supply
向储备供应ERC20令牌
USAGE
$ aave action supply --reserve-id <value> --amount <value> [--json] [-k <private-key>] [--enable-collateral]
FLAGS
-k, --private-key=<private-key> Private key to sign transactions (overrides PRIVATE_KEY env var)
--amount=<value> (required) Amount of the token to supply
--enable-collateral If provided, the supplied position is enabled as collateral
--reserve-id=<value> (required) Reserve ID of the reserve to supply
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Supply ERC20 tokens to a reserve
参见代码 : src/命令/动作/供应.ts
aave action swap token
使用市场模式将一个令牌换成另一个令牌
USAGE
$ aave action swap token -c <chain-id> --sell-token <value> --buy-token <value> --amount <value> [--json] [--kind
sell|buy] [--quote-only] [--address <evm-address>] [-k <private-key>]
FLAGS
-c, --chain=<chain-id> (required) Chain ID where the token swap will be executed
-k, --private-key=<private-key> Private key to sign transactions (overrides PRIVATE_KEY env var)
--address=<evm-address> User address for quote generation
--amount=<value> (required) Amount to swap
--buy-token=<value> (required) Token address to buy
--kind=<option> [default: sell] Swap amount interpretation
<options: sell|buy>
--quote-only Only fetch and display quote
--sell-token=<value> (required) Token address to sell
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Swap one token for another token using market mode
参见代码 : src/commands/ action/swap/token.ts 命令/动作/移动/移动
aave action withdraw
从保留区撤回 ERC20 令牌
USAGE
$ aave action withdraw --reserve-id <value> --amount <value> [--json] [-k <private-key>]
FLAGS
-k, --private-key=<private-key> Private key to sign transactions (overrides PRIVATE_KEY env var)
--amount=<value> (required) Amount of the token to withdraw
--reserve-id=<value> (required) Reserve ID of the reserve to withdraw from
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Withdraw ERC20 tokens from a reserve
参见代码 : src/命令/动作/撤回.ts
aave hubs list
列表 Aave v4 流动性中心
USAGE
$ aave hubs list [--json] [-c <chain-id>]
FLAGS
-c, --chain=<chain-id> The chain ID (e.g. 1, 137, 42161)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List Aave v4 liquidity hubs
参见代码 : src/commands/hubs/list.ts (中文(简体) )
aave reserve
通过保留 ID 显示 Aave v4 保留细节
USAGE
$ aave reserve -i <value> [--json]
FLAGS
-i, --id=<value> (required) Reserve ID (e.g. SGVsbG8h…)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Show Aave v4 reserve details by reserve ID
参见代码 : src/命令/保留
aave reserves holders
列出保留的顶端持有者
USAGE
$ aave reserves holders -i <value> [--json] [-f SUPPLIED|BORROWED]
FLAGS
-f, --filter=<option> [default: SUPPLIED] Filter by SUPPLIED or BORROWED holders
<options: SUPPLIED|BORROWED>
-i, --id=<value> (required) Reserve ID (e.g. SGVsbG8h…)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List top holders for a reserve
参见代码 : 斜弧/命令/保留地/持有者.ts
aave reserves list
列表 Aave v4 储备
USAGE
$ aave reserves list [--json] [-s <spoke-id>] [-h <hub-id>] [--hub_address <evm-address> -c <chain-id>]
FLAGS
-c, --chain_id=<chain-id> The chain ID (e.g. 1, 137, 42161)
-h, --hub_id=<hub-id> The hub ID (e.g. SGVsbG8h…)
-s, --spoke_id=<spoke-id> The spoke ID (e.g. SGVsbG8h…)
--hub_address=<evm-address> The hub address (e.g. 0x123…)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List Aave v4 reserves
参见代码 : src/命令/保留地/列表.ts
aave spokes list
列表 Aave v4 语句
USAGE
$ aave spokes list [--json] [-h <hub-id>] [--hub_address <evm-address> -c <chain-id>]
FLAGS
-c, --chain_id=<chain-id> The chain ID (e.g. 1, 137, 42161)
-h, --hub_id=<hub-id> The hub ID (e.g. SGVsbG8h…)
--hub_address=<evm-address> The hub address (e.g. 0x123…)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List Aave v4 spokes
参见代码 : src/commands/ speaks/list.ts 互联网档案馆的存檔,存档日期2013-12-02
aave user balance
列出 Aave v4 可使用的用户符号余额
USAGE
$ aave user balance -c <chain-id> [--json] [--address <evm-address>]
FLAGS
-c, --chain_id=<chain-id> (required) Chain ID to query balances from
--address=<evm-address> User address (defaults to PRIVATE_KEY wallet address)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List user token balances that can be used in Aave v4
参见代码 : src/命令/用户/平衡.ts
aave user borrows
列出特定链的用户借入
USAGE
$ aave user borrows -c <chain-id> [--json] [--address <evm-address>]
FLAGS
-c, --chain_id=<chain-id> (required) Chain ID to query borrows from
--address=<evm-address> User address (defaults to PRIVATE_KEY wallet address)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List user borrows for a specific chain
参见代码 : src/命令/用户/借阅
aave user positions
列出跨链的用户位置
USAGE
$ aave user positions -c <chain-id> [--json] [--address <evm-address>]
FLAGS
-c, --chain_id=<chain-id> (required) Filter by chain ID
--address=<evm-address> User address (defaults to PRIVATE_KEY wallet address)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List user positions across chains
参见代码 : src/命令/用户/位置.ts
aave user rewards
为特定链条上的用户列出可要求的奖励
USAGE
$ aave user rewards -c <chain-id> [--json] [--address <evm-address>]
FLAGS
-c, --chain_id=<chain-id> (required) Chain ID to query rewards from
--address=<evm-address> User address (defaults to PRIVATE_KEY wallet address)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List claimable rewards for a user on a specific chain
参见代码 : src/命令/用户/奖励
aave user summary
显示特定链的用户摘要
USAGE
$ aave user summary -c <chain-id> [--json] [--address <evm-address>]
FLAGS
-c, --chain_id=<chain-id> (required) Chain ID to query summary from
--address=<evm-address> User address (defaults to PRIVATE_KEY wallet address)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Show a user summary for a specific chain
参见代码 : src/命令/用户/摘要.ts
aave user supplies
列出特定链条的用户用品
USAGE
$ aave user supplies -c <chain-id> [--json] [--address <evm-address>]
FLAGS
-c, --chain_id=<chain-id> (required) Chain ID to query supplies from
--address=<evm-address> User address (defaults to PRIVATE_KEY wallet address)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List user supplies for a specific chain
参见代码 : src/命令/用户/用户