checkOrCreateAtaBatch()
checkOrCreateAtaBatch()
function checkOrCreateAtaBatch(
connection,
owners,
mint,
invoker,
programId?,
payer?): Promise<TransactionInstruction[]>;Defined in: utils.ts:539
Utility function that checks whether associated token accounts exist and return instructions to populate them if not
Parameters
| Parameter | Type | Description |
|---|---|---|
connection | Connection | Solana client connection |
owners | PublicKey[] | Array of ATA owners |
mint | PublicKey | Mint for which ATA will be checked |
invoker | { publicKey: PublicKey; } | Transaction invoker and payer |
invoker.publicKey | PublicKey | - |
programId? | PublicKey | Program ID of the Mint |
payer? | PublicKey | optional payer account, will be used instead of invoker as source |
Returns
Promise<TransactionInstruction[]>
Array of Transaction Instructions that should be added to a transaction