const feePayer = Keypair.fromSecretKey( bs58.decode( privateKey ) ); const airdropSig = await connection.requestAirdrop( feePayer.publicKey, 1000000000 ); await connection.confirmTransaction(airdropSig); const alice = Keypair.fromSecretKey( bs58.decode( privateKey ) ); const mintPubkey = new PublicKey( "AHAXf2nFJCJvvvkL34tDVoTuSRhVdPSNQUsiqFs4dtZ5" ); { let ata = await createAssociatedTokenAccountIdempotent( connection, // connection feePayer, // fee payer mintPubkey, // mint alice.publicKey, // owner undefined, TOKEN_2022_PROGRAM_ID ); console.log(`ATA: ${ata.toBase58()}`); }