You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constfetch=require('node-fetch');consttransactionId='YOUR_TRANSACTION_ID';// Replace with your transaction IDconstindexerUrl=`https://testnet-api.algonode.cloud/v2/transactions/${transactionId}`;fetch(indexerUrl).then(response=>response.json()).then(data=>{consttransaction=data.transaction;// Check if it's a transferif(transaction.type==='pay'||transaction.type==='axfer'){console.log('Transaction Details:',transaction);// Extract relevant detailsif(transaction.type==='pay'){console.log(`ALGO Transfer: Amount ${transaction.amount} from ${transaction.from} to ${transaction.to}`);}elseif(transaction.type==='axfer'){console.log(`ASA Transfer: Asset ID ${transaction.assetIndex} from ${transaction.from} to ${transaction.to}`);}}else{console.log('No transfer found for this transaction.');}}).catch(error=>{console.error('Error fetching data:',error);});