mirror of
https://github.com/d0zingcat/solana-agent-kit.git
synced 2026-05-31 15:11:24 +00:00
merge and docs
This commit is contained in:
49
README.md
49
README.md
@@ -54,11 +54,13 @@ Anyone - whether an SF-based AI researcher or a crypto-native builder - can brin
|
||||
- Jito Bundles
|
||||
- Pyth Price feeds for fetching Asset Prices
|
||||
- Register/resolve Alldomains
|
||||
- Perpetuals Trading with Adrena Protocol
|
||||
|
||||
- **Solana Blinks**
|
||||
- Lending by Lulo (Best APR for USDC)
|
||||
- Send Arcade Games
|
||||
- JupSOL staking
|
||||
- Solayer SOL (sSOL)staking
|
||||
|
||||
- **Non-Financial Actions**
|
||||
- Gib Work for registering bounties
|
||||
@@ -71,6 +73,11 @@ Anyone - whether an SF-based AI researcher or a crypto-native builder - can brin
|
||||
- Memory management for persistent interactions
|
||||
- Streaming responses for real-time feedback
|
||||
|
||||
- **Vercel AI SDK Integration**
|
||||
- Vercel AI SDK for AI agent integration
|
||||
- Framework agnostic support
|
||||
- Quick and easy toolkit setup
|
||||
|
||||
- **Autonomous Modes**
|
||||
- Interactive chat mode for guided operations
|
||||
- Autonomous mode for independent agent actions
|
||||
@@ -168,6 +175,15 @@ const signature = await agent.stake(
|
||||
);
|
||||
```
|
||||
|
||||
### Stake SOL on Solayer
|
||||
|
||||
```typescript
|
||||
const signature = await agent.restake(
|
||||
1 // amount in SOL to stake
|
||||
);
|
||||
|
||||
```
|
||||
|
||||
### Send an SPL Token Airdrop via ZK Compression
|
||||
|
||||
```typescript
|
||||
@@ -205,6 +221,32 @@ const price = await agent.getPythPrice(priceFeedID);
|
||||
console.log("Price of SOL/USD:", price);
|
||||
```
|
||||
|
||||
### Open PERP Trade
|
||||
|
||||
```typescript
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
|
||||
const signature = await agent.openPerpTradeLong({
|
||||
price: 300, // $300 SOL Max price
|
||||
collateralAmount: 10, // 10 jitoSOL in
|
||||
collateralMint: new PublicKey("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"), // jitoSOL
|
||||
leverage: 50000, // x5
|
||||
tradeMint: new PublicKey("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"), // jitoSOL
|
||||
slippage: 0.3, // 0.3%
|
||||
});
|
||||
```
|
||||
|
||||
### Close PERP Trade
|
||||
|
||||
```typescript
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
|
||||
const signature = await agent.closePerpTradeLong({
|
||||
price: 200, // $200 SOL price
|
||||
tradeMint: new PublicKey("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"), // jitoSOL
|
||||
});
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### LangGraph Multi-Agent System
|
||||
@@ -254,7 +296,12 @@ Refer to [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines on how to co
|
||||
|
||||
Apache-2 License
|
||||
|
||||
## Funding
|
||||
|
||||
If you wanna give back any tokens or donations to the OSS community -- The Public Solana Agent Kit Treasury Address:
|
||||
|
||||
Solana Network : EKHTbXpsm6YDgJzMkFxNU1LNXeWcUW7Ezf8mjUNQQ4Pa
|
||||
|
||||
## Security
|
||||
|
||||
This toolkit handles private keys and transactions. Always ensure you're using it in a secure environment and never share your private keys.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user