add airdrop

This commit is contained in:
Swenschaeferjohann
2024-12-20 06:12:30 +00:00
parent e0ff4399df
commit c13ab12aee
7 changed files with 483 additions and 422 deletions

View File

@@ -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);
}
}