PUMPFUN TOKEN INTEGRATION

🔥 Pump.fun Token Integration - Complete Guide

Token Address: FwHB1xfXJWRz4ogkEdrt3LX7j9tQYkVwmN8Wi7eupump Platform: pump.fun Chain: Solana Symbol: ENERGY Name: ARAYA Energy

Integration Date: October 16, 2025 Version: 1.0.0

---

The pump.fun token is the official native currency for: 1. Mandem.OS - Virtual environment system 2. Ember Terminal - Gaming/questing platform

---

📍 Token Details

Official Links:

`javascript { address: 'FwHB1xfXJWRz4ogkEdrt3LX7j9tQYkVwmN8Wi7eupump', name: 'ARAYA Energy', symbol: 'ENERGY', decimals: 9, chain: 'solana', platform: 'pump.fun' } `

---

🔧 Integration Components

1. Core File Created

File: pumpfun-token-config.js

Features:

File: /mandem.os/workspace/index.html

Location: Header area, below MGC balance `html

`

Features:

File: /ember-terminal/app.html

Location 1: Above navigation footer `html

`

Location 2: ENERGY Status Bar (Real-time balance display) `html

ENERGY 🔥
0
`

Features:

1. Token Symbol & Logo (top-left) 2. Balance Display (top-right) 3. Price Information (middle) 4. 24h Change (middle-right, color-coded) 5. Trade Button (bottom, links to pump.fun)

Example Widget:

` ╔══════════════════════════════════╗ ║ 🔥 MANDEM 1,234.56 ║ ║ Mandem OS Token Balance ║ ║ ║ ║ Price 24h Change ║ ║ $0.004200 ▲ 15.30% ║ ║ ║ ║ [📈 Trade on Pump.fun] ║ ╚══════════════════════════════════╝ `

---

💻 API Functions

Available Functions:

#### 1. Get Token Price `javascript const priceData = await getTokenPrice(); // Returns: { price, priceUSD, change24h, volume24h, marketCap, holders, transactions24h } `

#### 2. Get Token Balance `javascript const balance = await getTokenBalance(walletAddress); // Returns: Number (token amount) `

#### 3. Format Token Amount `javascript const formatted = formatTokenAmount(1234.5678, 2); // Returns: "1,234.57" `

#### 4. Get Display Info `javascript const info = getTokenDisplayInfo(); // Returns: { symbol, name, logo, color, address, shortAddress, pumpfunUrl } `

#### 5. Initialize Token Widget `javascript await initPumpfunToken('pumpfun-token-container'); // Auto-fetches price, balance, and renders widget `

---

🚀 How It Works

Automatic Initialization:

`javascript // On page load, if container exists document.addEventListener('DOMContentLoaded', () => { if (document.getElementById('pumpfun-token-container')) { initPumpfunToken(); } }); `

Manual Initialization:

`javascript // Call manually with custom container ID await initPumpfunToken('my-custom-container-id'); `

Integration with Wallet Auth:

`javascript // Automatically detects connected wallet if (window.universalWalletAuth && window.universalWalletAuth.isAuthenticated()) { const address = window.universalWalletAuth.getAddress(); const balance = await getTokenBalance(address); // Display balance in widget } `

---

🎮 Use Cases

In Mandem.OS:

1. Rewards: Earn MANDEM tokens for completing tasks 2. Purchases: Buy virtual items with MANDEM 3. Staking: Stake tokens for platform benefits 4. Governance: Vote on platform decisions 5. Trading: Buy/sell on pump.fun directly from UI

In Ember Terminal:

1. Quest Rewards: Complete quests to earn MANDEM 2. Item Purchases: Buy relics, scrolls, and upgrades 3. Trading: Exchange with other players 4. Staking: Lock tokens for bonus stats 5. Leaderboard: Top holders get special status

---

📊 Mock Data (For Testing)

Currently using mock data until live API integration: `javascript { price: 0.000042, // SOL priceUSD: 0.0042, // USD change24h: 15.3, // Percentage volume24h: 125000, // USD marketCap: 420000, // USD holders: 1337, // Number of holders transactions24h: 2450 // 24h transactions } `

---

🔮 Future Enhancements

Phase 2: Live Data

` URL: /mandem.os/workspace/index.html Check: Token widget appears in header `

2. Open Ember Terminal: ` URL: /ember-terminal/app.html Check: Token widget appears above nav footer `

3. Connect Wallet: ` Click: Connect Wallet button Result: Widget shows your balance (mock data for now) `

4. Check Console: ` Open: Browser DevTools (F12) Check: "🔥 Pump.fun Token Config Loaded" Check: Token address logged `

5. Click Trade Button: ` Click: "📈 Trade on Pump.fun" button Result: Opens pump.fun page in new tab URL: https://pump.fun/coin/FwHB1xfXJWRz4ogkEdrt3LX7j9tQYkVwmN8Wi7eupump `

---

📱 Mobile Responsive

Breakpoints:

1. Read-Only: Widget only displays data, doesn't request wallet signatures 2. No Private Keys: Never stores or transmits private keys 3. Safe Links: All pump.fun links are official and verified 4. Mock Data: Currently using mock data (safe for testing) 5. Wallet Integration: Uses existing universal-wallet-auth system

When Live API Enabled:

`javascript // In pumpfun-token-config.js PUMPFUN_TOKEN_CONFIG.color = '#YOUR_COLOR'; PUMPFUN_TOKEN_CONFIG.gradient = 'YOUR_GRADIENT'; PUMPFUN_TOKEN_CONFIG.logo = '🔥'; // Or image URL `

Change Widget Position:

`html
`

Change Update Frequency:

`javascript // Add auto-refresh setInterval(async () => { await initPumpfunToken(); }, 30000); // 30 seconds `

---

📚 Code Examples

Example 1: Basic Integration

`html
🤖 AUL-enabled
`

Example 2: Custom Container

`html

`

Example 3: Manual Balance Display

`javascript // Get balance for specific wallet const balance = await getTokenBalance('YourSolanaAddressHere'); `

Example 4: Price Monitoring

`javascript // Monitor price changes setInterval(async () => { const priceData = await getTokenPrice(); }, 60000); // Every minute `

---

🐛 Troubleshooting

Widget Not Showing:

1. Check container exists: document.getElementById('pumpfun-token-container') 2. Check script loaded: 3. Check console for errors 4. Hard refresh: Ctrl + Shift + F5

Balance Shows 0:

1. Currently using mock data (expected) 2. When live: Check wallet connected 3. Verify Solana address is valid 4. Check console for API errors

Trade Button Not Working:

1. Check popup blocker 2. Verify pump.fun URL is correct 3. Check browser console for errors

---

📞 Support

For Issues:

1. Check browser console (F12) 2. Verify all scripts loaded 3. Test with wallet connected 4. Clear cache and hard refresh

Configuration File:

Platform: pump.fun (Solana) Status: ✅ INTEGRATED Pages: Mandem.OS + Ember Terminal Features: Balance display, price tracking, direct trading link

Next Steps: 1. Test integration on both pages 2. Connect wallet to see mock balance 3. Click trade button to visit pump.fun 4. Ready for Phase 2 (live API integration)

---

Built with 🔥 for Mandem.OS & Ember Terminal Powered by pump.fun on Solana

Token Ready! 🚀💎


← Back to Home