Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat(PumpFun): add rendering for first-time GitHub claims with detailed information
nirholasdd3cb6dbb557
diff --git a/public/pumpfun.html b/public/pumpfun.htmlindex 1b9d0adcd..4d32529ea 100644--- a/public/pumpfun.html+++ b/public/pumpfun.html@@ -297,7 +297,7 @@const mcStr = [mcUsd, mcSol].filter(Boolean).join(' / ');const buyStr = ev.initial_buy_sol ? `${fmtSol(ev.initial_buy_sol)}${ev.initial_buy_usd ? ' (' + fmtUsd(ev.initial_buy_usd) + ')' : ''}` : '';const social = [- ev.twitter ? `<a href="https://twitter.com/${encodeURIComponent(ev.twitter.replace('@',''))}" target="_blank" rel="noopener">𝕏 ${escapeHtml(ev.twitter)}</a>` : '',+ ev.twitter ? `<a href="${attr(twitterUrl(ev.twitter))}" target="_blank" rel="noopener">𝕏 ${escapeHtml(twitterLabel(ev.twitter))}</a>` : '',ev.telegram ? `<a href="${attr(ev.telegram)}" target="_blank" rel="noopener">TG</a>` : '',ev.website ? `<a href="${attr(ev.website)}" target="_blank" rel="noopener">🌐</a>` : '',].filter(Boolean).join(' ');@@ -316,14 +316,72 @@</div>`;}+ function fmtUtc(ts) {+ if (ts == null) return '';+ const d = new Date(typeof ts === 'number' ? (ts < 1e12 ? ts * 1000 : ts) : ts);+ if (Number.isNaN(d.getTime())) return '';+ return d.toISOString().replace('T', ' ').replace(/\..+$/, '') + ' UTC';+ }+function renderGraduation(ev) {const mint = ev.mint || '';+ const name = ev.name || ev.symbol || '—';+ const symbol = ev.symbol || '?';+ const age = ev.age || (ev.created_at ? timeAgo(ev.created_at) : '');+ const descRaw = ev.description ? String(ev.description) : '';+ const desc = descRaw ? escapeHtml(descRaw.slice(0, 100)) + (descRaw.length > 100 ? '…' : '') : '';++ const mcInitial = ev.market_cap_usd_initial ?? ev.initial_market_cap_usd ?? ev.market_cap_at_launch;+ const mcCurrent = ev.usd_market_cap ?? ev.market_cap_usd ?? ev.market_cap;+ const mcStr = (mcInitial != null && mcCurrent != null)+ ? `${fmtUsd(mcInitial)} ⇨ ${fmtUsd(mcCurrent)}`+ : (mcCurrent != null ? fmtUsd(mcCurrent) : '');++ const launches = ev.creator_launches;+ const bestToken = Array.isArray(ev.creator_tokens) && ev.creator_tokens.length+ ? ev.creator_tokens.slice().sort((a, b) => (b?.mc || 0) - (a?.mc || 0))[0]+ : null;+ const bestStr = bestToken+ ? `best $${escapeHtml(bestToken.symbol || '?')}${bestToken.mc ? ' ' + fmtUsd(bestToken.mc) : ''}`+ : '';+ const amountStr = ev.amount_sol != null+ ? `${Number(ev.amount_sol).toFixed(2)} SOL${ev.amount_usd != null ? ' [' + fmtUsd(ev.amount_usd) + ']' : ''}`+ : '';+ const devParts = [+ launches != null ? `${launches} launches` : '',+ bestStr,+ amountStr,+ ].filter(Boolean).join(' ⋅ ');++ const m = encodeURIComponent(mint);+ const chartLinks = mint ? [+ `<a href="https://dexscreener.com/solana/${m}" target="_blank" rel="noopener">DEX</a>`,+ `<a href="https://www.defined.fi/sol/${m}" target="_blank" rel="noopener">DEF</a>`,+ ].join('⋅') : '';+ const toolAbbr = mint ? [+ ['AXI', `https://axiom.trade/meme/${mint}`],+ ['GMG', `https://gmgn.ai/sol/token/${mint}`],+ ['PDR', `https://trade.padre.gg/trade/solana/${mint}`],+ ['PHO', `https://photon-sol.tinyastro.io/en/r/@bonk/${mint}`],+ ['BLX', `https://bullx.io/terminal?chainId=1399811149&address=${mint}`],+ ].map(([l, u]) => `<a href="${attr(u)}" target="_blank" rel="noopener">${l}</a>`).join('⋅') : '';++ const tsStr = fmtUtc(ev.timestamp ?? ev.block_time ?? ev.created_at);+ const sig = ev.signature || ev.tx_signature;+return `<div class="evt grad">- <div class="evt-row"><span class="evt-kind">🎓 graduation → Raydium</span></div>- <div class="evt-title">${escapeHtml(ev.name || ev.symbol || '—')}${ev.symbol ? ' — $' + escapeHtml(ev.symbol) : ''}</div>- <div class="evt-links">${toolLinks(mint)}</div>+ <div class="evt-title">🆕💊 ${escapeHtml(name)} — $${escapeHtml(symbol)}${age ? ' [' + escapeHtml(age) + ']' : ''}</div>+ ${desc ? `<div class="evt-desc">${desc}</div>` : ''}+ ${mcStr ? `<div class="evt-amt">💎 MC: ${mcStr}</div>` : ''}+ ${devParts ? `<div class="evt-row2" style="margin-top:6px">👨💻 ${devParts}</div>` : ''}+ ${chartLinks ? `<div class="evt-row2">💹 Chart: ${chartLinks}</div>` : ''}+ ${toolAbbr ? `<div class="evt-row2">🧰 ${toolAbbr}</div>` : ''}<div class="evt-mint">${escapeHtml(mint)}</div>- ${ev.signature ? `<div class="evt-meta"><a href="https://solscan.io/tx/${encodeURIComponent(ev.signature)}" target="_blank" rel="noopener">TX ↗</a></div>` : ''}+ <div class="evt-meta">+ ${sig ? `🔗 <a href="https://solscan.io/tx/${encodeURIComponent(sig)}" target="_blank" rel="noopener">TX</a>` : ''}+ ${mint ? ` · <a href="https://pump.fun/coin/${m}" target="_blank" rel="noopener">pump.fun</a>` : ''}+ ${tsStr ? ` · 🕐 ${escapeHtml(tsStr)}` : ''}+ </div></div>`;}@@ -358,7 +416,7 @@const ghHtml = ghUser ? `<div class="evt-section"><div class="evt-gh">👨💻 <strong>${escapeHtml(ev.github_name || ghUser)}</strong> (<a href="https://github.com/${encodeURIComponent(ghUser)}" target="_blank" rel="noopener">@${escapeHtml(ghUser)}</a>)- ${ev.github_twitter ? ` · <a href="https://twitter.com/${encodeURIComponent(ev.github_twitter)}" target="_blank" rel="noopener">𝕏 ${escapeHtml(ev.github_twitter)}</a>` : ''}</div>+ ${ev.github_twitter ? ` · <a href="${attr(twitterUrl(ev.github_twitter))}" target="_blank" rel="noopener">𝕏 ${escapeHtml(twitterLabel(ev.github_twitter))}</a>` : ''}</div><div class="evt-row2">${ev.github_repos != null ? `<span>📦 ${ev.github_repos} repos</span>` : ''}${ev.github_followers != null ? `<span>👁 ${ev.github_followers} followers</span>` : ''}@@ -452,6 +510,19 @@function shortKey(s) { s = String(s || ''); return s.length > 12 ? `${s.slice(0,4)}…${s.slice(-4)}` : s; }function escapeHtml(s) { return String(s ?? '').replace(/[&<>"']/g, (c) => ({ '&':'&','<':'<','>':'>','"':'"',"'":''' }[c])); }function attr(s) { return escapeHtml(s); }+ function twitterUrl(v) {+ const s = String(v ?? '').trim();+ if (!s) return '';+ if (/^https?:\/\//i.test(s)) return s;+ const handle = s.replace(/^@+/, '').split(/[/?#]/)[0];+ return `https://x.com/${encodeURIComponent(handle)}`;+ }+ function twitterLabel(v) {+ const s = String(v ?? '').trim();+ const m = s.match(/^https?:\/\/(?:www\.)?(?:x|twitter)\.com\/([^/?#]+)/i);+ if (m) return '@' + m[1];+ return s.startsWith('@') ? s : '@' + s.replace(/^@+/, '');+ }// ── Filter changes apply instantly. Mint filter only re-filters; asset/kind/tier remount. ──$('ctl-mint').addEventListener('input', (e) => {diff --git a/src/widgets/pumpfun-feed.js b/src/widgets/pumpfun-feed.jsindex 60ae66b63..66d56626e 100644--- a/src/widgets/pumpfun-feed.js+++ b/src/widgets/pumpfun-feed.js@@ -130,6 +130,9 @@ function addCard(stack, el, max) {}function renderClaim(ev) {+ if (ev.first_time_claim && (ev.github_user || ev.github_repo || ev.github_account_age_days != null)) {+ return renderFirstGithubClaim(ev);+ }const el = document.createElement('div');el.style.cssText = cardStyle(ev.fake_claim ? '#3a1418' : ev.first_time_claim ? '#0d2d1a' : '#161616');const tier = ev.tier ? `${TIER_BADGE[ev.tier] || ''} ${ev.tier}` : '';@@ -146,6 +149,227 @@ function renderClaim(ev) {return el;}+function renderFirstGithubClaim(ev) {+ const el = document.createElement('div');+ el.style.cssText = [+ 'background:linear-gradient(180deg,#0d2d1a 0%,#0a1f14 100%)',+ 'border:1px solid rgba(108,224,200,0.35)',+ 'border-radius:10px',+ 'padding:12px 14px',+ 'margin-bottom:8px',+ 'box-shadow:0 4px 14px rgba(0,0,0,0.45)',+ 'font-size:12px',+ 'line-height:1.5',+ ].join(';');++ const tier = ev.tier ? `${TIER_BADGE[ev.tier] || ''} ${cap(ev.tier)}` : '';+ const symbol = ev.token_symbol || ev.symbol;+ const name = ev.token_name || ev.name;+ const mint = ev.mint || ev.token_mint || '';+ const mcUsd = num(ev.market_cap_usd);+ const priceSol = ev.price_sol != null ? Number(ev.price_sol).toFixed(9).replace(/0+$/, '').replace(/\.$/, '') : null;+ const priceUsd = ev.price_usd != null ? Number(ev.price_usd).toFixed(6).replace(/0+$/, '').replace(/\.$/, '') : null;+ const createdAgo = relTime(ev.token_created_at || ev.created_at);+ const status = ev.graduated+ ? 'Graduated to PumpAMM'+ : ev.curve_progress != null ? `Bonding curve (${Math.round(ev.curve_progress)}%)` : null;+ const ath = num(ev.ath_usd || ev.market_cap_ath_usd);+ const lastTrade = relTime(ev.last_trade_at);++ const claimNum = ev.claim_count ?? ev.claim_number ?? 1;+ const amtSol = ev.amount_sol != null ? Number(ev.amount_sol).toFixed(4) : null;+ const amtUsd = num(ev.amount_usd);+ const lifeSol = ev.lifetime_claim_sol != null ? Number(ev.lifetime_claim_sol).toFixed(4) : amtSol;+ const lifeUsd = num(ev.lifetime_claim_usd) || amtUsd;+ const claimType = ev.claim_type || 'Claim Social Fee PDA (GitHub)';++ const claimer = ev.claimer || ev.github_wallet;+ const tx = ev.tx_signature || ev.signature;++ const ghUser = ev.github_user;+ const ghName = ev.github_name;+ const ghRepos = ev.github_repos;+ const ghFollowers = ev.github_followers;+ const ghFollowing = ev.github_following;+ const ghAge = ev.github_account_age_days != null ? formatAccountAge(ev.github_account_age_days) : null;+ const ghLoc = ev.github_location;+ const ghBio = ev.github_bio;+ const ghTwitter = ev.github_twitter;++ const repoFull = ev.github_repo_full || (ghUser && ev.github_repo ? `${ghUser}/${ev.github_repo}` : null);+ const repoDesc = ev.github_repo_description;+ const repoLang = ev.github_repo_language;+ const repoStars = ev.github_repo_stars;+ const repoForks = ev.github_repo_forks;+ const repoLastPush = relTime(ev.github_repo_last_push);+ const repoCreated = relTime(ev.github_repo_created_at);+ const repoTopics = Array.isArray(ev.github_repo_topics) ? ev.github_repo_topics : null;++ const creator = ev.token_creator;+ const creatorLaunches = ev.creator_launches;+ const creatorGraduated = ev.creator_graduated;+ const creatorTokens = Array.isArray(ev.creator_recent_tokens) ? ev.creator_recent_tokens : null;++ const verified = ev.verified ?? ev.signal_verified;++ const sections = [];++ sections.push(`+ <div style="font-weight:700;color:#ff6e6e;letter-spacing:0.5px">🚨🚨🚨 FIRST CREATOR FEE CLAIM</div>+ ${tier ? `<div style="opacity:0.85;margin-top:2px">${escapeHtml(tier)}</div>` : ''}+ ${mint ? `<div style="font-family:ui-monospace,monospace;font-size:11px;opacity:0.7;margin-top:6px;word-break:break-all">${escapeHtml(mint)}</div>` : ''}+ `);++ const tokenLines = [];+ if (symbol || name) tokenLines.push(`🐙 ${symbol ? '$' + escapeHtml(symbol) : ''}${symbol && name ? ' — ' : ''}${name ? escapeHtml(name) : ''}`);+ if (mcUsd) tokenLines.push(`💰 MC: $${mcUsd}`);+ if (priceSol || priceUsd) tokenLines.push(`💲 Price: ${priceSol ? priceSol + ' SOL' : ''}${priceSol && priceUsd ? ' ' : ''}${priceUsd ? '($' + priceUsd + ')' : ''}`);+ if (createdAgo) tokenLines.push(`⏱ Created: ${createdAgo}`);+ if (status) tokenLines.push(`📈 Status: ${escapeHtml(status)}`);+ if (ath) tokenLines.push(`🏆 ATH: $${ath}`);+ if (lastTrade) tokenLines.push(`🕐 Last trade: ${lastTrade}`);+ if (tokenLines.length) sections.push(linesBlock(tokenLines));++ const claimLines = [`<b>Claim #${claimNum}</b>`];+ if (amtSol || amtUsd) claimLines.push(`${amtSol || '?'} SOL${amtUsd ? ' ($' + amtUsd + ')' : ''}`);+ if (lifeSol || lifeUsd) claimLines.push(`Lifetime claims: ${lifeSol || '?'} SOL${lifeUsd ? ' ($' + lifeUsd + ')' : ''}`);+ claimLines.push(`Type: ${escapeHtml(claimType)}`);+ sections.push(headedBlock('💸 Claim Stats', claimLines));++ if (claimer) {+ sections.push(headedBlock('👛 Claimed By', [+ escapeHtml(shortAddr(claimer)),+ `🔗 <a href="https://pump.fun/profile/${encodeURIComponent(claimer)}" target="_blank" rel="noopener" style="color:#6ce0c8">pump.fun/profile/${escapeHtml(shortAddr(claimer))}</a>`,+ ]));+ }++ if (tx) {+ sections.push(headedBlock('🔎 Transaction', [+ `<a href="https://solscan.io/tx/${encodeURIComponent(tx)}" target="_blank" rel="noopener" style="color:#6ce0c8;word-break:break-all">solscan.io/tx/${escapeHtml(tx.slice(0, 24))}…</a>`,+ ]));+ }++ if (ghUser || ghName) {+ const devLines = [];+ devLines.push(`<b>${escapeHtml(ghUser || '')}</b>${ghName ? ' (' + escapeHtml(ghName) + ')' : ''}`);+ if (ghRepos != null) devLines.push(`📦 Repos: ${ghRepos}`);+ if (ghFollowers != null) devLines.push(`👁 Followers: ${ghFollowers}`);+ if (ghFollowing != null) devLines.push(`👥 Following: ${ghFollowing}`);+ if (ghAge) devLines.push(`📅 Account age: ${ghAge}`);+ if (ghLoc) devLines.push(`📍 Location: ${escapeHtml(ghLoc)}`);+ if (ghBio) devLines.push(`<span style="opacity:0.85;font-style:italic">${escapeHtml(ghBio)}</span>`);+ if (ghTwitter) devLines.push(`𝕏 <a href="https://x.com/${encodeURIComponent(ghTwitter)}" target="_blank" rel="noopener" style="color:#6ce0c8">${escapeHtml(ghTwitter)}</a>`);+ sections.push(headedBlock('👨💻 Linked Dev', devLines));+ }++ if (repoFull) {+ const repoLines = [`<b>${escapeHtml(repoFull)}</b>`];+ if (repoDesc) repoLines.push(`<span style="opacity:0.85">${escapeHtml(repoDesc)}</span>`);+ if (repoLang) repoLines.push(`🔤 Language: ${escapeHtml(repoLang)}`);+ if (repoStars != null) repoLines.push(`⭐ Stars: ${repoStars}`);+ if (repoForks != null) repoLines.push(`🍴 Forks: ${repoForks}`);+ if (repoLastPush) repoLines.push(`🕐 Last push: ${repoLastPush}`);+ if (repoCreated) repoLines.push(`📅 Repo created: ${repoCreated}`);+ if (repoTopics?.length) repoLines.push(`🏷 Topics: ${repoTopics.map(escapeHtml).join(', ')}`);+ sections.push(headedBlock('📂 Repo Claimed', repoLines));+ }++ if (creator) {+ const cLines = [escapeHtml(shortAddr(creator))];+ if (creatorLaunches != null) cLines.push(`🚀 Launches: ${creatorLaunches}`);+ if (creatorGraduated != null) cLines.push(`🎓 Graduated: ${creatorGraduated}`);+ if (creatorTokens?.length) {+ const tokenStr = creatorTokens+ .slice(0, 3)+ .map((t) => `${escapeHtml(t.symbol || '?')}${t.tier ? TIER_BADGE[t.tier] || '' : ''}${t.market_cap_usd != null ? ' [' + num(t.market_cap_usd) + ']' : ''}`)+ .join(' · ');+ cLines.push(`🪙 ${tokenStr}`);+ }+ sections.push(headedBlock('🧑💻 Token Creator', cLines));+ }++ if (verified || ev.ai_take) {+ const sigLines = [];+ if (verified) sigLines.push('✅ Verified — token GitHub matches claimer');+ if (ev.ai_take) sigLines.push(`<span style="font-style:italic;opacity:0.85">${escapeHtml(ev.ai_take)}</span>`);+ sections.push(headedBlock('⚡ Signals', sigLines));+ }++ const links = [];+ if (mint) links.push(`<a href="https://pump.fun/coin/${encodeURIComponent(mint)}" target="_blank" rel="noopener" style="color:#6ce0c8">📊 pump.fun</a>`);+ if (ghTwitter) links.push(`<a href="https://x.com/${encodeURIComponent(ghTwitter)}" target="_blank" rel="noopener" style="color:#6ce0c8">𝕏 ${escapeHtml(ghTwitter)}</a>`);+ if (repoFull) links.push(`<a href="https://github.com/${repoFull.split('/').map(encodeURIComponent).join('/')}" target="_blank" rel="noopener" style="color:#6ce0c8">🌐 github.com/${escapeHtml(repoFull)}</a>`);+ if (links.length) sections.push(`<div style="margin-top:8px;display:flex;flex-direction:column;gap:2px">${links.join('')}</div>`);++ if (mint) {+ const trade = [+ `<a href="https://axiom.trade/t/${encodeURIComponent(mint)}" target="_blank" rel="noopener" style="color:#6ce0c8">Axiom</a>`,+ `<a href="https://gmgn.ai/sol/token/${encodeURIComponent(mint)}" target="_blank" rel="noopener" style="color:#6ce0c8">GMGN</a>`,+ `<a href="https://padre.gg/sol/${encodeURIComponent(mint)}" target="_blank" rel="noopener" style="color:#6ce0c8">Padre</a>`,+ ].join(' | ');+ sections.push(`+ <div style="border-top:1px solid rgba(255,255,255,0.08);margin-top:10px;padding-top:8px">+ <div style="font-weight:600">💹 Trade</div>+ <div style="margin-top:2px">${trade}</div>+ </div>+ `);+ }++ el.innerHTML = sections.join('<div style="height:8px"></div>');+ return el;+}++function headedBlock(heading, lines) {+ return `+ <div>+ <div style="font-weight:600">${heading}</div>+ <div style="margin-top:2px">${lines.map((l) => `<div>${l}</div>`).join('')}</div>+ </div>+ `;+}++function linesBlock(lines) {+ return `<div>${lines.map((l) => `<div>${l}</div>`).join('')}</div>`;+}++function num(x) {+ if (x == null || !isFinite(x)) return null;+ const n = Number(x);+ if (n >= 1000) return n.toLocaleString(undefined, { maximumFractionDigits: 2 });+ return n.toFixed(2);+}++function relTime(t) {+ if (t == null) return null;+ const ts = typeof t === 'number' ? (t < 1e12 ? t * 1000 : t) : Date.parse(t);+ if (!isFinite(ts)) return null;+ const diff = Date.now() - ts;+ if (diff < 60_000) return `${Math.max(1, Math.round(diff / 1000))}s ago`;+ if (diff < 3_600_000) return `${Math.round(diff / 60_000)}m ago`;+ if (diff < 86_400_000) return `${Math.round(diff / 3_600_000)}h ago`;+ if (diff < 7 * 86_400_000) return `${Math.round(diff / 86_400_000)}d ago`;+ if (diff < 30 * 86_400_000) return `${Math.round(diff / (7 * 86_400_000))}w ago`;+ if (diff < 365 * 86_400_000) return `${Math.round(diff / (30 * 86_400_000))}mo ago`;+ return `${Math.round(diff / (365 * 86_400_000))}y ago`;+}++function formatAccountAge(days) {+ if (days < 30) return `${Math.round(days)}d ago`;+ if (days < 365) return `${Math.round(days / 30)}mo ago`;+ return `${Math.round(days / 365)}y ago`;+}++function shortAddr(s) {+ const str = String(s || '');+ if (str.length <= 12) return str;+ return `${str.slice(0, 6)}…${str.slice(-4)}`;+}++function cap(s) {+ const str = String(s || '');+ return str ? str[0].toUpperCase() + str.slice(1) : '';+}+function renderGraduation(ev) {const el = document.createElement('div');el.style.cssText = cardStyle('#1a1632');