mirror of
https://github.com/d0zingcat/solana-agent-kit.git
synced 2026-05-22 07:36:44 +00:00
add airdrop
This commit is contained in:
@@ -17,7 +17,6 @@ import {
|
||||
getTokenDataByAddress,
|
||||
getTokenDataByTicker,
|
||||
stakeWithJup,
|
||||
createCompressedAirdrop,
|
||||
sendCompressedAirdrop,
|
||||
} from "../tools";
|
||||
import { CollectionOptions, PumpFunTokenOptions } from "../types";
|
||||
@@ -142,17 +141,20 @@ export class SolanaAgentKit {
|
||||
return stakeWithJup(this, amount);
|
||||
}
|
||||
|
||||
async airdropCompressedTokens(
|
||||
async sendCompressedAirdrop(
|
||||
mintAddress: string,
|
||||
amount: number,
|
||||
recipients: string[]
|
||||
) {
|
||||
await createCompressedAirdrop(
|
||||
recipients: string[],
|
||||
priorityFeeInLamports: number,
|
||||
shouldLog: boolean
|
||||
): Promise<string[]> {
|
||||
return await sendCompressedAirdrop(
|
||||
this,
|
||||
new PublicKey(mintAddress),
|
||||
BigInt(amount),
|
||||
recipients.map((recipient) => new PublicKey(recipient))
|
||||
amount,
|
||||
recipients.map((recipient) => new PublicKey(recipient)),
|
||||
priorityFeeInLamports,
|
||||
shouldLog
|
||||
);
|
||||
return await sendCompressedAirdrop(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user