UNPKG

solana-token-extension-boost

Version:

SDK for Solana Token Extensions with wallet adapter support

19 lines (18 loc) 1.12 kB
import { Connection, PublicKey, Signer, Commitment, ConfirmOptions } from '@solana/web3.js'; import { Account } from '@solana/spl-token'; /** * Get or create associated token account for owner and mint * * @param connection Connection to use * @param payer Transaction and initialization fee payer * @param mint Mint associated with the account to establish or verify * @param owner Owner of the account to establish or verify * @param allowOwnerOffCurve Allow the owner account to be a PDA (Program Derived Address) * @param commitment Desired commitment level for the query state * @param confirmOptions Transaction confirmation options * @param programId SPL Token program account * @param associatedTokenProgramId SPL Associated Token program account * * @return Address of the new associated token account */ export declare function getOrCreateTokenAccount(connection: Connection, payer: Signer, mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, commitment?: Commitment, confirmOptions?: ConfirmOptions, programId?: PublicKey, associatedTokenProgramId?: PublicKey): Promise<Account>;