feat: include Voltr into readme

This commit is contained in:
jakeyvee
2025-01-15 21:21:13 +08:00
parent 04cd1b2e28
commit 2971bdaef4
2 changed files with 33 additions and 1 deletions

View File

@@ -471,6 +471,38 @@ Update the address a drift vault is delegated to.
const signature = await agent.updateDriftVaultDelegate("41Y8C4oxk4zgJT1KXyQr35UhZcfsp5mP86Z2G7UUzojU", "new-address")
```
### Get Voltr Vault Position Values
Get the current position values and total value of assets in a Voltr vault.
```typescript
const values = await agent.voltrGetPositionValues("7opUkqYtxmQRriZvwZkPcg6LqmGjAh1RSEsVrdsGDx5K")
```
### Deposit into Voltr Strategy
Deposit assets into a specific strategy within a Voltr vault.
```typescript
const signature = await agent.voltrDepositStrategy(
new BN("1000000000"), // amount in base units (e.g., 1 USDC = 1000000)
"7opUkqYtxmQRriZvwZkPcg6LqmGjAh1RSEsVrdsGDx5K", // vault
"9ZQQYvr4x7AMqd6abVa1f5duGjti5wk1MHsX6hogPsLk" // strategy
)
```
### Withdraw from Voltr Strategy
Withdraw assets from a specific strategy within a Voltr vault.
```typescript
const signature = await agent.voltrWithdrawStrategy(
new BN("1000000000"), // amount in base units (e.g., 1 USDC = 1000000)
"7opUkqYtxmQRriZvwZkPcg6LqmGjAh1RSEsVrdsGDx5K", // vault
"9ZQQYvr4x7AMqd6abVa1f5duGjti5wk1MHsX6hogPsLk" // strategy
)
```
## Examples
### LangGraph Multi-Agent System

View File

@@ -52,7 +52,7 @@
"@sqds/multisig": "^2.1.3",
"@tensor-oss/tensorswap-sdk": "^4.5.0",
"@tiplink/api": "^0.3.1",
"@voltr/vault-sdk": "^0.1.1",
"@voltr/vault-sdk": "^0.1.1",
"ai": "^4.0.22",
"bn.js": "^5.2.1",
"bs58": "^6.0.0",