Skip to content

Commit 02f9291

Browse files
authored
Update Vaults.fyi provider (#883)
* Update Vaults.fyi provider * remove console.log * parse apy in positions * add changeset * resolve comments * update readmes * add default config * remove unused function
1 parent 0a82321 commit 02f9291

15 files changed

Lines changed: 1620 additions & 1224 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@coinbase/agentkit": patch
3+
---
4+
5+
Updated Vaults.fyi provider to use the v2 API

typescript/agentkit/README.md

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -575,25 +575,45 @@ const agent = createReactAgent({
575575
<td width="768">Gets historical APY and TVL data for a specific vault over time.</td>
576576
</tr>
577577
<tr>
578-
<td width="200"><code>deposit</code></td>
579-
<td width="768">Deposits assets into a selected vault to start earning yield.</td>
578+
<td width="200"><code>transaction_context</code></td>
579+
<td width="768">Gets the available balances and operations for a given vault.</td>
580580
</tr>
581581
<tr>
582-
<td width="200"><code>redeem</code></td>
583-
<td width="768">Redeems assets from a vault to withdraw principal and earned yield.</td>
584-
</tr>
585-
<tr>
586-
<td width="200"><code>claim</code></td>
587-
<td width="768">Claims rewards from a vault without withdrawing the principal deposit.</td>
582+
<td width="200"><code>execute_step</code></td>
583+
<td width="768">Executes an operation on a given vault.</td>
588584
</tr>
589585
<tr>
590-
<td width="200"><code>balances</code></td>
591-
<td width="768">Retrieves user's native token and ERC20 token balances across supported networks.</td>
586+
<td width="200"><code>user_idle_assets</code></td>
587+
<td width="768">Gets the user's idle assets.</td>
592588
</tr>
593589
<tr>
594590
<td width="200"><code>positions</code></td>
595591
<td width="768">Gets user's current positions in vaults including balances and unclaimed rewards.</td>
596592
</tr>
593+
<tr>
594+
<td width="200"><code>rewards_context</code></td>
595+
<td width="768">Gets the available rewards for a given user.</td>
596+
</tr>
597+
<tr>
598+
<td width="200"><code>claim_rewards</code></td>
599+
<td width="768">Claims requested rewards for a given user.</td>
600+
</tr>
601+
<tr>
602+
<td width="200"><code>benchmark_apy</code></td>
603+
<td width="768">Gets the benchmark APY.</td>
604+
</tr>
605+
<tr>
606+
<td width="200"><code>historical_benchmark_apy</code></td>
607+
<td width="768">Gets the historical benchmark APY.</td>
608+
</tr>
609+
<tr>
610+
<td width="200"><code>total_vault_returns</code></td>
611+
<td width="768">Gets the total returns for a given vault.</td>
612+
</tr>
613+
<tr>
614+
<td width="200"><code>user_events</code></td>
615+
<td width="768">Gets the user's events for a given vault.</td>
616+
</tr>
597617
</table>
598618
</details>
599619
<details>

typescript/agentkit/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@
4545
"@coinbase/cdp-sdk": "^1.38.0",
4646
"@coinbase/coinbase-sdk": "^0.20.0",
4747
"@coinbase/x402": "^0.6.3",
48+
"@ensofinance/sdk": "^2.0.6",
4849
"@jup-ag/api": "^6.0.39",
4950
"@privy-io/public-api": "2.18.5",
5051
"@privy-io/server-auth": "1.18.4",
5152
"@solana/kit": "^2.1.1",
5253
"@solana/spl-token": "^0.4.12",
5354
"@solana/web3.js": "^1.98.1",
55+
"@vaultsfyi/sdk": "^2.1.9",
5456
"@zerodev/ecdsa-validator": "^5.4.5",
5557
"@zerodev/intent": "^0.0.24",
5658
"@zerodev/sdk": "^5.4.28",
@@ -67,9 +69,8 @@
6769
"opensea-js": "^7.1.18",
6870
"reflect-metadata": "^0.2.2",
6971
"sushi": "6.2.1",
70-
"@ensofinance/sdk": "^2.0.6",
7172
"twitter-api-v2": "^1.18.2",
72-
"viem": "^2.22.16",
73+
"viem": "2.38.3",
7374
"x402": "^0.6.0",
7475
"x402-axios": "^0.6.0",
7576
"zod": "^3.23.8"

typescript/agentkit/src/action-providers/vaultsfyi/README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,25 @@ vaultsfyi/
1515
├── schemas.ts # Action schemas and types
1616
├── constants.ts # Provider constants
1717
├── utils.ts # Provider utility functions
18-
├── /api
19-
├── actions.ts # vaultsfyi transactional API actions
20-
├── types.ts # vaultsfyi API types
21-
├── vaults.ts # vaults list getter
22-
├── historicalData.ts # vaults historical data getter
18+
├── sdk.ts # vaultsfyi SDK client
2319
├── index.ts # Package exports
2420
└── README.md # Documentation (this file)
2521
```
2622

2723
## Actions
2824
- `vaults`: Get the list of available vaults on vaultsfyi.
2925
- `vault_details`: Get details of a specific vault.
30-
- `historical_data`: Get historical data for a specific vault.
31-
- `deposit`: Deposit assets into a vault.
32-
- `redeem`: Redeem assets from a vault.
33-
- `claim`: Claim rewards from a vault.
34-
- `user-wallet-balances`: Get the user's native token and compatible ERC20 token balances.
35-
- `positions`: Get the user's positions in vaults.
26+
- `vault_historical_data`: Get historical data for a specific vault.
27+
- `transaction_context`: Get the transaction context for a vault.
28+
- `execute_step`: Execute a step in a vault.
29+
- `user_idle_assets`: Get the user's idle assets.
30+
- `positions`: Get the user's positions.
31+
- `rewards_context`: Get the rewards context.
32+
- `claim_rewards`: Claim rewards.
33+
- `benchmark_apy`: Get the benchmark APY.
34+
- `historical_benchmark_apy`: Get the historical benchmark APY.
35+
- `total_vault_returns`: Get the total returns for a vault.
36+
- `user_events`: Get the user's events for a vault.
3637

3738
## Network Support
3839
This provider supports selected evm networks.

typescript/agentkit/src/action-providers/vaultsfyi/api/actions.ts

Lines changed: 0 additions & 66 deletions
This file was deleted.

typescript/agentkit/src/action-providers/vaultsfyi/api/historicalData.ts

Lines changed: 0 additions & 71 deletions
This file was deleted.

typescript/agentkit/src/action-providers/vaultsfyi/api/types.ts

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)