mirror of
https://github.com/d0zingcat/solana-agent-kit.git
synced 2026-05-13 23:16:55 +00:00
remove unnecessary imports, rename to send_compressed_airdrop
This commit is contained in:
@@ -28,19 +28,14 @@
|
||||
"@metaplex-foundation/umi-web3js-adapters": "^0.9.2",
|
||||
"@solana/spl-token": "^0.4.9",
|
||||
"@solana/web3.js": "^1.95.4",
|
||||
"better-sqlite3": "^11.7.0",
|
||||
"bs58": "^6.0.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"drizzle-orm": "^0.38.2",
|
||||
"form-data": "^4.0.1",
|
||||
"helius-airship-core": "file:../airship/packages/core",
|
||||
"langchain": "^0.3.6",
|
||||
"openai": "^4.75.0",
|
||||
"sqlocal": "^0.13.0",
|
||||
"typedoc": "^0.26.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/better-sqlite3": "^7.6.12",
|
||||
"@types/node": "^22.9.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.7.2"
|
||||
|
||||
770
pnpm-lock.yaml
generated
770
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -702,15 +702,15 @@ export class SolanaTokenDataByTickerTool extends Tool {
|
||||
}
|
||||
}
|
||||
|
||||
export class SolanaAirdropCompressedTokensTool extends Tool {
|
||||
name = "solana_airdrop_compressed_tokens";
|
||||
description = `Airdrop tokens with zk compression
|
||||
export class SolanaCompressedAirdropTool extends Tool {
|
||||
name = "solana_compressed_airdrop";
|
||||
description = `Airdrop SPL tokens with ZK Compression
|
||||
|
||||
Inputs:
|
||||
- mintAddress: string, the mint address of the token, e.g., "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN"
|
||||
- amount: number, the amount of tokens to airdrop per recipient, e.g., 42
|
||||
- recipients: string[], the recipient addresses, e.g., ["JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN", "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN"]
|
||||
- priorityFeeInLamports: number, the priority fee in lamports, e.g., 10_000. Default is 30_000.
|
||||
- recipients: string[], the recipient addresses, e.g., ["1nc1nerator11111111111111111111111111111111", "1nc1nerator11111111111111111111111111111111"]
|
||||
- priorityFeeInLamports: number, the priority fee in lamports. Default is 30_000.
|
||||
`;
|
||||
|
||||
constructor(private solanaKit: SolanaAgentKit) {
|
||||
@@ -765,6 +765,6 @@ export function createSolanaTools(solanaKit: SolanaAgentKit) {
|
||||
new SolanaGetDomainTool(solanaKit),
|
||||
new SolanaTokenDataTool(solanaKit),
|
||||
new SolanaTokenDataByTickerTool(solanaKit),
|
||||
new SolanaAirdropCompressedTokensTool(solanaKit),
|
||||
new SolanaCompressedAirdropTool(solanaKit),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -14,4 +14,4 @@ export * from "./get_tps";
|
||||
export * from "./get_token_data";
|
||||
export * from "./stake_with_jup";
|
||||
export * from "./fetch_price";
|
||||
export * from "./airdrop_compressed_tokens";
|
||||
export * from "./send_compressed_airdrop";
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
PublicKey,
|
||||
TransactionInstruction,
|
||||
} from "@solana/web3.js";
|
||||
import { SolanaAgentKit } from "../../agent/index.js";
|
||||
import { SolanaAgentKit } from "../agent/index.js";
|
||||
import {
|
||||
buildAndSignTx,
|
||||
calculateComputeUnitPrice,
|
||||
@@ -81,6 +81,7 @@ export async function sendCompressedAirdrop(
|
||||
shouldLog
|
||||
);
|
||||
}
|
||||
|
||||
async function processAll(
|
||||
agent: SolanaAgentKit,
|
||||
amount: number,
|
||||
Reference in New Issue
Block a user