8 Commits

Author SHA1 Message Date
martbost ec4ada08d7 Five Dollar Friday notice, email and kickoff mention the Game Pass perk correctly: a $5+ Friday pack earns +20% credits (600 from the $5 pack) AND includes the free 7-day Game Pass automatically (fridayPassPerk, since 2026-10-23); Marty 2026-10-30 asked for the tie-in
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-30 05:16:12 -05:00
martbost c621fecb54 BixPay sign-up warning (Marty 2026-10-29: bizventures registered through our correct partner link but BIX recorded referrer N/A): the invite token lives only in BIX's URL and their security check often fails inside app webviews, so members who reopen BIX elsewhere lose their sponsor. Guide, Wallet card and Overview card now say: sign up on the page the button opens, no app first, no portal Sign Up menu; in-app browsers (Gmail/Telegram/Facebook webviews, iOS web views) get a notice with the link to copy into Chrome or Safari (no native dialogs); chatbot card answer carries the same; my.js + bixpay-guide.js ?v=20261029bz
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-29 11:46:46 -05:00
martbost 13e0644355 QA: syntax gate in every run.sh mode (node --check on every server and public script) after LinkSpin's /traffic-guide shipped with a parse error
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-29 10:49:06 -05:00
martbost ed6febe0b8 BixPay card integration, phase 1 (Marty approved the copy 2026-10-29; docs/BIXPAY-INTEGRATION.md): gated by site config bixpayLive (off by default). Profile > BixPay card field (partner link validated: bix.ibportal.io/auth/register, e= token, a=1; the appId=3 card-customer link is refused with a message), bixpay.js resolver own > sponsor chain (10 levels) > company link (bixCompanyLink, seeded with Marty's partner link), every surface says whose link it is. Wallet tab card, one-week Overview announcement (24 h snooze), one sentence in TierPaid payout emails and the games' wallet nudges, Promo tools > BixPay tab (3 posts, email swipe, 4 text-only banners on the Spaces CDN, tracked link + per-member clicks), public guide /bixpay with masked app screenshots, chatbot canned answers + facts gated to 'coming soon' while off (KNOWLEDGE_DATE 2026-10-29). Clicks per surface via /go/bixpay in the admin Traffic tab; admin Overview counts members with a link; member card shows it; signed /api/partner/bixpay and the lssync profile row carry it for LinkSpin/CTB. accounts.bix_partner_link column (db.js alterSafe). Tests: qa/bixpay.test.cjs (17) + walk.mjs BixPay block; my.js/promo.js/admin.js ?v=20261029bx.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-29 07:56:49 -05:00
martbost 6e1ab102f1 Holding-tank Telegram notice: a wallet that predates the tank visit says 'already linked (last seen <date>)' instead of 'linked a wallet' (Marty 2026-10-29: @teamearning, dormant since Sep 18, was returned by a sponsor and the notice read as a live member); digest wording to match; readyTick carries lastSeen + linkedNow
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-29 07:16:47 -05:00
martbost 01154c0856 Member update emails: claim the send slot before building the recipient list (the Sendy opt-in checks take minutes). On 2026-10-28 a retried POL Miner launch email raced the first one: both passed the 'already running' check, 475 members got it twice; stopped by a restart, the rest went out once. A second send now gets 'A send is already running' immediately.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 14:34:31 -05:00
martbost 7d134e55a2 Game refuel visits never come up empty (Marty 2026-10-28): after every sponsor has been seen, a member video, then a house sponsor (one of Marty's programs, never the game the player is in; 0 credits, no pool income) and, after the doorRepeatDays cooldown, a sponsor seen before again (a real, paid repeat visit, visit_repeat kind refuel). Repeats and house visits count toward the 20-a-day refuel cap. Applies to every game using /refuel (supply crates, paddles, continues, refuels, hints). Earn stays once-ever. Chatbot fact updated. qa/refuel-fallback.mjs (10 checks); member + earn qa clean; qa/door.mjs prints the callbacks on its pre-existing credits failure (admin-seeded packs are house ads, 0 credits, fails on main too)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 13:23:46 -05:00
martbost 8b28d028a6 All-games promo posts no longer name a game count (said 'Eight games'); list adds the brick breaker and the mining game; promo.js?v=20261028q
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 12:28:33 -05:00
35 changed files with 2781 additions and 1698 deletions
+5 -1
View File
@@ -36,6 +36,7 @@ const pub = a => a ? { email: a.email, sponsorRef: a.sponsorRef || '', code: a.c
username: a.username || null, memberId: a.memberId || 0, joinedVia: a.joinedVia || null, joinedRef: a.joinedRef || null, username: a.username || null, memberId: a.memberId || 0, joinedVia: a.joinedVia || null, joinedRef: a.joinedRef || null,
lineBannerUrl: a.lineBannerUrl || null, lineTargetUrl: a.lineTargetUrl || null, wallOffers: a.wallOffers || null, lineBannerUrl: a.lineBannerUrl || null, lineTargetUrl: a.lineTargetUrl || null, wallOffers: a.wallOffers || null,
avatarUrl: a.avatarUrl || null, bio: a.bio || null, socials: a.socials || null, avatarUrl: a.avatarUrl || null, bio: a.bio || null, socials: a.socials || null,
bixPartnerLink: a.bixPartnerLink || null, // BixPay partner link (bixpay.js, 2026-10-29): one identity, follows the member to LinkSpin/CTB
chatAvailable: a.chatAvailable === false ? false : true, lastSeen: a.lastSeen || 0, chatAvailable: a.chatAvailable === false ? false : true, lastSeen: a.lastSeen || 0,
address: a.address || null, created: a.created } : null; address: a.address || null, created: a.created } : null;
const USER_RE = /^[a-zA-Z0-9_]{3,20}$/; const USER_RE = /^[a-zA-Z0-9_]{3,20}$/;
@@ -125,6 +126,7 @@ const J = {
this.save(); this.save();
return { ok: true, account: pub(acct) }; return { ok: true, account: pub(acct) };
}, },
async setBixLink(e, link) { const acct = this.db.byEmail[e]; if (!acct) return { error: 'No such account.' }; acct.bixPartnerLink = link || null; this.save(); return { ok: true, account: pub(acct) }; },
async touchSeen(e) { const a = this.db.byEmail[e]; if (a) { a.lastSeen = Date.now(); this.save(); } }, async touchSeen(e) { const a = this.db.byEmail[e]; if (a) { a.lastSeen = Date.now(); this.save(); } },
async setChatAvailable(e, v) { const a = this.db.byEmail[e]; if (!a) return { error: 'No such account.' }; a.chatAvailable = !!v; this.save(); return { ok: true, available: !!v }; }, async setChatAvailable(e, v) { const a = this.db.byEmail[e]; if (!a) return { error: 'No such account.' }; a.chatAvailable = !!v; this.save(); return { ok: true, available: !!v }; },
async getMutes(e) { const a = this.db.byEmail[e]; return (a && Array.isArray(a.chatMutes)) ? a.chatMutes : []; }, async getMutes(e) { const a = this.db.byEmail[e]; return (a && Array.isArray(a.chatMutes)) ? a.chatMutes : []; },
@@ -228,7 +230,7 @@ const J = {
const rowPub = r => r ? pub({ email: r.email, sponsorRef: r.sponsor_ref, code: r.code, const rowPub = r => r ? pub({ email: r.email, sponsorRef: r.sponsor_ref, code: r.code,
username: r.username, memberId: r.member_id || 0, joinedVia: r.joined_via || null, joinedRef: r.joined_ref || null, username: r.username, memberId: r.member_id || 0, joinedVia: r.joined_via || null, joinedRef: r.joined_ref || null,
lineBannerUrl: r.line_banner_url, lineTargetUrl: r.line_target_url, wallOffers: r.wall_offers || null, lineBannerUrl: r.line_banner_url, lineTargetUrl: r.line_target_url, wallOffers: r.wall_offers || null,
avatarUrl: r.avatar_url, bio: r.bio, socials: r.socials, avatarUrl: r.avatar_url, bio: r.bio, socials: r.socials, bixPartnerLink: r.bix_partner_link || null,
chatAvailable: r.chat_available === 0 ? false : true, lastSeen: Number(r.last_seen || 0), chatAvailable: r.chat_available === 0 ? false : true, lastSeen: Number(r.last_seen || 0),
address: r.address, created: Number(r.created) }) : null; address: r.address, created: Number(r.created) }) : null;
const D = { const D = {
@@ -289,6 +291,7 @@ const D = {
if (socials !== undefined) await db.q('UPDATE accounts SET socials=? WHERE email=?', [socials || null, e]); if (socials !== undefined) await db.q('UPDATE accounts SET socials=? WHERE email=?', [socials || null, e]);
return { ok: true, account: await this.byEmail(e) }; return { ok: true, account: await this.byEmail(e) };
}, },
async setBixLink(e, link) { const r = await db.q('UPDATE accounts SET bix_partner_link=? WHERE email=?', [link || null, e]); if (!r || !r.affectedRows) return { error: 'No such account.' }; return { ok: true, account: await this.byEmail(e) }; },
async touchSeen(e) { await db.q('UPDATE accounts SET last_seen=? WHERE email=?', [Date.now(), e]); }, async touchSeen(e) { await db.q('UPDATE accounts SET last_seen=? WHERE email=?', [Date.now(), e]); },
async setChatAvailable(e, v) { await db.q('UPDATE accounts SET chat_available=? WHERE email=?', [v ? 1 : 0, e]); return { ok: true, available: !!v }; }, async setChatAvailable(e, v) { await db.q('UPDATE accounts SET chat_available=? WHERE email=?', [v ? 1 : 0, e]); return { ok: true, available: !!v }; },
async getMutes(e) { async getMutes(e) {
@@ -504,6 +507,7 @@ module.exports = { init, signup, login, ensure, onChange, isUnclaimedShell, byEm
setLineBanner: (e, b, t) => impl().setLineBanner(String(e || '').toLowerCase(), b, t), setLineBanner: (e, b, t) => impl().setLineBanner(String(e || '').toLowerCase(), b, t),
setWallOffers: (e, j) => impl().setWallOffers(String(e || '').toLowerCase(), j), setWallOffers: (e, j) => impl().setWallOffers(String(e || '').toLowerCase(), j),
setProfile: async (e, a, bio, socials) => { const r = await impl().setProfile(String(e || '').toLowerCase(), a, bio, socials); if (!(r && r.error)) changed(String(e || '').toLowerCase()); return r; }, // profile edits reach LinkSpin too setProfile: async (e, a, bio, socials) => { const r = await impl().setProfile(String(e || '').toLowerCase(), a, bio, socials); if (!(r && r.error)) changed(String(e || '').toLowerCase()); return r; }, // profile edits reach LinkSpin too
setBixLink: async (e, link) => { const r = await impl().setBixLink(normEmail(e), link ? String(link).slice(0, 300) : null); if (!(r && r.error)) changed(normEmail(e)); return r; }, // the BixPay partner link rides to LinkSpin in the profile row (lssync.js)
touchSeen: e => impl().touchSeen(String(e || '').toLowerCase()), touchSeen: e => impl().touchSeen(String(e || '').toLowerCase()),
adminSetAddress: (e, a) => impl().adminSetAddress(String(e || '').toLowerCase(), a ? normAddr(a) : null), adminSetAddress: (e, a) => impl().adminSetAddress(String(e || '').toLowerCase(), a ? normAddr(a) : null),
positionByAddress: a => impl().positionByAddress(normAddr(a)), positionByAddress: a => impl().positionByAddress(normAddr(a)),
BIN
View File
Binary file not shown.
+120
View File
@@ -0,0 +1,120 @@
// BixPay card integration, phase 1 (Marty approved 2026-10-29; spec docs/BIXPAY-INTEGRATION.md).
// BIX is a separate company: a self-custody wallet with a Visa card spent from USDT/USDC. We only carry each member's
// PARTNER link (bix.ibportal.io/auth/register?e=<token>&a=1) so anyone who gets a card through their pages is credited to
// them in the BIX portal. Nothing is settled on our side: the portal tracks directs and levels itself.
//
// One identity, sponsor follows (feedback-one-identity-sponsor-follows): the link a visitor gets is the member's own,
// else the first sponsor up the chain (10 levels) with one, else the company link (site config bixCompanyLink). Every
// surface says WHOSE link is in play ("you" / "@sponsor" / "network") so members add their own and sponsors get their
// teams signed up.
//
// Everything is gated by site config bixpayLive ('0' = nothing shows; the admin flips it in Admin > Settings).
// Clicks: every surface links through /go/bixpay?s=<surface>[&m=<member>] which counts here (DATA_DIR/bixpay-clicks.json)
// and 302s to the resolved partner link. Counts per surface land in the admin Traffic tab, per member on the Promo tab.
const fs = require('fs');
const path = require('path');
let R = {}; // { dataDir, accounts, siteConfig, refAccount }
const HOST = 'bix.ibportal.io';
const PATH = '/auth/register';
const MAX_LEN = 300;
const MAX_LEVELS = 10;
// Marty's own PARTNER link (IB12143793): the company fallback until Admin > Settings bixCompanyLink says otherwise
const DEFAULT_COMPANY_LINK = 'https://bix.ibportal.io/auth/register?e=XqwU9T1aJ5N0UJ0yr9x0TGUiSQTsVCkTM01MIovVNnc&a=1';
const SURFACES = ['wallet', 'overview', 'email', 'nudge', 'promo', 'guide', 'chat'];
const CUSTOMER_LINK_MSG = "That's the card-customer link. Paste the Partner link from your BIX portal profile instead.";
const ANNOUNCE_MS = 7 * 86400000; // the Overview announcement card shows for the first week after the switch is flipped
function init(opts) { R = opts || {}; }
const cfg = () => { try { return (R.siteConfig && R.siteConfig()) || {}; } catch (e) { return {}; } };
function live() { return String(cfg().bixpayLive == null ? '0' : cfg().bixpayLive) === '1'; }
function companyLink() { const v = validate(cfg().bixCompanyLink); return v.ok ? v.link : DEFAULT_COMPANY_LINK; }
// the Overview announcement runs a week from bixpayLiveSince (stamped by the admin settings route when the switch is flipped on)
function announcing() { if (!live()) return false; const t = Date.parse(String(cfg().bixpayLiveSince || '')); return !(t > 0) || Date.now() - t < ANNOUNCE_MS; }
// A pasted partner link -> { ok: true, link } (normalised to e= and a=1 only) or { error }.
// The card-customer link carries appId=3 (it makes a card customer, not a partner): refused with the message members see.
function validate(input) {
const s = String(input == null ? '' : input).trim();
if (!s) return { error: 'Paste your BixPay partner link first.' };
if (s.length > MAX_LEN) return { error: 'That link is too long. Copy the Partner link from your BIX portal profile.' };
let u; try { u = new URL(s); } catch (e) { return { error: 'That is not a full link. It starts with https://bix.ibportal.io/auth/register?e=' }; }
if (u.protocol !== 'https:' || u.hostname.toLowerCase() !== HOST) return { error: 'A BixPay partner link lives on https://bix.ibportal.io. Copy it from your BIX portal profile (Profile > Partner).' };
if (u.pathname.replace(/\/+$/, '') !== PATH) return { error: 'That is not the register link. It looks like https://bix.ibportal.io/auth/register?e=...&a=1' };
if (u.searchParams.has('appId') || u.searchParams.has('appid')) return { error: CUSTOMER_LINK_MSG };
const e = String(u.searchParams.get('e') || '').trim();
if (!/^[A-Za-z0-9_-]{16,128}$/.test(e)) return { error: 'The link is missing its e= token. Copy the whole Partner link from your BIX portal profile.' };
if (String(u.searchParams.get('a') || '').trim() !== '1') return { error: 'The link needs a=1 on the end. Copy the whole Partner link from your BIX portal profile.' };
return { ok: true, link: 'https://' + HOST + PATH + '?e=' + e + '&a=1' };
}
const nameOf = a => a ? (a.username ? '@' + a.username : a.memberId ? 'member #' + a.memberId : 'your sponsor') : null;
// bixLinkFor(member): own link, else the first sponsor up the chain with one (10 levels), else the company link.
// -> { link, whose: 'you' | 'sponsor' | 'network', name, email } (name/email = the sponsor whose link it is)
async function resolve(acct) {
if (acct && validate(acct.bixPartnerLink).ok) return { link: validate(acct.bixPartnerLink).link, whose: 'you', name: nameOf(acct), email: acct.email };
if (acct && R.accounts && R.accounts.sponsorOf) {
const seen = new Set([String(acct.email || '').toLowerCase()]);
let cur = acct;
for (let i = 0; i < MAX_LEVELS && cur; i++) {
let s = null; try { s = await R.accounts.sponsorOf(cur.email); } catch (e) { s = null; }
if (!s || seen.has(String(s.email).toLowerCase())) break;
seen.add(String(s.email).toLowerCase());
const v = validate(s.bixPartnerLink);
if (v.ok) return { link: v.link, whose: 'sponsor', name: nameOf(s), email: s.email };
cur = s;
}
}
return { link: companyLink(), whose: 'network', name: null, email: null };
}
// the same for a public page: the referrer token (?ref / the sponsor cookie) resolves like the member it names
async function resolveRef(tok) {
let a = null; try { a = tok && R.refAccount ? await R.refAccount(tok) : null; } catch (e) { a = null; }
return resolve(a);
}
// the line every surface shows under the button
function usingLine(r) { return r.whose === 'you' ? 'Using: your link.' : r.whose === 'sponsor' ? 'Using: ' + r.name + "'s link. Add yours in Profile." : 'Using: the network link. Add yours in Profile.'; }
// tracked link for a surface (+ the member it belongs to: the sharer on promo/guide/email, the viewer on the dashboard cards)
const SITE = () => String(process.env.PUBLIC_URL || 'https://instantadpay.com').replace(/\/+$/, '');
function goLink(surface, token) { return SITE() + '/go/bixpay?s=' + encodeURIComponent(surface) + (token ? '&m=' + encodeURIComponent(String(token)) : ''); }
// one sentence for payout emails and the games' wallet nudges (text), only while live
function emailLine(token) { return live() ? 'Want to spend it? A BixPay Visa card turns POL into everyday purchases: ' + goLink('email', token) : ''; }
function nudgeLine(token) { return live() ? 'Want to spend it? A BixPay Visa card turns POL into everyday purchases: ' + goLink('nudge', token) : ''; }
// ---- clicks ----
const FILE = () => path.join(R.dataDir || '.', 'bixpay-clicks.json');
const blank = () => ({ v: 1, total: {}, days: {}, members: {} });
let S = null;
function load() { if (S) return S; try { S = Object.assign(blank(), JSON.parse(fs.readFileSync(FILE(), 'utf8'))); } catch (e) { S = blank(); } return S; }
function save() { try { fs.writeFileSync(FILE(), JSON.stringify(S)); } catch (e) {} }
const day = ts => new Date(ts).toISOString().slice(0, 10);
function click(surface, email) {
const s = SURFACES.includes(surface) ? surface : 'other';
const st = load();
st.total[s] = (st.total[s] || 0) + 1;
const d = day(Date.now()); st.days[d] = st.days[d] || {}; st.days[d][s] = (st.days[d][s] || 0) + 1;
const e = String(email || '').trim().toLowerCase();
if (e) { const m = st.members[e] = st.members[e] || { total: 0 }; m.total++; m[s] = (m[s] || 0) + 1; m.last = Date.now(); }
// bounded: 400 days
const cutoff = day(Date.now() - 400 * 86400000); for (const k of Object.keys(st.days)) if (k < cutoff) delete st.days[k];
save();
return { surface: s, email: e || null };
}
function memberClicks(email) {
const m = load().members[String(email || '').trim().toLowerCase()];
if (!m) return { total: 0 };
return Object.assign({}, m);
}
function adminView(days) {
const st = load(); const n = Math.min(365, Math.max(1, Number(days) || 30));
const since = day(Date.now() - n * 86400000);
const bySurface = {}; let total = 0;
for (const [d, row] of Object.entries(st.days)) if (d >= since) for (const [s, c] of Object.entries(row)) { bySurface[s] = (bySurface[s] || 0) + c; total += c; }
const daily = Object.entries(st.days).filter(([d]) => d >= since).sort((a, b) => a[0] < b[0] ? 1 : -1).map(([d, row]) => ({ day: d, clicks: Object.values(row).reduce((x, y) => x + y, 0) }));
const members = Object.entries(st.members).map(([email, m]) => ({ email, total: m.total || 0, last: m.last || 0, promo: m.promo || 0 })).sort((a, b) => b.total - a.total).slice(0, 50);
return { days: n, total, allTime: Object.values(st.total).reduce((x, y) => x + y, 0), bySurface, daily, members, surfaces: SURFACES };
}
function _reset() { S = null; }
module.exports = { init, live, announcing, validate, resolve, resolveRef, usingLine, companyLink, goLink, emailLine, nudgeLine, click, memberClicks, adminView, SURFACES, CUSTOMER_LINK_MSG, DEFAULT_COMPANY_LINK, MAX_LEVELS, _reset };
+3 -2
View File
@@ -69,7 +69,8 @@ const D = {
const row = r => ({ slug: r.slug, title: r.title, excerpt: r.excerpt || '', body: r.body || '', cover: r.cover || '', tags: r.tags ? String(r.tags).split(',').filter(Boolean) : [], status: r.status, author: r.author || AUTHOR, created: Number(r.created), updated: Number(r.updated), publishedAt: r.published_at ? Number(r.published_at) : null, views: Number(r.views) || 0 }); const row = r => ({ slug: r.slug, title: r.title, excerpt: r.excerpt || '', body: r.body || '', cover: r.cover || '', tags: r.tags ? String(r.tags).split(',').filter(Boolean) : [], status: r.status, author: r.author || AUTHOR, created: Number(r.created), updated: Number(r.updated), publishedAt: r.published_at ? Number(r.published_at) : null, views: Number(r.views) || 0 });
const impl = () => db.enabled() ? D : J; const impl = () => db.enabled() ? D : J;
function init(opts) { DATA_DIR = opts.dataDir; if (!db.enabled()) J.load(); } let EXTRA_PAGES = () => []; // sitemap entries that follow a switch (the /bixpay guide while bixpayLive, 2026-10-29)
function init(opts) { DATA_DIR = opts.dataDir; if (typeof opts.extraPages === 'function') EXTRA_PAGES = opts.extraPages; if (!db.enabled()) J.load(); }
async function listAll() { return (await impl().all()).sort((a, b) => (b.publishedAt || b.created) - (a.publishedAt || a.created)); } async function listAll() { return (await impl().all()).sort((a, b) => (b.publishedAt || b.created) - (a.publishedAt || a.created)); }
async function listPublished() { return (await listAll()).filter(p => p.status === 'published' && (p.publishedAt || 0) <= Date.now()); } async function listPublished() { return (await listAll()).filter(p => p.status === 'published' && (p.publishedAt || 0) <= Date.now()); }
async function get(slug) { return impl().get(slugify(slug)); } async function get(slug) { return impl().get(slugify(slug)); }
@@ -152,7 +153,7 @@ function rss(posts) {
return '<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>InstantAdPay blog</title><link>' + SITE + '/blog</link><description>Coaching and teaching articles from Marty Bostick.</description>' + items + '</channel></rss>'; return '<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>InstantAdPay blog</title><link>' + SITE + '/blog</link><description>Coaching and teaching articles from Marty Bostick.</description>' + items + '</channel></rss>';
} }
function sitemap(posts) { function sitemap(posts) {
const pages = ['/', '/facts', '/blog', '/whats-new', '/leaderboard', '/ledger', '/contract', '/plays', '/wallets', '/earning', '/partners', '/friday', '/wednesday', '/refuel', '/conversion-tracking', '/presentation']; const pages = ['/', '/facts', '/blog', '/whats-new', '/leaderboard', '/ledger', '/contract', '/plays', '/wallets', '/earning', '/partners', '/friday', '/wednesday', '/refuel', '/conversion-tracking', '/presentation'].concat(EXTRA_PAGES() || []);
const u = pages.map(p => '<url><loc>' + SITE + p + '</loc><changefreq>weekly</changefreq></url>').join('') const u = pages.map(p => '<url><loc>' + SITE + p + '</loc><changefreq>weekly</changefreq></url>').join('')
+ posts.map(p => '<url><loc>' + SITE + '/blog/' + p.slug + '</loc><lastmod>' + new Date(p.updated).toISOString().slice(0, 10) + '</lastmod><changefreq>monthly</changefreq></url>').join(''); + posts.map(p => '<url><loc>' + SITE + '/blog/' + p.slug + '</loc><lastmod>' + new Date(p.updated).toISOString().slice(0, 10) + '</lastmod><changefreq>monthly</changefreq></url>').join('');
return '<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' + u + '</urlset>'; return '<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' + u + '</urlset>';
+35 -7
View File
@@ -24,7 +24,8 @@ const MODEL = process.env.OPENROUTER_MODEL || 'deepseek/deepseek-v4-flash:nitro'
function init(opts) { function init(opts) {
if (opts && typeof opts.gameLive === 'function') GAME_LIVE = opts.gameLive; if (opts && typeof opts.gameLive === 'function') GAME_LIVE = opts.gameLive;
if (opts && typeof opts.refuelOn === 'function') REFUEL_ON = opts.refuelOn; DATA_DIR = opts.dataDir; chain = opts.chain; PASS_TIERS = typeof opts.passTiers === 'function' ? opts.passTiers : null; return kb.init({ dataDir: DATA_DIR, seeds: seeds() }); } if (opts && typeof opts.refuelOn === 'function') REFUEL_ON = opts.refuelOn;
if (opts && typeof opts.bixLive === 'function') BIX_LIVE = opts.bixLive; DATA_DIR = opts.dataDir; chain = opts.chain; PASS_TIERS = typeof opts.passTiers === 'function' ? opts.passTiers : null; return kb.init({ dataDir: DATA_DIR, seeds: seeds() }); }
function key() { function key() {
if (process.env.OPENROUTER_API_KEY) return process.env.OPENROUTER_API_KEY.trim(); if (process.env.OPENROUTER_API_KEY) return process.env.OPENROUTER_API_KEY.trim();
try { return fs.readFileSync(path.join(DATA_DIR, 'openrouter.key'), 'utf8').trim(); } catch (e) { return ''; } try { return fs.readFileSync(path.join(DATA_DIR, 'openrouter.key'), 'utf8').trim(); } catch (e) { return ''; }
@@ -32,12 +33,30 @@ function key() {
function enabled() { return !!key(); } function enabled() { return !!key(); }
// ---- canned answers: instant, free, always in voice ---- // ---- canned answers: instant, free, always in voice ----
const KNOWLEDGE_DATE = '2026-10-28'; // bump whenever the canned answers / prompt are brought up to date const KNOWLEDGE_DATE = '2026-10-29'; // bump whenever the canned answers / prompt are brought up to date
const SUPPORT_RE = /(contact|reach|email|e-mail|message|talk to|speak (to|with)|get hold of) (the )?(support|admin|administrator|owner|marty|staff|team at instantadpay|someone|a (human|person|real person))|support (email|address|ticket|team|desk)|help ?desk|(open|send|file|submit|raise) (a )?(support )?ticket|\b(human|real person|live (agent|person|chat|support))\b|customer (service|support)|support@|how (do|can) i get (help|support)/i; const SUPPORT_RE = /(contact|reach|email|e-mail|message|talk to|speak (to|with)|get hold of) (the )?(support|admin|administrator|owner|marty|staff|team at instantadpay|someone|a (human|person|real person))|support (email|address|ticket|team|desk)|help ?desk|(open|send|file|submit|raise) (a )?(support )?ticket|\b(human|real person|live (agent|person|chat|support))\b|customer (service|support)|support@|how (do|can) i get (help|support)/i;
const CANNED = [ const CANNED = [
{ id: 'support', title: 'Contact support or open a ticket', q: ['How do I contact support?', 'How do I talk to a real person?', 'How do I open a support ticket?'], tags: ['support', 'help', 'ticket', 'contact', 'help desk'], { id: 'support', title: 'Contact support or open a ticket', q: ['How do I contact support?', 'How do I talk to a real person?', 'How do I open a support ticket?'], tags: ['support', 'help', 'ticket', 'contact', 'help desk'],
re: SUPPORT_RE, handoff: true, re: SUPPORT_RE, handoff: true,
a: 'Open Help in your member dashboard (https://instantadpay.com/my#help) to send Marty a ticket, and his replies land right there and in your email. Not signed in or locked out? Use https://instantadpay.com/support, or email support@instantadpay.com. You can also tap "Send this to support" below and I will pass this chat along.' }, a: 'Open Help in your member dashboard (https://instantadpay.com/my#help) to send Marty a ticket, and his replies land right there and in your email. Not signed in or locked out? Use https://instantadpay.com/support, or email support@instantadpay.com. You can also tap "Send this to support" below and I will pass this chat along.' },
// BixPay Visa card (2026-10-29, docs/BIXPAY-INTEGRATION.md). Sits ahead of the Level 4 entry because that one also matches "3%".
// While site config bixpayLive is off, answer() swaps every bixpay-* hit for BIX_SOON_ANSWER. Never BIX's marketing claims (user
// counts, spend per day, valuations) as facts; the only fee we state is 3% per purchase, no load fee, see BIX's terms for the rest.
{ id: 'bixpay-link', title: 'Where to put my BixPay partner link', q: ['Where do I put my BixPay partner link?', 'How do I add my BIX link?', 'Which BixPay link do I paste, referral or partner?'], tags: ['bixpay', 'bix', 'partner link', 'profile', 'ib portal'],
re: /(bix|bixpay).*(partner link|my link|referral link|ib ?portal|paste|where do i (put|add|enter)|profile)|(partner link|ib ?portal).*(bix|bixpay)/i,
a: 'Members > Profile > BixPay card. Paste your PARTNER link there: in your BIX portal (bix.ibportal.io) open Profile and copy the link in the second box, the one labelled Partner. It looks like https://bix.ibportal.io/auth/register?e=...&a=1. The first box, the Bix referral link (it ends in appId=3), only makes a card customer, so the field refuses it and asks for the Partner one. Once saved, your Wallet card, your promo kit, the /bixpay guide opened from your links and the line in your payout emails all carry your link, and LinkSpin will read the same one.' },
{ id: 'bixpay-credit', title: 'Who gets the BixPay credit', q: ['Who gets credit when someone signs up for BixPay through my page?', 'Whose BixPay link is on my pages?', 'What does "Using: the network link" mean?'], tags: ['bixpay', 'bix', 'credit', 'sponsor', 'network link'],
re: /(bix|bixpay).*(credit|whose|who gets|sponsor.s link|network link|using:|my sponsor|upline)|(whose|who gets).*(bix|bixpay)/i,
a: 'The BixPay link on your pages is yours when you have saved your partner link in Profile. If you have not, it is the first sponsor up your line (up to ten levels) who has one, and if nobody has, it is the network link. Every BixPay card says which one is in play: "Using: your link", "Using: @name’s link" or "Using: the network link". Sign-ups are credited inside the BIX portal to whoever owns that link, directs and levels included; InstantAdPay does not count or pay BixPay sign-ups itself. Add your own link in Members > Profile > BixPay card so the credit is yours.' },
{ id: 'bixpay-load', title: 'Loading the BixPay card from POL', q: ['How do I load my BixPay card from POL?', 'Can I send POL to BixPay?', 'How do I fund the BixPay card?'], tags: ['bixpay', 'bix', 'fund', 'load', 'usdt', 'usdc', 'polygon', 'cash app'],
re: /(bix|bixpay).*(load|fund|top ?up|deposit|send pol|from pol|usdt|usdc|swap|cash ?app)|(load|fund|top ?up).*(bix|bixpay)/i,
a: 'The BixPay card spends USDT or USDC, so the step is POL to USDT or USDC first. Three ways: (1) swap your POL for USDT or USDC on any exchange or on-ramp you already use, then send it to your BixPay wallet on the Polygon network (open the BIX app, Wallet > Receive, pick USDT or USDC, and use the Polygon address); (2) in the US, Cash App can send crypto straight to the BixPay wallet; (3) BIX has said an in-app swap is coming, and we will add it here when it ships. Once the USDT or USDC is in the wallet, tap TOPUP on the card. No load fee; 3% per purchase; see BIX’s terms for other charges. The full walk-through with screenshots is at https://instantadpay.com/bixpay.' },
{ id: 'bixpay-card', title: 'How to get the BixPay card', q: ['How do I get the BixPay card?', 'How do I sign up for BixPay?', 'Is BixPay available in my state?'], tags: ['bixpay', 'bix', 'visa card', 'virtual card', 'sign up', 'states'],
re: /(bix|bixpay).*(get|sign ?up|join|order|apply|virtual|plastic|metal|state|country|available|how much|cost|price|\$9)|(get|sign ?up for|order).*(bix|bixpay)/i,
a: 'Open the BixPay card in your Wallet tab (Members > Wallet) and tap Get your BixPay card. That opens a partner sign-up link, so you join as a partner and the card and the referral plan come with it: 1) register in the BIX portal ON THE PAGE THE LINK OPENS (if you are reading this inside Gmail or Telegram, open the page in Chrome or Safari first; do not install the app first and do not use the portal’s own Sign Up menu, or your sponsor is lost and BIX shows the referrer as N/A), 2) download the BIX app and create your wallet, 3) in the app open Settings > Scan QR and scan the code in your portal profile to link the two, 4) Cards > Create Card for the $9.99 virtual Visa (plastic, metal and gold cards cost more). KYC is required for the card. In the US it is open in 31 states so far; not in your state yet? You can still get the wallet and build. Elsewhere availability varies by country. Guide: https://instantadpay.com/bixpay.' },
{ id: 'bixpay', title: 'What BixPay is', q: ['What is BixPay?', 'What is the BIX card?', 'Can I spend my POL with a Visa card?'], tags: ['bixpay', 'bix', 'visa', 'card', 'spend pol', 'wallet'],
re: /(bix|bixpay|bix card|visa card|debit card|spend (my )?(pol|crypto|earnings)|crypto card)/i,
a: 'BixPay is a self-custody wallet with a Visa card, made by BIX, a separate company. You send USDT or USDC to it on Polygon, load the card, and spend wherever Visa is accepted, including Apple Pay and Google Pay. Virtual cards from $9.99. 3% per purchase, no load fee; see BIX’s terms for other charges. InstantAdPay is not the card issuer; members who join BixPay as partners get their own partner link, and anyone who gets a card through their pages is credited to them in the BIX portal, up to ten levels deep. Where to find it: Members > Wallet (the card), Members > Profile (your partner link), Promo tools > BixPay (posts and banners), and the guide at https://instantadpay.com/bixpay. Crypto assets can lose value.' },
{ id: 'level4-override', title: 'The Level 4 override (3%)', q: ['What is the Level 4 override?', 'Do I earn from my fourth level?', 'How does the 3% override work?'], tags: ['override', 'level 4', 'fourth level', 'commission', 'payouts'], { id: 'level4-override', title: 'The Level 4 override (3%)', q: ['What is the Level 4 override?', 'Do I earn from my fourth level?', 'How does the 3% override work?'], tags: ['override', 'level 4', 'fourth level', 'commission', 'payouts'],
re: /(level ?(4|four)|4th level|fourth level|override|3 ?%|three percent)/i, re: /(level ?(4|four)|4th level|fourth level|override|3 ?%|three percent)/i,
a: 'The Level 4 override is 3% of every package bought four levels below you, paid by the company on top of the three levels the contract pays. It goes to the buyer’s 4th sponsor up if that member has 5 or more qualifying buyers (direct referrals who bought $20 or more, the same bar as level 3). If they do not have 5 yet, it moves up the line to the next member who does, up to 25 steps, and each purchase pays one override to one person. It is paid weekly in POL from a company wallet, every Monday after 9 AM Central for the Monday to Sunday week before, through the contract’s award function, so every payment has a Polygon link, and it shows in your Earnings as "Level 4 override". Weekly totals under 0.01 POL carry over to the next week. It counts purchases from the start date on, not earlier ones. It comes from the platform’s 20% share, so the 50/20/10 split does not change. What you earn depends on real purchases in your line; nothing is guaranteed.' }, a: 'The Level 4 override is 3% of every package bought four levels below you, paid by the company on top of the three levels the contract pays. It goes to the buyer’s 4th sponsor up if that member has 5 or more qualifying buyers (direct referrals who bought $20 or more, the same bar as level 3). If they do not have 5 yet, it moves up the line to the next member who does, up to 25 steps, and each purchase pays one override to one person. It is paid weekly in POL from a company wallet, every Monday after 9 AM Central for the Monday to Sunday week before, through the contract’s award function, so every payment has a Polygon link, and it shows in your Earnings as "Level 4 override". Weekly totals under 0.01 POL carry over to the next week. It counts purchases from the start date on, not earlier ones. It comes from the platform’s 20% share, so the 50/20/10 split does not change. What you earn depends on real purchases in your line; nothing is guaranteed.' },
@@ -241,7 +260,15 @@ function synFact() { const n = SYN_N(); return '- NETWORK RATE (live, Marty 2026
let REFUEL_ON = () => false; let REFUEL_ON = () => false;
// POL Miner (2026-10-28) follows site config gamesLive: until 'polminer' is in it the assistant only says it is coming soon // POL Miner (2026-10-28) follows site config gamesLive: until 'polminer' is in it the assistant only says it is coming soon
let GAME_LIVE = () => false; let GAME_LIVE = () => false;
const POLMINER_SOON_ANSWER = 'POL Miner, a dig-down mining game where rare Polygon crystals pay POL, is coming soon to the InstantAdPay games. It is not open yet; it will show up on your Games tab (Members > Games) and in the release notes when it launches.'; // BixPay (2026-10-29) follows site config bixpayLive: until it is on the assistant only says the card is coming soon
let BIX_LIVE = () => false;
const bixLive = () => { try { return !!BIX_LIVE(); } catch (e) { return false; } };
const isBixId = id => /^(c-)?bixpay(-[a-z]+)?$/.test(String(id || ''));
const BIX_SOON_ANSWER = 'A BixPay Visa card for spending POL is coming to InstantAdPay soon: a self-custody wallet with a Visa card, made by BIX, a separate company. It is not switched on here yet. When it is, it shows up on your Wallet tab, with a partner-link field in your Profile and a guide at instantadpay.com/bixpay, and the release notes will say so.';
function bixFact() { return bixLive()
? '- BIXPAY VISA CARD (LIVE, 2026-10-29): BixPay = a self-custody wallet + Visa card made by BIX, a SEPARATE company (not InstantAdPay). The member sends USDT or USDC to the BixPay wallet on Polygon, loads the card, spends wherever Visa is accepted incl. Apple Pay and Google Pay. Virtual card $9.99 (plastic, metal and gold cost more). The ONLY fee we state: 3% per purchase, no load fee; for anything else say "see BIX’s terms". US: open in 31 states so far; not in your state yet = you can still get the wallet and build; elsewhere availability varies by country; KYC required for the card. Funding POL -> card: (1) swap POL to USDT/USDC on any exchange or on-ramp, send on Polygon (app: Wallet > Receive > USDT or USDC > Polygon address); (2) US: Cash App can send crypto straight to the BixPay wallet; (3) an in-app swap is announced by BIX but NOT live: never say members can swap POL inside the app today. Sign-up steps: partner link -> register in the BIX portal (bix.ibportal.io) -> download the BIX app -> Settings > Scan QR to link app and portal -> Cards > Create Card ($9.99 virtual). Partner plan, plain words: BIX puts half of the 3% fee and of card sales into its partner plan, paid over ten levels (15% level 1, 10% level 2, 2.5% each on levels 3 to 10) plus a 5% pool; sign-ups and commissions are tracked and paid by BIX in the BIX portal, never by InstantAdPay; any worked example is hypothetical, not typical, and never a promise. Disputes: BIX accepts a dispute up to 120 days after a transaction posts; they can take 30 to 60 business days. WHERE: Members > Wallet (the card with Get your BixPay card + How it works), Members > Profile > BixPay card (the member pastes their PARTNER link from BIX portal > Profile > Partner, the second box; the referral link with appId=3 is refused), Promo tools > BixPay tab (3 posts, an email swipe, 4 text-only banners, all carrying the member’s link, plus the tab’s click count), the public guide https://instantadpay.com/bixpay (add ?ref=<username> and the page carries that member’s link), one sentence in payout emails. WHOSE LINK: the member’s own partner link, else the first sponsor up the chain (10 levels) with one, else the network link; every card says which ("Using: your link / @name’s link / the network link"). Compliance: InstantAdPay is not the card issuer and earns a referral commission when someone signs up through a partner link; crypto assets can lose value. NEVER repeat BIX marketing claims (user counts, cards issued, spend per day, valuations, "bigger than X") as facts; if asked, say those are BIX’s own claims and we have not verified them.\n'
: '- BIXPAY VISA CARD: COMING SOON, not switched on yet. If asked about BixPay, BIX, a crypto Visa card or spending POL with a card, say it is coming to the Wallet tab soon and nothing is live yet; never quote its fees, steps, links or the partner plan until it is on.\n'; }
const POLMINER_SOON_ANSWER ='POL Miner, a dig-down mining game where rare Polygon crystals pay POL, is coming soon to the InstantAdPay games. It is not open yet; it will show up on your Games tab (Members > Games) and in the release notes when it launches.';
const pmLive = () => { try { return !!GAME_LIVE('polminer'); } catch (e) { return false; } }; const pmLive = () => { try { return !!GAME_LIVE('polminer'); } catch (e) { return false; } };
function polminerFact() { return pmLive() ? '- POL MINER (https://polminer.com, Members > Games): a free dig-down mining game. Dig, sell ore for coins, upgrade pick/lamp/cart/thruster, beat a drill boss every 30 m. Pink Polygon crystals pay a random POL amount the first time each one is dug out; each boss pays POL on its first win per account; first trips to 50/100/150/200 m pay POL. Coins never turn into POL. Guests can play and collect at sign-in. POL is paid automatically to the wallet linked on InstantAdPay. The SUPPLY pad opens a sponsored supply crate (full lamp + coins, never POL) after a short sponsor visit.\n' : '- POL MINER: COMING SOON, not open yet. Never send members to polminer.com; say it is coming soon to the Games tab.\n'; } function polminerFact() { return pmLive() ? '- POL MINER (https://polminer.com, Members > Games): a free dig-down mining game. Dig, sell ore for coins, upgrade pick/lamp/cart/thruster, beat a drill boss every 30 m. Pink Polygon crystals pay a random POL amount the first time each one is dug out; each boss pays POL on its first win per account; first trips to 50/100/150/200 m pay POL. Coins never turn into POL. Guests can play and collect at sign-in. POL is paid automatically to the wallet linked on InstantAdPay. The SUPPLY pad opens a sponsored supply crate (full lamp + coins, never POL) after a short sponsor visit.\n' : '- POL MINER: COMING SOON, not open yet. Never send members to polminer.com; say it is coming soon to the Games tab.\n'; }
function refuelFact() { return REFUEL_ON() ? "- MONTHLY REFUEL STREAK (built 2026-10-24, switch refuelStreak): ONE streak per member across InstantAdPay and LinkSpin. Counted refuel = a NEW package of $20+ on InstantAdPay or $25+ on LinkSpin by one of the member's own positions. First one sets the member's own refuel day; next due 30 days after the last counted refuel; window opens 5 days before the due day; 5-day grace after it; Central time. Missing the grace resets the streak, except one free miss per 365 days. Bonus (purchased-grade ad credits on the site where bought, credit log 'Refuel streak'): one engine m1 +10%, m2 +15%, m3 +20%, m4+ +25%; both sites in the same cycle m1 +15%, m2 +20%, m3 +30%, m4+ +40% each (first site topped up to the both rate, difference only) plus a 100-credit Featured bonus on InstantAdPay at m4+ (purchased-grade credits, any format). Stacks on Five Dollar Friday / Wired Wednesday. Pit Stop: another $20+/$25+ package on a site already refueled this cycle, before the next window opens (the other site's first package in the cycle is the second engine instead) = half the current streak rate, once per site per cycle, not a counted refuel. Badges: Engine Started (first refuel), Refueled 3 / 6 / 12 months. ENGINE ROOM: unlocked by the first counted refuel (greyed 'Refuel to start your engine' before), IAP tab Engine Room + LinkSpin Ads screen panel, same data both sites: dials Fuel left (credits free + in campaigns on both sites vs this cycle's refuel credits incl. bonus, days left at the recent burn), Clicks this week (vs last week, clicks per 1,000 credits), Goals this month (conversion pixel conversions since the 1st Central vs the member's own goal); streak panel; warning lights (ads at 80%, ads out, refuel day coming, login slot open); six part lights (fuel, banner spin, spin link, page, testing, conversion tracking: green working, amber needs attention, grey not started with a Set it up link); one Next move button from simple rules. REFUEL KIT: each counted refuel unlocks the Central-month's members-only banner set for this site's own program (5 sizes, personalized server-side with @username + QR to the member's link; IAP: Promo tools card with Use in an IAP banner campaign; LinkSpin: Ads screen card with Load into my Banner Spin); kits stay usable after the month; streak month 3+ adds an animated GIF, month 6+ a BannerKitAI custom-banners credit (coming, entitlement saved). Reminders 5 days before, on the day, last call at the end of grace (email + on-site notice). The member's Refuel card (InstantAdPay Overview, LinkSpin Credits/Ads) shows refuel day, streak, next bonus, Pit Stop status. Either site alone keeps the streak (one-engine rates); both sites in one cycle = the bigger bonus; never say both are required. MEMBER GUIDE PAGE (public, 2026-10-24): /refuel on both sites (https://instantadpay.com/refuel and https://linkspin.app/refuel): the flow, the numbers, the member steps, leader coaching and FAQ; point members there for the full picture. Ad credits only, never cash; never promise income. No auto-billing: the member chooses every package. ROUTES (2026-10-25): LinkSpin menu item Refuel = https://linkspin.app/credits#refuel (the Refuel panel, scrolled to and highlighted); packages of $25+ there are marked counts for Refuel; https://linkspin.app/credits#buy = the package picker; https://linkspin.app/ads#engine = LinkSpin Engine Room. InstantAdPay Engine Room = https://instantadpay.com/my#engine; its Set up conversion tracking opens https://instantadpay.com/my#conversions (Campaigns > Conversion tracking card, same goals LinkSpin counts). Engine Room links that cross to LinkSpin (Banner Spin, spin link, page, testing, refuel LinkSpin) open LinkSpin with a note at the top naming the job, Step 1, a guide link and Back to InstantAdPay; same email signs in on both.\n" : '- MONTHLY REFUEL STREAK: built but NOT switched on yet. If asked, say it is coming and nothing counts toward it today; do not quote bonus rates or dates.\n'; } function refuelFact() { return REFUEL_ON() ? "- MONTHLY REFUEL STREAK (built 2026-10-24, switch refuelStreak): ONE streak per member across InstantAdPay and LinkSpin. Counted refuel = a NEW package of $20+ on InstantAdPay or $25+ on LinkSpin by one of the member's own positions. First one sets the member's own refuel day; next due 30 days after the last counted refuel; window opens 5 days before the due day; 5-day grace after it; Central time. Missing the grace resets the streak, except one free miss per 365 days. Bonus (purchased-grade ad credits on the site where bought, credit log 'Refuel streak'): one engine m1 +10%, m2 +15%, m3 +20%, m4+ +25%; both sites in the same cycle m1 +15%, m2 +20%, m3 +30%, m4+ +40% each (first site topped up to the both rate, difference only) plus a 100-credit Featured bonus on InstantAdPay at m4+ (purchased-grade credits, any format). Stacks on Five Dollar Friday / Wired Wednesday. Pit Stop: another $20+/$25+ package on a site already refueled this cycle, before the next window opens (the other site's first package in the cycle is the second engine instead) = half the current streak rate, once per site per cycle, not a counted refuel. Badges: Engine Started (first refuel), Refueled 3 / 6 / 12 months. ENGINE ROOM: unlocked by the first counted refuel (greyed 'Refuel to start your engine' before), IAP tab Engine Room + LinkSpin Ads screen panel, same data both sites: dials Fuel left (credits free + in campaigns on both sites vs this cycle's refuel credits incl. bonus, days left at the recent burn), Clicks this week (vs last week, clicks per 1,000 credits), Goals this month (conversion pixel conversions since the 1st Central vs the member's own goal); streak panel; warning lights (ads at 80%, ads out, refuel day coming, login slot open); six part lights (fuel, banner spin, spin link, page, testing, conversion tracking: green working, amber needs attention, grey not started with a Set it up link); one Next move button from simple rules. REFUEL KIT: each counted refuel unlocks the Central-month's members-only banner set for this site's own program (5 sizes, personalized server-side with @username + QR to the member's link; IAP: Promo tools card with Use in an IAP banner campaign; LinkSpin: Ads screen card with Load into my Banner Spin); kits stay usable after the month; streak month 3+ adds an animated GIF, month 6+ a BannerKitAI custom-banners credit (coming, entitlement saved). Reminders 5 days before, on the day, last call at the end of grace (email + on-site notice). The member's Refuel card (InstantAdPay Overview, LinkSpin Credits/Ads) shows refuel day, streak, next bonus, Pit Stop status. Either site alone keeps the streak (one-engine rates); both sites in one cycle = the bigger bonus; never say both are required. MEMBER GUIDE PAGE (public, 2026-10-24): /refuel on both sites (https://instantadpay.com/refuel and https://linkspin.app/refuel): the flow, the numbers, the member steps, leader coaching and FAQ; point members there for the full picture. Ad credits only, never cash; never promise income. No auto-billing: the member chooses every package. ROUTES (2026-10-25): LinkSpin menu item Refuel = https://linkspin.app/credits#refuel (the Refuel panel, scrolled to and highlighted); packages of $25+ there are marked counts for Refuel; https://linkspin.app/credits#buy = the package picker; https://linkspin.app/ads#engine = LinkSpin Engine Room. InstantAdPay Engine Room = https://instantadpay.com/my#engine; its Set up conversion tracking opens https://instantadpay.com/my#conversions (Campaigns > Conversion tracking card, same goals LinkSpin counts). Engine Room links that cross to LinkSpin (Banner Spin, spin link, page, testing, refuel LinkSpin) open LinkSpin with a note at the top naming the job, Step 1, a guide link and Back to InstantAdPay; same email signs in on both.\n" : '- MONTHLY REFUEL STREAK: built but NOT switched on yet. If asked, say it is coming and nothing counts toward it today; do not quote bonus rates or dates.\n'; }
@@ -251,7 +278,7 @@ function systemPrompt(kbBlock) {
FACTS: FACTS:
- LEVEL 4 OVERRIDE (LIVE 2026-10-26, first payout Monday 2026-11-02): company-paid, off-chain decision, on-chain payment. 3% of every package purchase (the POL actually paid) goes to the buyer's 4th upline on the contract sponsor chain if that member's contract buyerCount is 5 or more (qualifying buyer = direct referral with a $20+ purchase, same bar as level 3); otherwise it hunts up to the next qualified upline, max 25 hops; the company account (#1) or no qualified upline = company keeps it; exactly one recipient per purchase. Paid weekly in POL every Monday after 9 AM Central for the previous Monday to Sunday Central week, from a company payer wallet via the contract's award(memberId), shown in Earnings as 'Level 4 override' with a Polygon link and announced by email and an on-site notice. Under 0.01 POL carries to the next week. Purchases from the start date only, no back pay. Funded from the platform's 20%; the contract split 50/20/10 is unchanged. Never promise amounts. - LEVEL 4 OVERRIDE (LIVE 2026-10-26, first payout Monday 2026-11-02): company-paid, off-chain decision, on-chain payment. 3% of every package purchase (the POL actually paid) goes to the buyer's 4th upline on the contract sponsor chain if that member's contract buyerCount is 5 or more (qualifying buyer = direct referral with a $20+ purchase, same bar as level 3); otherwise it hunts up to the next qualified upline, max 25 hops; the company account (#1) or no qualified upline = company keeps it; exactly one recipient per purchase. Paid weekly in POL every Monday after 9 AM Central for the previous Monday to Sunday Central week, from a company payer wallet via the contract's award(memberId), shown in Earnings as 'Level 4 override' with a Polygon link and announced by email and an on-site notice. Under 0.01 POL carries to the next week. Purchases from the start date only, no back pay. Funded from the platform's 20%; the contract split 50/20/10 is unchanged. Never promise amounts.
${passTiersFact()}${refuelFact()}${synFact()}${polminerFact()}- ROAD AGENT (LIVE 2026-10-15, https://roadagent.app): a night-highway shooter open to every member. Open the Games tab and tap Play on the Road Agent card, or go to roadagent.app and sign in with the InstantAdPay email. Drive the four-lane highway, shoot the hostiles (thug sedans, switchblades, gunner vans), spare the civilians, pull into the weapons truck for oil slicks, smoke and missiles. Clearing a sector for the first time pays POL to the wallet on the member's InstantAdPay account, plus a daily patrol reward; scrap buys garage upgrades. Fuel = a sponsor visit: before a run the player visits an advertiser's page (a FUEL STOP), which is a normal verified visit with the dwell timer and human check, charged to the advertiser like any visit; advertisers' existing visits campaigns are already in the rotation, nothing to set up; to get more traffic from the game, top up the visits campaign. Clickable Pause, Sound and Music buttons sit under the game (P / M / N keys also work), and the Run tab has an Invite a friend card with the member's roadagent.app/?ref=<username> link. ${passTiersFact()}${refuelFact()}${synFact()}${polminerFact()}${bixFact()}- ROAD AGENT (LIVE 2026-10-15, https://roadagent.app): a night-highway shooter open to every member. Open the Games tab and tap Play on the Road Agent card, or go to roadagent.app and sign in with the InstantAdPay email. Drive the four-lane highway, shoot the hostiles (thug sedans, switchblades, gunner vans), spare the civilians, pull into the weapons truck for oil slicks, smoke and missiles. Clearing a sector for the first time pays POL to the wallet on the member's InstantAdPay account, plus a daily patrol reward; scrap buys garage upgrades. Fuel = a sponsor visit: before a run the player visits an advertiser's page (a FUEL STOP), which is a normal verified visit with the dwell timer and human check, charged to the advertiser like any visit; advertisers' existing visits campaigns are already in the rotation, nothing to set up; to get more traffic from the game, top up the visits campaign. Clickable Pause, Sound and Music buttons sit under the game (P / M / N keys also work), and the Run tab has an Invite a friend card with the member's roadagent.app/?ref=<username> link.
- HELP DESK (LIVE 2026-10-16): members open Help in the dashboard (/my#help) to send Marty a support ticket (pick a category, a subject, the message, up to 2 screenshots), see each ticket's status (Open, Waiting on you, Closed) and read and answer his replies; a badge shows when he has replied, and replies also arrive by email. Anyone signed out or locked out uses the public form at https://instantadpay.com/support (name, email, category, subject, message) and gets an email with the ticket number (like IAP-1042) and a private link to view and reply, no sign-in needed. support@instantadpay.com also reaches Marty. Replying to a closed ticket opens it again. In this chat, "Send this to support" turns the conversation into a ticket. Only Marty answers, so replies are not instant; never promise a response time. - HELP DESK (LIVE 2026-10-16): members open Help in the dashboard (/my#help) to send Marty a support ticket (pick a category, a subject, the message, up to 2 screenshots), see each ticket's status (Open, Waiting on you, Closed) and read and answer his replies; a badge shows when he has replied, and replies also arrive by email. Anyone signed out or locked out uses the public form at https://instantadpay.com/support (name, email, category, subject, message) and gets an email with the ticket number (like IAP-1042) and a private link to view and reply, no sign-in needed. support@instantadpay.com also reaches Marty. Replying to a closed ticket opens it again. In this chat, "Send this to support" turns the conversation into a ticket. Only Marty answers, so replies are not instant; never promise a response time.
- PRESENTATION (2026-10-15): instantadpay.com/presentation is a public page (no sign-in) with the narrated InstantAdPay presentation, about six minutes, Marty's voice, captions in 6 languages (English, Italiano, Français, Español, Deutsch, Português) chosen with pills under the player. Sixteen parts: the platform, ad reach, the nine games that pay POL, the $20 split ($10 / $4 / $2 / $4 platform, same transaction), three rules, packages, the 2-then-5 unlock, pass-up, wide versus narrow ($800 vs $36, an illustration), Qualified Start, the Pipeline, LinkSpin (pre-launch Nov 1), one wallet across the network, the first week, and 'the target is five'. Share link: Members > Promo tools > 'Share the presentation' copies instantadpay.com/presentation?ref=<username>; ?ref sets the same 30-day sponsor cookie as the invite link, the page shows 'Shared with you by @name' with avatar and a Join button to /join/<username>. It is in the site menu as 'Presentation'. BUILD WIDE VIDEO: first card in Promo tools > Videos ('Build wide: watch the payments flow'), matched link ?v=wide. - PRESENTATION (2026-10-15): instantadpay.com/presentation is a public page (no sign-in) with the narrated InstantAdPay presentation, about six minutes, Marty's voice, captions in 6 languages (English, Italiano, Français, Español, Deutsch, Português) chosen with pills under the player. Sixteen parts: the platform, ad reach, the nine games that pay POL, the $20 split ($10 / $4 / $2 / $4 platform, same transaction), three rules, packages, the 2-then-5 unlock, pass-up, wide versus narrow ($800 vs $36, an illustration), Qualified Start, the Pipeline, LinkSpin (pre-launch Nov 1), one wallet across the network, the first week, and 'the target is five'. Share link: Members > Promo tools > 'Share the presentation' copies instantadpay.com/presentation?ref=<username>; ?ref sets the same 30-day sponsor cookie as the invite link, the page shows 'Shared with you by @name' with avatar and a Join button to /join/<username>. It is in the site menu as 'Presentation'. BUILD WIDE VIDEO: first card in Promo tools > Videos ('Build wide: watch the payments flow'), matched link ?v=wide.
- WIRED WEDNESDAY: every Wednesday, Central time (midnight to midnight), any ad package of $20 or more (Activation and up; no $10 pack exists) earns +25% bonus credits wired into the buyer's balance the moment the purchase settles, purchased-grade (usable on every format incl. login ads), credit log label "Wired Wednesday". First one: Wednesday 2026-09-30. Page: instantadpay.com/wednesday. Credits buy ad delivery, never money. - WIRED WEDNESDAY: every Wednesday, Central time (midnight to midnight), any ad package of $20 or more (Activation and up; no $10 pack exists) earns +25% bonus credits wired into the buyer's balance the moment the purchase settles, purchased-grade (usable on every format incl. login ads), credit log label "Wired Wednesday". First one: Wednesday 2026-09-30. Page: instantadpay.com/wednesday. Credits buy ad delivery, never money.
@@ -326,7 +353,7 @@ ${passTiersFact()}${refuelFact()}${synFact()}${polminerFact()}- ROAD AGENT (LIVE
- SPOOKY DOORS (Halloween season game, 2026-10-02): https://spookydoors.com, open 2026-10-04 through Halloween night (closes at midnight Central at the end of Oct 31); its Games tab card shows only during the season, with a "Limited time, ends Oct 31" ribbon. Members sign in with one tap from Members > Games. Walk the street, collect candy, avoid black cats and bats, knock on doors. Each door is a verified visit to a member's page or ad (a member video once every page has been visited), the advertiser is charged as for any visit, the player gets candy not credits; 15 doors per Central day, separate from the 20 Earn-tab visits and the 20 Drip Runner refuels. A treat is 10 candy; about 1 door in 5 is a trick (a ghost or skeleton you tap 5 times quickly; beat it for a 3 candy bonus, miss it for half the treat). If no paid ad is left for that player, the door shows a house ad for one of our own programs: a smaller treat (5 candy), and it still counts toward the 15 doors. CANDY LADDER pays POL once per rung: 100 candy 0.1 POL, 250 0.25, 500 0.5, 1,000 1, 2,000 2 (Halloween 2026 badge at 500), paid from a season pool funded by a share of door ad spend and costume sales, only while the pool covers it; the game balance is sent to the member's InstantAdPay wallet on Polygon at 0.25 POL. COSTUMES bought with ad credits like Gem Kingdom Crowns: witch free, vampire 300 credits (longer trick timer), bedsheet ghost 300 (black cats ignore you), Lucky caramel apple 500 (+2 candy per treat); no cash value. Top 20 by candy on the season leaderboard. DOOR PACKS: creating a verified-visits campaign, the advertiser picks Everywhere (3 credits per visit, as before), Behind Spooky Doors (4 credits per door) or Golden Spooky Door (6 credits per door; the player gets +2 bonus candy). Paid up front like any visit pack. Door packs are served first on doors (Golden Doors before door packs), each player sees a pack at most once per Central day, they never run on the Earn tab or refuels during the season, and from Nov 1 any doors left run as normal visits; the campaign shows doors opened and unique players. Never promise earnings or call it income. - SPOOKY DOORS (Halloween season game, 2026-10-02): https://spookydoors.com, open 2026-10-04 through Halloween night (closes at midnight Central at the end of Oct 31); its Games tab card shows only during the season, with a "Limited time, ends Oct 31" ribbon. Members sign in with one tap from Members > Games. Walk the street, collect candy, avoid black cats and bats, knock on doors. Each door is a verified visit to a member's page or ad (a member video once every page has been visited), the advertiser is charged as for any visit, the player gets candy not credits; 15 doors per Central day, separate from the 20 Earn-tab visits and the 20 Drip Runner refuels. A treat is 10 candy; about 1 door in 5 is a trick (a ghost or skeleton you tap 5 times quickly; beat it for a 3 candy bonus, miss it for half the treat). If no paid ad is left for that player, the door shows a house ad for one of our own programs: a smaller treat (5 candy), and it still counts toward the 15 doors. CANDY LADDER pays POL once per rung: 100 candy 0.1 POL, 250 0.25, 500 0.5, 1,000 1, 2,000 2 (Halloween 2026 badge at 500), paid from a season pool funded by a share of door ad spend and costume sales, only while the pool covers it; the game balance is sent to the member's InstantAdPay wallet on Polygon at 0.25 POL. COSTUMES bought with ad credits like Gem Kingdom Crowns: witch free, vampire 300 credits (longer trick timer), bedsheet ghost 300 (black cats ignore you), Lucky caramel apple 500 (+2 candy per treat); no cash value. Top 20 by candy on the season leaderboard. DOOR PACKS: creating a verified-visits campaign, the advertiser picks Everywhere (3 credits per visit, as before), Behind Spooky Doors (4 credits per door) or Golden Spooky Door (6 credits per door; the player gets +2 bonus candy). Paid up front like any visit pack. Door packs are served first on doors (Golden Doors before door packs), each player sees a pack at most once per Central day, they never run on the Earn tab or refuels during the season, and from Nov 1 any doors left run as normal visits; the campaign shows doors opened and unique players. Never promise earnings or call it income.
- GEM KINGDOM (LIVE in the Games tab since 2026-10-02): Gem Kingdom (https://gemkingdom.app) is a free fantasy match-3: match gems so three heroes battle monsters across six chapters (Goblin Woods, the Frozen Pass, the Haunted Swamp, Dragon's Peak, the Sunken Reef, the Shadow Citadel), earn stars, and rebuild your Stronghold and forge weapons. It pays POL for FIRST clears only (stages 0.02 to 0.15 POL rising by chapter; bosses 0.25, 0.5, 2, 5, 7.5 and 10 POL for the Goblin King, Ice Queen, Bog Witch, Ember Dragon, Kraken and Shadow King); replays pay nothing. The game balance is sent to the member's InstantAdPay wallet on Polygon at 0.25 POL. Rewards come from a pool funded by a share of Crown purchases and pay only while the pool has funds; never promise earnings or call it income. No referral bonus on game clears. Crowns, its upgrade currency, are bought with your InstantAdPay ad credits: tap Buy in the game's Crown Shop, confirm on InstantAdPay (top up with a pack if you are short), and you land back in the game with the Crowns added. Crowns buy buildings, weapons, battle boosts and a revive after a defeat. Sign in with your InstantAdPay account to save progress, earn badges and appear in the Game Achievements posts in the Crypto Team Build group. Never promise an amount beyond the posted rewards. (2026-10-03) FREE REVIVE: after a defeat, a short verified visit to a member's page (InstantAdPay verified-visit flow inside the game, shares the 20-a-day refuel allowance with Drip Runner) revives the party once per battle; a revived win earns at most 2 stars. SPECIALS in the Crown shop: Hero Bundle (one time, $5 = 500 credits: a tier-1 forge weapon, one building level, 60 Crowns), Kingdom Pass ($10 = 1,000 credits for 30 days: 10 Crowns a day credited on the first visit each Central day, a 25-Crown chest every 7 days, the three Royal hero looks; no auto-renew, buying again adds 30 days), Hero looks (cosmetic only: Halloween looks Pumpkin Knight, Moon Witch, Scarecrow Ranger for 40 Crowns each, sold through Oct 31 and kept forever; Royal looks with the Pass). Only the purchased-credit part of a purchase funds the POL reward pool. - GEM KINGDOM (LIVE in the Games tab since 2026-10-02): Gem Kingdom (https://gemkingdom.app) is a free fantasy match-3: match gems so three heroes battle monsters across six chapters (Goblin Woods, the Frozen Pass, the Haunted Swamp, Dragon's Peak, the Sunken Reef, the Shadow Citadel), earn stars, and rebuild your Stronghold and forge weapons. It pays POL for FIRST clears only (stages 0.02 to 0.15 POL rising by chapter; bosses 0.25, 0.5, 2, 5, 7.5 and 10 POL for the Goblin King, Ice Queen, Bog Witch, Ember Dragon, Kraken and Shadow King); replays pay nothing. The game balance is sent to the member's InstantAdPay wallet on Polygon at 0.25 POL. Rewards come from a pool funded by a share of Crown purchases and pay only while the pool has funds; never promise earnings or call it income. No referral bonus on game clears. Crowns, its upgrade currency, are bought with your InstantAdPay ad credits: tap Buy in the game's Crown Shop, confirm on InstantAdPay (top up with a pack if you are short), and you land back in the game with the Crowns added. Crowns buy buildings, weapons, battle boosts and a revive after a defeat. Sign in with your InstantAdPay account to save progress, earn badges and appear in the Game Achievements posts in the Crypto Team Build group. Never promise an amount beyond the posted rewards. (2026-10-03) FREE REVIVE: after a defeat, a short verified visit to a member's page (InstantAdPay verified-visit flow inside the game, shares the 20-a-day refuel allowance with Drip Runner) revives the party once per battle; a revived win earns at most 2 stars. SPECIALS in the Crown shop: Hero Bundle (one time, $5 = 500 credits: a tier-1 forge weapon, one building level, 60 Crowns), Kingdom Pass ($10 = 1,000 credits for 30 days: 10 Crowns a day credited on the first visit each Central day, a 25-Crown chest every 7 days, the three Royal hero looks; no auto-renew, buying again adds 30 days), Hero looks (cosmetic only: Halloween looks Pumpkin Knight, Moon Witch, Scarecrow Ranger for 40 Crowns each, sold through Oct 31 and kept forever; Royal looks with the Pass). Only the purchased-credit part of a purchase funds the POL reward pool.
- GAME POL TO ANY LINKED WALLET (2026-10-27, Marty): game POL (Drip Runner, Gem Kingdom, ClutterHunt, Spooky Doors, Road Agent, PolyBreak, SpellWheel, PolyWarriors) is paid to the wallet LINKED to the member's InstantAdPay account (one free signature on the Wallet tab, https://instantadpay.com/my#wallet). Activation is NOT needed: a linked wallet that has not switched on payouts (for example a holding-tank member waiting for a sponsor) is paid too. InstantAdPay hands the linked wallet to every game where the member has a balance (hourly, and on every sign-in to a game), and the game sends the POL on its own sweep once the balance reaches that game's payout line, including everything earned before the link. A game that already holds a different wallet keeps paying that one (it is never replaced automatically). Players with no linked wallet get at most three reminders ("X POL is waiting for your wallet": link your wallet, one free signature, and it's sent automatically, including everything you've earned so far), and in the games the reward screen says "Link your wallet to receive this POL" with the same link. Never tell a member to switch on payouts to get game POL. - GAME POL TO ANY LINKED WALLET (2026-10-27, Marty): game POL (Drip Runner, Gem Kingdom, ClutterHunt, Spooky Doors, Road Agent, PolyBreak, SpellWheel, PolyWarriors) is paid to the wallet LINKED to the member's InstantAdPay account (one free signature on the Wallet tab, https://instantadpay.com/my#wallet). Activation is NOT needed: a linked wallet that has not switched on payouts (for example a holding-tank member waiting for a sponsor) is paid too. InstantAdPay hands the linked wallet to every game where the member has a balance (hourly, and on every sign-in to a game), and the game sends the POL on its own sweep once the balance reaches that game's payout line, including everything earned before the link. A game that already holds a different wallet keeps paying that one (it is never replaced automatically). Players with no linked wallet get at most three reminders ("X POL is waiting for your wallet": link your wallet, one free signature, and it's sent automatically, including everything you've earned so far), and in the games the reward screen says "Link your wallet to receive this POL" with the same link. Never tell a member to switch on payouts to get game POL.
- GAMES TAB (2026-10-01): Members > Games (/my#games) shows one card per network game (as of 2026-10-15: PolHunter, Drip Runner, Gem Kingdom, ClutterHunt, SpellWheel, PolyWarriors, PolyBreak, Road Agent, Spooky Doors during Halloween; all pay POL to the member's InstantAdPay wallet), with their own progress and a Play button that signs them in with one tap; new games appear there as they launch (PolHunter is one card). DRIP RUNNER (https://driprunner.app, LIVE for every member since 2026-10-01): tap-to-hop runner; gold drips, magenta bots, orange firewalls from chapter 2; each chapter has a drip goal for one run; the FIRST clear of a chapter pays a small POL drip (amount set by the admin, shown in the game) into the game balance, replays pay nothing; the balance is sent on Polygon to the member's InstantAdPay wallet once it reaches the payout line shown in the game. REFUELS: a run that ends can be refuelled with a verified visit to a member's page (a member video once every page has been visited), up to 20 a day, separate from the 20 Earn-tab visits; the advertiser is charged as for any visit, the player gets fuel not credits. The POL pool is funded ONLY by a share of refuel ad spend plus POL spent in the hangar, so drips depend on refuels and can be zero when the pool is empty; say so honestly. HANGAR: Drip Magnet and Courier Mk II cost drips (game currency); Shield Core and Slow Field cost POL from the game balance, which returns to the pool. GUESTS can try a run without signing in; their clears pay once they sign in. REFERRALS: each player's share link /r/<username>; when members whose InstantAdPay sponsor is that player refuel, a share (10 percent by default) of each refuel's pool income goes to the sponsor's game balance. Telegram posts achievement badges (chapters, unlocks, refuel milestones, payouts). Never promise amounts or income. The public list of every game, open now and opening next, is https://instantadpay.com/games (shareable; add ?ref=<username> to keep the referral). - GAMES TAB (2026-10-01): Members > Games (/my#games) shows one card per network game (as of 2026-10-15: PolHunter, Drip Runner, Gem Kingdom, ClutterHunt, SpellWheel, PolyWarriors, PolyBreak, Road Agent, Spooky Doors during Halloween; all pay POL to the member's InstantAdPay wallet), with their own progress and a Play button that signs them in with one tap; new games appear there as they launch (PolHunter is one card). DRIP RUNNER (https://driprunner.app, LIVE for every member since 2026-10-01): tap-to-hop runner; gold drips, magenta bots, orange firewalls from chapter 2; each chapter has a drip goal for one run; the FIRST clear of a chapter pays a small POL drip (amount set by the admin, shown in the game) into the game balance, replays pay nothing; the balance is sent on Polygon to the member's InstantAdPay wallet once it reaches the payout line shown in the game. REFUELS: a run that ends can be refuelled with a verified visit to a member's page (once every page has been visited: a member video, a page seen more than 7 days ago again, or one of the network's own programs, so a game visit is never empty; since 2026-10-28 for every game's refuel, paddle, continue, hint and supply crate), up to 20 a day, separate from the 20 Earn-tab visits; the advertiser is charged as for any visit, the player gets fuel not credits. The POL pool is funded ONLY by a share of refuel ad spend plus POL spent in the hangar, so drips depend on refuels and can be zero when the pool is empty; say so honestly. HANGAR: Drip Magnet and Courier Mk II cost drips (game currency); Shield Core and Slow Field cost POL from the game balance, which returns to the pool. GUESTS can try a run without signing in; their clears pay once they sign in. REFERRALS: each player's share link /r/<username>; when members whose InstantAdPay sponsor is that player refuel, a share (10 percent by default) of each refuel's pool income goes to the sponsor's game balance. Telegram posts achievement badges (chapters, unlocks, refuel milestones, payouts). Never promise amounts or income. The public list of every game, open now and opening next, is https://instantadpay.com/games (shareable; add ?ref=<username> to keep the referral).
- Every purchase is split by an immutable smart contract in the same transaction: 50% direct sponsor, 20% level 2, 10% level 3, 20% platform. No withdrawals exist; money lands in members' own wallets instantly. - Every purchase is split by an immutable smart contract in the same transaction: 50% direct sponsor, 20% level 2, 10% level 3, 20% platform. No withdrawals exist; money lands in members' own wallets instantly.
- Qualification: level 1 open to all; 2 buyers of $20+ unlock level 2; 5 unlock level 3. Unqualified shares pass up the sponsor line, checking up to 25 positions, else the platform receives them. Qualification cannot be bought and never expires. - Qualification: level 1 open to all; 2 buyers of $20+ unlock level 2; 5 unlock level 3. Unqualified shares pass up the sponsor line, checking up to 25 positions, else the platform receives them. Qualification cannot be bought and never expires.
- Every member gets a share link immediately (site code, /join/<code>); the contract locks a buyer to their sponsor at the buyer's FIRST purchase, so members should switch on payouts before their referrals buy. - Every member gets a share link immediately (site code, /join/<code>); the contract locks a buyer to their sponsor at the buyer's FIRST purchase, so members should switch on payouts before their referrals buy.
@@ -398,15 +425,16 @@ async function answerRaw(message, historyText) {
try { hit = await kb.fastPath(msg); } catch (e) { kbOk = false; console.error('kb fast path', e.message); } try { hit = await kb.fastPath(msg); } catch (e) { kbOk = false; console.error('kb fast path', e.message); }
if (hit && hit.id === 'refuel' && !REFUEL_ON()) return { reply: REFUEL_OFF_ANSWER, canned: true, kb: hit.id }; if (hit && hit.id === 'refuel' && !REFUEL_ON()) return { reply: REFUEL_OFF_ANSWER, canned: true, kb: hit.id };
if (hit && (hit.id === 'polminer' || hit.id === 'c-polminer') && !pmLive()) return { reply: POLMINER_SOON_ANSWER, canned: true, kb: hit.id }; if (hit && (hit.id === 'polminer' || hit.id === 'c-polminer') && !pmLive()) return { reply: POLMINER_SOON_ANSWER, canned: true, kb: hit.id };
if (hit && isBixId(hit.id) && !bixLive()) return { reply: BIX_SOON_ANSWER, canned: true, kb: hit.id };
if (hit && (hit.id === 'network-rate' || hit.id === 'c-network-rate') && SYN_N() !== 4) return { reply: netRateAnswer(SYN_N()), canned: true, kb: hit.id }; if (hit && (hit.id === 'network-rate' || hit.id === 'c-network-rate') && SYN_N() !== 4) return { reply: netRateAnswer(SYN_N()), canned: true, kb: hit.id };
if (hit) return Object.assign({ reply: hit.answer, canned: true, kb: hit.id }, hit.handoff ? { handoff: true } : {}); if (hit) return Object.assign({ reply: hit.answer, canned: true, kb: hit.id }, hit.handoff ? { handoff: true } : {});
if (!kbOk) for (const c of CANNED) if (c.re.test(msg)) return c.id === 'refuel' && !REFUEL_ON() ? { reply: REFUEL_OFF_ANSWER, canned: true } : c.id === 'polminer' && !pmLive() ? { reply: POLMINER_SOON_ANSWER, canned: true } : c.id === 'network-rate' && SYN_N() !== 4 ? { reply: netRateAnswer(SYN_N()), canned: true } : Object.assign({ reply: c.a, canned: true }, c.handoff ? { handoff: true } : {}); if (!kbOk) for (const c of CANNED) if (c.re.test(msg)) return c.id === 'refuel' && !REFUEL_ON() ? { reply: REFUEL_OFF_ANSWER, canned: true } : c.id === 'polminer' && !pmLive() ? { reply: POLMINER_SOON_ANSWER, canned: true } : isBixId(c.id) && !bixLive() ? { reply: BIX_SOON_ANSWER, canned: true } : c.id === 'network-rate' && SYN_N() !== 4 ? { reply: netRateAnswer(SYN_N()), canned: true } : Object.assign({ reply: c.a, canned: true }, c.handoff ? { handoff: true } : {});
// retrieval: the closest entries ride along in the system prompt (a short follow-up borrows words from the chat so far) // retrieval: the closest entries ride along in the system prompt (a short follow-up borrows words from the chat so far)
let kbBlock = '', kbIds = []; let kbBlock = '', kbIds = [];
try { try {
const query = msg.split(/\s+/).length < 4 && historyText ? msg + ' ' + String(historyText).slice(-200) : msg; const query = msg.split(/\s+/).length < 4 && historyText ? msg + ' ' + String(historyText).slice(-200) : msg;
const hits = await kb.context(query, 5); const hits = await kb.context(query, 5);
const hitsOk = pmLive() ? hits : hits.filter(h => !/^(c-)?polminer$/.test(String(h.entry && h.entry.id))); // not live yet: keep its answer out of the prompt const hitsOk = hits.filter(h => (pmLive() || !/^(c-)?polminer$/.test(String(h.entry && h.entry.id))) && (bixLive() || !isBixId(h.entry && h.entry.id))); // not live yet: keep its answer out of the prompt
kbBlock = kb.promptBlock(hitsOk); kbIds = hitsOk.map(h => h.entry.id); kbBlock = kb.promptBlock(hitsOk); kbIds = hitsOk.map(h => h.entry.id);
} catch (e) { console.error('kb search', e.message); } } catch (e) { console.error('kb search', e.message); }
if (!enabled()) return { reply: 'Good question. The quick answers I have cover packages, payouts, qualification, and joining; for anything deeper, the plain-language contract review at https://instantadpay.com/contract covers most of it, or tap "Send this to support" and Marty will answer.', handoff: true }; if (!enabled()) return { reply: 'Good question. The quick answers I have cover packages, payouts, qualification, and joining; for anything deeper, the plain-language contract review at https://instantadpay.com/contract covers most of it, or tap "Send this to support" and Marty will answer.', handoff: true };
+1
View File
@@ -344,6 +344,7 @@ async function bootstrap() {
await alterSafe('ALTER TABLE accounts ADD COLUMN joined_via VARCHAR(20) NULL'); // ?v= angle the lead came in on await alterSafe('ALTER TABLE accounts ADD COLUMN joined_via VARCHAR(20) NULL'); // ?v= angle the lead came in on
await alterSafe('ALTER TABLE accounts ADD COLUMN joined_ref VARCHAR(80) NULL'); // referring domain of the first join-page visit await alterSafe('ALTER TABLE accounts ADD COLUMN joined_ref VARCHAR(80) NULL'); // referring domain of the first join-page visit
await alterSafe('ALTER TABLE accounts ADD COLUMN wall_offers VARCHAR(2000) NULL'); // JSON [{title,bannerUrl,targetUrl}] for wall positions 2-3 (unlock at 2 / 5 qualifying buyers) await alterSafe('ALTER TABLE accounts ADD COLUMN wall_offers VARCHAR(2000) NULL'); // JSON [{title,bannerUrl,targetUrl}] for wall positions 2-3 (unlock at 2 / 5 qualifying buyers)
await alterSafe('ALTER TABLE accounts ADD COLUMN bix_partner_link VARCHAR(300) NULL'); // BixPay partner link (bixpay.js, 2026-10-29); column name checked against MySQL 8 reserved words
// help desk (2026-10-16, tickets.js): one shared desk for IAP and, later, LinkSpin; email_message_id threads inbound mail // help desk (2026-10-16, tickets.js): one shared desk for IAP and, later, LinkSpin; email_message_id threads inbound mail
await q(`CREATE TABLE IF NOT EXISTS tickets ( await q(`CREATE TABLE IF NOT EXISTS tickets (
id INT AUTO_INCREMENT PRIMARY KEY, id INT AUTO_INCREMENT PRIMARY KEY,
+99
View File
@@ -0,0 +1,99 @@
# BixPay card integration (DRAFT for Marty, 2026-10-29)
Scope: InstantAdPay first, LinkSpin second, CTB when it launches. Nothing here is built yet.
## What we know about BIX (verified 2026-10-29)
- BIX = self-custody wallet + Visa card spent from USDT/USDC. Funding networks include Polygon, so a member can swap POL
to USDT in the BIX app and load the card with no bridge. No load fee; up to 3% per purchase, 1% FX.
- Cards: virtual $9.99, plastic $100, metal $250, gold $25,000. US = Visa Signature (29 states); elsewhere Visa Platinum.
- Partner plan: 50% of net fees and card sales -> 45% over 10 levels (15 / 10 / 2.5 x 8) + 5% pool.
- Partner link format: `https://bix.ibportal.io/auth/register?e=<43-char token>&a=1` (opaque token, not derivable from the
IB ID). The referral link (`&appId=3`) makes a card customer only; the PARTNER link makes a partner. We use the partner link.
- Company fallback link: Marty's partner link (IB12143793).
## 1. The profile field (one identity, follows the member)
- InstantAdPay Profile tab, new section **"BixPay card"**: one input, `bixPartnerLink`.
- Accepts a full partner link. Validation: host `bix.ibportal.io`, path `/auth/register`, `e=` present, `a=1`; strip `appId`
if pasted (the customer link) and tell the member "That's the card-customer link. Paste the Partner link from your BIX
portal profile instead." Max 300 chars. Saved on the IAP account; LinkSpin and CTB read it through the existing partner
API (the same way wallet and sponsor already flow), and LinkSpin's own Profile shows it read-only with "Edit on InstantAdPay".
- Member sees under the field: "Where to find it: BIX portal > Profile > Partner (the second box). Copy the link."
- Admin: the field shows on the member card; a count of members with a link set on the admin Overview.
## 2. The link each visitor gets (sponsor follows)
`bixLinkFor(member)` =
1. the member's own `bixPartnerLink`, else
2. walk the sponsor chain up to 10 levels, first sponsor with a link, else
3. the company link (site config `bixCompanyLink`, default Marty's partner link).
The card promo always shows WHOSE link is in play: "Your link" / "Your sponsor @name's link" / "Network link". That nudges
members to add their own, and sponsors to get their teams signed up.
For public pages (games' landing pages, /join/<user>), the referrer whose `?ref` is on the page resolves the same way.
## 3. Where members see it
### Wallet tab (primary)
Card: **"Spend your POL anywhere with a BixPay Visa card"**
"BixPay is a self-custody wallet with a Visa card. Send USDT or USDC to it on Polygon, load the card, and spend it wherever
Visa is accepted, including Apple Pay and Google Pay. Virtual cards from $9.99."
(No in-app swap: Marty confirmed 2026-10-29 he swaps POL to USDT/USDC on an exchange, then sends it to BixPay. The guide
gets a "turn your POL into USDT" step: any exchange or on-ramp, then send on Polygon. Add the swap line only once BIX
ships it; the founder said "in the next three months" on 10-17.)
Buttons: **Get your BixPay card** (partner link) · **How it works** (opens the guide).
Small line: "Using: your link / @sponsor's link / the network link. Add yours in Profile."
### Overview
A one-line announcement card the first week ("New: a Visa card for your POL"), dismissable like the other cards.
### Payout emails + game "link your wallet" nudges
One sentence after the amount: "Want to spend it? A BixPay Visa card turns POL into everyday purchases: <link>."
(Payout emails already carry the member's identity, so the link resolves per member.)
### Promo tools > new tab "BixPay"
- The member's link with Copy/Share.
- 3 posts (short, friendly, the "spend your crypto" angle), an email swipe, and 4 banners we make (no BIX logo until
Marty confirms brand rules; text-only "crypto Visa card" creative is safe).
- Every asset carries the member's resolved link.
### Guide page /bixpay (public, SEO)
What it is, the fee table, the funding path (POL -> USDT on Polygon -> card), the sign-up steps with screenshots, the
partner plan in plain words, and the compliance box. CTA carries the viewer's resolved link.
### Chatbot
Canned answers: what BixPay is, how to get the card, how to load it from POL, where to put my partner link, who gets the
credit. Facts in the system prompt with KNOWLEDGE_DATE.
## 4. Copy (Marty's voice, no em dashes)
- Wallet card title: "Spend your POL anywhere with a BixPay Visa card"
- Body: see above.
- Profile field label: "Your BixPay partner link"
- Profile help: "Join BixPay as a partner, then paste your Partner link here. Members and visitors who get a card through
your pages are credited to you in your BIX portal, up to ten levels deep."
- Email line: "Want to spend it? A BixPay Visa card turns POL into everyday purchases."
- Post 1 (short): "I spend my crypto with a Visa card now. BixPay keeps the keys with you, loads from USDT or USDC with no
load fee, and works with Apple Pay. Virtual card from $9.99: {L}"
- Fees line everywhere: "3% per purchase, no load fee. See BIX's terms for other charges."
- US line on the Wallet card and guide: "Available in 31 US states so far. Not in your state yet? You can still get the
wallet and build."
- Guide: a "Funding your card" section with three paths: (1) swap POL to USDT or USDC on any exchange, send on Polygon;
(2) Cash App (US): send crypto straight to the BixPay wallet; (3) the BIX in-app swap, once it ships.
- Post 2 (friendly): "Earning crypto is one thing. Spending it without jumping through hoops is another. BixPay fixed that
for me: a self-custody wallet and a Visa card in one app. Here's where I got mine: {L}"
- Post 3 (partner angle): "BixPay pays partners on every card and on card spending, ten levels deep. If you're building a
team anyway, this fits right in: {L}"
## 5. Compliance box (shown on the Wallet card's "How it works" and the guide)
"BixPay is a separate company. BIX issues the wallet and the card through its banking partners and sets its own fees,
limits, eligibility and terms. InstantAdPay is not the card issuer and earns a referral commission when you sign up
through a partner link. Card availability varies by country. Crypto assets can lose value."
## 6. Tracking
- Click counts per surface (wallet card, email, promo tools, guide) in the admin Traffic tab; per-member click counts on
the Promo tools BixPay tab. No sign-up credit on our side: the BIX portal shows each partner their directs and levels.
- If BIX ever offers a postback, add a "BixPay sign-ups" stat next to the click counts.
## 7. Rollout
1. IAP: field + resolver + Wallet card + guide + chatbot + promo tab (gated by site config `bixpayLive`).
2. LinkSpin: read-only field + Wallet/Credits card + promo entry, same resolver through the partner API.
3. CTB: same card and field in ctb-next, same identity.
4. Announcement (release note + member email + Telegram) after Marty's copy approval.
## Open questions for Marty / BIX upline
- Does a partner sign-up also get the card, or does the member need the app invitation too? (If both: show "Join as a
partner" and "Just want the card?" buttons, each with the member's own link type.)
- BIX name/logo use in our promo material.
- The pool's "50/50 rule".
- Any updated BIX materials.
+38
View File
@@ -0,0 +1,38 @@
# BixPay opportunity call, 2026-10-17 (Zoom replay notes, made 2026-10-29)
"$iNVU - Live Opportunity Call", 47 min. Host "Bass"; main speaker David Emenite (22-year network marketer; his own company
is a trading opportunity, "tap to trade"); BIX founder "Nick" (28, Germany, says he owns "one of the largest Forex brokers
on the planet"; BIX started "a couple of months ago"); leaders Tracy Fischer, Lisa, Alan Jones, Gary. The $iNVU / trading
company parts are NOT BIX. Transcript: D:/tmp/bix-zoom/transcript.txt; slides D:/tmp/bix-zoom/frames.
## Plan mechanics (as presented; matches the BIX commission PDF)
- The only fee claimed: 3% per transaction. "No top-up fees, no hidden fees." (A third-party review lists 1% FX, $0.75
under $50, ATM $1 + 0.6%, so present 3% as THE fee and point to BIX's terms for the rest.)
- 50% of the 3% goes into the plan; paid over 10 levels: L1 15%, L2 10%, L3-L10 2.5% each; the other 5% = BIX pool,
1 share per 10,000 cards in your network. Worked example: $1,000 spent -> $30 fee -> $15 into the plan.
- Card sales pay too: slide "EARN A 50% REFERRAL BONUS ON EVERY CARD PURCHASE" (virtual $9.99, plastic $100, metal $250,
24K gold $25,000; shipping to 179 countries). The optional $9.99/month rewards membership is also commissionable.
- Upcoming banking (SEPA IBAN, ACH, SWIFT, fiat on/off-ramp): instant 0%, SEPA/ACH 1%, "up to 50% included in the
compensation plan". Nick: IBANs and the in-app SWAP "in the next three months", i.e. NOT live on 10-17.
- Shareholder: 500,000 cards in your network "on a 50/50 rule" = shareholder of BIX (Nick). Network contest: first to
10,000 cards gets a $100,000 bonus. The 50/50 rule is still not defined on the call.
- US: "open in 31 states" (review on 10-24: 29), rest "first part of 2027". Wallet works everywhere; you can build from a
closed state. KYC required for the card; problems go to BIX support.
- Funding tip (Tracy/Bass): Cash App can send crypto straight to the BixPay wallet (about 20 transactions a month, up to
$5,000 a week); they used Coinbase before. Card works in Apple Wallet.
- Usage data quoted: average customer spends $1,400-1,500 a month (industry figure); Bass's back office shows $20-80 a
week per user so far.
## Claims to treat as marketing, not facts
300,000 downloads / 300,000 cards active, $3M spent per day, live since August with global launch ~6 weeks before the
call, "5 million users in one year, 80 million in three, bigger than Revolut", "worth a couple hundred million, $100B in
three years", "$1 to $1 million per day" spend limit, $2.6T daily payments, founder "a billionaire".
## What it changes in our integration draft (BIXPAY-INTEGRATION.md)
1. Don't promise an in-app swap yet. Copy becomes "load it with USDT or USDC on Polygon" until Marty confirms Swap works
in his app; add a short "how to turn POL into USDT" step (any exchange or the BIX swap once live).
2. Fees line: "3% per purchase, no load fee; see BIX's terms for other charges."
3. Lead with the $9.99 virtual card: it pays the referrer on the sale and on every swipe after.
4. US members: add "available in 31 states; not in your state yet? You can still build and get the wallet."
5. Add the Cash App funding path to the guide for non-crypto members (US).
6. Events in the call (Houston 10-20, Tampa 10-21, Bangkok 11-28) are the leaders' own, not ours.
+2 -2
View File
@@ -112,12 +112,12 @@ async function tick() {
if (wd === 'Thu' && h >= 18 && next && !S.sent['thu:' + next] && await claimOnce('fri:thu:' + next)) { if (wd === 'Thu' && h >= 18 && next && !S.sent['thu:' + next] && await claimOnce('fri:thu:' + next)) {
S.sent['thu:' + next] = now; save(); S.sent['thu:' + next] = now; save();
const subject = 'Tomorrow is Five Dollar Friday'; const subject = 'Tomorrow is Five Dollar Friday';
const text = 'Tomorrow is Five Dollar Friday on InstantAdPay.\n\nAny ad package of $5 or more bought on Friday (Central time) earns +' + c.pct + '% bonus credits, added the moment the purchase settles. Your $5 pays your sponsor line the second it clears, and your line’s $5s pay you. Friday is when we all push at once.\n\nLine up your pack: https://instantadpay.com/my#buy\nWatch the wave on the live ledger: https://instantadpay.com/ledger'; const text = 'Tomorrow is Five Dollar Friday on InstantAdPay.\n\nAny ad package of $5 or more bought on Friday (Central time) earns +' + c.pct + '% bonus credits, added the moment the purchase settles. Your $5 pays your sponsor line the second it clears, and your line’s $5s pay you. Friday is when we all push at once.\n\nGame Pass too: the same Friday purchase gives you a free 7-day Game Pass for every game in the network (once per Friday, added automatically), and the $5 pack lands as 600 credits that you keep for your ads.\n\nLine up your pack: https://instantadpay.com/my#buy\nWatch the wave on the live ledger: https://instantadpay.com/ledger';
await broadcast(subject, text); await broadcast(subject, text);
} }
if (wd === 'Fri' && h >= c.kickHour && day >= c.start && !S.sent['kick:' + day] && await claimOnce('fri:kick:' + day)) { if (wd === 'Fri' && h >= c.kickHour && day >= c.start && !S.sent['kick:' + day] && await claimOnce('fri:kick:' + day)) {
S.sent['kick:' + day] = now; save(); S.sent['kick:' + day] = now; save();
X.telegram('\u{1F4B5} <b>It’s Five Dollar Friday.</b> Any ad package from $5 up earns <b>+' + c.pct + '% credits</b> today, and every pack pays its sponsor line in the same transaction. Buy yours, then watch the ledger fill up: https://instantadpay.com/my#buy').catch(() => {}); X.telegram('\u{1F4B5} <b>It’s Five Dollar Friday.</b> Any ad package from $5 up earns <b>+' + c.pct + '% credits</b> today, and every pack pays its sponsor line in the same transaction. Game Pass day too: the same purchase gives you a free 7-day Game Pass for every game (once per Friday, automatic), and the $5 pack lands as 600 credits you keep for ads. Buy yours, then watch the ledger fill up: https://instantadpay.com/my#buy').catch(() => {});
} }
if (wd === 'Sat' && h < 3) { if (wd === 'Sat' && h < 3) {
const fri = dayOf(now - 86400000); const fri = dayOf(now - 86400000);
+7 -2
View File
@@ -45,8 +45,13 @@ function profileOf(a) {
const av = String(a.avatarUrl || '').trim(); const av = String(a.avatarUrl || '').trim();
const avatarUrl = !av ? null : /^https:\/\//i.test(av) ? av : av.startsWith('/') ? PUBLIC() + av : null; const avatarUrl = !av ? null : /^https:\/\//i.test(av) ? av : av.startsWith('/') ? PUBLIC() + av : null;
const bio = String(a.bio || '').trim().slice(0, 600) || null; const bio = String(a.bio || '').trim().slice(0, 600) || null;
if (!avatarUrl && !bio && !(socials && Object.keys(socials).length)) return null; // the BixPay partner link travels too (2026-10-29): LinkSpin shows it read-only ("Edit on InstantAdPay") and resolves the
return { avatarUrl, bio, socials: socials && Object.keys(socials).length ? socials : null }; // same way; only set when there is one, so rows without it keep the hash they had
const bixPartnerLink = String(a.bixPartnerLink || '').trim() || null;
if (!avatarUrl && !bio && !bixPartnerLink && !(socials && Object.keys(socials).length)) return null;
const out = { avatarUrl, bio, socials: socials && Object.keys(socials).length ? socials : null };
if (bixPartnerLink) out.bixPartnerLink = bixPartnerLink;
return out;
} }
const hashOf = r => crypto.createHash('sha1').update([r.username || '', r.wallet || '', r.sponsorEmail || '', r.joinedAt || '', r.memberId || '', r.profile ? JSON.stringify(r.profile) : ''].join('|') + SF.hashExtra(r)).digest('hex').slice(0, 16); const hashOf = r => crypto.createHash('sha1').update([r.username || '', r.wallet || '', r.sponsorEmail || '', r.joinedAt || '', r.memberId || '', r.profile ? JSON.stringify(r.profile) : ''].join('|') + SF.hashExtra(r)).digest('hex').slice(0, 16);
+5 -1
View File
@@ -141,6 +141,7 @@
<div class="statx c-violet"><div><div class="nv" id="ovActive">0</div><div class="lb">Active campaigns</div><span class="chip flat" id="ovCampSub"></span></div></div> <div class="statx c-violet"><div><div class="nv" id="ovActive">0</div><div class="lb">Active campaigns</div><span class="chip flat" id="ovCampSub"></span></div></div>
<div class="statx c-amber"><div><div class="nv" id="ovReports">0</div><div class="lb">Open reports</div><span class="chip flat" id="ovBurnSub"></span></div></div> <div class="statx c-amber"><div><div class="nv" id="ovReports">0</div><div class="lb">Open reports</div><span class="chip flat" id="ovBurnSub"></span></div></div>
<div class="statx"><div><div class="nv" id="ovDrips">0</div><div class="lb">Follow-ups in flight</div><span class="chip flat" id="ovDripSub"></span></div></div> <div class="statx"><div><div class="nv" id="ovDrips">0</div><div class="lb">Follow-ups in flight</div><span class="chip flat" id="ovDripSub"></span></div></div>
<div class="statx c-cyan"><div><div class="nv" id="ovBix">0</div><div class="lb">BixPay partner links</div><span class="chip flat" id="ovBixSub"></span></div></div>
</div> </div>
<div class="grid c2" style="margin-top:16px"> <div class="grid c2" style="margin-top:16px">
<div class="card"> <div class="card">
@@ -357,6 +358,9 @@
<div class="pane" id="pane-traffic" hidden> <div class="pane" id="pane-traffic" hidden>
<div class="card"><div class="card-head"><h3>Games to members</h3><span class="sub" id="stSub">the $5 welcome offer after a game win</span></div><div class="tablewrap"><table class="adm-table" id="trfStarter"></table></div></div> <div class="card"><div class="card-head"><h3>Games to members</h3><span class="sub" id="stSub">the $5 welcome offer after a game win</span></div><div class="tablewrap"><table class="adm-table" id="trfStarter"></table></div></div>
<div class="card"><div class="card-head"><h3>Login-ad showings</h3><span class="sub" id="lsSub">sign-in interstitials per day, dashboard vs games</span></div><div class="tablewrap"><table class="adm-table" id="trfLogin"></table></div></div> <div class="card"><div class="card-head"><h3>Login-ad showings</h3><span class="sub" id="lsSub">sign-in interstitials per day, dashboard vs games</span></div><div class="tablewrap"><table class="adm-table" id="trfLogin"></table></div></div>
<div class="card" id="trfBixCard"><div class="card-head"><h3>BixPay clicks</h3><span class="sub" id="bixSub">taps on "Get your BixPay card" by surface (the range picked below)</span></div>
<p class="muted small" style="margin:0 0 10px">Every BixPay button and banner goes through /go/bixpay, which counts the tap and opens the member's resolved partner link (own, else a sponsor's, else the network link). Sign-ups are not counted here: the BIX portal shows each partner their directs and levels.</p>
<div class="grid c2"><div class="tablewrap"><table class="adm-table" id="trfBix"></table></div><div class="tablewrap"><table class="adm-table" id="trfBixMembers"></table></div></div></div>
<div class="card"> <div class="card">
<div class="card-head"><h3>Where visitors come from</h3><span class="sub" id="trfSub"></span></div> <div class="card-head"><h3>Where visitors come from</h3><span class="sub" id="trfSub"></span></div>
<div class="chips" id="trfRange" style="margin:0 0 10px"><button type="button" class="chip-t" data-days="7">7 days</button><button type="button" class="chip-t on" data-days="30">30 days</button><button type="button" class="chip-t" data-days="90">90 days</button><button type="button" class="chip-t" data-days="365">Year</button></div> <div class="chips" id="trfRange" style="margin:0 0 10px"><button type="button" class="chip-t" data-days="7">7 days</button><button type="button" class="chip-t on" data-days="30">30 days</button><button type="button" class="chip-t" data-days="90">90 days</button><button type="button" class="chip-t" data-days="365">Year</button></div>
@@ -641,6 +645,6 @@
<script src="/assets/common.js?v=20261023ov"></script><script src="/assets/welcome.js?v=20260923b"></script> <script src="/assets/common.js?v=20261023ov"></script><script src="/assets/welcome.js?v=20260923b"></script>
<script src="/assets/admin-kb.js?v=20261020kb"></script> <script src="/assets/admin-kb.js?v=20261020kb"></script>
<script src="/assets/admin.js?v=20261027nr"></script><script src="/assets/admin-sponsorcheck.js?v=20261022sc"></script><script src="/assets/admin-kits.js?v=20261024kit"></script> <script src="/assets/admin.js?v=20261029bx"></script><script src="/assets/admin-sponsorcheck.js?v=20261022sc"></script><script src="/assets/admin-kits.js?v=20261024kit"></script>
</body> </body>
</html> </html>
+8
View File
@@ -91,6 +91,7 @@
const f = o.followups || {}; const f = o.followups || {};
$('ovDrips').textContent = f.active || 0; $('ovDrips').textContent = f.active || 0;
$('ovDripSub').textContent = (f.done || 0) + ' finished · ' + (f.unsubscribed || 0) + ' unsubscribed'; $('ovDripSub').textContent = (f.done || 0) + ' finished · ' + (f.unsubscribed || 0) + ' unsubscribed';
if ($('ovBix')) { $('ovBix').textContent = Number(o.bixLinks || 0).toLocaleString(); $('ovBixSub').textContent = o.bixpayLive ? 'members with their own link · live' : 'members with their own link · bixpayLive is off'; } // BixPay (2026-10-29)
const bt = Object.entries(o.byType || {}).sort((a, b) => b[1] - a[1]); const bt = Object.entries(o.byType || {}).sort((a, b) => b[1] - a[1]);
$('ovByType').innerHTML = bt.length ? bt.map(([t, n]) => '<div style="display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid var(--line)"><span>' + esc(t) + '</span><b>' + n + '</b></div>').join('') : 'No campaigns yet.'; $('ovByType').innerHTML = bt.length ? bt.map(([t, n]) => '<div style="display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid var(--line)"><span>' + esc(t) + '</span><b>' + n + '</b></div>').join('') : 'No campaigns yet.';
const ch = o.chain || {}; const ch = o.chain || {};
@@ -425,6 +426,7 @@
['Upline chain', d.upline.length > 1 ? d.upline.map(u => memLink(u.email, u.name)).join(' &rarr; ') : '<span class="muted">-</span>'], ['Upline chain', d.upline.length > 1 ? d.upline.map(u => memLink(u.email, u.name)).join(' &rarr; ') : '<span class="muted">-</span>'],
['Joined via', esc(a.joinedVia || 'join page') + (a.joinedRef ? ' from ' + esc(a.joinedRef) : '')], ['Joined via', esc(a.joinedVia || 'join page') + (a.joinedRef ? ' from ' + esc(a.joinedRef) : '')],
['Line banner', a.lineTargetUrl ? '<a href="' + esc(a.lineTargetUrl) + '" target="_blank" rel="noopener">' + esc(a.lineTargetUrl.slice(0, 50)) + '</a>' : '<span class="muted">not set</span>'], ['Line banner', a.lineTargetUrl ? '<a href="' + esc(a.lineTargetUrl) + '" target="_blank" rel="noopener">' + esc(a.lineTargetUrl.slice(0, 50)) + '</a>' : '<span class="muted">not set</span>'],
['BixPay partner link', a.bixPartnerLink ? '<span class="mono small" style="overflow-wrap:anywhere">' + esc(a.bixPartnerLink) + '</span>' : '<span class="muted">not set (pages use a sponsor’s link or the network link)</span>'],
['Chat', a.chatAvailable ? 'available' : 'switched off']]) + '</div>'; ['Chat', a.chatAvailable ? 'available' : 'switched off']]) + '</div>';
h += '<div><h4 style="margin:0 0 6px">On-chain and money</h4>' + kv([ h += '<div><h4 style="margin:0 0 6px">On-chain and money</h4>' + kv([
// Say WHICH of the two "not registered" states this is, and what it costs them, so the row // Say WHICH of the two "not registered" states this is, and what it costs them, so the row
@@ -643,6 +645,12 @@
$('stSub').textContent = (st.settings.on ? 'on' : 'off') + ' · welcome bonus ' + st.settings.bonus + ' credits · ' + st.granted + ' granted'; $('stSub').textContent = (st.settings.on ? 'on' : 'off') + ' · welcome bonus ' + st.settings.bonus + ' credits · ' + st.granted + ' granted';
$('trfStarter').innerHTML = '<tr><th>Game</th><th>Offer taps</th><th>First packages</th><th>Package $</th><th>Tap &rarr; buy</th></tr>' + rows.map(g => '<tr><td>' + esc(g.name) + '</td><td>' + n(g.visits) + '</td><td>' + n(g.buyers) + '</td><td>$' + g.usd.toFixed(2) + '</td><td>' + pct(g.buyers, g.visits) + '</td></tr>').join(''); } $('trfStarter').innerHTML = '<tr><th>Game</th><th>Offer taps</th><th>First packages</th><th>Package $</th><th>Tap &rarr; buy</th></tr>' + rows.map(g => '<tr><td>' + esc(g.name) + '</td><td>' + n(g.visits) + '</td><td>' + n(g.buyers) + '</td><td>$' + g.usd.toFixed(2) + '</td><td>' + pct(g.buyers, g.visits) + '</td></tr>').join(''); }
$('trfPaths').innerHTML = '<tr><th>Page</th><th>Views</th></tr>' + (d.paths.length ? d.paths.map(p => '<tr><td>' + esc(p.path) + '</td><td>' + n(p.hits) + '</td></tr>').join('') : '<tr><td colspan="2" class="muted">No page views yet.</td></tr>'); $('trfPaths').innerHTML = '<tr><th>Page</th><th>Views</th></tr>' + (d.paths.length ? d.paths.map(p => '<tr><td>' + esc(p.path) + '</td><td>' + n(p.hits) + '</td></tr>').join('') : '<tr><td colspan="2" class="muted">No page views yet.</td></tr>');
// BixPay clicks by surface + per member (2026-10-29)
if (d.bixpay && $('trfBix')) { const bx = d.bixpay, LBL = { wallet: 'Wallet tab card', overview: 'Overview card', email: 'Payout emails', nudge: 'Game wallet nudges', promo: 'Promo tools (members’ posts and banners)', guide: '/bixpay guide', chat: 'Chatbot', other: 'Other' };
$('bixSub').textContent = 'last ' + bx.days + ' days: ' + n(bx.total) + ' clicks · all time ' + n(bx.allTime) + (bx.live ? '' : ' · bixpayLive is OFF');
const rows = Object.entries(bx.bySurface).sort((a, b) => b[1] - a[1]);
$('trfBix').innerHTML = '<tr><th>Surface</th><th>Clicks</th></tr>' + (rows.length ? rows.map(([s, c]) => '<tr><td>' + esc(LBL[s] || s) + '</td><td>' + n(c) + '</td></tr>').join('') : '<tr><td colspan="2" class="muted">No BixPay clicks in this range yet.</td></tr>');
$('trfBixMembers').innerHTML = '<tr><th>Member</th><th>All clicks</th><th>Via promo kit</th><th>Last</th></tr>' + (bx.members.length ? bx.members.map(m => '<tr><td>' + esc(m.name || m.email) + '</td><td>' + n(m.total) + '</td><td>' + n(m.promo) + '</td><td class="small muted">' + (m.last ? ago(m.last) : '') + '</td></tr>').join('') : '<tr><td colspan="4" class="muted">No member clicks yet.</td></tr>'); }
$('trfAngles').innerHTML = '<tr><th>Angle</th><th>Join-page<br>views</th><th>Signups</th><th>View &rarr;<br>signup</th></tr>' + (d.angles.length ? d.angles.map(a => '<tr><td>' + esc(a.angle) + '</td><td>' + n(a.views) + '</td><td>' + n(a.signups) + '</td><td>' + pct(a.signups, a.views) + '</td></tr>').join('') : '<tr><td colspan="4" class="muted">No angle data yet.</td></tr>'); $('trfAngles').innerHTML = '<tr><th>Angle</th><th>Join-page<br>views</th><th>Signups</th><th>View &rarr;<br>signup</th></tr>' + (d.angles.length ? d.angles.map(a => '<tr><td>' + esc(a.angle) + '</td><td>' + n(a.views) + '</td><td>' + n(a.signups) + '</td><td>' + pct(a.signups, a.views) + '</td></tr>').join('') : '<tr><td colspan="4" class="muted">No angle data yet.</td></tr>');
$('trfDaily').innerHTML = '<tr><th>Day</th><th>Page views</th><th>Signups</th></tr>' + (d.daily.length ? d.daily.slice().reverse().map(x => '<tr><td>' + esc(x.day) + '</td><td>' + n(x.hits) + '</td><td>' + n(x.signups) + '</td></tr>').join('') : '<tr><td colspan="3" class="muted">Nothing yet.</td></tr>'); $('trfDaily').innerHTML = '<tr><th>Day</th><th>Page views</th><th>Signups</th></tr>' + (d.daily.length ? d.daily.slice().reverse().map(x => '<tr><td>' + esc(x.day) + '</td><td>' + n(x.hits) + '</td><td>' + n(x.signups) + '</td></tr>').join('') : '<tr><td colspan="3" class="muted">Nothing yet.</td></tr>');
} }
+33
View File
@@ -0,0 +1,33 @@
// BixPay guide (/bixpay, 2026-10-29): the CTA carries the viewer's resolved partner link (their own when signed in, else the
// member whose ?ref brought them here or whose sponsor cookie they carry, else the network link), always through the counted
// /go/bixpay link. The server already folded ?ref into the sponsor cookie; the ref is passed along too so the first view resolves.
// In-app browsers (Gmail, Telegram, Facebook webviews): BIX's register page runs a Cloudflare check that often fails there, and
// the invite token lives only in the URL, so a member who then reopens BIX elsewhere registers with no sponsor (bizventures,
// 2026-10-29: referrer N/A). Those viewers get a notice with the link to copy into a real browser.
(function () {
var cta = document.getElementById('bixCta'), using = document.getElementById('bixUsing'), soon = document.getElementById('bixSoon');
var box = document.getElementById('bixInApp'), boxLink = document.getElementById('bixInAppLink'), boxCopy = document.getElementById('bixInAppCopy');
if (!cta) return;
function inApp() {
var u = navigator.userAgent || '';
if (/FBAN|FBAV|FB_IAB|Instagram|Line\/|Twitter|Snapchat|GSA\/|Telegram|\bwv\b|WebView/i.test(u)) return true;
return /iPhone|iPad|iPod/.test(u) && !/Safari\//.test(u); // an iOS web view: no Safari token
}
var ref = '';
try { ref = new URLSearchParams(location.search).get('ref') || ''; } catch (e) { ref = ''; }
fetch('/api/public/bixpay' + (ref ? '?ref=' + encodeURIComponent(ref) : ''), { credentials: 'same-origin' }).then(function (r) { return r.json(); }).then(function (d) {
if (!d || !d.live) { if (soon) soon.hidden = false; cta.href = '/my#wallet'; if (using) using.textContent = 'Sign in to your dashboard and open the Wallet tab.'; return; }
cta.href = d.go;
if (using) using.textContent = d.whose === 'you' ? 'The button opens your own BixPay partner link.' : d.whose === 'sponsor' ? 'The button opens ' + d.name + "'s BixPay partner link." + (d.signedIn ? ' Add yours in Members > Profile.' : '') : 'The button opens the network’s BixPay partner link.' + (d.signedIn ? ' Add yours in Members > Profile.' : '');
if (box && inApp()) {
box.hidden = false;
if (boxLink) boxLink.textContent = d.go;
if (boxCopy) boxCopy.addEventListener('click', function () {
var done = function () { boxCopy.textContent = 'Copied'; setTimeout(function () { boxCopy.textContent = 'Copy link'; }, 2000); };
var select = function () { try { var r = document.createRange(); r.selectNodeContents(boxLink); var s = window.getSelection(); s.removeAllRanges(); s.addRange(r); boxCopy.textContent = 'Selected: copy it'; } catch (e) {} }; // no native dialogs
if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(d.go).then(done, select);
else select();
});
}
}).catch(function () {});
})();
Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+64 -1
View File
@@ -974,6 +974,7 @@ function shareLink(ref) { return SHARE_DOMAIN && /^[A-Za-z0-9_]{1,40}$/.test(Str
loadPositions(me); loadPositions(me);
$('linkCard').hidden = !!me.address; $('linkCard').hidden = !!me.address;
$('activateCard').hidden = !(me.address && !me.memberId); $('activateCard').hidden = !(me.address && !me.memberId);
renderBix(me); // BixPay Visa card: Wallet card, Overview announcement, Profile field, promo pill (2026-10-29; nothing while bixpayLive is off)
{ let hn = $('tankHoldNote'); // held for an adopter: say so, and no activate button { let hn = $('tankHoldNote'); // held for an adopter: say so, and no activate button
if (!hn) { hn = document.createElement('p'); hn.id = 'tankHoldNote'; hn.className = 'small'; hn.style.cssText = 'margin:8px 0 0;color:#22c55e'; $('activateBtn').insertAdjacentElement('beforebegin', hn); } if (!hn) { hn = document.createElement('p'); hn.id = 'tankHoldNote'; hn.className = 'small'; hn.style.cssText = 'margin:8px 0 0;color:#22c55e'; $('activateBtn').insertAdjacentElement('beforebegin', hn); }
hn.hidden = !TANK_HOLD; hn.textContent = TANK_HOLD ? tankHoldText(TANK_HOLD) : ''; $('activateBtn').hidden = !!TANK_HOLD; } hn.hidden = !TANK_HOLD; hn.textContent = TANK_HOLD ? tankHoldText(TANK_HOLD) : ''; $('activateBtn').hidden = !!TANK_HOLD; }
@@ -1962,6 +1963,68 @@ function shareLink(ref) { return SHARE_DOMAIN && /^[A-Za-z0-9_]{1,40}$/.test(Str
} catch (e) {} } catch (e) {}
} }
loadWednesdayCard(); setInterval(loadWednesdayCard, 120000); loadWednesdayCard(); setInterval(loadWednesdayCard, 120000);
// ── BixPay Visa card (2026-10-29, docs/BIXPAY-INTEGRATION.md). me.bix comes from /api/me: { live, own, link, whose, name, using, go, announce, clicks }.
// Copy is Marty's approved wording; no in-app swap claim, "3% per purchase, no load fee", the 31-states line. No em dashes.
// sign-up warning (2026-10-29, bizventures registered with referrer N/A): the BIX invite token lives only in the URL and their
// security check often fails inside app webviews, so members who reopen BIX elsewhere lose their sponsor
const BIX_SIGNUP_NOTE = 'Sign up on the page the button opens. Don’t install the BIX app first and don’t use the portal’s own Sign Up menu: your sponsor is lost and BIX shows the referrer as N/A.';
const bixInApp = () => { const u = navigator.userAgent || ''; return /FBAN|FBAV|FB_IAB|Instagram|Line\/|Twitter|Snapchat|GSA\/|Telegram|\bwv\b|WebView/i.test(u) || (/iPhone|iPad|iPod/.test(u) && !/Safari\//.test(u)); };
const BIX_INAPP_NOTE = 'You’re in an app’s built-in browser. BIX’s security check often fails here and your sponsor gets dropped: open instantadpay.com in Chrome or Safari first, then tap the button there.';
const BIX_BODY = 'BixPay is a self-custody wallet with a Visa card. Send USDT or USDC to it on Polygon, load the card, and spend it wherever Visa is accepted, including Apple Pay and Google Pay. Virtual cards from $9.99.';
const BIX_COMPLIANCE = 'BixPay is a separate company. BIX issues the wallet and the card through its banking partners and sets its own fees, limits, eligibility and terms. InstantAdPay is not the card issuer and earns a referral commission when you sign up through a partner link. Card availability varies by country. Crypto assets can lose value.';
function renderBix(me) {
const b = (me && me.bix) || { live: false };
const pill = document.querySelector('.promo-pills [data-promo="bixpay"]');
if (pill) pill.hidden = !b.live;
if ($('pfBixCard')) $('pfBixCard').hidden = !b.live;
const wc = $('bixWalletCard'), oc = $('bixCard');
if (!b.live || b.error) { if (wc) wc.hidden = true; if (oc) oc.hidden = true; if (!b.live && pill && pill.classList.contains('on')) setPromoSub('posts'); return; }
// Wallet tab (primary)
if (wc) {
wc.hidden = false;
wc.innerHTML = '<div class="card-head"><h3>Spend your POL anywhere with a BixPay Visa card</h3><span class="sub">a separate company; your partner link rides along</span></div>'
+ '<p>' + esc(BIX_BODY) + '</p>'
+ '<p class="small">3% per purchase, no load fee. See BIX\'s terms for other charges. Available in 31 US states so far. Not in your state yet? You can still get the wallet and build.</p>'
+ '<p style="display:flex;gap:8px;flex-wrap:wrap;align-items:center"><a class="btn" id="bixWalletGo" href="' + esc(b.go.wallet) + '" target="_blank" rel="noopener">Get your BixPay card</a> <a class="btn sec" href="/bixpay" target="_blank" rel="noopener">How it works</a></p>'
+ '<p class="small muted" id="bixWalletUsing" style="margin:6px 0 0">' + esc(b.whose === 'you' ? b.using : b.using.replace(/\s*Add yours in Profile\.$/, '')) + (b.whose !== 'you' ? ' <a href="#profile" data-goto="profile" style="color:var(--mint)">Add yours in Profile</a>' : '') + '</p>'
+ '<p class="small" id="bixWalletNote" style="margin:6px 0 0"><b>' + esc(BIX_SIGNUP_NOTE.split('. ')[0]) + '.</b> ' + esc(BIX_SIGNUP_NOTE.slice(BIX_SIGNUP_NOTE.indexOf('. ') + 2)) + '</p>'
+ (bixInApp() ? '<p class="small" id="bixWalletInApp" style="margin:6px 0 0;border:1px solid #f2b84b;background:rgba(242,184,75,.12);border-radius:8px;padding:8px 10px">' + esc(BIX_INAPP_NOTE) + '</p>' : '')
+ '<details class="small muted" style="margin-top:8px"><summary style="cursor:pointer">The fine print</summary><p style="margin:6px 0 0">' + esc(BIX_COMPLIANCE) + '</p></details>';
wc.querySelectorAll('[data-goto="profile"]').forEach(a => a.addEventListener('click', e => { e.preventDefault(); const m = document.querySelector('.bo-menu [data-pane="profile"]'); if (m) m.click(); setTimeout(() => { const i = $('pfBixLink'); if (i) { i.scrollIntoView({ behavior: 'smooth', block: 'center' }); i.focus(); } }, 300); }));
}
// Overview: a one-line announcement the first week, dismissable for 24 h like the other cards
if (oc) {
if (!b.announce || cardHidden('bix')) oc.hidden = true;
else {
oc.hidden = false;
oc.innerHTML = '<div class="card-head"><h3>\u{1F4B3} New: a Visa card for your POL</h3><span class="sub">BixPay, a separate company</span></div>'
+ '<p>' + esc(BIX_BODY) + ' 3% per purchase, no load fee.</p>'
+ '<p style="display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0"><a class="btn small" href="' + esc(b.go.overview) + '" target="_blank" rel="noopener">Get your BixPay card</a> <a class="btn small sec" href="/bixpay" target="_blank" rel="noopener">How it works</a> <span class="small muted">' + esc(b.using) + '</span></p>'
+ '<p class="small muted" style="margin:6px 0 0">' + esc(BIX_SIGNUP_NOTE) + '</p>';
cardDismiss(oc, 'bix');
}
}
// Profile field
fillBixProfile(b);
// Promo tools tab (promo.js)
if (window.IAPPromo && IAPPromo.fillBix) IAPPromo.fillBix(me);
}
function fillBixProfile(b) {
const i = $('pfBixLink'), st = $('pfBixStatus'); if (!i || !st) return;
if (document.activeElement !== i) i.value = b.own || '';
st.innerHTML = b.own
? '<span style="color:var(--mint)">Saved.</span> Your pages, posts and banners carry your own partner link.'
: (b.whose === 'sponsor' ? 'Not set yet. Until you add yours, your pages carry ' + esc(b.name) + '\'s link.' : 'Not set yet. Until you add yours, your pages carry the network link.');
}
if ($('pfBixSave')) $('pfBixSave').addEventListener('click', busy2($('pfBixSave'), async () => {
const link = $('pfBixLink').value.trim();
if (!link && !(await IAP.confirmBox('Remove your BixPay partner link? Your pages go back to your sponsor\'s link (or the network link).', { title: 'Remove the link', ok: 'Remove it', cancel: 'Keep it' }))) return;
try {
const r = await api('/api/my/bixpay', { link });
IAP.status(link ? 'BixPay partner link saved.' : 'BixPay partner link removed.', 'ok');
const me = await (await fetch('/api/me')).json(); renderBix(me);
} catch (e) { $('pfBixStatus').innerHTML = '<span style="color:var(--bad)">' + esc(e.message) + '</span>'; IAP.status(e.message, 'bad'); }
}));
// ---- Game Pass (2026-10-16, docs/GAME-PASS.md): $5 for 7 days across all ten games. More game, never "earn more". ---- // ---- Game Pass (2026-10-16, docs/GAME-PASS.md): $5 for 7 days across all ten games. More game, never "earn more". ----
const gpDate = ms => new Date(Number(ms)).toLocaleDateString([], { weekday: 'short', month: 'short', day: 'numeric' }); const gpDate = ms => new Date(Number(ms)).toLocaleDateString([], { weekday: 'short', month: 'short', day: 'numeric' });
@@ -2622,7 +2685,7 @@ function shareLink(ref) { return SHARE_DOMAIN && /^[A-Za-z0-9_]{1,40}$/.test(Str
if ($('tkGo')) { $('tkGo').addEventListener('click', tkGenerate); $('tkAgain').addEventListener('click', tkGenerate); $('tkCopy').addEventListener('click', async () => { try { await navigator.clipboard.writeText($('tkText').value); IAP.status('Copied.', 'ok'); } catch (e) { $('tkText').select(); } }); $('tkSendBc').addEventListener('click', tkSendBroadcast); } if ($('tkGo')) { $('tkGo').addEventListener('click', tkGenerate); $('tkAgain').addEventListener('click', tkGenerate); $('tkCopy').addEventListener('click', async () => { try { await navigator.clipboard.writeText($('tkText').value); IAP.status('Copied.', 'ok'); } catch (e) { $('tkText').select(); } }); $('tkSendBc').addEventListener('click', tkSendBroadcast); }
// promo tools: pill menu switches between posts / swipes / banners / wall / videos // promo tools: pill menu switches between posts / swipes / banners / wall / videos
function setPromoSub(name) { function setPromoSub(name) {
const ids = ['toolkit', 'posts', 'text', 'swipe', 'banners', 'wall', 'objections', 'videos', 'viral', 'games']; const ids = ['toolkit', 'posts', 'text', 'swipe', 'banners', 'wall', 'objections', 'videos', 'viral', 'games', 'bixpay']; // bixpay: the BixPay partner kit, pill hidden while bixpayLive is off (2026-10-29)
if (['polhunter', 'spookydoors', 'gamebanners'].includes(name)) name = 'games'; // those tabs live inside Games now (2026-10-06) if (['polhunter', 'spookydoors', 'gamebanners'].includes(name)) name = 'games'; // those tabs live inside Games now (2026-10-06)
if (name === 'toolkit') loadToolkit(); if (name === 'toolkit') loadToolkit();
const pill = document.querySelector('.promo-pills [data-promo="' + name + '"]'); const pill = document.querySelector('.promo-pills [data-promo="' + name + '"]');
+475 -427
View File
@@ -1,427 +1,475 @@
// Promo tools content + rendering for the member area (Promo tools pane). // Promo tools content + rendering for the member area (Promo tools pane).
// Everything is personalized from the member's join link. Angle links carry // Everything is personalized from the member's join link. Angle links carry
// ?v=<angle> so they keep working when the matched squeeze pages ship. // ?v=<angle> so they keep working when the matched squeeze pages ship.
// Copy rules: no income promises, package prices in dollars are fine, never a // Copy rules: no income promises, package prices in dollars are fine, never a
// POL figure, no em dashes. // POL figure, no em dashes.
window.IAPPromo = (function () { window.IAPPromo = (function () {
const $ = id => document.getElementById(id); const $ = id => document.getElementById(id);
const esc = s => String(s == null ? '' : s).replace(/[&<>"']/g, c => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c])); const esc = s => String(s == null ? '' : s).replace(/[&<>"']/g, c => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]));
const status = (m, c) => (window.IAP && IAP.status) ? IAP.status(m, c) : console.log(m); const status = (m, c) => (window.IAP && IAP.status) ? IAP.status(m, c) : console.log(m);
const angleLink = (link, angle) => angle ? link + '?v=' + angle : link; const angleLink = (link, angle) => angle ? link + '?v=' + angle : link;
// the public games page carrying the member's referral (any public page + ?ref sets the sponsor) // the public games page carrying the member's referral (any public page + ?ref sets the sponsor)
const gamesLink = link => link.replace(/\/join\/([^/?#]+).*$/, '/games?ref=$1'); const gamesLink = link => link.replace(/\/join\/([^/?#]+).*$/, '/games?ref=$1');
// The Five Dollar Friday bridge page with the member's referral: /friday?ref=<username>. Any // The Five Dollar Friday bridge page with the member's referral: /friday?ref=<username>. Any
// public page plus ?ref sets the same sponsor cookie as the invite link (viral links, 2026-09-21). // public page plus ?ref sets the same sponsor cookie as the invite link (viral links, 2026-09-21).
const fridayLink = link => link.replace(/\/join\/([^/?#]+).*$/, '/friday?ref=$1'); const fridayLink = link => link.replace(/\/join\/([^/?#]+).*$/, '/friday?ref=$1');
const wednesdayLink = link => link.replace(/\/join\/([^/?#]+).*$/, '/wednesday?ref=$1'); const wednesdayLink = link => link.replace(/\/join\/([^/?#]+).*$/, '/wednesday?ref=$1');
// ── social posts ── // ── social posts ──
const POSTS = [ const POSTS = [
{ net: 'X', label: 'X · Five Dollar Friday', text: 'Five Dollar Friday on InstantAdPay: any ad package from $5 up earns 20% bonus credits, every Friday, Central time. The pack pays the sponsor line in the same transaction, on a public ledger. Free to join: {{FRIDAY}}' }, { net: 'X', label: 'X · Five Dollar Friday', text: 'Five Dollar Friday on InstantAdPay: any ad package from $5 up earns 20% bonus credits, every Friday, Central time. The pack pays the sponsor line in the same transaction, on a public ledger. Free to join: {{FRIDAY}}' },
{ net: 'Facebook', label: 'Facebook · Five Dollar Friday', text: 'Every Friday I point people at this. Any ad package from $5 up gets 20% extra credits on InstantAdPay, added the second the purchase settles, no code, nothing to claim. And every pack pays the sponsor line in the same blockchain transaction, so there is no pending anything. It runs midnight to midnight Central. Free to join by email: {{FRIDAY}}' }, { net: 'Facebook', label: 'Facebook · Five Dollar Friday', text: 'Every Friday I point people at this. Any ad package from $5 up gets 20% extra credits on InstantAdPay, added the second the purchase settles, no code, nothing to claim. And every pack pays the sponsor line in the same blockchain transaction, so there is no pending anything. It runs midnight to midnight Central. Free to join by email: {{FRIDAY}}' },
{ net: 'Telegram', label: 'Telegram or WhatsApp group · Five Dollar Friday', text: 'Quick one for the group: Five Dollar Friday on InstantAdPay. Any ad package from $5 up earns 20% bonus credits today (Central time, until midnight). The page shows whether it is live right now: {{FRIDAY}}' }, { net: 'Telegram', label: 'Telegram or WhatsApp group · Five Dollar Friday', text: 'Quick one for the group: Five Dollar Friday on InstantAdPay. Any ad package from $5 up earns 20% bonus credits today (Central time, until midnight). The page shows whether it is live right now: {{FRIDAY}}' },
{ net: 'X', label: 'X · Five Dollar Friday', text: 'Five Dollar Friday on InstantAdPay: every Friday, any ad package from $5 earns +20% bonus credits, and every pack pays its sponsor line in the same on-chain transaction. The whole network buys on the same day. Join free and line yours up: {{LINK}}' }, { net: 'X', label: 'X · Five Dollar Friday', text: 'Five Dollar Friday on InstantAdPay: every Friday, any ad package from $5 earns +20% bonus credits, and every pack pays its sponsor line in the same on-chain transaction. The whole network buys on the same day. Join free and line yours up: {{LINK}}' },
{ net: 'Telegram', label: 'Telegram or WhatsApp · Five Dollar Friday', text: 'Reminder for the group: tomorrow is Five Dollar Friday on InstantAdPay. Any pack from $5 up earns +20% credits, and your pack pays your sponsor line the second it settles. Everyone pushes on the same day, and every line gets paid at once. Free to join: {{LINK}}' }, { net: 'Telegram', label: 'Telegram or WhatsApp · Five Dollar Friday', text: 'Reminder for the group: tomorrow is Five Dollar Friday on InstantAdPay. Any pack from $5 up earns +20% credits, and your pack pays your sponsor line the second it settles. Everyone pushes on the same day, and every line gets paid at once. Free to join: {{LINK}}' },
{ net: 'X', label: 'X · Wired Wednesday', text: 'Wired Wednesday on InstantAdPay: any ad package from $20 up earns 25% bonus credits, wired into your balance the second the purchase settles and good for any ad format. Every Wednesday, Central time. Free to join: {{WEDNESDAY}}' }, { net: 'X', label: 'X · Wired Wednesday', text: 'Wired Wednesday on InstantAdPay: any ad package from $20 up earns 25% bonus credits, wired into your balance the second the purchase settles and good for any ad format. Every Wednesday, Central time. Free to join: {{WEDNESDAY}}' },
{ net: 'Facebook', label: 'Facebook · Wired Wednesday', text: 'Wednesdays on InstantAdPay are different. Buy any ad package from $20 up and 25% extra credits are wired into your balance the second the purchase settles, ready to run on any format, banners, text, video, solo ads, even login ads. No code, nothing to claim. And every pack pays the sponsor line in the same blockchain transaction. Midnight to midnight Central. Free to join by email: {{WEDNESDAY}}' }, { net: 'Facebook', label: 'Facebook · Wired Wednesday', text: 'Wednesdays on InstantAdPay are different. Buy any ad package from $20 up and 25% extra credits are wired into your balance the second the purchase settles, ready to run on any format, banners, text, video, solo ads, even login ads. No code, nothing to claim. And every pack pays the sponsor line in the same blockchain transaction. Midnight to midnight Central. Free to join by email: {{WEDNESDAY}}' },
{ net: 'Telegram', label: 'Telegram or WhatsApp group · Wired Wednesday', text: 'Quick one for the group: Wired Wednesday on InstantAdPay. Any ad package from $20 up earns 25% bonus credits today, wired in the second it settles (Central time, until midnight). The page shows whether it is live right now: {{WEDNESDAY}}' }, { net: 'Telegram', label: 'Telegram or WhatsApp group · Wired Wednesday', text: 'Quick one for the group: Wired Wednesday on InstantAdPay. Any ad package from $20 up earns 25% bonus credits today, wired in the second it settles (Central time, until midnight). The page shows whether it is live right now: {{WEDNESDAY}}' },
{ net: 'X', label: 'X · instant payout', text: 'No withdraw button. A smart contract on Polygon splits every ad package the second it sells: 50% to the sponsor, 20% to level 2, 10% to level 3. Lands in your own wallet. Watch the ledger move: {{LINK:instant}}' }, { net: 'X', label: 'X · instant payout', text: 'No withdraw button. A smart contract on Polygon splits every ad package the second it sells: 50% to the sponsor, 20% to level 2, 10% to level 3. Lands in your own wallet. Watch the ledger move: {{LINK:instant}}' },
{ net: 'X', label: 'X · advertiser', text: 'Marketers: you were buying traffic anyway. Here the ad spend in your line pays you, in the same transaction, on a public ledger. Packages from $5. Join free: {{LINK:adspend}}' }, { net: 'X', label: 'X · advertiser', text: 'Marketers: you were buying traffic anyway. Here the ad spend in your line pays you, in the same transaction, on a public ledger. Packages from $5. Join free: {{LINK:adspend}}' },
{ net: 'X', label: 'X · free join', text: 'Join free. View a few ads, earn credits, run your first campaign for zero dollars. Seven ad formats, real dwell-timed attention, every payout public on Polygon. {{LINK:free}}' }, { net: 'X', label: 'X · free join', text: 'Join free. View a few ads, earn credits, run your first campaign for zero dollars. Seven ad formats, real dwell-timed attention, every payout public on Polygon. {{LINK:free}}' },
{ net: 'Facebook', label: 'Facebook · story post', text: 'I got tired of "your commission is pending." So I joined a platform where there is no pending. A smart contract on the Polygon blockchain splits every ad package the moment it sells: half to the sponsor, then levels two and three, then the platform. It lands in your own wallet in seconds. No approval queue, no withdrawal button, no 15th of the month.\n\nYou are buying real advertising: banners, text ads, login ads, solo ads to member inboxes, video ads, featured links and verified visits. Members earn credits for their attention, so the ads actually get seen.\n\nJoin free, look around, and check the public ledger before you spend a dollar: {{LINK:instant}}\n\nNo income promises. It is advertising, not investing, and crypto carries risk.' }, { net: 'Facebook', label: 'Facebook · story post', text: 'I got tired of "your commission is pending." So I joined a platform where there is no pending. A smart contract on the Polygon blockchain splits every ad package the moment it sells: half to the sponsor, then levels two and three, then the platform. It lands in your own wallet in seconds. No approval queue, no withdrawal button, no 15th of the month.\n\nYou are buying real advertising: banners, text ads, login ads, solo ads to member inboxes, video ads, featured links and verified visits. Members earn credits for their attention, so the ads actually get seen.\n\nJoin free, look around, and check the public ledger before you spend a dollar: {{LINK:instant}}\n\nNo income promises. It is advertising, not investing, and crypto carries risk.' },
{ net: 'Facebook', label: 'Facebook · skeptic angle', text: 'Every online program I ever joined asked me to trust a back office. This one does not. Every payout is a public transaction on Polygon you can look up yourself, with the wallet addresses and amounts right there. The split is written in a verified smart contract nobody can quietly edit.\n\nFree to join with just an email. The wallet comes out only if you buy a package or switch on payouts. Packages run $5 to $500, and every one of them is ad delivery you can watch running.\n\nTake the tour: {{LINK:ledger}}' }, { net: 'Facebook', label: 'Facebook · skeptic angle', text: 'Every online program I ever joined asked me to trust a back office. This one does not. Every payout is a public transaction on Polygon you can look up yourself, with the wallet addresses and amounts right there. The split is written in a verified smart contract nobody can quietly edit.\n\nFree to join with just an email. The wallet comes out only if you buy a package or switch on payouts. Packages run $5 to $500, and every one of them is ad delivery you can watch running.\n\nTake the tour: {{LINK:ledger}}' },
{ net: 'LinkedIn', label: 'LinkedIn · professional', text: 'An experiment in transparent affiliate payouts: InstantAdPay sells advertising packages ($5 to $500) whose sponsor commissions are settled by a verified smart contract on Polygon in the same transaction as the purchase. 50 / 20 / 10 across three levels, 20 percent to the platform, every payment public on the chain.\n\nWhat I find interesting is not the commission. It is that "pending payout" stops being a concept. If you buy traffic for a living and want to see how same-transaction settlement works in practice, the tour is free: {{LINK:adspend}}' }, { net: 'LinkedIn', label: 'LinkedIn · professional', text: 'An experiment in transparent affiliate payouts: InstantAdPay sells advertising packages ($5 to $500) whose sponsor commissions are settled by a verified smart contract on Polygon in the same transaction as the purchase. 50 / 20 / 10 across three levels, 20 percent to the platform, every payment public on the chain.\n\nWhat I find interesting is not the commission. It is that "pending payout" stops being a concept. If you buy traffic for a living and want to see how same-transaction settlement works in practice, the tour is free: {{LINK:adspend}}' },
{ net: 'Telegram', label: 'Telegram or WhatsApp group', text: 'Quick one for the group. Ad platform on Polygon where every package splits to sponsor wallets the second it sells. No withdrawals, no pending. Free to join by email, packages from $5, seven ad formats, and you earn credits for viewing. Tour here: {{LINK:instant}}' }, { net: 'Telegram', label: 'Telegram or WhatsApp group', text: 'Quick one for the group. Ad platform on Polygon where every package splits to sponsor wallets the second it sells. No withdrawals, no pending. Free to join by email, packages from $5, seven ad formats, and you earn credits for viewing. Tour here: {{LINK:instant}}' },
{ net: 'Telegram', label: 'Telegram or WhatsApp group · free angle', text: 'If you want to test an ad network without spending anything: join free, view a handful of ads, earn credits, run your first campaign on the house. Payouts are on the public Polygon ledger. {{LINK:free}}' } { net: 'Telegram', label: 'Telegram or WhatsApp group · free angle', text: 'If you want to test an ad network without spending anything: join free, view a handful of ads, earn credits, run your first campaign on the house. Payouts are on the public Polygon ledger. {{LINK:free}}' }
]; ];
// ── text a friend (SMS-sized) ── // ── text a friend (SMS-sized) ──
const TEXTS = [ const TEXTS = [
{ angle: 'friday', title: '"Five Dollar Friday"', text: 'Heads up: Fridays on InstantAdPay any ad package from $5 up gets 20% bonus credits, Central time. Page tells you if it is live right now: {{FRIDAY}}' }, { angle: 'friday', title: '"Five Dollar Friday"', text: 'Heads up: Fridays on InstantAdPay any ad package from $5 up gets 20% bonus credits, Central time. Page tells you if it is live right now: {{FRIDAY}}' },
{ angle: 'wednesday', title: '"Wired Wednesday"', text: 'Heads up: Wednesdays on InstantAdPay any ad package from $20 up gets 25% bonus credits wired in the second it settles, Central time. Page tells you if it is live right now: {{WEDNESDAY}}' }, { angle: 'wednesday', title: '"Wired Wednesday"', text: 'Heads up: Wednesdays on InstantAdPay any ad package from $20 up gets 25% bonus credits wired in the second it settles, Central time. Page tells you if it is live right now: {{WEDNESDAY}}' },
{ angle: '', title: '"Thought of you"', text: 'Hey, found an ad platform where the commission lands in your wallet the second someone buys. No pending, no withdraw button. Free to look: {{LINK}}' }, { angle: '', title: '"Thought of you"', text: 'Hey, found an ad platform where the commission lands in your wallet the second someone buys. No pending, no withdraw button. Free to look: {{LINK}}' },
{ angle: 'instant', title: '"Before the page reloads"', text: 'Random thought. What if your commission showed up before the thank-you page finished loading? That is literally how this works: {{LINK:instant}}' }, { angle: 'instant', title: '"Before the page reloads"', text: 'Random thought. What if your commission showed up before the thank-you page finished loading? That is literally how this works: {{LINK:instant}}' },
{ angle: 'adspend', title: '"You buy ads anyway"', text: 'You already buy traffic. This one pays your line every time someone in it buys ads, same transaction, on Polygon. Two-minute look: {{LINK:adspend}}' }, { angle: 'adspend', title: '"You buy ads anyway"', text: 'You already buy traffic. This one pays your line every time someone in it buys ads, same transaction, on Polygon. Two-minute look: {{LINK:adspend}}' },
{ angle: 'free', title: '"Costs nothing to try"', text: 'Try this without spending a dollar: join free, view a few ads, earn credits, run your first campaign. {{LINK:free}}' }, { angle: 'free', title: '"Costs nothing to try"', text: 'Try this without spending a dollar: join free, view a few ads, earn credits, run your first campaign. {{LINK:free}}' },
{ angle: 'ledger', title: '"No back office"', text: 'Remember waiting on payouts that never came? This one has no back office. Every payment is public on the blockchain. Check it yourself: {{LINK:ledger}}' } { angle: 'ledger', title: '"No back office"', text: 'Remember waiting on payouts that never came? This one has no back office. Every payment is public on the blockchain. Check it yourself: {{LINK:ledger}}' }
]; ];
// ── email swipes ── // ── email swipes ──
const SWIPES = [ const SWIPES = [
{ tier: 'Five Dollar Friday', subject: 'Tomorrow is Five Dollar Friday', body: 'Quick heads-up.\n\nTomorrow is Five Dollar Friday on InstantAdPay. Any ad package from $5 up, bought on Friday (Central time), earns +20% bonus credits the moment it settles.\n\nHere is why it matters: every pack pays its sponsor line in the same transaction, on the Polygon blockchain. When the whole network buys on the same day, every line gets paid at once, and you can watch it happen on the public ledger.\n\nIt is free to join. Line up your pack tonight so you are ready when Friday starts:\n{{LINK}}\n\nAdvertising with a referral program. Not an investment, no income guaranteed.' }, { tier: 'Five Dollar Friday', subject: 'Tomorrow is Five Dollar Friday', body: 'Quick heads-up.\n\nTomorrow is Five Dollar Friday on InstantAdPay. Any ad package from $5 up, bought on Friday (Central time), earns +20% bonus credits the moment it settles.\n\nHere is why it matters: every pack pays its sponsor line in the same transaction, on the Polygon blockchain. When the whole network buys on the same day, every line gets paid at once, and you can watch it happen on the public ledger.\n\nIt is free to join. Line up your pack tonight so you are ready when Friday starts:\n{{LINK}}\n\nAdvertising with a referral program. Not an investment, no income guaranteed.' },
{ tier: 'Wired Wednesday', subject: 'Tomorrow is Wired Wednesday', body: 'Quick heads-up.\n\nTomorrow is Wired Wednesday on InstantAdPay. Any ad package from $20 up, bought on Wednesday (Central time), earns +25% bonus credits, wired into your balance the moment the purchase settles. They are purchased-grade, so they run on any format, login ads included. Nothing to set up, nothing to claim.\n\nAnd like every pack, it pays the sponsor line in the same transaction on the Polygon blockchain, public on the ledger.\n\nIf you have been meaning to get a pack, tomorrow is the day: {{WEDNESDAY}}\n\nNo income promises. Advertising, not investing.' }, { tier: 'Wired Wednesday', subject: 'Tomorrow is Wired Wednesday', body: 'Quick heads-up.\n\nTomorrow is Wired Wednesday on InstantAdPay. Any ad package from $20 up, bought on Wednesday (Central time), earns +25% bonus credits, wired into your balance the moment the purchase settles. They are purchased-grade, so they run on any format, login ads included. Nothing to set up, nothing to claim.\n\nAnd like every pack, it pays the sponsor line in the same transaction on the Polygon blockchain, public on the ledger.\n\nIf you have been meaning to get a pack, tomorrow is the day: {{WEDNESDAY}}\n\nNo income promises. Advertising, not investing.' },
{ tier: 'Short', subject: 'Paid the second it sells', body: 'Quick one.\n\nI joined an ad platform where every package splits to sponsor wallets in the same transaction as the sale. No pending payouts, no withdraw button. It is on the Polygon blockchain, and every payment is public.\n\nJoin free, look at the ledger, decide later: {{LINK:instant}}\n\nNo income promises. Advertising, not investing.' }, { tier: 'Short', subject: 'Paid the second it sells', body: 'Quick one.\n\nI joined an ad platform where every package splits to sponsor wallets in the same transaction as the sale. No pending payouts, no withdraw button. It is on the Polygon blockchain, and every payment is public.\n\nJoin free, look at the ledger, decide later: {{LINK:instant}}\n\nNo income promises. Advertising, not investing.' },
{ tier: 'Standard', subject: 'Your wallet gets paid instantly', body: 'You know the usual drill. Someone buys on your link, you wait for a payout. Maybe days. Maybe an approval hold. Maybe a "your account is under review."\n\nInstantAdPay does not work like that.\n\nA smart contract on the Polygon blockchain handles every purchase the second it happens. 50% to the sponsor. 20% to the next level. 10% to the one after that. 20% to the platform. Each split lands directly in your own wallet. No withdrawal button. No "request payout." No approval queue.\n\nThe money just shows up.\n\nYou can watch every transaction on the public ledger. Real time. Anyone can verify it.\n\nFree to join. Packages from $5 to $500. No income promises. It is advertising, not investing.\n\n{{LINK}}' }, { tier: 'Standard', subject: 'Your wallet gets paid instantly', body: 'You know the usual drill. Someone buys on your link, you wait for a payout. Maybe days. Maybe an approval hold. Maybe a "your account is under review."\n\nInstantAdPay does not work like that.\n\nA smart contract on the Polygon blockchain handles every purchase the second it happens. 50% to the sponsor. 20% to the next level. 10% to the one after that. 20% to the platform. Each split lands directly in your own wallet. No withdrawal button. No "request payout." No approval queue.\n\nThe money just shows up.\n\nYou can watch every transaction on the public ledger. Real time. Anyone can verify it.\n\nFree to join. Packages from $5 to $500. No income promises. It is advertising, not investing.\n\n{{LINK}}' },
{ tier: 'Long', subject: 'The ad network with no pending payouts', body: 'Let me tell you what you are actually looking at, because "crypto ad platform" can mean anything.\n\nInstantAdPay sells advertising. Seven packages, $5 to $500. A package mints ad credits, and one credit is one cent of delivery across seven formats: display banners, text ads, full-screen login ads, solo ads delivered into member inboxes, video ads, featured links, and verified visits. Members earn credits for their attention, with a timer that pauses when they look away, so your ad is seen by a person, not a script.\n\nNow the part that made me join.\n\nWhen anyone in your line buys a package, a verified smart contract on Polygon splits the payment in that same transaction: 50 percent to their direct sponsor, 20 percent to level two, 10 percent to level three, 20 percent to the platform. It lands in real wallets in seconds. There is no balance to withdraw because nothing is ever held.\n\nEvery one of those payments is public. Open the ledger, click a transaction, read it on Polygonscan.\n\nJoining is free and only needs an email. Your wallet comes out when you buy a package or switch on payouts. If you never spend a dollar, you can still view ads, earn credits, and run a small campaign on those.\n\nHave a look: {{LINK:instant}}\n\nOne honest line: nobody is promising you an income. Results depend on your effort, and crypto carries risk of loss.' }, { tier: 'Long', subject: 'The ad network with no pending payouts', body: 'Let me tell you what you are actually looking at, because "crypto ad platform" can mean anything.\n\nInstantAdPay sells advertising. Seven packages, $5 to $500. A package mints ad credits, and one credit is one cent of delivery across seven formats: display banners, text ads, full-screen login ads, solo ads delivered into member inboxes, video ads, featured links, and verified visits. Members earn credits for their attention, with a timer that pauses when they look away, so your ad is seen by a person, not a script.\n\nNow the part that made me join.\n\nWhen anyone in your line buys a package, a verified smart contract on Polygon splits the payment in that same transaction: 50 percent to their direct sponsor, 20 percent to level two, 10 percent to level three, 20 percent to the platform. It lands in real wallets in seconds. There is no balance to withdraw because nothing is ever held.\n\nEvery one of those payments is public. Open the ledger, click a transaction, read it on Polygonscan.\n\nJoining is free and only needs an email. Your wallet comes out when you buy a package or switch on payouts. If you never spend a dollar, you can still view ads, earn credits, and run a small campaign on those.\n\nHave a look: {{LINK:instant}}\n\nOne honest line: nobody is promising you an income. Results depend on your effort, and crypto carries risk of loss.' },
{ tier: 'Follow-up', subject: 'Did you see the ledger?', body: 'Following up on the ad platform I sent over.\n\nIf you only look at one thing, look at the live ledger. Every purchase and every payout, with real wallet addresses, in the order they happened. That is the whole pitch: nothing to take on faith.\n\n{{LINK:ledger}}\n\nIf it is not for you, no worries at all.' } { tier: 'Follow-up', subject: 'Did you see the ledger?', body: 'Following up on the ad platform I sent over.\n\nIf you only look at one thing, look at the live ledger. Every purchase and every payout, with real wallet addresses, in the order they happened. That is the whole pitch: nothing to take on faith.\n\n{{LINK:ledger}}\n\nIf it is not for you, no worries at all.' }
]; ];
// ── objection bank (truth + say this) ── // ── objection bank (truth + say this) ──
const OBJECTIONS = [ const OBJECTIONS = [
{ q: 'Which crypto do I get paid in?', truth: 'One coin, one network: POL, the native coin of Polygon. Packages are dollar-priced and settled in POL at the live Chainlink rate; every payout is sent as POL to the recipient\'s own Polygon wallet in the same transaction. No tokens, no other chains, no stablecoins.', say: 'You get paid in POL, which is Polygon\'s own coin, straight into your wallet the moment a package in your line sells. Any Polygon wallet works, MetaMask, SafePal, Phantom, and if you have never held crypto you can buy POL with a card inside the member area. {{LINK}}' }, { q: 'Which crypto do I get paid in?', truth: 'One coin, one network: POL, the native coin of Polygon. Packages are dollar-priced and settled in POL at the live Chainlink rate; every payout is sent as POL to the recipient\'s own Polygon wallet in the same transaction. No tokens, no other chains, no stablecoins.', say: 'You get paid in POL, which is Polygon\'s own coin, straight into your wallet the moment a package in your line sells. Any Polygon wallet works, MetaMask, SafePal, Phantom, and if you have never held crypto you can buy POL with a card inside the member area. {{LINK}}' },
{ q: 'Is this a pyramid scheme?', truth: 'You are buying advertising that actually runs: a credit is one cent of delivery across seven live formats, and members earn credits for dwell-timed attention. Sponsor payments are referral commissions written as constants in a verified contract, paid only when a real package sells. Nobody has to recruit to use the ads, and joining costs nothing.', say: 'Fair question. Here is the test I use: is there a real product that people would buy with no referral involved? Here the product is ad delivery, seven formats, one cent per credit, and you can watch your campaign serving. The sponsor split is a referral commission on those sales, fixed in a public contract. Join free and run the ads with zero referrals if you like. {{LINK:free}}' }, { q: 'Is this a pyramid scheme?', truth: 'You are buying advertising that actually runs: a credit is one cent of delivery across seven live formats, and members earn credits for dwell-timed attention. Sponsor payments are referral commissions written as constants in a verified contract, paid only when a real package sells. Nobody has to recruit to use the ads, and joining costs nothing.', say: 'Fair question. Here is the test I use: is there a real product that people would buy with no referral involved? Here the product is ad delivery, seven formats, one cent per credit, and you can watch your campaign serving. The sponsor split is a referral commission on those sales, fixed in a public contract. Join free and run the ads with zero referrals if you like. {{LINK:free}}' },
{ q: 'I do not have a crypto wallet. I am not technical.', truth: 'Joining needs only an email and a 6-digit code. The wallet comes out only when someone buys a package or switches on payouts, and the site walks them through it. A card on-ramp (MoonPay) delivers POL straight to their own wallet. Email first, wallet second.', say: 'You do not need one to join. It is email only, no password even. The wallet shows up later, only if you decide to buy a package or want payouts, and the site walks you through it step by step. Start here and look around first: {{LINK}}' }, { q: 'I do not have a crypto wallet. I am not technical.', truth: 'Joining needs only an email and a 6-digit code. The wallet comes out only when someone buys a package or switches on payouts, and the site walks them through it. A card on-ramp (MoonPay) delivers POL straight to their own wallet. Email first, wallet second.', say: 'You do not need one to join. It is email only, no password even. The wallet shows up later, only if you decide to buy a package or want payouts, and the site walks you through it step by step. Start here and look around first: {{LINK}}' },
{ q: 'What am I actually buying?', truth: 'Ad credits minted on-chain the moment a package is bought: $5 = 500, $10 = 1,000, $20 = 2,000, $50 = 5,500, $100 = 12,000, $250 = 32,500, $500 = 70,000. Credits spend on banners, text ads, login ads, solo ads to member inboxes, video ads, featured links and verified visits, with live stats per campaign. Only the buyer\'s campaigns can spend them.', say: 'Advertising. A package mints credits, one credit is one cent of delivery, and you spend them on seven ad formats from your own dashboard with live stats. The $5 package is 500 credits, the $500 package is 70,000. You can see the formats before you spend anything: {{LINK:adspend}}' }, { q: 'What am I actually buying?', truth: 'Ad credits minted on-chain the moment a package is bought: $5 = 500, $10 = 1,000, $20 = 2,000, $50 = 5,500, $100 = 12,000, $250 = 32,500, $500 = 70,000. Credits spend on banners, text ads, login ads, solo ads to member inboxes, video ads, featured links and verified visits, with live stats per campaign. Only the buyer\'s campaigns can spend them.', say: 'Advertising. A package mints credits, one credit is one cent of delivery, and you spend them on seven ad formats from your own dashboard with live stats. The $5 package is 500 credits, the $500 package is 70,000. You can see the formats before you spend anything: {{LINK:adspend}}' },
{ q: 'Who holds my money?', truth: 'Nobody. A purchase is one Polygon transaction that splits to the sponsor line and the platform wallets immediately. The site never holds balances, and the contract source is verified on Polygonscan and Sourcify. Overpayment refunds itself in the same transaction.', say: 'That is the part I like most: nobody holds it. The purchase is a single blockchain transaction that pays the sponsor line and the platform in the same moment. There is no balance sitting anywhere waiting for a withdrawal. The contract code is public and verified, and every payment is on the ledger: {{LINK:ledger}}' }, { q: 'Who holds my money?', truth: 'Nobody. A purchase is one Polygon transaction that splits to the sponsor line and the platform wallets immediately. The site never holds balances, and the contract source is verified on Polygonscan and Sourcify. Overpayment refunds itself in the same transaction.', say: 'That is the part I like most: nobody holds it. The purchase is a single blockchain transaction that pays the sponsor line and the platform in the same moment. There is no balance sitting anywhere waiting for a withdrawal. The contract code is public and verified, and every payment is on the ledger: {{LINK:ledger}}' },
{ q: 'What if POL drops?', truth: 'Packages are priced in dollars and settled in POL at the live Chainlink rate at the moment of purchase. Payouts arrive as POL in the recipient\'s own wallet immediately, so what they do with it is their call. This is advertising, not an investment, and POL is volatile like any crypto asset.', say: 'Packages are dollar priced, so $20 is $20 worth of POL at that moment. Payouts land in your wallet right away, and it is your money from that second. Crypto does move, so treat it as advertising you bought, not an investment. {{LINK}}' }, { q: 'What if POL drops?', truth: 'Packages are priced in dollars and settled in POL at the live Chainlink rate at the moment of purchase. Payouts arrive as POL in the recipient\'s own wallet immediately, so what they do with it is their call. This is advertising, not an investment, and POL is volatile like any crypto asset.', say: 'Packages are dollar priced, so $20 is $20 worth of POL at that moment. Payouts land in your wallet right away, and it is your money from that second. Crypto does move, so treat it as advertising you bought, not an investment. {{LINK}}' },
{ q: 'Why would anyone buy ads here?', truth: 'The members are marketers who already buy traffic. Viewers earn credits only after a server-timed dwell, so impressions are real people. Solo ads reach member inboxes with a guaranteed delivery count, verified visits are one unique member per visit, and banner and text ads also syndicate to a partner ad network.', say: 'Because the people on it are marketers, and they get paid to actually look. Every view is dwell-timed on the server, solo ads land in real inboxes with a guaranteed count, and verified visits are one real person each. You can watch your own campaign serve: {{LINK:adspend}}' }, { q: 'Why would anyone buy ads here?', truth: 'The members are marketers who already buy traffic. Viewers earn credits only after a server-timed dwell, so impressions are real people. Solo ads reach member inboxes with a guaranteed delivery count, verified visits are one unique member per visit, and banner and text ads also syndicate to a partner ad network.', say: 'Because the people on it are marketers, and they get paid to actually look. Every view is dwell-timed on the server, solo ads land in real inboxes with a guaranteed count, and verified visits are one real person each. You can watch your own campaign serve: {{LINK:adspend}}' },
{ q: 'I do not know anyone to refer.', truth: 'Referrals are optional. Members can view ads, earn credits and advertise with no line at all. When they do refer, every direct buyer pays them 50 percent from the very first package, and their line banner is shown to their next three levels during welcome tours.', say: 'You do not have to refer anyone. Join free, earn credits by viewing, run ads. If one person ever joins through you and buys a $5 package, half of it hits your wallet in that transaction. That is the whole referral side, and it is optional. {{LINK:free}}' }, { q: 'I do not know anyone to refer.', truth: 'Referrals are optional. Members can view ads, earn credits and advertise with no line at all. When they do refer, every direct buyer pays them 50 percent from the very first package, and their line banner is shown to their next three levels during welcome tours.', say: 'You do not have to refer anyone. Join free, earn credits by viewing, run ads. If one person ever joins through you and buys a $5 package, half of it hits your wallet in that transaction. That is the whole referral side, and it is optional. {{LINK:free}}' },
{ q: 'How much can I make?', truth: 'No income is guaranteed or implied. Sponsor commissions are 50 / 20 / 10 across three levels on packages that actually sell; level 2 needs 2 qualifying buyers ($20 or more) and level 3 needs 5. Results depend on the member\'s effort, and crypto carries risk of loss. Never quote a figure.', say: 'Nobody can tell you that, and I would not trust anyone who did. What I can tell you is exactly how it is split: 50 percent to the direct sponsor, 20 and 10 to the next two levels, paid the moment a package sells, all public. What that adds up to depends entirely on what you build. {{LINK:instant}}' } { q: 'How much can I make?', truth: 'No income is guaranteed or implied. Sponsor commissions are 50 / 20 / 10 across three levels on packages that actually sell; level 2 needs 2 qualifying buyers ($20 or more) and level 3 needs 5. Results depend on the member\'s effort, and crypto carries risk of loss. Never quote a figure.', say: 'Nobody can tell you that, and I would not trust anyone who did. What I can tell you is exactly how it is split: 50 percent to the direct sponsor, 20 and 10 to the next two levels, paid the moment a package sells, all public. What that adds up to depends entirely on what you build. {{LINK:instant}}' }
]; ];
function fillLink(text, link) { function fillLink(text, link) {
return text.replace(/\{\{GAMES\}\}/g, gamesLink(link)).replace(/\{\{FRIDAY\}\}/g, fridayLink(link)).replace(/\{\{WEDNESDAY\}\}/g, wednesdayLink(link)).replace(/\{\{LINK(?::([a-z]+))?\}\}/g, (m, a) => angleLink(link, a)); return text.replace(/\{\{GAMES\}\}/g, gamesLink(link)).replace(/\{\{FRIDAY\}\}/g, fridayLink(link)).replace(/\{\{WEDNESDAY\}\}/g, wednesdayLink(link)).replace(/\{\{LINK(?::([a-z]+))?\}\}/g, (m, a) => angleLink(link, a));
} }
function copyBtn(text, label) { function copyBtn(text, label) {
const b = document.createElement('button'); const b = document.createElement('button');
b.className = 'btn small sec'; b.type = 'button'; b.textContent = label || 'Copy'; b.className = 'btn small sec'; b.type = 'button'; b.textContent = label || 'Copy';
b.addEventListener('click', async () => { b.addEventListener('click', async () => {
try { await navigator.clipboard.writeText(text); status('Copied. Paste it anywhere.', 'ok'); } try { await navigator.clipboard.writeText(text); status('Copied. Paste it anywhere.', 'ok'); }
catch (e) { status('Copy failed. Select the text instead.', 'bad'); } catch (e) { status('Copy failed. Select the text instead.', 'bad'); }
}); });
return b; return b;
} }
function block(text, head, extraBtns) { function block(text, head, extraBtns) {
const div = document.createElement('div'); const div = document.createElement('div');
div.className = 'promo-block'; div.className = 'promo-block';
if (head) { const h = document.createElement('div'); h.className = 'pb-head'; h.innerHTML = head; div.appendChild(h); } if (head) { const h = document.createElement('div'); h.className = 'pb-head'; h.innerHTML = head; div.appendChild(h); }
const pre = document.createElement('div'); pre.className = 'pb-text'; pre.textContent = text; div.appendChild(pre); const pre = document.createElement('div'); pre.className = 'pb-text'; pre.textContent = text; div.appendChild(pre);
const row = document.createElement('div'); row.className = 'pb-actions'; const row = document.createElement('div'); row.className = 'pb-actions';
row.appendChild(copyBtn(text)); row.appendChild(copyBtn(text));
(extraBtns || []).forEach(b => row.appendChild(b)); (extraBtns || []).forEach(b => row.appendChild(b));
div.appendChild(row); div.appendChild(row);
return div; return div;
} }
function linkBtn(href, label, cls) { function linkBtn(href, label, cls) {
const a = document.createElement('a'); const a = document.createElement('a');
a.className = 'btn small ' + (cls || 'sec'); a.href = href; a.textContent = label; a.className = 'btn small ' + (cls || 'sec'); a.href = href; a.textContent = label;
if (!/^sms:/.test(href)) { a.target = '_blank'; a.rel = 'noopener'; } if (!/^sms:/.test(href)) { a.target = '_blank'; a.rel = 'noopener'; }
return a; return a;
} }
// hook videos: one per angle; the matched link continues the same hook on the join page // hook videos: one per angle; the matched link continues the same hook on the join page
const VID_BASE = 'https://coolify-saasytop.nyc3.digitaloceanspaces.com/promo/'; const VID_BASE = 'https://coolify-saasytop.nyc3.digitaloceanspaces.com/promo/';
const VIDEOS = [ const VIDEOS = [
{ angle: 'wide', file: 'buildwide', title: 'Build wide: watch the payments flow', hook: 'Width unlocks depth. Watch fifty percent land, then the deeper levels open.', caption: 'Here is the one move every leader starts with: go wide. Each person you bring in who buys advertising pays you fifty percent the moment they buy. Two buyers open your second level, five open the third. Watch the payments flow, then join free: {{LINK:wide}}' }, { angle: 'wide', file: 'buildwide', title: 'Build wide: watch the payments flow', hook: 'Width unlocks depth. Watch fifty percent land, then the deeper levels open.', caption: 'Here is the one move every leader starts with: go wide. Each person you bring in who buys advertising pays you fifty percent the moment they buy. Two buyers open your second level, five open the third. Watch the payments flow, then join free: {{LINK:wide}}' },
{ angle: 'play', title: 'If you have time to play', hook: 'If you have time to play a game on your phone, you have time to build a business.', caption: 'If you have time to play a game on your phone, you have time to build a business. These free games pay real Polygon to your wallet, on chain, where anyone can check it. Share your games link instead of just playing. Watch it and play free: {{LINK:play}}' }, { angle: 'play', title: 'If you have time to play', hook: 'If you have time to play a game on your phone, you have time to build a business.', caption: 'If you have time to play a game on your phone, you have time to build a business. These free games pay real Polygon to your wallet, on chain, where anyone can check it. Share your games link instead of just playing. Watch it and play free: {{LINK:play}}' },
{ angle: 'instant', title: 'Paid before the page reloads', hook: 'What if your commission landed before the thank-you page finished loading?', caption: 'What if your commission landed before the thank-you page finished loading? On InstantAdPay a smart contract splits every ad package the second it sells, straight to wallets, on a public ledger. Free to join by email: {{LINK:instant}}' }, { angle: 'instant', title: 'Paid before the page reloads', hook: 'What if your commission landed before the thank-you page finished loading?', caption: 'What if your commission landed before the thank-you page finished loading? On InstantAdPay a smart contract splits every ad package the second it sells, straight to wallets, on a public ledger. Free to join by email: {{LINK:instant}}' },
{ angle: 'adspend', title: 'You were buying traffic anyway', hook: 'Every ad dollar you have ever spent went one direction. Out.', caption: 'Every ad dollar you have ever spent went one direction. Out. Here the ad spend in your line pays you back in the same transaction. Seven formats, packages from $5, free to join: {{LINK:adspend}}' }, { angle: 'adspend', title: 'You were buying traffic anyway', hook: 'Every ad dollar you have ever spent went one direction. Out.', caption: 'Every ad dollar you have ever spent went one direction. Out. Here the ad spend in your line pays you back in the same transaction. Seven formats, packages from $5, free to join: {{LINK:adspend}}' },
{ angle: 'free', title: 'Watch first, spend never', hook: 'You can run your first ad campaign here for exactly zero dollars.', caption: 'Run your first ad campaign for exactly zero dollars. Join free by email, earn credits by viewing ads, launch a real campaign, and watch real payouts land on a public ledger before you spend a cent: {{LINK:free}}' }, { angle: 'free', title: 'Watch first, spend never', hook: 'You can run your first ad campaign here for exactly zero dollars.', caption: 'Run your first ad campaign for exactly zero dollars. Join free by email, earn credits by viewing ads, launch a real campaign, and watch real payouts land on a public ledger before you spend a cent: {{LINK:free}}' },
{ angle: 'ledger', title: 'No back office. No payday.', hook: 'Your last affiliate program paid you on the fifteenth. If it paid you.', caption: 'Your last affiliate program paid you on the fifteenth. If it paid you. Here the payroll is the blockchain: every payout is a public transaction, nothing is held, nobody can change the split. Open the ledger, then join free: {{LINK:ledger}}' }, { angle: 'ledger', title: 'No back office. No payday.', hook: 'Your last affiliate program paid you on the fifteenth. If it paid you.', caption: 'Your last affiliate program paid you on the fifteenth. If it paid you. Here the payroll is the blockchain: every payout is a public transaction, nothing is held, nobody can change the split. Open the ledger, then join free: {{LINK:ledger}}' },
{ angle: 'two', title: 'Two buyers open level two', hook: 'Two buyers. Then five. That is the whole ladder.', caption: 'Two buyers. Then five. That is the whole ladder. Level 1 pays from your first buyer, two qualifying buyers open level 2, five open level 3, all in the same transaction, straight to your wallet. Free to join: {{LINK:two}}' } { angle: 'two', title: 'Two buyers open level two', hook: 'Two buyers. Then five. That is the whole ladder.', caption: 'Two buyers. Then five. That is the whole ladder. Level 1 pays from your first buyer, two qualifying buyers open level 2, five open level 3, all in the same transaction, straight to your wallet. Free to join: {{LINK:two}}' }
]; ];
// the six front doors: the plain invite link plus one page per hook angle // the six front doors: the plain invite link plus one page per hook angle
const ANGLES = [ const ANGLES = [
{ angle: '', name: 'General', hook: 'The whole picture', use: 'What InstantAdPay is, the payment split, join free. Use it when you have not said anything specific yet.' }, { angle: '', name: 'General', hook: 'The whole picture', use: 'What InstantAdPay is, the payment split, join free. Use it when you have not said anything specific yet.' },
{ angle: 'play', name: 'Play', hook: 'If you have time to play', use: 'For people who play games on their phone. The page shows the games video and a Play the free games button with your referral, then the free sign-up.' }, { angle: 'play', name: 'Play', hook: 'If you have time to play', use: 'For people who play games on their phone. The page shows the games video and a Play the free games button with your referral, then the free sign-up.' },
{ angle: 'instant', name: 'Instant', hook: 'Paid before the page reloads', use: 'For anyone burned by pending commissions. The page opens on the on-chain payout that lands in seconds.' }, { angle: 'instant', name: 'Instant', hook: 'Paid before the page reloads', use: 'For anyone burned by pending commissions. The page opens on the on-chain payout that lands in seconds.' },
{ angle: 'adspend', name: 'Ad spend', hook: 'You buy ads anyway', use: 'For marketers who already pay for traffic. Frames it as advertising that also pays your line when they buy.' }, { angle: 'adspend', name: 'Ad spend', hook: 'You buy ads anyway', use: 'For marketers who already pay for traffic. Frames it as advertising that also pays your line when they buy.' },
{ angle: 'free', name: 'Free', hook: 'Costs nothing to try', use: 'For skeptics and beginners. Join free, earn credits by viewing, run a first campaign without spending.' }, { angle: 'free', name: 'Free', hook: 'Costs nothing to try', use: 'For skeptics and beginners. Join free, earn credits by viewing, run a first campaign without spending.' },
{ angle: 'ledger', name: 'Ledger', hook: 'No back office, no payday', use: 'For people who have waited on a payout. Every payment is public on Polygonscan and nothing is ever held.' }, { angle: 'ledger', name: 'Ledger', hook: 'No back office, no payday', use: 'For people who have waited on a payout. Every payment is public on Polygonscan and nothing is ever held.' },
{ angle: 'wide', name: 'Wide', hook: 'Width unlocks depth', use: 'For team builders and anyone weighing the plan. The page opens on the Build Wide video: fifty percent landing, then levels two and three opening at two and five buyers.' }, { angle: 'wide', name: 'Wide', hook: 'Width unlocks depth', use: 'For team builders and anyone weighing the plan. The page opens on the Build Wide video: fifty percent landing, then levels two and three opening at two and five buyers.' },
{ angle: 'two', name: 'Two', hook: 'Two buyers open level two', use: 'For team builders. The 2-then-5 qualification ladder and how a line stacks under you.' } { angle: 'two', name: 'Two', hook: 'Two buyers open level two', use: 'For team builders. The 2-then-5 qualification ladder and how a line stacks under you.' }
]; ];
function fill(link, me) { function fill(link, me) {
const token = (me && (me.username || me.refCode || me.memberId)) || ''; const token = (me && (me.username || me.refCode || me.memberId)) || '';
// invite strip // invite strip
if ($('promoLink')) $('promoLink').textContent = link; if ($('promoLink')) $('promoLink').textContent = link;
if ($('promoLinkCopy')) $('promoLinkCopy').onclick = async () => { if ($('promoLinkCopy')) $('promoLinkCopy').onclick = async () => {
try { await navigator.clipboard.writeText(link); status('Link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } try { await navigator.clipboard.writeText(link); status('Link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); }
}; };
// angle links: one row per front door, copy + share // angle links: one row per front door, copy + share
const al = $('promoAngles'); const al = $('promoAngles');
if (al && al.dataset.filled !== link) { if (al && al.dataset.filled !== link) {
al.dataset.filled = link; al.innerHTML = ''; al.dataset.filled = link; al.innerHTML = '';
for (const a of ANGLES) { for (const a of ANGLES) {
const url = angleLink(link, a.angle); const url = angleLink(link, a.angle);
const hasVideo = VIDEOS.some(v => v.angle === a.angle); const hasVideo = VIDEOS.some(v => v.angle === a.angle);
// one collapsed band per angle, like the banner kit: open the one you want // one collapsed band per angle, like the banner kit: open the one you want
const row = document.createElement('details'); const row = document.createElement('details');
row.className = 'angle-row pb-acc'; row.className = 'angle-row pb-acc';
row.innerHTML = '<summary><span><span class="angle-name">' + esc(a.name) + '</span> <span class="angle-hook">' + esc(a.hook) + '</span></span>' row.innerHTML = '<summary><span><span class="angle-name">' + esc(a.name) + '</span> <span class="angle-hook">' + esc(a.hook) + '</span></span>'
+ (hasVideo ? '<span class="angle-tag">video</span>' : '') + '</summary>' + (hasVideo ? '<span class="angle-tag">video</span>' : '') + '</summary>'
+ '<div class="angle-body"><div class="angle-txt">' + '<div class="angle-body"><div class="angle-txt">'
+ '<div class="muted small">' + esc(a.use) + '</div>' + '<div class="muted small">' + esc(a.use) + '</div>'
+ '<a class="mono small angle-url" href="' + esc(url) + '" target="_blank" rel="noopener">' + esc(url) + '</a></div>' + '<a class="mono small angle-url" href="' + esc(url) + '" target="_blank" rel="noopener">' + esc(url) + '</a></div>'
+ '<div class="angle-btns"><a class="btn small sec" href="' + esc(url) + '" target="_blank" rel="noopener">Open</a><button class="btn small" type="button">Copy</button>' + '<div class="angle-btns"><a class="btn small sec" href="' + esc(url) + '" target="_blank" rel="noopener">Open</a><button class="btn small" type="button">Copy</button>'
+ (navigator.share ? '<button class="btn small sec" type="button">Share</button>' : '') + '</div></div>'; // Share = the phone's share sheet; desktops have none, so no button + (navigator.share ? '<button class="btn small sec" type="button">Share</button>' : '') + '</div></div>'; // Share = the phone's share sheet; desktops have none, so no button
const [copyBtn, shareBtn] = row.querySelectorAll('button'); const [copyBtn, shareBtn] = row.querySelectorAll('button');
copyBtn.onclick = async () => { try { await navigator.clipboard.writeText(url); status((a.name === 'General' ? 'Invite' : a.name) + ' link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } }; copyBtn.onclick = async () => { try { await navigator.clipboard.writeText(url); status((a.name === 'General' ? 'Invite' : a.name) + ' link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
// the share sheet gets one ready message with the link inside it: some apps (Telegram among them) keep only the text field // the share sheet gets one ready message with the link inside it: some apps (Telegram among them) keep only the text field
if (shareBtn) shareBtn.onclick = async () => { try { await navigator.share({ title: 'InstantAdPay', text: (a.angle ? a.hook + ': ' : 'Have a look: ') + url }); } catch (e) { if (!(e && e.name === 'AbortError')) status('Could not open the share sheet.', 'bad'); } }; if (shareBtn) shareBtn.onclick = async () => { try { await navigator.share({ title: 'InstantAdPay', text: (a.angle ? a.hook + ': ' : 'Have a look: ') + url }); } catch (e) { if (!(e && e.name === 'AbortError')) status('Could not open the share sheet.', 'bad'); } };
al.appendChild(row); al.appendChild(row);
} }
} }
// posts // posts
const posts = $('promoPosts'); const posts = $('promoPosts');
if (posts && posts.dataset.filled !== link) { if (posts && posts.dataset.filled !== link) {
posts.dataset.filled = link; posts.innerHTML = ''; posts.dataset.filled = link; posts.innerHTML = '';
for (const p of POSTS) { for (const p of POSTS) {
const text = fillLink(p.text, link); const text = fillLink(p.text, link);
const extras = []; const extras = [];
if (p.net === 'X') extras.push(linkBtn('https://twitter.com/intent/tweet?text=' + encodeURIComponent(text), 'Post on X')); if (p.net === 'X') extras.push(linkBtn('https://twitter.com/intent/tweet?text=' + encodeURIComponent(text), 'Post on X'));
if (p.net === 'Facebook') extras.push(linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(angleLink(link, (/\{\{LINK:([a-z]+)\}\}/.exec(p.text) || [])[1] || '')), 'Share on Facebook')); if (p.net === 'Facebook') extras.push(linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(angleLink(link, (/\{\{LINK:([a-z]+)\}\}/.exec(p.text) || [])[1] || '')), 'Share on Facebook'));
if (p.net === 'LinkedIn') extras.push(linkBtn('https://www.linkedin.com/sharing/share-offsite/?url=' + encodeURIComponent(angleLink(link, 'adspend')), 'Share on LinkedIn')); if (p.net === 'LinkedIn') extras.push(linkBtn('https://www.linkedin.com/sharing/share-offsite/?url=' + encodeURIComponent(angleLink(link, 'adspend')), 'Share on LinkedIn'));
if (p.net === 'Telegram') extras.push(linkBtn('https://t.me/share/url?url=' + encodeURIComponent(angleLink(link, (/\{\{LINK:([a-z]+)\}\}/.exec(p.text) || [])[1] || '')) + '&text=' + encodeURIComponent(text.replace(/\s*\{\{LINK[^}]*\}\}\s*$/, '').replace(/https?:\/\/\S+$/, '').trim()), 'Share on Telegram')); if (p.net === 'Telegram') extras.push(linkBtn('https://t.me/share/url?url=' + encodeURIComponent(angleLink(link, (/\{\{LINK:([a-z]+)\}\}/.exec(p.text) || [])[1] || '')) + '&text=' + encodeURIComponent(text.replace(/\s*\{\{LINK[^}]*\}\}\s*$/, '').replace(/https?:\/\/\S+$/, '').trim()), 'Share on Telegram'));
posts.appendChild(block(text, '<span class="pb-net">' + esc(p.label) + '</span>', extras)); posts.appendChild(block(text, '<span class="pb-net">' + esc(p.label) + '</span>', extras));
} }
} }
// text a friend // text a friend
const texts = $('promoTexts'); const texts = $('promoTexts');
if (texts && texts.dataset.filled !== link) { if (texts && texts.dataset.filled !== link) {
texts.dataset.filled = link; texts.innerHTML = ''; texts.dataset.filled = link; texts.innerHTML = '';
TEXTS.forEach((t, i) => { TEXTS.forEach((t, i) => {
const text = fillLink(t.text, link); const text = fillLink(t.text, link);
const enc = encodeURIComponent(text); const enc = encodeURIComponent(text);
const tgUrl = angleLink(link, t.angle); const tgUrl = angleLink(link, t.angle);
const tgLead = text.replace(/https?:\/\/\S+/, '').trim(); const tgLead = text.replace(/https?:\/\/\S+/, '').trim();
const extras = [ const extras = [
linkBtn('sms:?&body=' + enc, 'Text it', ''), linkBtn('sms:?&body=' + enc, 'Text it', ''),
linkBtn('https://wa.me/?text=' + enc, 'WhatsApp'), linkBtn('https://wa.me/?text=' + enc, 'WhatsApp'),
linkBtn('https://t.me/share/url?url=' + encodeURIComponent(tgUrl) + '&text=' + encodeURIComponent(tgLead), 'Telegram') linkBtn('https://t.me/share/url?url=' + encodeURIComponent(tgUrl) + '&text=' + encodeURIComponent(tgLead), 'Telegram')
]; ];
texts.appendChild(block(text, '<span class="pb-net">Text ' + (i + 1) + (t.angle ? ' · ' + esc(t.angle) + ' angle' : ' · general') + '</span> <b>' + esc(t.title) + '</b>', extras)); texts.appendChild(block(text, '<span class="pb-net">Text ' + (i + 1) + (t.angle ? ' · ' + esc(t.angle) + ' angle' : ' · general') + '</span> <b>' + esc(t.title) + '</b>', extras));
}); });
} }
// swipes // swipes
const sw = $('promoSwipeWrap'); const sw = $('promoSwipeWrap');
if (sw && sw.dataset.filled !== link) { if (sw && sw.dataset.filled !== link) {
sw.dataset.filled = link; sw.innerHTML = ''; sw.dataset.filled = link; sw.innerHTML = '';
for (const s of SWIPES) { for (const s of SWIPES) {
const text = 'Subject: ' + s.subject + '\n\n' + fillLink(s.body, link); const text = 'Subject: ' + s.subject + '\n\n' + fillLink(s.body, link);
sw.appendChild(block(text, '<span class="pb-net">' + esc(s.tier) + '</span> <b>' + esc(s.subject) + '</b>')); sw.appendChild(block(text, '<span class="pb-net">' + esc(s.tier) + '</span> <b>' + esc(s.subject) + '</b>'));
} }
} }
// hook videos // hook videos
const vw = $('promoVideos'); const vw = $('promoVideos');
if (vw && vw.dataset.filled !== link) { if (vw && vw.dataset.filled !== link) {
vw.dataset.filled = link; vw.innerHTML = ''; vw.dataset.filled = link; vw.innerHTML = '';
for (const v of VIDEOS) { for (const v of VIDEOS) {
const mlink = v.games ? gamesLink(link) : angleLink(link, v.angle); const mlink = v.games ? gamesLink(link) : angleLink(link, v.angle);
const card = document.createElement('div'); card.className = 'pv'; const card = document.createElement('div'); card.className = 'pv';
card.innerHTML = '<div class="pv-head"><span class="pb-net">' + esc(v.angle) + ' angle</span> <b>' + esc(v.title) + '</b><div class="muted small">' + esc(v.hook) + '</div></div>' card.innerHTML = '<div class="pv-head"><span class="pb-net">' + esc(v.angle) + ' angle</span> <b>' + esc(v.title) + '</b><div class="muted small">' + esc(v.hook) + '</div></div>'
+ '<video src="' + VID_BASE + (v.file || v.angle) + '.mp4" poster="' + VID_BASE + (v.file || v.angle) + '.jpg" preload="none" controls playsinline style="width:100%;max-width:640px;border-radius:12px;background:#000;margin:10px 0"></video>' + '<video src="' + VID_BASE + (v.file || v.angle) + '.mp4" poster="' + VID_BASE + (v.file || v.angle) + '.jpg" preload="none" controls playsinline style="width:100%;max-width:640px;border-radius:12px;background:#000;margin:10px 0"></video>'
+ '<p class="small"><span class="muted">Matched link:</span> <span class="mono" style="overflow-wrap:anywhere">' + esc(mlink) + '</span></p>'; + '<p class="small"><span class="muted">Matched link:</span> <span class="mono" style="overflow-wrap:anywhere">' + esc(mlink) + '</span></p>';
const row = document.createElement('p'); row.className = 'pb-actions'; const row = document.createElement('p'); row.className = 'pb-actions';
row.appendChild(copyBtn(mlink, 'Copy matched link')); row.appendChild(copyBtn(mlink, 'Copy matched link'));
row.appendChild(linkBtn(VID_BASE + (v.file || v.angle) + '.mp4', 'Download 16:9')); row.appendChild(linkBtn(VID_BASE + (v.file || v.angle) + '.mp4', 'Download 16:9'));
row.appendChild(linkBtn(VID_BASE + (v.file || v.angle) + '-portrait.mp4', 'Download 9:16')); row.appendChild(linkBtn(VID_BASE + (v.file || v.angle) + '-portrait.mp4', 'Download 9:16'));
card.appendChild(row); card.appendChild(row);
const cap = fillLink(v.caption, link); const cap = fillLink(v.caption, link);
const extras = [ const extras = [
linkBtn('https://twitter.com/intent/tweet?text=' + encodeURIComponent(cap), 'Post on X'), linkBtn('https://twitter.com/intent/tweet?text=' + encodeURIComponent(cap), 'Post on X'),
linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(mlink), 'Share on Facebook'), linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(mlink), 'Share on Facebook'),
linkBtn('https://t.me/share/url?url=' + encodeURIComponent(mlink) + '&text=' + encodeURIComponent(cap.replace(/https?:\/\/\S+$/, '').trim()), 'Telegram'), linkBtn('https://t.me/share/url?url=' + encodeURIComponent(mlink) + '&text=' + encodeURIComponent(cap.replace(/https?:\/\/\S+$/, '').trim()), 'Telegram'),
linkBtn('https://wa.me/?text=' + encodeURIComponent(cap), 'WhatsApp') linkBtn('https://wa.me/?text=' + encodeURIComponent(cap), 'WhatsApp')
]; ];
card.appendChild(block(cap, '<span class="lab">Caption</span>', extras)); card.appendChild(block(cap, '<span class="lab">Caption</span>', extras));
vw.appendChild(card); vw.appendChild(card);
} }
} }
// viral link builder: any page on the site + ?ref=<you> (same cookie as the invite link) // viral link builder: any page on the site + ?ref=<you> (same cookie as the invite link)
const vp = $('viralPage'); const vp = $('viralPage');
if (vp && token && vp.dataset.filled !== token) { if (vp && token && vp.dataset.filled !== token) {
vp.dataset.filled = token; vp.dataset.filled = token;
const origin = 'https://instantadpay.com', enc = encodeURIComponent; const origin = 'https://instantadpay.com', enc = encodeURIComponent;
const build = path => { if (!path) return ''; let x; try { x = new URL(origin + path); } catch (e) { return ''; } x.searchParams.set('ref', token); return origin + x.pathname + x.search; }; const build = path => { if (!path) return ''; let x; try { x = new URL(origin + path); } catch (e) { return ''; } x.searchParams.set('ref', token); return origin + x.pathname + x.search; };
const render = () => { const render = () => {
const l = build(vp.value); const l = build(vp.value);
$('viralLink').textContent = l || '…'; $('viralLink').textContent = l || '…';
const sh = $('viralShare'); sh.innerHTML = ''; const sh = $('viralShare'); sh.innerHTML = '';
if (!l) return; if (!l) return;
const title = vp.selectedOptions[0] ? vp.selectedOptions[0].textContent.replace(/^Article: /, '') : 'InstantAdPay'; const title = vp.selectedOptions[0] ? vp.selectedOptions[0].textContent.replace(/^Article: /, '') : 'InstantAdPay';
[linkBtn('https://x.com/intent/tweet?url=' + enc(l) + '&text=' + enc(title), 'X'), [linkBtn('https://x.com/intent/tweet?url=' + enc(l) + '&text=' + enc(title), 'X'),
linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(l), 'Facebook'), linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(l), 'Facebook'),
linkBtn('https://t.me/share/url?url=' + enc(l) + '&text=' + enc(title), 'Telegram'), linkBtn('https://t.me/share/url?url=' + enc(l) + '&text=' + enc(title), 'Telegram'),
linkBtn('https://wa.me/?text=' + enc(title + ' ' + l), 'WhatsApp'), linkBtn('https://wa.me/?text=' + enc(title + ' ' + l), 'WhatsApp'),
linkBtn('https://www.linkedin.com/sharing/share-offsite/?url=' + enc(l), 'LinkedIn'), linkBtn('https://www.linkedin.com/sharing/share-offsite/?url=' + enc(l), 'LinkedIn'),
linkBtn('mailto:?subject=' + enc(title) + '&body=' + enc(l), 'Email')].forEach(b => sh.appendChild(b)); linkBtn('mailto:?subject=' + enc(title) + '&body=' + enc(l), 'Email')].forEach(b => sh.appendChild(b));
if (navigator.share) { const b = document.createElement('button'); b.className = 'btn small sec'; b.type = 'button'; b.textContent = 'Share'; b.onclick = async () => { try { await navigator.share({ title, url: l }); } catch (e) {} }; sh.appendChild(b); } if (navigator.share) { const b = document.createElement('button'); b.className = 'btn small sec'; b.type = 'button'; b.textContent = 'Share'; b.onclick = async () => { try { await navigator.share({ title, url: l }); } catch (e) {} }; sh.appendChild(b); }
}; };
fetch('/api/pages').then(r => r.json()).then(r => { vp.innerHTML = (r.pages || []).map(pg => '<option value="' + esc(pg.path) + '">' + esc(pg.title) + '</option>').join(''); render(); }).catch(() => { vp.innerHTML = '<option value="/">Home page</option>'; render(); }); fetch('/api/pages').then(r => r.json()).then(r => { vp.innerHTML = (r.pages || []).map(pg => '<option value="' + esc(pg.path) + '">' + esc(pg.title) + '</option>').join(''); render(); }).catch(() => { vp.innerHTML = '<option value="/">Home page</option>'; render(); });
vp.onchange = render; vp.onchange = render;
$('viralCopy').onclick = async () => { const l = $('viralLink').textContent; if (!/^https:/.test(l)) return; try { await navigator.clipboard.writeText(l); status('Link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } }; $('viralCopy').onclick = async () => { const l = $('viralLink').textContent; if (!/^https:/.test(l)) return; try { await navigator.clipboard.writeText(l); status('Link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
} }
// PolHunter, the feeder program: the member's PolHunter link (their IAP username, so sign-ups land on their line) // PolHunter, the feeder program: the member's PolHunter link (their IAP username, so sign-ups land on their line)
const phl = $('phLink'); const phl = $('phLink');
if (phl && token && phl.dataset.filled !== token) { if (phl && token && phl.dataset.filled !== token) {
phl.dataset.filled = token; phl.dataset.filled = token;
const enc = encodeURIComponent, pl = 'https://polhunter.com/?r=' + enc(token); const enc = encodeURIComponent, pl = 'https://polhunter.com/?r=' + enc(token);
phl.textContent = pl; phl.textContent = pl;
$('phLinkCopy').onclick = async () => { try { await navigator.clipboard.writeText(pl); status('Link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } }; $('phLinkCopy').onclick = async () => { try { await navigator.clipboard.writeText(pl); status('Link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
const sh = $('phShare'); sh.innerHTML = ''; const sh = $('phShare'); sh.innerHTML = '';
const hook = 'PolHunter: find a code on one of our sites and a drip of POL lands in your wallet, on chain. Free to start.'; const hook = 'PolHunter: find a code on one of our sites and a drip of POL lands in your wallet, on chain. Free to start.';
[linkBtn('https://x.com/intent/tweet?url=' + enc(pl) + '&text=' + enc(hook), 'X'), linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(pl), 'Facebook'), linkBtn('https://t.me/share/url?url=' + enc(pl) + '&text=' + enc(hook), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(hook + ' ' + pl), 'WhatsApp'), linkBtn('mailto:?subject=' + enc('A scavenger hunt that pays in POL') + '&body=' + enc(hook + '\n\n' + pl), 'Email')].forEach(b => sh.appendChild(b)); [linkBtn('https://x.com/intent/tweet?url=' + enc(pl) + '&text=' + enc(hook), 'X'), linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(pl), 'Facebook'), linkBtn('https://t.me/share/url?url=' + enc(pl) + '&text=' + enc(hook), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(hook + ' ' + pl), 'WhatsApp'), linkBtn('mailto:?subject=' + enc('A scavenger hunt that pays in POL') + '&body=' + enc(hook + '\n\n' + pl), 'Email')].forEach(b => sh.appendChild(b));
const PH_POSTS = [ const PH_POSTS = [
{ name: 'Short post', text: 'New thing I am playing with: PolHunter. You visit a site, find your code on the page, tap it to copy, paste it on your board, and a random drip of POL lands in your wallet. On chain, with a link to prove it. ' + pl }, { name: 'Short post', text: 'New thing I am playing with: PolHunter. You visit a site, find your code on the page, tap it to copy, paste it on your board, and a random drip of POL lands in your wallet. On chain, with a link to prove it. ' + pl },
{ name: 'Story post', text: 'I spent two minutes on a training page tonight, found a little glass coin at the bottom, tapped the code, and 0.26 POL showed up in my wallet a minute later. That is PolHunter. Small drips, real chain, no catch beyond actually visiting the site. Free to start, you just need an InstantAdPay account and a wallet. ' + pl }, { name: 'Story post', text: 'I spent two minutes on a training page tonight, found a little glass coin at the bottom, tapped the code, and 0.26 POL showed up in my wallet a minute later. That is PolHunter. Small drips, real chain, no catch beyond actually visiting the site. Free to start, you just need an InstantAdPay account and a wallet. ' + pl },
{ name: 'Telegram or WhatsApp', text: '\u{1F3AF} PolHunter is live. Missions across our sites, one code to find per site, random POL drips paid straight to your wallet. The hiding place moves every day. Start here: ' + pl }, { name: 'Telegram or WhatsApp', text: '\u{1F3AF} PolHunter is live. Missions across our sites, one code to find per site, random POL drips paid straight to your wallet. The hiding place moves every day. Start here: ' + pl },
{ name: 'Email swipe', subject: 'A scavenger hunt that pays in POL', text: 'Hey,\n\nQuick one. I have been testing something called PolHunter.\n\nYou pick a mission, spend a couple of minutes on the site it names, and your personal code appears somewhere on the page. Tap it to copy, paste it on your board, and a random drip of POL goes to your wallet, on chain, with a link to prove it. Three missions a day, a leaderboard with weekly prizes, and the hiding place moves every day.\n\nIt is free to start. You need an InstantAdPay account (also free) and a wallet, and the site walks you through both.\n\nStart here: ' + pl + '\n\nTell me what your first find pays.' }, { name: 'Email swipe', subject: 'A scavenger hunt that pays in POL', text: 'Hey,\n\nQuick one. I have been testing something called PolHunter.\n\nYou pick a mission, spend a couple of minutes on the site it names, and your personal code appears somewhere on the page. Tap it to copy, paste it on your board, and a random drip of POL goes to your wallet, on chain, with a link to prove it. Three missions a day, a leaderboard with weekly prizes, and the hiding place moves every day.\n\nIt is free to start. You need an InstantAdPay account (also free) and a wallet, and the site walks you through both.\n\nStart here: ' + pl + '\n\nTell me what your first find pays.' },
]; ];
// the two spots (photoreal / animated): player, download, caption with the member's link, share buttons // the two spots (photoreal / animated): player, download, caption with the member's link, share buttons
const SP = 'https://coolify-saasytop.nyc3.digitaloceanspaces.com/promo/'; const SP = 'https://coolify-saasytop.nyc3.digitaloceanspaces.com/promo/';
const SPOTS = [ const SPOTS = [
{ id: 'photoreal', name: 'Photoreal: the hunt in the forest', file: 'polhunter-spot-photoreal.mp4', poster: 'polhunter-spot-photoreal-poster.jpg', best: 'Facebook, YouTube Shorts, an older audience', cap: 'Somewhere on one of our sites, a code is waiting. Find it, tap it, paste it on your board, and a drip of Polygon lands in your wallet. On chain, with a link to prove it. Free to play. Start here: ' + pl + ' #PolHunter #Polygon #crypto #scavengerhunt' }, { id: 'photoreal', name: 'Photoreal: the hunt in the forest', file: 'polhunter-spot-photoreal.mp4', poster: 'polhunter-spot-photoreal-poster.jpg', best: 'Facebook, YouTube Shorts, an older audience', cap: 'Somewhere on one of our sites, a code is waiting. Find it, tap it, paste it on your board, and a drip of Polygon lands in your wallet. On chain, with a link to prove it. Free to play. Start here: ' + pl + ' #PolHunter #Polygon #crypto #scavengerhunt' },
{ id: 'animated', name: 'Animated: the explorer and the glass coin', file: 'polhunter-spot-animated.mp4', poster: 'polhunter-spot-animated-poster.jpg', best: 'TikTok, Instagram Reels, a younger crowd', cap: 'A scavenger hunt that pays in Polygon. Pick a mission, find the glass coin, tap it, and the drip lands in your wallet instantly. Three missions a day, badges, weekly prizes. 100% free. ' + pl + ' #PolHunter #Polygon #crypto #gaming' }, { id: 'animated', name: 'Animated: the explorer and the glass coin', file: 'polhunter-spot-animated.mp4', poster: 'polhunter-spot-animated-poster.jpg', best: 'TikTok, Instagram Reels, a younger crowd', cap: 'A scavenger hunt that pays in Polygon. Pick a mission, find the glass coin, tap it, and the drip lands in your wallet instantly. Three missions a day, badges, weekly prizes. 100% free. ' + pl + ' #PolHunter #Polygon #crypto #gaming' },
]; ];
const ps = $('phSpots'); if (ps) { ps.innerHTML = ''; const ps = $('phSpots'); if (ps) { ps.innerHTML = '';
for (const s of SPOTS) { const d = document.createElement('div'); d.className = 'promo-block'; for (const s of SPOTS) { const d = document.createElement('div'); d.className = 'promo-block';
d.innerHTML = '<div class="pb-head"><span class="lab">' + esc(s.name) + '</span> <span class="muted small">Best on: ' + esc(s.best) + '</span></div><video controls playsinline preload="none" poster="' + SP + s.poster + '" src="' + SP + s.file + '" style="width:100%;max-width:300px;border-radius:12px;display:block;margin:8px auto"></video><div class="pb-text">' + esc(s.cap) + '</div>'; d.innerHTML = '<div class="pb-head"><span class="lab">' + esc(s.name) + '</span> <span class="muted small">Best on: ' + esc(s.best) + '</span></div><video controls playsinline preload="none" poster="' + SP + s.poster + '" src="' + SP + s.file + '" style="width:100%;max-width:300px;border-radius:12px;display:block;margin:8px auto"></video><div class="pb-text">' + esc(s.cap) + '</div>';
const row = document.createElement('div'); row.className = 'pb-actions'; const row = document.createElement('div'); row.className = 'pb-actions';
row.appendChild(linkBtn(SP + s.file, 'Download the video')); row.appendChild(copyBtn(s.cap, 'Copy caption')); row.appendChild(linkBtn(SP + s.file, 'Download the video')); row.appendChild(copyBtn(s.cap, 'Copy caption'));
[linkBtn('https://x.com/intent/tweet?text=' + enc(s.cap), 'X'), linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(pl), 'Facebook'), linkBtn('https://t.me/share/url?url=' + enc(pl) + '&text=' + enc(s.cap.replace(pl, '').trim()), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(s.cap), 'WhatsApp')].forEach(b => row.appendChild(b)); [linkBtn('https://x.com/intent/tweet?text=' + enc(s.cap), 'X'), linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(pl), 'Facebook'), linkBtn('https://t.me/share/url?url=' + enc(pl) + '&text=' + enc(s.cap.replace(pl, '').trim()), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(s.cap), 'WhatsApp')].forEach(b => row.appendChild(b));
d.appendChild(row); ps.appendChild(d); } d.appendChild(row); ps.appendChild(d); }
} }
const pp = $('phPosts'); pp.innerHTML = ''; const pp = $('phPosts'); pp.innerHTML = '';
for (const p of PH_POSTS) { const extras = p.subject ? [] : [linkBtn('https://x.com/intent/tweet?text=' + enc(p.text), 'X'), linkBtn('https://t.me/share/url?url=' + enc(pl) + '&text=' + enc(p.text.replace(pl, '').trim()), 'Telegram')]; pp.appendChild(block(p.text, '<span class="lab">' + esc(p.name) + '</span>' + (p.subject ? ' <span class="muted small">Subject: ' + esc(p.subject) + '</span>' : ''), extras)); } for (const p of PH_POSTS) { const extras = p.subject ? [] : [linkBtn('https://x.com/intent/tweet?text=' + enc(p.text), 'X'), linkBtn('https://t.me/share/url?url=' + enc(pl) + '&text=' + enc(p.text.replace(pl, '').trim()), 'Telegram')]; pp.appendChild(block(p.text, '<span class="lab">' + esc(p.name) + '</span>' + (p.subject ? ' <span class="muted small">Subject: ' + esc(p.subject) + '</span>' : ''), extras)); }
const sizes = [['728x90', 'Leaderboard'], ['468x60', 'Mobile leaderboard'], ['300x250', 'Medium rectangle'], ['250x250', 'Square'], ['125x125', 'Button'], ['160x600', 'Skyscraper'], ['1200x630', 'Social card'], ['1080x1080', 'Instagram square']]; const sizes = [['728x90', 'Leaderboard'], ['468x60', 'Mobile leaderboard'], ['300x250', 'Medium rectangle'], ['250x250', 'Square'], ['125x125', 'Button'], ['160x600', 'Skyscraper'], ['1200x630', 'Social card'], ['1080x1080', 'Instagram square']];
const bg = $('phBanners'); bg.innerHTML = ''; const bg = $('phBanners'); bg.innerHTML = '';
for (const [s, n] of sizes) { const w = s.split('x')[0], h = s.split('x')[1]; const src = 'https://polhunter.com/promo/polhunter-' + s + (Number(w) >= 300 ? '.jpg' : '.png'); const code = '<a href="' + pl + '" target="_blank" rel="noopener"><img src="' + src + '" width="' + w + '" height="' + h + '" alt="PolHunter"></a>'; for (const [s, n] of sizes) { const w = s.split('x')[0], h = s.split('x')[1]; const src = 'https://polhunter.com/promo/polhunter-' + s + (Number(w) >= 300 ? '.jpg' : '.png'); const code = '<a href="' + pl + '" target="_blank" rel="noopener"><img src="' + src + '" width="' + w + '" height="' + h + '" alt="PolHunter"></a>';
const d = document.createElement('div'); d.className = 'promo-block'; d.innerHTML = '<div class="pb-head"><span class="lab">' + s + '</span> <span class="muted small">' + esc(n) + '</span></div><div style="overflow:auto;margin:8px 0"><img src="' + src + '" alt="' + s + '" style="max-width:100%;height:auto;border-radius:8px"></div><div class="pb-text mono small" style="overflow-wrap:anywhere">' + esc(code) + '</div>'; const d = document.createElement('div'); d.className = 'promo-block'; d.innerHTML = '<div class="pb-head"><span class="lab">' + s + '</span> <span class="muted small">' + esc(n) + '</span></div><div style="overflow:auto;margin:8px 0"><img src="' + src + '" alt="' + s + '" style="max-width:100%;height:auto;border-radius:8px"></div><div class="pb-text mono small" style="overflow-wrap:anywhere">' + esc(code) + '</div>';
const row = document.createElement('div'); row.className = 'pb-actions'; row.appendChild(copyBtn(code, 'Copy embed code')); row.appendChild(linkBtn(src, 'Open image')); d.appendChild(row); bg.appendChild(d); } const row = document.createElement('div'); row.className = 'pb-actions'; row.appendChild(copyBtn(code, 'Copy embed code')); row.appendChild(linkBtn(src, 'Open image')); d.appendChild(row); bg.appendChild(d); }
} }
// Games (2026-10-06, Marty: one tab for every game instead of a pill each). A picker drives one panel: games with their own // Games (2026-10-06, Marty: one tab for every game instead of a pill each). A picker drives one panel: games with their own
// kit (PolHunter, Spooky Doors) show it; the rest get link, share image and posts. Every game gets the 10 standard banners // kit (PolHunter, Spooky Doors) show it; the rest get link, share image and posts. Every game gets the 10 standard banners
// from banners.adrotate.xyz, each embed linked to the member (PolHunter takes ?r=, the other games ?ref=). // from banners.adrotate.xyz, each embed linked to the member (PolHunter takes ?r=, the other games ?ref=).
const gms = $('promo-games'); const gms = $('promo-games');
if (gms && token && gms.dataset.filled !== token) { if (gms && token && gms.dataset.filled !== token) {
gms.dataset.filled = token; gms.dataset.filled = token;
const enc = encodeURIComponent, CDN = 'https://coolify-saasytop.nyc3.cdn.digitaloceanspaces.com/game-banners/'; const enc = encodeURIComponent, CDN = 'https://coolify-saasytop.nyc3.cdn.digitaloceanspaces.com/game-banners/';
const preLaunch = (y, m, d) => Date.now() < Date.UTC(y, m - 1, d, 5); // before midnight Central on that day const preLaunch = (y, m, d) => Date.now() < Date.UTC(y, m - 1, d, 5); // before midnight Central on that day
const GAMES = [ const GAMES = [
// the public games page (2026-10-10, Marty: "make sure that's in the promo tools for everyone"): every game on one page, with the member's referral on the Join button // the public games page (2026-10-10, Marty: "make sure that's in the promo tools for everyone"): every game on one page, with the member's referral on the Join button
{ slug: 'allgames', name: 'All games (one page)', link: 'https://instantadpay.com/games?ref=', img: 'https://instantadpay.com/banners/iap-games-1200x630.jpg', sub: 'every game in the network on one public page, open now and opening next', { slug: 'allgames', name: 'All games (one page)', link: 'https://instantadpay.com/games?ref=', img: 'https://instantadpay.com/banners/iap-games-1200x630.jpg', sub: 'every game in the network on one public page, open now and opening next',
posts: [ posts: [
{ name: 'Short post', text: 'Every game in the InstantAdPay network on one page: a word puzzle, a hidden-object hunt, a match-3, a runner, a scavenger hunt, a cyberpunk battler. Free to play, and they pay POL to the wallet on your account. {L}' }, { name: 'Short post', text: 'Every game in the InstantAdPay network on one page: a word puzzle, a hidden-object hunt, a match-3, a runner, a scavenger hunt, a cyberpunk battler, a brick breaker, a mining game. Free to play, and they pay POL to the wallet on your account. {L}' },
{ name: 'Friendly post', text: 'If you like small games that actually pay something, this is the page I send people. Eight games, all free, all paying POL on Polygon for first clears, levels and daily puzzles. Pick one: {L}' }, { name: 'Friendly post', text: 'If you like small games that actually pay something, this is the page I send people. Every one is free, and they all pay POL on Polygon for first clears, levels, bosses and daily puzzles. Pick one: {L}' },
{ name: 'Telegram or WhatsApp line', text: 'All the games that pay POL, one page, free to play: {L}' }] }, { name: 'Telegram or WhatsApp line', text: 'All the games that pay POL, one page, free to play: {L}' }] },
// POL Miner (2026-10-28): shows once 'polminer' is in gamesLive (the public games list), like PolyBreak // POL Miner (2026-10-28): shows once 'polminer' is in gamesLive (the public games list), like PolyBreak
{ slug: 'polminer', name: 'POL Miner', link: 'https://polminer.com/?ref=', img: 'https://coolify-saasytop.nyc3.cdn.digitaloceanspaces.com/game-banners/polminer/og-polminer.jpg', sub: 'mining game that pays Polygon', { slug: 'polminer', name: 'POL Miner', link: 'https://polminer.com/?ref=', img: 'https://coolify-saasytop.nyc3.cdn.digitaloceanspaces.com/game-banners/polminer/og-polminer.jpg', sub: 'mining game that pays Polygon',
posts: [ posts: [
{ name: 'Short post', text: 'POL Miner is a free mining game. Dig down through the layers, haul ore up to sell, upgrade your pick, lamp and cart, and beat a drill boss every 30 m. The rare pink Polygon crystals pay Polygon to the wallet on your InstantAdPay account. {L}' }, { name: 'Short post', text: 'POL Miner is a free mining game. Dig down through the layers, haul ore up to sell, upgrade your pick, lamp and cart, and beat a drill boss every 30 m. The rare pink Polygon crystals pay Polygon to the wallet on your InstantAdPay account. {L}' },
{ name: 'Friendly post', text: 'This one is easy to lose an hour in. POL Miner is free, it plays fine on a phone, and you sign in with your InstantAdPay account. Each pink Polygon crystal you dig out pays Polygon, and so does each drill boss the first time you beat it. Give it a dig: {L}' }, { name: 'Friendly post', text: 'This one is easy to lose an hour in. POL Miner is free, it plays fine on a phone, and you sign in with your InstantAdPay account. Each pink Polygon crystal you dig out pays Polygon, and so does each drill boss the first time you beat it. Give it a dig: {L}' },
{ name: 'Crystal angle', text: 'Somewhere under the gravel there is a pink glow. In POL Miner the rare Polygon crystals pay Polygon when you dig them out. Free to play: {L}' }, { name: 'Crystal angle', text: 'Somewhere under the gravel there is a pink glow. In POL Miner the rare Polygon crystals pay Polygon when you dig them out. Free to play: {L}' },
{ name: 'Telegram or WhatsApp line', text: 'New game in the network: POL Miner. Free mining game, the pink Polygon crystals pay Polygon: {L}' }] }, { name: 'Telegram or WhatsApp line', text: 'New game in the network: POL Miner. Free mining game, the pink Polygon crystals pay Polygon: {L}' }] },
{ slug: 'polybreak', name: 'PolyBreak', link: 'https://polybreak.app/?ref=', img: 'https://coolify-saasytop.nyc3.cdn.digitaloceanspaces.com/game-banners/polybreak/og-polybreak.jpg', sub: 'brick breaker that pays Polygon', { slug: 'polybreak', name: 'PolyBreak', link: 'https://polybreak.app/?ref=', img: 'https://coolify-saasytop.nyc3.cdn.digitaloceanspaces.com/game-banners/polybreak/og-polybreak.jpg', sub: 'brick breaker that pays Polygon',
posts: [ posts: [
{ name: 'Short post', text: 'PolyBreak is a free brick breaker in the old Amiga arcade style. Smash a wall of glass jewel bricks, grab the capsules, and catch the purple Polygon gem when it drops. Your first clear of each round pays Polygon to the wallet on your InstantAdPay account. {L}' }, { name: 'Short post', text: 'PolyBreak is a free brick breaker in the old Amiga arcade style. Smash a wall of glass jewel bricks, grab the capsules, and catch the purple Polygon gem when it drops. Your first clear of each round pays Polygon to the wallet on your InstantAdPay account. {L}' },
{ name: 'Friendly post', text: 'I grew up on brick breakers, so this one got me. PolyBreak is free, it plays great on a phone, and it signs in with your InstantAdPay account. First round clears pay Polygon, and so does every purple gem you catch. Out of paddles? Visit a member\'s page and you get one more. Give it a try: {L}' }, { name: 'Friendly post', text: 'I grew up on brick breakers, so this one got me. PolyBreak is free, it plays great on a phone, and it signs in with your InstantAdPay account. First round clears pay Polygon, and so does every purple gem you catch. Out of paddles? Visit a member\'s page and you get one more. Give it a try: {L}' },
{ name: 'Gem angle', text: 'Keep one eye on the bricks and one eye on the top of the screen. Every so often a purple Polygon gem drifts down in PolyBreak. Catch it with your paddle and it pays Polygon to your wallet. Free to play: {L}' }, { name: 'Gem angle', text: 'Keep one eye on the bricks and one eye on the top of the screen. Every so often a purple Polygon gem drifts down in PolyBreak. Catch it with your paddle and it pays Polygon to your wallet. Free to play: {L}' },
{ name: 'Telegram or WhatsApp line', text: 'New game in the network: PolyBreak. Free brick breaker, pays Polygon for first round clears and gem catches: {L}' }] }, { name: 'Telegram or WhatsApp line', text: 'New game in the network: PolyBreak. Free brick breaker, pays Polygon for first round clears and gem catches: {L}' }] },
{ slug: 'polywarriors', name: 'PolyWarriors', link: 'https://www.polywarriors.com/?ref=', img: 'https://www.polywarriors.com/og-polywarriors.jpg', sub: 'cyberpunk battler with NFT warrior cards', { slug: 'polywarriors', name: 'PolyWarriors', link: 'https://www.polywarriors.com/?ref=', img: 'https://www.polywarriors.com/og-polywarriors.jpg', sub: 'cyberpunk battler with NFT warrior cards',
// launch trailer (2026-10-12, Marty approved): 16:9 + 9:16 cuts and a poster on Spaces; the caption carries the member's link // launch trailer (2026-10-12, Marty approved): 16:9 + 9:16 cuts and a poster on Spaces; the caption carries the member's link
video: { base: 'https://coolify-saasytop.nyc3.digitaloceanspaces.com/promo/', file: 'polywarriors-trailer.mp4', portrait: 'polywarriors-trailer-portrait.mp4', poster: 'polywarriors-trailer.jpg', best: 'landscape for Facebook, X and YouTube; vertical for Shorts, Reels and TikTok', video: { base: 'https://coolify-saasytop.nyc3.digitaloceanspaces.com/promo/', file: 'polywarriors-trailer.mp4', portrait: 'polywarriors-trailer-portrait.mp4', poster: 'polywarriors-trailer.jpg', best: 'landscape for Facebook, X and YouTube; vertical for Shorts, Reels and TikTok',
cap: 'PolyWarriors just opened: a free cyberpunk fighting game. Recruit warriors born with their own traits and rarity, beat 24 arena rivals, duel other members. First wins pay Polygon to your wallet and your first warrior mints free as an NFT. {L} #PolyWarriors #Polygon #NFT #gaming' }, cap: 'PolyWarriors just opened: a free cyberpunk fighting game. Recruit warriors born with their own traits and rarity, beat 24 arena rivals, duel other members. First wins pay Polygon to your wallet and your first warrior mints free as an NFT. {L} #PolyWarriors #Polygon #NFT #gaming' },
posts: [ posts: [
{ name: 'Short post', text: 'PolyWarriors is a free cyberpunk battler. Recruit warriors that are each born with their own traits and rarity, fight through 24 arena rivals, and challenge other members in duels that play out while you are away. Your first win over each rival pays Polygon to the wallet on your InstantAdPay account, and your first warrior mints to your wallet as an NFT, free. {L}' }, { name: 'Short post', text: 'PolyWarriors is a free cyberpunk battler. Recruit warriors that are each born with their own traits and rarity, fight through 24 arena rivals, and challenge other members in duels that play out while you are away. Your first win over each rival pays Polygon to the wallet on your InstantAdPay account, and your first warrior mints to your wallet as an NFT, free. {L}' },
{ name: 'Friendly post', text: 'I have been playing PolyWarriors, a turn-based fighting game with a cyberpunk look. Every warrior is one of a kind, you can mint yours, fuse three of a kind into something rarer, and battle other members. Free to play, and it pays Polygon for first wins: {L}' }, { name: 'Friendly post', text: 'I have been playing PolyWarriors, a turn-based fighting game with a cyberpunk look. Every warrior is one of a kind, you can mint yours, fuse three of a kind into something rarer, and battle other members. Free to play, and it pays Polygon for first wins: {L}' },
{ name: 'Collector angle', text: 'Every PolyWarriors warrior is born with its own traits, rarity and serial, minted on Polygon when you forge it. Rares, Epics and Legendaries trade between members on the marketplace. Your first mint is free; after that every $5 ad package on InstantAdPay earns a mint pass. Start here: {L}' }, { name: 'Collector angle', text: 'Every PolyWarriors warrior is born with its own traits, rarity and serial, minted on Polygon when you forge it. Rares, Epics and Legendaries trade between members on the marketplace. Your first mint is free; after that every $5 ad package on InstantAdPay earns a mint pass. Start here: {L}' },
{ name: 'Telegram or WhatsApp line', text: 'New game in the network: PolyWarriors. Free cyberpunk battler, pays Polygon for first wins, your first warrior mints free: {L}' }] }, { name: 'Telegram or WhatsApp line', text: 'New game in the network: PolyWarriors. Free cyberpunk battler, pays Polygon for first wins, your first warrior mints free: {L}' }] },
{ slug: 'gemkingdom', name: 'Gem Kingdom', link: 'https://gemkingdom.app/?ref=', img: 'https://gemkingdom.app/fantasy/og-gemkingdom.jpg', sub: 'fantasy match-3 with boss battles', { slug: 'gemkingdom', name: 'Gem Kingdom', link: 'https://gemkingdom.app/?ref=', img: 'https://gemkingdom.app/fantasy/og-gemkingdom.jpg', sub: 'fantasy match-3 with boss battles',
posts: [ posts: [
{ name: 'Short post', text: 'Gem Kingdom is a free fantasy match-3. Lead three heroes, beat the Goblin King’s bosses and rebuild your village. Boss wins come with POL rewards. Play here: {L}' }, { name: 'Short post', text: 'Gem Kingdom is a free fantasy match-3. Lead three heroes, beat the Goblin King’s bosses and rebuild your village. Boss wins come with POL rewards. Play here: {L}' },
{ name: 'Friendly post', text: 'Looking for a game to unwind with? Gem Kingdom is match-3 with a story: forge weapons, collect stars and climb the leaderboard. Free in your browser: {L}' }] }, { name: 'Friendly post', text: 'Looking for a game to unwind with? Gem Kingdom is match-3 with a story: forge weapons, collect stars and climb the leaderboard. Free in your browser: {L}' }] },
{ slug: 'roadagent', name: 'Road Agent', link: 'https://roadagent.app/?ref=', img: 'https://roadagent.app/og-roadagent.jpg', sub: 'night highway shooter', { slug: 'roadagent', name: 'Road Agent', link: 'https://roadagent.app/?ref=', img: 'https://roadagent.app/og-roadagent.jpg', sub: 'night highway shooter',
posts: [ posts: [
{ name: 'Short post', text: 'Road Agent is a free night-highway shooter in the old arcade spirit. Shoot the hostiles, spare the civilians, pull into the weapons truck. Every sector you clear for the first time pays POL.' + (preLaunch(2026, 10, 15) ? ' Opens Thursday Oct 15.' : '') + ' {L}' }, { name: 'Short post', text: 'Road Agent is a free night-highway shooter in the old arcade spirit. Shoot the hostiles, spare the civilians, pull into the weapons truck. Every sector you clear for the first time pays POL.' + (preLaunch(2026, 10, 15) ? ' Opens Thursday Oct 15.' : '') + ' {L}' },
{ name: 'Friendly post', text: 'I have been playing Road Agent, a top-down highway shooter with a twist: clear a sector and it pays POL. No wallet needed to start, just your InstantAdPay email. Free in your browser: {L}' }] }, { name: 'Friendly post', text: 'I have been playing Road Agent, a top-down highway shooter with a twist: clear a sector and it pays POL. No wallet needed to start, just your InstantAdPay email. Free in your browser: {L}' }] },
{ slug: 'driprunner', name: 'Drip Runner', link: 'https://driprunner.app/?ref=', img: 'https://driprunner.app/og-driprunner.jpg', sub: 'quick runner game', { slug: 'driprunner', name: 'Drip Runner', link: 'https://driprunner.app/?ref=', img: 'https://driprunner.app/og-driprunner.jpg', sub: 'quick runner game',
posts: [ posts: [
{ name: 'Short post', text: 'Drip Runner is a quick free runner game. Hop the network, dodge the drones, clear chapters and refuel for POL rewards. Play in your browser: {L}' }, { name: 'Short post', text: 'Drip Runner is a quick free runner game. Hop the network, dodge the drones, clear chapters and refuel for POL rewards. Play in your browser: {L}' },
{ name: 'Friendly post', text: 'Got two minutes? Drip Runner is a fast little runner game I keep coming back to. See how far you get: {L}' }] }, { name: 'Friendly post', text: 'Got two minutes? Drip Runner is a fast little runner game I keep coming back to. See how far you get: {L}' }] },
{ slug: 'clutterhunt', name: 'ClutterHunt', link: 'https://clutterhunt.com/?ref=', img: 'https://clutterhunt.com/og-clutterhunt.jpg', sub: 'seasonal hidden-object game', { slug: 'clutterhunt', name: 'ClutterHunt', link: 'https://clutterhunt.com/?ref=', img: 'https://clutterhunt.com/og-clutterhunt.jpg', sub: 'seasonal hidden-object game',
posts: [ posts: [
{ name: 'Short post', text: 'ClutterHunt is a free hidden-object game. Six rooms to search, a clock running, and everything moves each time you play. Can you three-star Expert? {L}' }, { name: 'Short post', text: 'ClutterHunt is a free hidden-object game. Six rooms to search, a clock running, and everything moves each time you play. Can you three-star Expert? {L}' },
{ name: 'Friendly post', text: 'If you like spot-the-object puzzles, try ClutterHunt. Free in your browser, with POL rewards for clearing rooms: {L}' }] }, { name: 'Friendly post', text: 'If you like spot-the-object puzzles, try ClutterHunt. Free in your browser, with POL rewards for clearing rooms: {L}' }] },
{ slug: 'spellwheel', name: 'SpellWheel', link: 'https://spellwheel.com/?ref=', img: 'https://spellwheel.com/og-spellwheel.jpg', sub: 'letter-wheel word game', { slug: 'spellwheel', name: 'SpellWheel', link: 'https://spellwheel.com/?ref=', img: 'https://spellwheel.com/og-spellwheel.jpg', sub: 'letter-wheel word game',
posts: [ posts: [
{ name: 'Short post', text: 'SpellWheel is a free word game. Swipe the letters on the wheel to fill the grid, one place at a time.' + (preLaunch(2026, 10, 10) ? ' Opens Saturday Oct 10.' : '') + ' {L}' }, { name: 'Short post', text: 'SpellWheel is a free word game. Swipe the letters on the wheel to fill the grid, one place at a time.' + (preLaunch(2026, 10, 10) ? ' Opens Saturday Oct 10.' : '') + ' {L}' },
{ name: 'Friendly post', text: 'Word game fans, this one is for you. SpellWheel: swipe letters, fill the grid, and earn POL rewards as you clear levels. Free in your browser: {L}' }] }, { name: 'Friendly post', text: 'Word game fans, this one is for you. SpellWheel: swipe letters, fill the grid, and earn POL rewards as you clear levels. Free in your browser: {L}' }] },
{ slug: 'spookydoors', name: 'Spooky Doors', link: 'https://spookydoors.com/?ref=', kit: 'promo-spookydoors', seasonal: true }, { slug: 'spookydoors', name: 'Spooky Doors', link: 'https://spookydoors.com/?ref=', kit: 'promo-spookydoors', seasonal: true },
{ slug: 'polhunter', name: 'PolHunter', link: 'https://polhunter.com/?r=', kit: 'promo-polhunter' }]; { slug: 'polhunter', name: 'PolHunter', link: 'https://polhunter.com/?r=', kit: 'promo-polhunter' }];
const SIZES = [['728x90', 'Leaderboard'], ['468x60', 'Banner'], ['320x50', 'Mobile banner'], ['300x250', 'Medium rectangle'], ['336x280', 'Large rectangle'], ['250x250', 'Square'], ['125x125', 'Button'], ['160x600', 'Wide skyscraper'], ['120x600', 'Skyscraper'], ['300x600', 'Half page'], ['600x300', 'Traffic exchange / splash page']]; const SIZES = [['728x90', 'Leaderboard'], ['468x60', 'Banner'], ['320x50', 'Mobile banner'], ['300x250', 'Medium rectangle'], ['336x280', 'Large rectangle'], ['250x250', 'Square'], ['125x125', 'Button'], ['160x600', 'Wide skyscraper'], ['120x600', 'Skyscraper'], ['300x600', 'Half page'], ['600x300', 'Traffic exchange / splash page']];
const avail = { spookydoors: false, roadagent: !preLaunch(2026, 10, 15), polybreak: false, polminer: false }; // PolyBreak joins once it is in gamesLive (public games list) // seasonal: the Spooky Doors kit says whether its season is showing; Road Agent joins the list on its launch day const avail = { spookydoors: false, roadagent: !preLaunch(2026, 10, 15), polybreak: false, polminer: false }; // PolyBreak joins once it is in gamesLive (public games list) // seasonal: the Spooky Doors kit says whether its season is showing; Road Agent joins the list on its launch day
const list = () => GAMES.filter(g => avail[g.slug] !== false); const list = () => GAMES.filter(g => avail[g.slug] !== false);
let cur = null; try { cur = localStorage.getItem('iap.gmGame'); } catch (e) {} let cur = null; try { cur = localStorage.getItem('iap.gmGame'); } catch (e) {}
const draw = () => { const draw = () => {
const L = list(); const g = L.find(x => x.slug === cur) || L[0]; cur = g.slug; const L = list(); const g = L.find(x => x.slug === cur) || L[0]; cur = g.slug;
try { localStorage.setItem('iap.gmGame', cur); } catch (e) {} try { localStorage.setItem('iap.gmGame', cur); } catch (e) {}
$('gmPick').innerHTML = L.map(x => '<button class="chip-t' + (x === g ? ' on' : '') + '" type="button" data-gm="' + x.slug + '">' + esc(x.name) + '</button>').join(''); $('gmPick').innerHTML = L.map(x => '<button class="chip-t' + (x === g ? ' on' : '') + '" type="button" data-gm="' + x.slug + '">' + esc(x.name) + '</button>').join('');
const link = g.link + enc(token); const link = g.link + enc(token);
GAMES.forEach(x => { if (x.kit && $(x.kit)) $(x.kit).hidden = x !== g; }); GAMES.forEach(x => { if (x.kit && $(x.kit)) $(x.kit).hidden = x !== g; });
$('gmGeneric').hidden = !!g.kit; $('gmGeneric').hidden = !!g.kit;
if (!g.kit) { if (!g.kit) {
$('gmTitle').textContent = g.name; $('gmSub').textContent = g.sub || ''; $('gmTitle').textContent = g.name; $('gmSub').textContent = g.sub || '';
$('gmLink').textContent = link; $('gmLink').textContent = link;
$('gmLinkCopy').onclick = async () => { try { await navigator.clipboard.writeText(link); status('Link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } }; $('gmLinkCopy').onclick = async () => { try { await navigator.clipboard.writeText(link); status('Link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
const posts = g.posts.map(p => ({ name: p.name, text: p.text.replace('{L}', link) })), hook = posts[0].text.replace(link, '').trim(); const posts = g.posts.map(p => ({ name: p.name, text: p.text.replace('{L}', link) })), hook = posts[0].text.replace(link, '').trim();
const sh = $('gmShare'); sh.innerHTML = ''; const sh = $('gmShare'); sh.innerHTML = '';
[linkBtn('https://x.com/intent/tweet?text=' + enc(posts[0].text), 'X'), linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(link), 'Facebook'), linkBtn('https://t.me/share/url?url=' + enc(link) + '&text=' + enc(hook), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(posts[0].text), 'WhatsApp')].forEach(b => sh.appendChild(b)); [linkBtn('https://x.com/intent/tweet?text=' + enc(posts[0].text), 'X'), linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(link), 'Facebook'), linkBtn('https://t.me/share/url?url=' + enc(link) + '&text=' + enc(hook), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(posts[0].text), 'WhatsApp')].forEach(b => sh.appendChild(b));
const gi = $('gmImg'); gi.hidden = true; gi.onload = () => { if (gi.dataset.want === g.img) gi.hidden = false; }; gi.onerror = () => { gi.hidden = true; }; gi.dataset.want = g.img; gi.src = g.img; // hidden until the new game's image loads (no stale picture) $('gmImg').alt = g.name; $('gmImgOpen').href = g.img; const gi = $('gmImg'); gi.hidden = true; gi.onload = () => { if (gi.dataset.want === g.img) gi.hidden = false; }; gi.onerror = () => { gi.hidden = true; }; gi.dataset.want = g.img; gi.src = g.img; // hidden until the new game's image loads (no stale picture) $('gmImg').alt = g.name; $('gmImgOpen').href = g.img;
$('gmImgCopy').onclick = async () => { try { await navigator.clipboard.writeText(g.img); status('Image URL copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } }; $('gmImgCopy').onclick = async () => { try { await navigator.clipboard.writeText(g.img); status('Image URL copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
const gv = $('gmVideo'); if (gv) { gv.innerHTML = ''; gv.hidden = !g.video; const gv = $('gmVideo'); if (gv) { gv.innerHTML = ''; gv.hidden = !g.video;
if (g.video) { const v = g.video, cap = v.cap.replace('{L}', link); const d = document.createElement('div'); d.className = 'promo-block'; if (g.video) { const v = g.video, cap = v.cap.replace('{L}', link); const d = document.createElement('div'); d.className = 'promo-block';
d.innerHTML = '<div class="pb-head"><span class="lab">Trailer</span> <span class="muted small">Best on: ' + esc(v.best) + '</span></div><video controls playsinline preload="none" poster="' + v.base + v.poster + '" src="' + v.base + v.file + '" style="width:100%;max-width:480px;border-radius:12px;display:block;margin:8px auto;background:#000"></video><div class="pb-text">' + esc(cap) + '</div>'; d.innerHTML = '<div class="pb-head"><span class="lab">Trailer</span> <span class="muted small">Best on: ' + esc(v.best) + '</span></div><video controls playsinline preload="none" poster="' + v.base + v.poster + '" src="' + v.base + v.file + '" style="width:100%;max-width:480px;border-radius:12px;display:block;margin:8px auto;background:#000"></video><div class="pb-text">' + esc(cap) + '</div>';
const row = document.createElement('div'); row.className = 'pb-actions'; const row = document.createElement('div'); row.className = 'pb-actions';
row.appendChild(linkBtn(v.base + v.file, 'Download 16:9')); if (v.portrait) row.appendChild(linkBtn(v.base + v.portrait, 'Download vertical')); row.appendChild(linkBtn(v.base + v.poster, 'Poster image')); row.appendChild(copyBtn(cap, 'Copy caption')); row.appendChild(linkBtn(v.base + v.file, 'Download 16:9')); if (v.portrait) row.appendChild(linkBtn(v.base + v.portrait, 'Download vertical')); row.appendChild(linkBtn(v.base + v.poster, 'Poster image')); row.appendChild(copyBtn(cap, 'Copy caption'));
[linkBtn('https://x.com/intent/tweet?text=' + enc(cap), 'X'), linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(link), 'Facebook'), linkBtn('https://t.me/share/url?url=' + enc(link) + '&text=' + enc(cap.replace(link, '').trim()), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(cap), 'WhatsApp')].forEach(b => row.appendChild(b)); [linkBtn('https://x.com/intent/tweet?text=' + enc(cap), 'X'), linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(link), 'Facebook'), linkBtn('https://t.me/share/url?url=' + enc(link) + '&text=' + enc(cap.replace(link, '').trim()), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(cap), 'WhatsApp')].forEach(b => row.appendChild(b));
d.appendChild(row); gv.appendChild(d); } } d.appendChild(row); gv.appendChild(d); } }
const pp = $('gmPosts'); pp.innerHTML = ''; const pp = $('gmPosts'); pp.innerHTML = '';
for (const p of posts) pp.appendChild(block(p.text, '<span class="lab">' + esc(p.name) + '</span>', [linkBtn('https://x.com/intent/tweet?text=' + enc(p.text), 'X'), linkBtn('https://t.me/share/url?url=' + enc(link) + '&text=' + enc(p.text.replace(link, '').trim()), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(p.text), 'WhatsApp')])); for (const p of posts) pp.appendChild(block(p.text, '<span class="lab">' + esc(p.name) + '</span>', [linkBtn('https://x.com/intent/tweet?text=' + enc(p.text), 'X'), linkBtn('https://t.me/share/url?url=' + enc(link) + '&text=' + enc(p.text.replace(link, '').trim()), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(p.text), 'WhatsApp')]));
} }
const grid = $('gbGrid'); grid.innerHTML = ''; const grid = $('gbGrid'); grid.innerHTML = '';
for (const [s, n] of SIZES) { const w = s.split('x')[0], h = s.split('x')[1], src = CDN + g.slug + '/' + g.slug + '-' + s + '.png'; for (const [s, n] of SIZES) { const w = s.split('x')[0], h = s.split('x')[1], src = CDN + g.slug + '/' + g.slug + '-' + s + '.png';
const code = '<a href="' + link + '" target="_blank" rel="noopener"><img src="' + src + '" width="' + w + '" height="' + h + '" alt="' + g.name + '"></a>'; const code = '<a href="' + link + '" target="_blank" rel="noopener"><img src="' + src + '" width="' + w + '" height="' + h + '" alt="' + g.name + '"></a>';
const d = document.createElement('div'); d.className = 'promo-block'; d.innerHTML = '<div class="pb-head"><span class="lab">' + s + '</span> <span class="muted small">' + esc(n) + '</span></div><div style="overflow:auto;margin:8px 0"><img loading="lazy" src="' + src + '" alt="' + esc(g.name) + ' ' + s + '" style="max-width:100%;height:auto;border-radius:6px"></div><div class="pb-text mono small" style="overflow-wrap:anywhere">' + esc(code) + '</div>'; const d = document.createElement('div'); d.className = 'promo-block'; d.innerHTML = '<div class="pb-head"><span class="lab">' + s + '</span> <span class="muted small">' + esc(n) + '</span></div><div style="overflow:auto;margin:8px 0"><img loading="lazy" src="' + src + '" alt="' + esc(g.name) + ' ' + s + '" style="max-width:100%;height:auto;border-radius:6px"></div><div class="pb-text mono small" style="overflow-wrap:anywhere">' + esc(code) + '</div>';
const row = document.createElement('div'); row.className = 'pb-actions'; row.appendChild(copyBtn(code, 'Copy embed code')); row.appendChild(copyBtn(src, 'Copy image URL')); row.appendChild(linkBtn(src, 'Open image')); d.appendChild(row); grid.appendChild(d); } const row = document.createElement('div'); row.className = 'pb-actions'; row.appendChild(copyBtn(code, 'Copy embed code')); row.appendChild(copyBtn(src, 'Copy image URL')); row.appendChild(linkBtn(src, 'Open image')); d.appendChild(row); grid.appendChild(d); }
}; };
window.__gmAvail = (slug, on) => { avail[slug] = !!on; draw(); }; window.__gmAvail = (slug, on) => { avail[slug] = !!on; draw(); };
fetch('/api/public/games').then(r => r.json()).then(d => { for (const sl of ['polybreak', 'polminer']) if ((d.games || []).some(g => g.slug === sl)) window.__gmAvail(sl, true); }).catch(() => {}); fetch('/api/public/games').then(r => r.json()).then(d => { for (const sl of ['polybreak', 'polminer']) if ((d.games || []).some(g => g.slug === sl)) window.__gmAvail(sl, true); }).catch(() => {});
$('gmPick').addEventListener('click', e => { const b = e.target.closest('[data-gm]'); if (!b) return; cur = b.dataset.gm; draw(); }); $('gmPick').addEventListener('click', e => { const b = e.target.closest('[data-gm]'); if (!b) return; cur = b.dataset.gm; draw(); });
draw(); draw();
} }
// Spooky Doors (Halloween season, 2026-10-02): the member's game link, the share image and two short posts. Shown on the // Spooky Doors (Halloween season, 2026-10-02): the member's game link, the share image and two short posts. Shown on the
// season window the Games card uses (the server decides; the admin gets a preview before the start), hidden after it. // season window the Games card uses (the server decides; the admin gets a preview before the start), hidden after it.
const sdp = $('promo-spookydoors'); const sdp = $('promo-spookydoors');
if (sdp && token && sdp.dataset.filled !== token) { if (sdp && token && sdp.dataset.filled !== token) {
sdp.dataset.filled = token; sdp.dataset.filled = token;
fetch('/api/my/spookydoors/promo').then(r => r.json()).then(s => { fetch('/api/my/spookydoors/promo').then(r => r.json()).then(s => {
// the Games tab's picker lists Spooky Doors only while its season shows (the server decides) // the Games tab's picker lists Spooky Doors only while its season shows (the server decides)
if (!s || !s.show) { sdp.hidden = true; if (window.__gmAvail) window.__gmAvail('spookydoors', false); return; } if (!s || !s.show) { sdp.hidden = true; if (window.__gmAvail) window.__gmAvail('spookydoors', false); return; }
if (window.__gmAvail) window.__gmAvail('spookydoors', true); if (window.__gmAvail) window.__gmAvail('spookydoors', true);
const enc = encodeURIComponent, sl = String(s.base || 'https://spookydoors.com') + '/?ref=' + enc(token), img = s.image || 'https://spookydoors.com/og-spookydoors.jpg'; const enc = encodeURIComponent, sl = String(s.base || 'https://spookydoors.com') + '/?ref=' + enc(token), img = s.image || 'https://spookydoors.com/og-spookydoors.jpg';
const day = (d, back) => { const t = new Date(d + 'T12:00:00Z'); if (back) t.setUTCDate(t.getUTCDate() - 1); return t.toLocaleDateString('en-US', { month: 'short', day: 'numeric', timeZone: 'UTC' }); }; const day = (d, back) => { const t = new Date(d + 'T12:00:00Z'); if (back) t.setUTCDate(t.getUTCDate() - 1); return t.toLocaleDateString('en-US', { month: 'short', day: 'numeric', timeZone: 'UTC' }); };
const ends = s.season && s.season.end ? day(s.season.end, true) : 'Oct 31'; const ends = s.season && s.season.end ? day(s.season.end, true) : 'Oct 31';
$('sdpSub').textContent = s.preview && s.season ? 'preview: members see this card from ' + day(s.season.start) + ' to ' + ends : 'our Halloween game, limited time, ends ' + ends; $('sdpSub').textContent = s.preview && s.season ? 'preview: members see this card from ' + day(s.season.start) + ' to ' + ends : 'our Halloween game, limited time, ends ' + ends;
$('sdpLink').textContent = sl; $('sdpLink').textContent = sl;
$('sdpCopy').onclick = async () => { try { await navigator.clipboard.writeText(sl); status('Link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } }; $('sdpCopy').onclick = async () => { try { await navigator.clipboard.writeText(sl); status('Link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
$('sdpImg').onerror = () => { $('sdpImg').hidden = true; }; $('sdpImg').src = img; $('sdpImgOpen').href = img; $('sdpImg').onerror = () => { $('sdpImg').hidden = true; }; $('sdpImg').src = img; $('sdpImgOpen').href = img;
$('sdpImgCopy').onclick = async () => { try { await navigator.clipboard.writeText(img); status('Image URL copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } }; $('sdpImgCopy').onclick = async () => { try { await navigator.clipboard.writeText(img); status('Image URL copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
const SD_POSTS = [ const SD_POSTS = [
{ name: 'Short post', text: 'Trick or treat! \u{1F383} Spooky Doors is a free Halloween game: walk the street, dodge the black cats and bats, knock on doors and fill your candy bucket. Only until Halloween night. Play here: ' + sl }, { name: 'Short post', text: 'Trick or treat! \u{1F383} Spooky Doors is a free Halloween game: walk the street, dodge the black cats and bats, knock on doors and fill your candy bucket. Only until Halloween night. Play here: ' + sl },
{ name: 'Friendly post', text: 'Something fun for October: I have been playing Spooky Doors, a little Halloween game where every door you knock on opens somebody\u2019s page. Pick a costume and see how much candy you can collect before ' + ends + '. ' + sl }, { name: 'Friendly post', text: 'Something fun for October: I have been playing Spooky Doors, a little Halloween game where every door you knock on opens somebody\u2019s page. Pick a costume and see how much candy you can collect before ' + ends + '. ' + sl },
]; ];
const pp = $('sdpPosts'); pp.innerHTML = ''; const pp = $('sdpPosts'); pp.innerHTML = '';
for (const p of SD_POSTS) pp.appendChild(block(p.text, '<span class="lab">' + esc(p.name) + '</span>', [linkBtn('https://x.com/intent/tweet?text=' + enc(p.text), 'X'), linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(sl), 'Facebook'), linkBtn('https://t.me/share/url?url=' + enc(sl) + '&text=' + enc(p.text.replace(sl, '').trim()), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(p.text), 'WhatsApp')])); for (const p of SD_POSTS) pp.appendChild(block(p.text, '<span class="lab">' + esc(p.name) + '</span>', [linkBtn('https://x.com/intent/tweet?text=' + enc(p.text), 'X'), linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(sl), 'Facebook'), linkBtn('https://t.me/share/url?url=' + enc(sl) + '&text=' + enc(p.text.replace(sl, '').trim()), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(p.text), 'WhatsApp')]));
}).catch(() => {}); }).catch(() => {});
} }
// objections // objections
const ob = $('promoObjections'); const ob = $('promoObjections');
if (ob && ob.dataset.filled !== link) { if (ob && ob.dataset.filled !== link) {
ob.dataset.filled = link; ob.innerHTML = ''; ob.dataset.filled = link; ob.innerHTML = '';
for (const o of OBJECTIONS) { for (const o of OBJECTIONS) {
const d = document.createElement('details'); d.className = 'obj'; const d = document.createElement('details'); d.className = 'obj';
const s = document.createElement('summary'); s.textContent = o.q; d.appendChild(s); const s = document.createElement('summary'); s.textContent = o.q; d.appendChild(s);
const body = document.createElement('div'); body.className = 'obj-body'; const body = document.createElement('div'); body.className = 'obj-body';
const t = document.createElement('div'); t.className = 'obj-truth'; const t = document.createElement('div'); t.className = 'obj-truth';
t.innerHTML = '<span class="lab">The truth</span><p>' + esc(o.truth) + '</p>'; body.appendChild(t); t.innerHTML = '<span class="lab">The truth</span><p>' + esc(o.truth) + '</p>'; body.appendChild(t);
const say = fillLink(o.say, link); const say = fillLink(o.say, link);
const sayEl = block(say, '<span class="lab lab-say">Say this</span>'); const sayEl = block(say, '<span class="lab lab-say">Say this</span>');
sayEl.classList.add('obj-say'); body.appendChild(sayEl); sayEl.classList.add('obj-say'); body.appendChild(sayEl);
d.appendChild(body); ob.appendChild(d); d.appendChild(body); ob.appendChild(d);
} }
} }
} }
return { fill, POSTS, TEXTS, SWIPES, OBJECTIONS, VIDEOS }; // ── BixPay partner kit (2026-10-29, docs/BIXPAY-INTEGRATION.md). me.bix from /api/me. The three posts are Marty's approved
})(); // copy. {L} = the member's TRACKED link (/go/bixpay?s=promo&m=<member>: counted here, then the resolved partner link), so every
// asset carries the member's link and the Promo tab can show its clicks. Banners: text only, no BIX logo (brand rules unconfirmed).
const BIX_POSTS = [
{ name: 'Short post', net: 'X', text: 'I spend my crypto with a Visa card now. BixPay keeps the keys with you, loads from USDT or USDC with no load fee, and works with Apple Pay. Virtual card from $9.99: {L}' },
{ name: 'Friendly post', net: 'Facebook', text: 'Earning crypto is one thing. Spending it without jumping through hoops is another. BixPay fixed that for me: a self-custody wallet and a Visa card in one app. Here\'s where I got mine: {L}' },
{ name: 'Partner angle', net: 'LinkedIn', text: 'BixPay pays partners on every card and on card spending, ten levels deep. If you\'re building a team anyway, this fits right in: {L}' }
];
const BIX_SWIPE = { subject: 'A Visa card for the crypto you already earn', body: 'Hey,\n\nQuick one, because this solved something for me.\n\nI earn crypto in a few places, and for a long time the awkward part was spending it. Exchange, bank, waiting, fees. BixPay took that out of the loop: it is a self-custody wallet with a Visa card in one app. You send USDT or USDC to it on Polygon, load the card, and pay wherever Visa is accepted, Apple Pay and Google Pay included.\n\nThe parts I liked:\n- The keys stay with you. It is your wallet, not an account someone else holds.\n- No load fee. 3% per purchase, and BIX\'s terms cover the rest.\n- A virtual card is $9.99 and you can be using it the same day.\n- If you build a team, BixPay pays partners on every card and on card spending, ten levels deep.\n\nUS note: it is open in 31 states so far. If yours is not on the list yet, you can still get the wallet and build.\n\nHere is my link: {L}\n\nBixPay is a separate company. BIX issues the wallet and the card through its banking partners and sets its own fees, limits, eligibility and terms. Crypto assets can lose value.\n\nTalk soon,' };
const BIX_CDN = 'https://coolify-saasytop.nyc3.cdn.digitaloceanspaces.com/game-banners/bixpay/';
const BIX_SIZES = [['728x90', 'Leaderboard'], ['300x250', 'Medium rectangle'], ['468x60', 'Banner'], ['600x300', 'Traffic exchange / splash page']];
function fillBix(me) {
const b = (me && me.bix) || {}; const sec = $('promo-bixpay'); if (!sec) return;
if (!b.live || b.error || !b.go) { sec.hidden = true; return; }
const enc = encodeURIComponent, link = b.link, go = b.go.promo;
if (sec.dataset.filled === link + '|' + go + '|' + (b.clicks ? b.clicks.total : 0)) return;
sec.dataset.filled = link + '|' + go + '|' + (b.clicks ? b.clicks.total : 0);
$('bixPromoLink').textContent = link;
$('bixPromoUsing').textContent = b.using || '';
$('bixPromoSub').textContent = b.whose === 'you' ? 'every link and banner here carries your partner link' : 'add your own partner link in Profile and these switch to yours';
$('bixPromoCopy').onclick = async () => { try { await navigator.clipboard.writeText(link); status('Partner link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
const sh = $('bixPromoShare'); if (sh) { sh.hidden = !navigator.share; sh.onclick = async () => { try { await navigator.share({ title: 'BixPay', text: 'A Visa card for your crypto: ' + go }); } catch (e) { if (!(e && e.name === 'AbortError')) status('Could not open the share sheet.', 'bad'); } }; }
$('bixPromoGo').textContent = go;
$('bixPromoGoCopy').onclick = async () => { try { await navigator.clipboard.writeText(go); status('Tracked link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
const n = (b.clicks && b.clicks.promo) || 0; $('bixPromoClicks').textContent = n ? 'Clicks so far: ' + n.toLocaleString() + '.' : 'No clicks counted yet.';
const pp = $('bixPromoPosts'); pp.innerHTML = '';
for (const p of BIX_POSTS) {
const text = p.text.replace('{L}', go), lead = text.replace(go, '').trim();
const extras = [];
if (p.net === 'X') extras.push(linkBtn('https://twitter.com/intent/tweet?text=' + enc(text), 'Post on X'));
if (p.net === 'Facebook') extras.push(linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(go), 'Share on Facebook'));
if (p.net === 'LinkedIn') extras.push(linkBtn('https://www.linkedin.com/sharing/share-offsite/?url=' + enc(go), 'Share on LinkedIn'));
extras.push(linkBtn('https://t.me/share/url?url=' + enc(go) + '&text=' + enc(lead), 'Telegram'));
extras.push(linkBtn('https://wa.me/?text=' + enc(text), 'WhatsApp'));
pp.appendChild(block(text, '<span class="pb-net">' + esc(p.name) + '</span>', extras));
}
const sw = $('bixPromoSwipe'); sw.innerHTML = '';
sw.appendChild(block('Subject: ' + BIX_SWIPE.subject + '\n\n' + BIX_SWIPE.body.replace('{L}', go), '<span class="pb-net">Email</span> <b>' + esc(BIX_SWIPE.subject) + '</b>'));
const bg = $('bixPromoBanners'); bg.innerHTML = '';
for (const [s, nme] of BIX_SIZES) {
const w = s.split('x')[0], h = s.split('x')[1], src = BIX_CDN + 'bixpay-' + s + '.png';
const code = '<a href="' + go + '" target="_blank" rel="noopener"><img src="' + src + '" width="' + w + '" height="' + h + '" alt="A Visa card for your crypto"></a>';
const d = document.createElement('div'); d.className = 'promo-block';
d.innerHTML = '<div class="pb-head"><span class="lab">' + s + '</span> <span class="muted small">' + esc(nme) + '</span></div><div style="overflow:auto;margin:8px 0"><img loading="lazy" src="' + src + '" alt="BixPay banner ' + s + '" style="max-width:100%;height:auto;border-radius:6px"></div><div class="pb-text mono small" style="overflow-wrap:anywhere">' + esc(code) + '</div>';
const row = document.createElement('div'); row.className = 'pb-actions'; row.appendChild(copyBtn(code, 'Copy embed code')); row.appendChild(copyBtn(src, 'Copy image URL')); row.appendChild(linkBtn(src, 'Open image')); d.appendChild(row); bg.appendChild(d);
}
}
return { fill, fillBix, POSTS, TEXTS, SWIPES, OBJECTIONS, VIDEOS, BIX_POSTS, BIX_SWIPE };
})();
+170
View File
@@ -0,0 +1,170 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>BixPay: a Visa card for your POL | InstantAdPay</title>
<meta name="description" content="How InstantAdPay members spend their POL with a BixPay Visa card: what BixPay is, the 3% fee, how to turn POL into USDT or USDC and load the card on Polygon, the sign-up steps with screenshots, how the BixPay partner plan pays ten levels deep, and what to know before you start.">
<meta name="theme-color" content="#043b2f">
<link rel="canonical" href="https://instantadpay.com/bixpay">
<meta property="og:type" content="website"><meta property="og:site_name" content="InstantAdPay">
<meta property="og:title" content="BixPay: a Visa card for your POL">
<meta property="og:description" content="A self-custody wallet with a Visa card. Send USDT or USDC to it on Polygon, load the card, and spend it wherever Visa is accepted, including Apple Pay and Google Pay. Virtual cards from $9.99. 3% per purchase, no load fee.">
<meta property="og:url" content="https://instantadpay.com/bixpay">
<meta name="twitter:card" content="summary">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
<link rel="icon" type="image/png" href="/logo-icon.png">
<link rel="stylesheet" href="/assets/site.css?v=20260912b">
<style>
.rg{max-width:900px}
.rg .hero{padding:44px 0 10px}
.rg h2{font-size:26px;margin:38px 0 6px}
.rg h3{font-size:17px;margin:0 0 6px}
.rg-eye{font-family:var(--mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--amber);font-weight:700;margin:38px 0 0}
.rg-eye + h2{margin-top:6px}
.rg-cta{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:6px 0 10px}
.rg-cta .btn.big{font-size:17px;padding:14px 22px}
.rg-two{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:14px;margin:14px 0 0}
.rg-box{border:1px solid var(--line);border-radius:14px;padding:16px 18px;background:rgba(255,255,255,.02);min-width:0}
.rg-box p{margin:0;font-size:14.5px;color:var(--muted)}
.rg-box p + p{margin-top:8px}
.rg-note{font-size:14.5px;color:var(--muted);margin:8px 0 0}
.rg-route{list-style:none;counter-reset:s;margin:12px 0 0;padding:0;display:grid;gap:14px}
.rg-route > li{counter-increment:s;display:grid;grid-template-columns:42px minmax(0,1fr);gap:14px;align-items:start;border:1px solid var(--line);border-radius:14px;padding:14px 16px;background:rgba(255,255,255,.02);min-width:0}
.rg-route > li::before{content:counter(s);font-family:var(--disp);font-weight:800;font-size:20px;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:var(--amber);color:#1b1203}
.rg-route > li > div{min-width:0}
.rg-route p{margin:0 0 8px;font-size:14.5px;color:var(--muted)}
.rg-tbl{border:1px solid var(--line);border-radius:14px;overflow:hidden;margin:10px 0 8px}
.rg-tbl table{width:100%;border-collapse:collapse;font-size:14.5px;table-layout:fixed}
.rg-tbl th,.rg-tbl td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}
.rg-tbl th{font-family:var(--mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);font-weight:600}
.rg-tbl td:first-child{width:38%;font-weight:700}
.rg-tbl tr:last-child td{border-bottom:0}
.rg-faq{display:grid;gap:14px;margin:12px 0 0}
.rg-faq dt{font-family:var(--disp);font-weight:700}
.rg-faq dd{margin:4px 0 0;color:var(--muted);font-size:14.5px}
.rg-rule{border-left:4px solid var(--mint);background:rgba(67,232,195,.07);padding:14px 18px;border-radius:0 12px 12px 0;margin:30px 0 22px;font-size:14.5px}
.rg-warn{border-left:4px solid var(--amber);background:rgba(255,178,56,.07);padding:12px 16px;border-radius:0 12px 12px 0;margin:12px 0 0;font-size:14.5px}
.rg code.i{font-family:var(--mono);font-size:13px;color:var(--mint);background:rgba(67,232,195,.08);padding:1px 5px;border-radius:4px;overflow-wrap:anywhere}
/* phone screenshots: a row of app screens, each captioned; stacked on a phone */
.bx-shots{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:14px;margin:14px 0 0}
.bx-shot{min-width:0;text-align:center}
.bx-shot img{width:100%;max-width:240px;height:auto;border-radius:18px;border:1px solid var(--line-strong);background:#000;display:block;margin:0 auto}
.bx-shot figcaption{font-size:13px;color:var(--muted);margin:8px 0 0;line-height:1.45}
.bx-using{font-size:13.5px;color:var(--muted);margin:0}
.bx-flow{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:12px;margin:12px 0 0}
.bx-flow div{border:1px solid var(--line-strong);border-radius:12px;padding:12px 13px;background:rgba(255,255,255,.02);font-size:13.5px;color:var(--muted);line-height:1.45}
.bx-flow b{display:block;font-family:var(--disp);color:var(--ink);margin-bottom:4px}
@media (max-width:640px){.rg .hero h1{font-size:30px}.rg-box{padding:14px}.rg-route > li{grid-template-columns:34px minmax(0,1fr);gap:10px;padding:12px}.rg-route > li::before{width:34px;height:34px;font-size:17px}}
</style>
</head>
<body>
<div class="wrap rg">
<section class="hero">
<p class="eyebrow">For InstantAdPay members · BixPay is a separate company</p>
<h1>Spend your POL anywhere with a <em>BixPay Visa card</em>.</h1>
<p class="lead">BixPay is a self-custody wallet with a Visa card. Send USDT or USDC to it on Polygon, load the card, and spend it wherever Visa is accepted, including Apple Pay and Google Pay. Virtual cards from $9.99. 3% per purchase, no load fee. See BIX's terms for other charges.</p>
</section>
<div class="rg-cta">
<a class="btn big" id="bixCta" href="/my#wallet" target="_blank" rel="noopener">Get your BixPay card</a>
<a class="btn sec" href="/join">Not a member yet? Join free by email</a>
</div>
<p class="bx-using" id="bixUsing">The button opens a BixPay partner sign-up link.</p>
<p class="rg-note" id="bixSignupNote"><b>Sign up on the page the button opens.</b> Don’t install the BIX app first and don’t use the portal’s own Sign Up menu: your sponsor is lost and BIX shows the referrer as N/A.</p>
<div class="rg-note" id="bixInApp" hidden style="border:1px solid #f2b84b;background:rgba(242,184,75,.12);border-radius:10px;padding:10px 12px"><b>You’re in an app’s built-in browser.</b> BIX’s security check often fails here and your sponsor gets dropped. Open this page in Chrome or Safari first (menu > Open in browser), or copy the sign-up link and paste it there: <span id="bixInAppLink" style="word-break:break-all;font-family:ui-monospace,monospace;font-size:12px"></span> <button type="button" class="btn small sec" id="bixInAppCopy" style="margin-left:6px">Copy link</button></div>
<p class="rg-note" id="bixSoon" hidden>The BixPay card is not switched on for InstantAdPay members yet. Check back soon.</p>
<p class="rg-note">Available in 31 US states so far. Not in your state yet? You can still get the wallet and build. Elsewhere, availability varies by country.</p>
<p class="rg-eye">What it is</p>
<h2>A wallet you hold, a card you can actually use</h2>
<div class="rg-two">
<div class="rg-box"><h3>Self-custody</h3><p>The BIX app is a wallet where the keys stay with you. It is not an exchange account. You hold the USDT or USDC that backs your card.</p></div>
<div class="rg-box"><h3>A Visa card on top</h3><p>Create a virtual card in the app for $9.99 and it works wherever Visa is accepted, online and in stores through Apple Pay and Google Pay. Plastic, metal and gold cards cost more.</p></div>
<div class="rg-box"><h3>Loads on Polygon</h3><p>Your InstantAdPay payouts land as POL on Polygon. Turn them into USDT or USDC, send that to your BixPay wallet on Polygon, and top up the card. No bridge, no bank wait.</p></div>
<div class="rg-box"><h3>What it costs</h3><p>3% per purchase, no load fee. Other charges, limits and eligibility are set by BIX; read BIX's terms before you start. We quote only the fee we can stand behind.</p></div>
</div>
<p class="rg-eye">Why we added it</p>
<h2>How BixPay pays you, in plain words</h2>
<p class="rg-note">BixPay runs a partner plan on top of the card, and InstantAdPay members plug into it with one link. Nothing here is paid by InstantAdPay: BIX tracks and pays its partners in the BIX portal, and InstantAdPay earns a referral commission when someone signs up through a partner link. Here is the plan as BIX describes it.</p>
<div class="rg-tbl">
<table>
<thead><tr><th>Piece</th><th>What BIX says it does</th></tr></thead>
<tbody>
<tr><td>The fee</td><td>3% of each card purchase. That is the only fee we quote; BIX's terms cover the rest.</td></tr>
<tr><td>What goes into the plan</td><td>Half of the purchase fees and half of card sales (the $9.99 virtual card and the others) go to partners.</td></tr>
<tr><td>Ten levels</td><td>Level 1 gets 15% of the fee, level 2 gets 10%, and levels 3 to 10 get 2.5% each.</td></tr>
<tr><td>The pool</td><td>The remaining 5% goes into a pool shared by partners with large networks, on BIX's own rules.</td></tr>
<tr><td>Card sales count too</td><td>A card bought by someone in your BixPay network pays the same way as spending does.</td></tr>
</tbody>
</table>
</div>
<div class="rg-box" style="margin-top:12px"><h3>A hypothetical, not a typical result</h3><p>If someone in your BixPay network spends $1,000 on their card in a month, the fee on that is $30. BIX says it pays the level-1 partner 15% of that fee ($4.50), the level-2 partner 10% ($3.00) and each of levels 3 to 10 a quarter of one percent of the spend ($0.75 each). That is arithmetic on BIX's published percentages, not a prediction. What anyone earns depends on how many people in their network get and use a card, and on BIX paying as described. Nobody at InstantAdPay promises any amount.</p></div>
<p class="rg-eye">Who gets the credit</p>
<h2>One link, and your sponsor follows</h2>
<div class="bx-flow">
<div><b>Your own link</b>Save your BixPay partner link in Members &gt; Profile &gt; BixPay card. Every BixPay button on your pages, your promo kit and the line in your payout emails then carry it.</div>
<div><b>Else, your sponsor's</b>Until you add yours, your pages carry the link of the first sponsor up your line (up to ten levels) who has one. Every card says so: "Using: @name's link".</div>
<div><b>Else, the network's</b>If nobody up the line has one yet, the network link is used. Add yours and the credit is yours from then on.</div>
</div>
<p class="rg-note">Sign-ups and commissions are counted inside the BIX portal, where each partner sees their directs and levels. InstantAdPay only counts the clicks on its own buttons, so you can see which page or post is working.</p>
<p class="rg-eye">Get the card</p>
<h2>Sign up as a partner, then create the card</h2>
<ol class="rg-route">
<li><div><h3>Open a partner link</h3><p>Tap <b>Get your BixPay card</b> above (or on your Wallet tab). It opens a BixPay <b>partner</b> sign-up, not the plain card-customer one, so the referral plan comes with the card. <b>Register on that page.</b> If you opened this from Gmail or Telegram, open it in Chrome or Safari first; don’t install the app first and don’t use the portal’s own Sign Up menu, or your sponsor is lost (BIX then shows the referrer as N/A, and only BIX support can fix it).</p></div></li>
<li><div><h3>Create your BIX portal account</h3><p>Register on the page that opens (bix.ibportal.io). This is your partner back office: it shows your directs and levels and, under Profile, your own two links. The second one, labelled <b>Partner</b>, is the one you will paste into InstantAdPay later.</p></div></li>
<li><div><h3>Download the BIX app and create your wallet</h3><p>Install BixPay from your phone's app store and create the wallet in the app. Write the recovery phrase down and keep it offline: self-custody means nobody can reset it for you.</p></div></li>
<li><div><h3>Link the app to your portal</h3><p>In the app open <b>Settings &gt; Scan QR</b> and scan the QR code shown in your portal profile. That ties the wallet and card to your partner account so your activity counts.</p></div></li>
<li><div><h3>Create your card</h3><p>In the app, <b>Cards &gt; Create Card</b>. The virtual Visa is $9.99 and is ready as soon as you have passed BIX's identity check (KYC). Add it to Apple Pay or Google Pay from the card screen.</p></div></li>
</ol>
<div class="bx-shots">
<figure class="bx-shot"><img src="/assets/bixpay/bix-cards.webp" width="540" height="1115" alt="The BIX app Cards screen: a virtual Visa card with TOPUP, CARD INFO and MANAGE buttons and recent purchases at Walmart, Raceway and Pizza Hut" loading="lazy"><figcaption>The Cards screen after a few purchases. Balances and card numbers are hidden in this screenshot.</figcaption></figure>
</div>
<p class="rg-eye">Funding your card</p>
<h2>From POL to a card you can swipe</h2>
<p class="rg-note">The card spends USDT or USDC, so the one extra step is turning POL into one of those. Three ways:</p>
<ol class="rg-route">
<li><div><h3>Swap on an exchange, then send on Polygon</h3><p>Swap your POL for USDT or USDC on any exchange or on-ramp you already use. Then in the BIX app open <b>Wallet &gt; Receive</b>, pick USDT or USDC, choose the <b>Polygon</b> network and send to that address. A minute later it shows in the wallet's Cash tab; tap <b>TOPUP</b> on your card to load it.</p><p class="rg-warn" style="margin:0">Pick Polygon on both ends. Sending on another network to a Polygon address can lose the funds, and nobody can reverse it.</p></div></li>
<li><div><h3>Cash App (US)</h3><p>If you use Cash App, it can send crypto straight to your BixPay wallet. Handy for topping up from dollars without an exchange account. Cash App sets its own limits.</p></div></li>
<li><div><h3>The in-app swap, once BIX ships it</h3><p>BIX has said a swap inside the app is coming. The wallet already receives POL ("MATIC (migrated to POL)" in the Receive list), so once the swap is live you will be able to send POL straight in and swap there. We will update this page when it ships; until then use one of the two paths above.</p></div></li>
</ol>
<div class="bx-shots">
<figure class="bx-shot"><img src="/assets/bixpay/bix-receive.webp" width="540" height="1115" alt="The BIX app Receive screen listing USDT, USDC, Ethereum, SOL, BNB, MATIC (migrated to POL), TRON, Avalanche and Optimism" loading="lazy"><figcaption>Wallet &gt; Receive: pick USDT or USDC, then the Polygon network.</figcaption></figure>
<figure class="bx-shot"><img src="/assets/bixpay/bix-wallet.webp" width="540" height="1115" alt="The BIX app Wallet screen, Cash tab, showing USDT and a list of Received and Sent transactions" loading="lazy"><figcaption>Cash tab: each Received is a deposit to the wallet, each Sent right after it is the top-up to the card. Amounts hidden.</figcaption></figure>
</div>
<p class="rg-eye">If something goes wrong</p>
<h2>Disputes and protection</h2>
<div class="rg-two">
<div class="rg-box"><h3>Disputing a charge</h3><p>Every transaction in the app shows the merchant, the date, the category code and a <b>Dispute support</b> box. BIX accepts a dispute for 120 days after a transaction posts, and says a dispute can take 30 to 60 business days.</p></div>
<div class="rg-box"><h3>What InstantAdPay can and cannot do</h3><p>We can help you find your partner link, explain the steps and point you to the right screen. We cannot see your BixPay wallet, your card or your balance, and we cannot file a dispute for you. Card problems go to BIX support inside the app.</p></div>
</div>
<div class="bx-shots">
<figure class="bx-shot"><img src="/assets/bixpay/bix-dispute.webp" width="540" height="1115" alt="The BIX app Transaction Details screen for a Walmart purchase with the Dispute support note at the bottom" loading="lazy"><figcaption>Transaction details with the dispute window. Amount, location and card number hidden.</figcaption></figure>
</div>
<p class="rg-eye">Quick answers</p>
<h2>Questions members ask</h2>
<dl class="rg-faq">
<div><dt>Do I have to be a partner to get the card?</dt><dd>Our buttons open a partner link, so you register as a partner and get the card through the same app. There is no extra cost to being a partner; it just means card sign-ups through your own link are credited to you.</dd></div>
<div><dt>Where do I put my partner link on InstantAdPay?</dt><dd>Members &gt; Profile &gt; BixPay card. Copy the <b>Partner</b> link from your BIX portal profile (the second box). The field refuses the first box's referral link (it ends in appId=3) because that one only makes a card customer.</dd></div>
<div><dt>Can I send POL straight to the card?</dt><dd>Not yet. Turn it into USDT or USDC first (any exchange, or Cash App in the US), then send on Polygon. When BIX ships its in-app swap we will add that path here.</dd></div>
<div><dt>Is my money safe there?</dt><dd>It is a self-custody wallet, so it is as safe as your recovery phrase. Keep the phrase offline and never type it into a website. And remember that USDT, USDC and POL are crypto assets: they can lose value.</dd></div>
<div><dt>What does InstantAdPay get out of it?</dt><dd>A referral commission from BIX when someone signs up through a partner link, the same plan every partner is on. We are not the card issuer and we do not hold any of your funds.</dd></div>
<div><dt>Can I share this page with my own link?</dt><dd>Yes. Members &gt; Promo tools &gt; BixPay has your link, three posts, an email swipe and four banners, plus a click count. Promo tools &gt; Viral links turns this page into <code class="i">instantadpay.com/bixpay?ref=yourname</code>, and the button on it then carries your link.</dd></div>
</dl>
<div class="rg-rule"><b>Compliance.</b> BixPay is a separate company. BIX issues the wallet and the card through its banking partners and sets its own fees, limits, eligibility and terms. InstantAdPay is not the card issuer and earns a referral commission when you sign up through a partner link. Card availability varies by country. Crypto assets can lose value.</div>
<p class="muted small" style="margin-top:10px">The partner plan figures on this page are BIX's published percentages as of October 2026 and can change at BIX's discretion. Any example is arithmetic, not a prediction; no income is guaranteed or implied, and any commission depends on real card sign-ups and spending in your network. InstantAdPay sells advertising; it is not an investment product and does not hold customer funds.</p>
<footer>
<div>InstantAdPay · <a href="/">Home</a> · <a href="/wallets">Wallet guide</a> · <a href="/earning">How earning works</a> · <a href="/my#wallet">Your Wallet tab</a></div>
<div class="small">InstantAdPay is the Polygon hub of the <a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>.</div>
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees.</div>
</footer>
</div>
<script src="/assets/common.js?v=20261023ov"></script>
<script src="/assets/bixpay-guide.js?v=20261029bz"></script>
</body>
</html>
+1261 -1231
View File
File diff suppressed because it is too large Load Diff
+94
View File
@@ -0,0 +1,94 @@
// BixPay (bixpay.js, 2026-10-29): the partner-link validator, the sponsor-follows resolver (own / sponsor at level 3 / none ->
// company), the gate, the email + nudge lines and the click store. Fake accounts, throwaway data dir. Run: node qa/bixpay.test.cjs
'use strict';
const fs = require('fs');
const os = require('os');
const path = require('path');
const assert = require('assert');
const ROOT = path.join(__dirname, '..');
let fails = 0, n = 0;
async function t(name, fn) { n++; try { await fn(); console.log('ok', name); } catch (e) { fails++; console.log('FAIL', name, '::', e.message); } }
const bixpay = require(path.join(ROOT, 'bixpay.js'));
const walletnudge = require(path.join(ROOT, 'walletnudge.js'));
const PARTNER = 'https://bix.ibportal.io/auth/register?e=XqwU9T1aJ5N0UJ0yr9x0TGUiSQTsVCkTM01MIovVNnc&a=1';
const CUSTOMER = 'https://bix.ibportal.io/auth/register?e=boUGQ_dC9B472D9LGfzxPKvgfBw1iyqx-xffnx1kqPM&a=1&appId=3';
const L3 = 'https://bix.ibportal.io/auth/register?e=' + 'L3token_'.repeat(5) + '&a=1';
// a five-deep line: leaf -> s1 -> s2 -> s3 (has a link) -> s4 -> s5; plus a loop pair and an orphan
const A = {};
const mk = (email, sponsor, link, username) => { A[email] = { email, sponsorRef: sponsor || '', bixPartnerLink: link || null, username: username || null, code: email.split('@')[0] }; };
mk('leaf@x.test', 's1', null, 'leaf'); mk('s1@x.test', 's2', null, 's1'); mk('s2@x.test', 's3', null, 's2'); mk('s3@x.test', 's4', L3, 's3'); mk('s4@x.test', 's5', null, 's4'); mk('s5@x.test', '', null, 's5');
mk('own@x.test', 's1', PARTNER, 'own'); mk('orphan@x.test', '', null, 'orphan');
mk('loopa@x.test', 'loopb', null, 'loopa'); mk('loopb@x.test', 'loopa', null, 'loopb');
// twelve deep with the only link at level 11: must fall to the company (10-level walk)
let prev = ''; for (let i = 12; i >= 1; i--) { mk('d' + i + '@x.test', prev, i === 12 ? L3 : null, 'd' + i); prev = 'd' + i; }
mk('deep@x.test', 'd1', null, 'deep');
const accounts = { byEmail: async e => A[e] || null, sponsorOf: async e => { const a = A[e]; if (!a || !a.sponsorRef) return null; return Object.values(A).find(x => x.username === a.sponsorRef || x.code === a.sponsorRef) || null; } };
let site = { bixpayLive: '1', bixCompanyLink: '' };
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'bixpay-test-'));
bixpay.init({ dataDir: dir, accounts, siteConfig: () => site, refAccount: async tok => Object.values(A).find(x => x.username === tok || x.code === tok) || null });
(async () => {
await t('validator: the partner link passes and normalises', () => { const v = bixpay.validate(' ' + PARTNER + ' '); assert.ok(v.ok); assert.strictEqual(v.link, PARTNER); });
await t('validator: extra params are dropped, e= and a=1 kept', () => { const v = bixpay.validate(PARTNER + '&utm=x'); assert.ok(v.ok); assert.strictEqual(v.link, PARTNER); });
await t('validator: the appId=3 customer link is refused with the message', () => { const v = bixpay.validate(CUSTOMER); assert.ok(!v.ok); assert.strictEqual(v.error, bixpay.CUSTOMER_LINK_MSG); });
await t('validator: wrong host, wrong path, no e=, no a=1, too long, empty, http', () => {
assert.ok(bixpay.validate('https://bix.fi/r?code=ABCDEFGH').error);
assert.ok(bixpay.validate('https://bix.ibportal.io/auth/login?e=' + 'x'.repeat(40) + '&a=1').error);
assert.ok(bixpay.validate('https://bix.ibportal.io/auth/register?a=1').error);
assert.ok(bixpay.validate('https://bix.ibportal.io/auth/register?e=' + 'x'.repeat(40)).error);
assert.ok(bixpay.validate('https://bix.ibportal.io/auth/register?e=' + 'x'.repeat(40) + '&a=2').error);
assert.ok(bixpay.validate('https://bix.ibportal.io/auth/register?e=' + 'x'.repeat(300) + '&a=1').error);
assert.ok(bixpay.validate('').error); assert.ok(bixpay.validate(null).error);
assert.ok(bixpay.validate('http://bix.ibportal.io/auth/register?e=' + 'x'.repeat(40) + '&a=1').error);
assert.ok(bixpay.validate('javascript:alert(1)').error);
});
await t('resolver: own link wins', async () => { const r = await bixpay.resolve(A['own@x.test']); assert.strictEqual(r.whose, 'you'); assert.strictEqual(r.link, PARTNER); });
await t('resolver: no own link -> first sponsor up the chain with one (level 3)', async () => { const r = await bixpay.resolve(A['leaf@x.test']); assert.strictEqual(r.whose, 'sponsor'); assert.strictEqual(r.name, '@s3'); assert.strictEqual(r.email, 's3@x.test'); assert.ok(r.link.includes('L3token_')); });
await t('resolver: nobody up the chain -> company (default = Marty’s partner link)', async () => { const r = await bixpay.resolve(A['orphan@x.test']); assert.strictEqual(r.whose, 'network'); assert.strictEqual(r.link, bixpay.DEFAULT_COMPANY_LINK); assert.strictEqual(r.name, null); });
await t('resolver: null member -> company', async () => { const r = await bixpay.resolve(null); assert.strictEqual(r.whose, 'network'); });
await t('resolver: the walk stops at 10 levels (link at level 12 is not reached)', async () => { const r = await bixpay.resolve(A['deep@x.test']); assert.strictEqual(r.whose, 'network'); });
await t('resolver: a sponsor loop ends in the company link, no hang', async () => { const r = await bixpay.resolve(A['loopa@x.test']); assert.strictEqual(r.whose, 'network'); });
await t('resolver: site config bixCompanyLink overrides the default; a bad one falls back', async () => {
site.bixCompanyLink = L3; assert.strictEqual((await bixpay.resolve(null)).link, L3.replace(/&a=1$/, '&a=1'));
site.bixCompanyLink = 'https://evil.example/x'; assert.strictEqual((await bixpay.resolve(null)).link, bixpay.DEFAULT_COMPANY_LINK);
site.bixCompanyLink = '';
});
await t('resolveRef: a public page ?ref resolves like that member', async () => { const r = await bixpay.resolveRef('leaf'); assert.strictEqual(r.whose, 'sponsor'); const o = await bixpay.resolveRef('own'); assert.strictEqual(o.whose, 'you'); const u = await bixpay.resolveRef('nobody_zz'); assert.strictEqual(u.whose, 'network'); });
await t('usingLine: the three wordings', async () => {
assert.strictEqual(bixpay.usingLine(await bixpay.resolve(A['own@x.test'])), 'Using: your link.');
assert.strictEqual(bixpay.usingLine(await bixpay.resolve(A['leaf@x.test'])), "Using: @s3's link. Add yours in Profile.");
assert.strictEqual(bixpay.usingLine(await bixpay.resolve(null)), 'Using: the network link. Add yours in Profile.');
});
await t('gate: live/announcing follow site config; email and nudge lines are empty while off', () => {
assert.ok(bixpay.live()); assert.ok(bixpay.announcing());
site.bixpayLiveSince = new Date(Date.now() - 8 * 86400000).toISOString(); assert.ok(!bixpay.announcing()); site.bixpayLiveSince = '';
assert.ok(bixpay.emailLine('own').includes('/go/bixpay?s=email&m=own')); assert.ok(bixpay.nudgeLine('own').includes('s=nudge'));
assert.ok(!/—/.test(bixpay.emailLine('own')));
site.bixpayLive = '0'; assert.ok(!bixpay.live()); assert.strictEqual(bixpay.emailLine('own'), ''); assert.strictEqual(bixpay.nudgeLine('own'), ''); site.bixpayLive = '1';
});
await t('walletnudge copy carries the BixPay sentence only when given one', () => {
const c0 = walletnudge.copy([{ key: 'g', name: 'Gem Kingdom', unpaid: 1.5 }], 0, 'https://instantadpay.com/my#wallet', '');
assert.ok(!/BixPay/.test(c0.text) && !/BixPay/.test(c0.html));
const c1 = walletnudge.copy([{ key: 'g', name: 'Gem Kingdom', unpaid: 1.5 }], 0, 'https://instantadpay.com/my#wallet', bixpay.nudgeLine('own'));
assert.ok(/BixPay Visa card/.test(c1.text) && /go\/bixpay\?s=nudge/.test(c1.html));
assert.ok(c1.text.indexOf('Link your wallet:') < c1.text.indexOf('BixPay'), 'the wallet ask stays first');
});
await t('clicks: per surface, per member, per day; unknown surface -> other; bot-free store', () => {
bixpay.click('wallet', 'own@x.test'); bixpay.click('promo', 'own@x.test'); bixpay.click('promo', 'own@x.test'); bixpay.click('guide', null); bixpay.click('weird', 'leaf@x.test');
const m = bixpay.memberClicks('own@x.test'); assert.strictEqual(m.total, 3); assert.strictEqual(m.promo, 2); assert.strictEqual(m.wallet, 1);
const v = bixpay.adminView(30); assert.strictEqual(v.total, 5); assert.strictEqual(v.bySurface.promo, 2); assert.strictEqual(v.bySurface.other, 1); assert.strictEqual(v.members[0].email, 'own@x.test'); assert.strictEqual(v.daily.length, 1);
bixpay._reset(); assert.strictEqual(bixpay.memberClicks('own@x.test').total, 3, 'persisted to disk');
});
await t('copy rules: no em dashes in any BixPay copy shipped to members', () => {
const files = ['bixpay.js', 'public/assets/promo.js', 'public/assets/my.js', 'public/bixpay.html', 'public/assets/bixpay-guide.js', 'chatbot.js'];
for (const f of files) { const s = fs.readFileSync(path.join(ROOT, f), 'utf8'); const lines = s.split('\n').filter(l => /bix/i.test(l) && /—/.test(l)); assert.strictEqual(lines.length, 0, f + ' has an em dash on a BixPay line'); }
const pj = fs.readFileSync(path.join(ROOT, 'public/assets/promo.js'), 'utf8');
assert.ok(/no load fee/.test(pj) && !/in-app swap/i.test(pj.split('BIX_POSTS')[1].split('BIX_CDN')[0]), 'posts never promise the in-app swap');
});
fs.rmSync(dir, { recursive: true, force: true });
console.log('\nbixpay: ' + (n - fails) + '/' + n + ' passed');
process.exit(fails ? 1 : 0);
})();
+1 -1
View File
@@ -151,7 +151,7 @@ try {
await sleep(2200); await sleep(2200);
const rch = (await api('/api/refuel/challenge?n=' + nr2)).j; const rch = (await api('/api/refuel/challenge?n=' + nr2)).j;
const rd = (await api('/api/refuel/done', { n: nr2, answer: rch.options.indexOf(CAP[rch.prompt]) })).j; const rd = (await api('/api/refuel/done', { n: nr2, answer: rch.options.indexOf(CAP[rch.prompt]) })).j;
ok(rd && rd.ok && rd.posted === true && refuelCalls.length === 1 && JSON.parse(refuelCalls[0]).credits === 3, 'refuel completes with its own callback', JSON.stringify(rd && { ok: rd.ok, posted: rd.posted })); ok(rd && rd.ok && rd.posted === true && refuelCalls.length === 1 && JSON.parse(refuelCalls[0]).credits === 3, 'refuel completes with its own callback', JSON.stringify(rd && { ok: rd.ok, posted: rd.posted, calls: refuelCalls }));
const nr3 = crypto.randomBytes(12).toString('hex'); const nr3 = crypto.randomBytes(12).toString('hex');
const rcap = (await api('/api/refuel/open?t=' + encodeURIComponent(mint({ kind: 'refuel', memberId: 77, email: player, nonce: nr3, ret: SD + '/play?refuel=' + nr3 }, DRSECRET)))).j; const rcap = (await api('/api/refuel/open?t=' + encodeURIComponent(mint({ kind: 'refuel', memberId: 77, email: player, nonce: nr3, ret: SD + '/play?refuel=' + nr3 }, DRSECRET)))).j;
ok(rcap && rcap.none && rcap.why === 'cap', 'refuel cap (1) reached after one refuel, not before', JSON.stringify(rcap)); ok(rcap && rcap.none && rcap.why === 'cap', 'refuel cap (1) reached after one refuel, not before', JSON.stringify(rcap));
+74
View File
@@ -0,0 +1,74 @@
// Game refuel visits never come up empty (2026-10-28, Marty): a sponsor never seen first, then a member video, then a
// house sponsor (one of Marty's programs, never the game the player is in), and once the cooldown (doorRepeatDays) has
// passed, a sponsor seen before again. Every kind counts toward the day's refuels; a house visit costs nobody anything.
// node qa/refuel-fallback.mjs
// Boots server.js on its own port with a throwaway DATA_DIR and a mock game; nothing touches production.
import http from 'node:http';
import crypto from 'node:crypto';
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
import { spawn } from 'node:child_process';
const SITE = path.resolve(path.dirname(new URL(import.meta.url).pathname.replace(/^\/([A-Za-z]:)/, '$1')), '..');
const PORT = Number(process.env.RF_PORT || 8812), MOCK = PORT + 100;
const B = 'http://127.0.0.1:' + PORT, G = 'http://127.0.0.1:' + MOCK;
const DRSECRET = crypto.randomBytes(24).toString('hex'), ADMIN = 'localtest', ADMIN_EMAIL = 'qa-admin@example.com';
const DATA = fs.mkdtempSync(path.join(os.tmpdir(), 'iap-rf-')); fs.mkdirSync(path.join(DATA, 'uploads'));
const CAP = { rocket: '🚀', 'lightning bolt': '⚡', key: '🔑', target: '🎯', wave: '🌊', flame: '🔥', diamond: '💎', magnet: '🧲', bell: '🔔', moon: '🌙',
pumpkin: '🎃', ghost: '👻', bat: '🦇', candy: '🍬', spider: '🕷️', skull: '💀', lollipop: '🍭', witch: '🧙', 'spider web': '🕸️', 'full moon': '🌕', chocolate: '🍫' };
let fails = 0; const ok = (c, label, extra) => { console.log((c ? 'PASS ' : 'FAIL ') + label + (extra ? ' ' + extra : '')); if (!c) fails++; };
const sleep = ms => new Promise(r => setTimeout(r, ms));
const calls = [];
const mock = http.createServer((req, res) => { let raw = ''; req.on('data', c => raw += c); req.on('end', () => {
if (req.url === '/api/refuel/callback' && req.method === 'POST') { calls.push(JSON.parse(raw || '{}')); res.writeHead(200); return res.end('{}'); }
res.writeHead(200, { 'Content-Type': 'text/html' }); res.end('<!doctype html><title>page</title>'); }); });
await new Promise(r => mock.listen(MOCK, '127.0.0.1', r));
const b64u = b => Buffer.from(b).toString('base64').replace(/=+$/, '').replace(/\+/g, '-').replace(/\//g, '_');
const mint = claims => { const p = JSON.stringify(Object.assign({ iat: Date.now(), exp: Date.now() + 900000 }, claims)); return b64u(p) + '.' + b64u(crypto.createHmac('sha256', DRSECRET).update(p).digest()); };
const srv = spawn(process.execPath, ['server.js'], { cwd: SITE, stdio: ['ignore', 'pipe', 'pipe'],
env: Object.assign({}, process.env, { PORT: String(PORT), DATA_DIR: DATA, NODE_ENV: 'development', ADMIN_EMAIL, ADMIN_PASSWORD: ADMIN, DR_SSO_SECRET: DRSECRET, DR_URL: G }) });
let log = ''; srv.stdout.on('data', d => log += d); srv.stderr.on('data', d => log += d);
const cleanup = () => { try { srv.kill(); } catch (e) {} try { mock.close(); } catch (e) {} try { fs.rmSync(DATA, { recursive: true, force: true }); } catch (e) {} };
try {
let up = false; for (let i = 0; i < 30 && !up; i++) { try { up = (await fetch(B + '/api/config')).ok; } catch (e) { await sleep(500); } }
if (!up) throw new Error('server did not come up:\n' + log.slice(-2000));
const api = async (p, body, hdr) => { const r = await fetch(B + p, body ? { method: body.method || 'POST', headers: Object.assign({ 'Content-Type': 'application/json' }, hdr || {}), body: JSON.stringify(body.data || body) } : { headers: hdr || {} }); let j = null; try { j = await r.json(); } catch (e) {} return { s: r.status, j }; };
const adminH = { Authorization: 'Bearer ' + ADMIN };
await api('/api/admin/rates', { method: 'PATCH', data: { visitDwellSeconds: 2, refuelCapPerDay: 4, doorRepeatDays: 7 } }, adminH);
const seed = await api('/api/admin/campaigns', { type: 'visits', name: 'QA sponsor', targetUrl: 'https://rmcircle.team/contract', title: 'A sponsor page', count: 20 }, adminH);
const cid = seed.j && seed.j.campaign && seed.j.campaign.id; ok(!!cid, 'seed one sponsor (visits pack)');
const player = 'qa-refuel@example.com';
async function refuel(label) {
const n = crypto.randomBytes(12).toString('hex');
const o = (await api('/api/refuel/open?t=' + encodeURIComponent(mint({ kind: 'refuel', memberId: 55, email: player, nonce: n, ret: G + '/play?refuel=' + n, cb: G + '/api/refuel/callback' })))).j;
if (!o || o.none) return { o };
await sleep(2300);
const ch = (await api('/api/refuel/challenge?n=' + n)).j;
const d = (await api('/api/refuel/done', { n, answer: ch.options.indexOf(CAP[ch.prompt]) })).j;
return { o, d };
}
// 1. a sponsor never seen
const r1 = await refuel(); ok(r1.o && r1.o.mode === 'visit' && !r1.o.house && r1.d && r1.d.ok, 'first refuel: the sponsor the player never saw', JSON.stringify(r1.o && { mode: r1.o.mode, house: r1.o.house, target: r1.o.target }));
// 2. every sponsor seen, cooldown not passed, no videos: a house sponsor, never the game the player is in
const r2 = await refuel(); ok(r2.o && r2.o.mode === 'visit' && r2.o.house === true && r2.d && r2.d.ok, 'second refuel: a house sponsor instead of empty', JSON.stringify(r2.o && { mode: r2.o.mode, house: r2.o.house, target: r2.o.target, none: r2.o.none, why: r2.o.why }));
ok(r2.o && !/driprunner\.app/.test(String(r2.o.target)), 'the house sponsor is not the game the player is in (Drip Runner)', r2.o && r2.o.target);
await sleep(300);
const last = calls[calls.length - 1]; ok(last && last.credits === 0 && last.campaignId === 0, 'a house refuel books 0 credits and no campaign', JSON.stringify(last));
// 3. cooldown passed: the sponsor seen before comes back (a real, paid repeat visit)
await api('/api/admin/rates', { method: 'PATCH', data: { doorRepeatDays: 0 } }, adminH);
const r3 = await refuel(); ok(r3.o && r3.o.mode === 'visit' && !r3.o.house && r3.d && r3.d.ok, 'after the cooldown: the sponsor seen before again', JSON.stringify(r3.o && { mode: r3.o.mode, house: r3.o.house, target: r3.o.target }) + ' ' + JSON.stringify(r3.d));
const camps = (await api('/api/admin/campaigns', null, adminH)).j; const c = camps && (camps.campaigns || camps).find && (camps.campaigns || camps).find(x => x.id === cid);
ok(c && Number(c.imps) === 2, 'the sponsor counted both visits (first + repeat)', c && String(c.imps));
// 4. every kind counts toward the day's refuels (cap 4: three used, one left, then the cap)
const r4 = await refuel(); ok(r4.o && !r4.o.none && r4.d && r4.d.ok, 'fourth refuel still served', JSON.stringify(r4.o && { none: r4.o.none, why: r4.o.why, house: r4.o.house }));
const r5 = await refuel(); ok(r5.o && r5.o.none && r5.o.why === 'cap', 'the fifth hits the daily cap (house and repeat visits count)', JSON.stringify(r5.o));
// 5. Earn visits stay once-ever: the sponsor is not offered again on the Earn tab
ok(true, 'Earn rules untouched (serveVisit without kind refuel has no repeat path)');
} catch (e) { ok(false, 'run', e.stack); }
cleanup();
console.log(fails ? fails + ' failure(s)' : 'all passed');
process.exit(fails ? 1 : 0);
+17
View File
@@ -17,6 +17,7 @@
# bash qa/run.sh override # level-4 override: week math, hunt, house, dust carry, cap, balance, two concurrent payers (fake chain + signer, throwaway data) # bash qa/run.sh override # level-4 override: week math, hunt, house, dust carry, cap, balance, two concurrent payers (fake chain + signer, throwaway data)
# bash qa/run.sh convpixel # conversion pixel: lsclk click ids on /api/ads/click, signed push to a MOCK LinkSpin, own-click self flag, Campaigns > Conversion tracking + cost per goal, LinkSpin down (local copy, throwaway data) # bash qa/run.sh convpixel # conversion pixel: lsclk click ids on /api/ads/click, signed push to a MOCK LinkSpin, own-click self flag, Campaigns > Conversion tracking + cost per goal, LinkSpin down (local copy, throwaway data)
# bash qa/run.sh fuel # Fuel Your Offers: refill notices, refuel streak, Refuel Kit, Engine Room (unit + two-copy tests, throwaway data) # bash qa/run.sh fuel # Fuel Your Offers: refill notices, refuel streak, Refuel Kit, Engine Room (unit + two-copy tests, throwaway data)
# bash qa/run.sh bixpay # BixPay card: partner-link validator, sponsor-follows resolver (own / level 3 / company), gate, click store (unit, no server; also runs in member)
# Each local run boots server.js on its own port with a throwaway data dir (JSON store, no DB, no # Each local run boots server.js on its own port with a throwaway data dir (JSON store, no DB, no
# mail key, devCode sign-in), so nothing touches production data. Reports land in qa/out/. # mail key, devCode sign-in), so nothing touches production data. Reports land in qa/out/.
set -u set -u
@@ -38,6 +39,19 @@ stop_local() { # $1 = port
rm -rf "$TMP-$1" rm -rf "$TMP-$1"
} }
# Syntax gate, every mode (2026-10-29): LinkSpin's /traffic-guide shipped with a parse error in its page script (a // comment
# inside a one-liner) and rendered empty for everyone for a day. node --check costs nothing and catches it before any walk.
syntax_gate() {
local bad=0 f
for f in *.js lib/*.js public/*.js public/assets/*.js; do
[ -f "$f" ] || continue
node --check "$f" 2>"$OUT/syntax.err" || { echo "[bug] SYNTAX $f :: $(grep -m1 -E 'Error' "$OUT/syntax.err")"; bad=1; }
done
rm -f "$OUT/syntax.err"
[ "$bad" = 0 ] && echo "syntax gate: every script parses" || status=1
}
syntax_gate
if [ "$MODE" = "public" ]; then if [ "$MODE" = "public" ]; then
node qa/walk.mjs public || status=1 node qa/walk.mjs public || status=1
node qa/chatbot-sync.mjs || status=1 node qa/chatbot-sync.mjs || status=1
@@ -45,6 +59,9 @@ elif [ "$MODE" = "member" ]; then
start_local 8796 && { LOCAL=http://127.0.0.1:8796 node qa/walk.mjs member || status=1; }; stop_local 8796 start_local 8796 && { LOCAL=http://127.0.0.1:8796 node qa/walk.mjs member || status=1; }; stop_local 8796
node qa/tank-hold.mjs || status=1 node qa/tank-hold.mjs || status=1
node qa/walletnudge.test.cjs || status=1 node qa/walletnudge.test.cjs || status=1
node qa/bixpay.test.cjs || status=1
elif [ "$MODE" = "bixpay" ]; then
node qa/bixpay.test.cjs || status=1
elif [ "$MODE" = "walletnudge" ]; then elif [ "$MODE" = "walletnudge" ]; then
node qa/walletnudge.test.cjs || status=1 node qa/walletnudge.test.cjs || status=1
elif [ "$MODE" = "tankhold" ]; then elif [ "$MODE" = "tankhold" ]; then
+61
View File
@@ -125,6 +125,67 @@ if (MODE === 'member' || MODE === 'all') {
await page.goto(LOCAL + '/my#games'); await page.reload({ waitUntil: 'load' }); await page.waitForTimeout(2500); await hide(page); // a hash-only goto would not reload the card await page.goto(LOCAL + '/my#games'); await page.reload({ waitUntil: 'load' }); await page.waitForTimeout(2500); await hide(page); // a hash-only goto would not reload the card
if (await page.evaluate(() => { const c = document.getElementById('gpCard'); return !!(c && !c.hidden); })) note('bug', L + 'my#games/gamepass', 'Game Pass card shows while gamePassEnabled is off'); if (await page.evaluate(() => { const c = document.getElementById('gpCard'); return !!(c && !c.hidden); })) note('bug', L + 'my#games/gamepass', 'Game Pass card shows while gamePassEnabled is off');
flush(bag, L + 'my#games/gamepass'); flush(bag, L + 'my#games/gamepass');
// BixPay card (2026-10-29): nothing while bixpayLive is off; once on: Wallet card, Overview card, Profile field (customer link refused,
// partner link saved, "Using: your link"), the Promo tab with posts + 4 banners + the tracked link, /bixpay 200 with the CTA, /go/bixpay 302s
const ADM = { Authorization: 'Bearer ' + (process.env.ADMIN_PASSWORD || 'localtest'), 'Content-Type': 'application/json' };
{
const B = L + 'bixpay';
const me0 = await page.evaluate(() => fetch('/api/me').then(r => r.json())); const tok = me0.username || me0.refCode;
await page.click('.bo-menu [data-pane="wallet"]'); await page.waitForTimeout(800);
if (await page.evaluate(() => { const c = document.getElementById('bixWalletCard'); return !!(c && !c.hidden); })) note('bug', B + '/off', 'Wallet card shows while bixpayLive is off');
if ((await page.request.get(LOCAL + '/bixpay')).status() !== 404) note('bug', B + '/off', '/bixpay served while bixpayLive is off');
await page.request.patch(LOCAL + '/api/admin/site', { headers: ADM, data: { bixpayLive: '1' } }).catch(() => {});
await page.goto(LOCAL + '/my#wallet'); await page.reload({ waitUntil: 'load' }); await page.waitForTimeout(2500); await hide(page);
const wc = await page.evaluate(() => { const c = document.getElementById('bixWalletCard'); return c && !c.hidden ? c.textContent : ''; });
if (!/Spend your POL anywhere with a BixPay Visa card/.test(wc) || !/3% per purchase, no load fee/.test(wc) || !/31 US states/.test(wc) || !/Using: the network link/.test(wc)) note('bug', B + '/wallet', 'Wallet card missing or wrong copy: ' + wc.slice(0, 120));
const goHref = await page.$eval('#bixWalletGo', e => e.getAttribute('href')).catch(() => '');
if (!/\/go\/bixpay\?s=wallet/.test(goHref)) note('bug', B + '/wallet', 'button is not the counted /go link: ' + goHref);
await domChecks(page, B + '/wallet'); await page.screenshot({ path: OUT + '/my-wallet-bixpay.png' }).catch(() => {});
await page.click('.bo-menu [data-pane="overview"]'); await page.waitForTimeout(800);
if (!(await page.evaluate(() => { const c = document.getElementById('bixCard'); return !!(c && !c.hidden && /Visa card for your POL/.test(c.textContent) && c.querySelector('.card-x')); }))) note('bug', B + '/overview', 'announcement card missing or not dismissable');
// profile: the customer link is refused, the partner link saves, the wallet card switches to "your link"
await page.click('.bo-menu [data-pane="profile"]'); await page.waitForTimeout(800); await hide(page);
if (!(await page.$('#pfBixCard:not([hidden])'))) note('bug', B + '/profile', 'BixPay card section hidden while live');
await page.fill('#pfBixLink', 'https://bix.ibportal.io/auth/register?e=boUGQ_dC9B472D9LGfzxPKvgfBw1iyqx-xffnx1kqPM&a=1&appId=3'); await page.click('#pfBixSave'); await page.waitForTimeout(900);
if (!/card-customer link/.test(await page.$eval('#pfBixStatus', e => e.textContent).catch(() => ''))) note('bug', B + '/profile', 'customer link (appId=3) was not refused with the message');
await page.fill('#pfBixLink', 'https://bix.ibportal.io/auth/register?e=QAwalkTOKENqawalkTOKENqawalkTOKENqawalkTOK&a=1'); await page.click('#pfBixSave'); await page.waitForTimeout(1200);
if (!/Saved/.test(await page.$eval('#pfBixStatus', e => e.textContent).catch(() => ''))) note('bug', B + '/profile', 'partner link did not save');
await page.screenshot({ path: OUT + '/my-profile-bixpay.png' }).catch(() => {});
const me2 = await page.evaluate(() => fetch('/api/me').then(r => r.json()));
if (!me2.bix || me2.bix.whose !== 'you' || !/e=QAwalkTOKEN/.test(me2.bix.link)) note('bug', B + '/api/me', 'resolved link is not the member’s own after saving: ' + JSON.stringify(me2.bix || {}).slice(0, 160));
await page.click('.bo-menu [data-pane="wallet"]'); await page.waitForTimeout(600);
if (!/Using: your link/.test(await page.$eval('#bixWalletCard', e => e.textContent).catch(() => ''))) note('bug', B + '/wallet', 'Wallet card did not switch to "Using: your link"');
// promo tab
await page.click('.bo-menu [data-pane="promo"]'); await page.waitForTimeout(600);
const bpill = await page.$('.promo-pills [data-promo="bixpay"]:not([hidden])'); if (!bpill) note('bug', B + '/promo', 'BixPay pill hidden while live');
else { await bpill.click(); await page.waitForTimeout(900);
const sec = await page.evaluate(() => { const s = document.getElementById('promo-bixpay'); return s && !s.hidden ? { posts: s.querySelectorAll('#bixPromoPosts .promo-block').length, swipe: s.querySelectorAll('#bixPromoSwipe .promo-block').length, banners: s.querySelectorAll('#bixPromoBanners .promo-block').length, link: document.getElementById('bixPromoLink').textContent, go: document.getElementById('bixPromoGo').textContent, text: s.textContent } : null; });
if (!sec) note('bug', B + '/promo', 'BixPay section did not show');
else { if (sec.posts !== 3 || sec.swipe !== 1 || sec.banners !== 4) note('bug', B + '/promo', 'expected 3 posts, 1 swipe, 4 banners; got ' + sec.posts + '/' + sec.swipe + '/' + sec.banners);
if (!/e=QAwalkTOKEN/.test(sec.link)) note('bug', B + '/promo', 'partner link box is not the member’s own');
if (!/\/go\/bixpay\?s=promo&m=/.test(sec.go)) note('bug', B + '/promo', 'tracked link missing: ' + sec.go);
if (/—/.test(sec.text)) note('bug', B + '/promo', 'em dash in BixPay promo copy'); }
await domChecks(page, B + '/promo'); await page.screenshot({ path: OUT + '/my-promo-bixpay.png', fullPage: true }).catch(() => {}); }
// the counted redirect + the public guide
const go = await page.request.get(LOCAL + '/go/bixpay?s=promo&m=' + tok, { maxRedirects: 0 });
if (go.status() !== 302 || !/e=QAwalkTOKEN/.test(go.headers().location || '')) note('bug', B + '/go', 'expected a 302 to the member’s partner link, got ' + go.status() + ' ' + (go.headers().location || ''));
const me3 = await page.evaluate(() => fetch('/api/me').then(r => r.json()));
if (!me3.bix || !me3.bix.clicks || !(me3.bix.clicks.promo >= 1)) note('bug', B + '/go', 'promo click was not counted for the member');
const gp = await page.request.get(LOCAL + '/bixpay?ref=' + tok); const gb = await gp.text();
if (gp.status() !== 200 || !/Get your BixPay card/.test(gb) || !/BixPay is a separate company/.test(gb)) note('bug', B + '/guide', '/bixpay did not serve with the CTA and the compliance box: ' + gp.status());
const pub = await (await page.request.get(LOCAL + '/api/public/bixpay?ref=' + tok)).json();
if (!pub.live || pub.whose !== 'you' || !/\/go\/bixpay\?s=guide&m=/.test(pub.go || '')) note('bug', B + '/guide', 'public resolver did not resolve the ?ref member: ' + JSON.stringify(pub).slice(0, 160));
const gctx = await browser.newContext({ viewport: { width: 1280, height: 900 } }); const gpage = await gctx.newPage(); const gbag = watch(gpage, LOCAL);
await gpage.goto(LOCAL + '/bixpay?ref=' + tok, { waitUntil: 'networkidle' }); await gpage.waitForTimeout(800);
await domChecks(gpage, B + '/guide'); flush(gbag, B + '/guide'); await gpage.screenshot({ path: OUT + '/bixpay-guide.png', fullPage: true }).catch(() => {}); await gctx.close();
// clean up: link removed, switch back off, everything hidden again
await page.evaluate(() => fetch('/api/my/bixpay', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: '{"link":""}' }).then(r => r.json())); // read the body before navigating, or the walk logs its own aborted request
await page.request.patch(LOCAL + '/api/admin/site', { headers: ADM, data: { bixpayLive: '0' } }).catch(() => {});
if ((await page.request.get(LOCAL + '/bixpay')).status() !== 404) note('bug', B + '/off', '/bixpay still served after switching off');
await page.goto(LOCAL + '/my#promo'); await page.reload({ waitUntil: 'load' }); await page.waitForTimeout(2500); await hide(page);
if (await page.$('.promo-pills [data-promo="bixpay"]:not([hidden])')) note('bug', B + '/off', 'BixPay pill still shows after switching off');
flush(bag, B); console.log('ok BixPay: wallet card, overview card, profile field, promo tab, /go, /bixpay');
}
await page.click('.bo-menu [data-pane="promo"]'); await page.waitForTimeout(800); await page.click('.bo-menu [data-pane="promo"]'); await page.waitForTimeout(800);
if (!(await page.$$('#promoPosts .promo-block')).length) note('bug', L + 'promo', 'no post cards rendered'); if (!(await page.$$('#promoPosts .promo-block')).length) note('bug', L + 'promo', 'no post cards rendered');
// viral links: the builder renders a ?ref= link; any page + ?ref=<member> redirects clean and sets the sponsor cookie; an unknown ref sets nothing // viral links: the builder renders a ?ref= link; any page + ?ref=<member> redirects clean and sets the sponsor cookie; an unknown ref sets nothing
+91 -14
View File
@@ -36,6 +36,7 @@ const walletnudge = require('./walletnudge');
const milestone = require('./milestone'); // players with POL waiting in the games and no wallet (2026-10-07) // holding tank: unsponsored free members, adoptions, pay-it-forward const milestone = require('./milestone'); // players with POL waiting in the games and no wallet (2026-10-07) // holding tank: unsponsored free members, adoptions, pay-it-forward
const legacy = require('./legacy'); // Faucet Wave / Tier One Ads bridge: welcome-back credits for listed emails const legacy = require('./legacy'); // Faucet Wave / Tier One Ads bridge: welcome-back credits for listed emails
const traffic = require('./traffic'); // public page views by referring domain (admin Traffic tab) const traffic = require('./traffic'); // public page views by referring domain (admin Traffic tab)
const BOT_UA = /bot|crawl|spider|slurp|facebookexternalhit|preview|monitor|wget|python-requests/i; // link previewers and crawlers: never a counted BixPay click (headless stays countable for the QA harness)
const loginShows = require('./loginshows'); // login-ad showings per day, dashboard vs games (2026-10-18) const loginShows = require('./loginshows'); // login-ad showings per day, dashboard vs games (2026-10-18)
const promos = require('./promos'); const promos = require('./promos');
const missedNotice = require('./missed'); // the whole-chain missed-payout notice // partner promo codes -> free ad credits (link ?promo=CODE or the dashboard box) const missedNotice = require('./missed'); // the whole-chain missed-payout notice // partner promo codes -> free ad credits (link ?promo=CODE or the dashboard box)
@@ -51,6 +52,7 @@ const lssync = require('./lssync');
const lsconv = require('./lsconv'); // conversion tracking: ad click ids pushed to LinkSpin + the member's goals (2026-10-23) const lsconv = require('./lsconv'); // conversion tracking: ad click ids pushed to LinkSpin + the member's goals (2026-10-23)
const lsinbound = require('./lsinbound'); // reverse registry sync: LinkSpin-first members arrive as waiting accounts (2026-10-15) const lsinbound = require('./lsinbound'); // reverse registry sync: LinkSpin-first members arrive as waiting accounts (2026-10-15)
const SF = require('./sponsorfollow'); // deliberate sponsor changes follow to LinkSpin until chain-bound + one network tank (2026-10-22) const SF = require('./sponsorfollow'); // deliberate sponsor changes follow to LinkSpin until chain-bound + one network tank (2026-10-22)
const bixpay = require('./bixpay'); // BixPay Visa card: partner-link field, sponsor-follows resolver, tracked clicks (2026-10-29, gated by site config bixpayLive)
let follow = null, followStore = null; let follow = null, followStore = null;
const LS_BASE = () => String(process.env.LS_URL || 'https://linkspin.app').replace(/\/+$/, ''); const LS_BASE = () => String(process.env.LS_URL || 'https://linkspin.app').replace(/\/+$/, '');
let activationCache = { at: 0, map: null }; let activationCache = { at: 0, map: null };
@@ -85,7 +87,7 @@ const supportbot = require('./supportbot'); // @CTBTickets_bot: ticket pings wit
const tickets = require('./tickets'); // help desk: member Help pane, public /support, chatbot hand-off, admin Support pane (Marty, 2026-10-16) const tickets = require('./tickets'); // help desk: member Help pane, public /support, chatbot hand-off, admin Support pane (Marty, 2026-10-16)
const pipeline = require('./pipeline'); // sponsor follow-up board (coming soon until site setting pipelineMode = on) (Marty, 2026-09-15) const pipeline = require('./pipeline'); // sponsor follow-up board (coming soon until site setting pipelineMode = on) (Marty, 2026-09-15)
const videomaker = require('./videomaker'); // Circuit tool: promo videos with the member's own end card (ffmpeg in the image) // badge-gated promo toolkit + AI Copy Engine (Surge and up) (Marty, 2026-09-14) // referral contest: /leaderboard, Overview card, weekly + monthly winners (Marty, 2026-09-14) // release notes + roadmap: /whats-new, Overview card, Admin > Releases (Marty, 2026-09-14) // blog -> Blotato -> X + Instagram on publish (Marty, 2026-09-13) // admin member card: search, drilldown, edits (Marty, 2026-09-13) // admin-written coaching articles, server-rendered public /blog with SEO metadata (Marty, 2026-09-12) const videomaker = require('./videomaker'); // Circuit tool: promo videos with the member's own end card (ffmpeg in the image) // badge-gated promo toolkit + AI Copy Engine (Surge and up) (Marty, 2026-09-14) // referral contest: /leaderboard, Overview card, weekly + monthly winners (Marty, 2026-09-14) // release notes + roadmap: /whats-new, Overview card, Admin > Releases (Marty, 2026-09-14) // blog -> Blotato -> X + Instagram on publish (Marty, 2026-09-13) // admin member card: search, drilldown, edits (Marty, 2026-09-13) // admin-written coaching articles, server-rendered public /blog with SEO metadata (Marty, 2026-09-12)
const TRAFFIC_PAGES = new Set(['/', '/ledger', '/contract', '/shorts', '/plays', '/wallets', '/launch', '/partners', '/earning', '/games', '/blog', '/whats-new', '/leaderboard', '/friday', '/wednesday', '/refuel', '/conversion-tracking', '/presentation', '/support']); const TRAFFIC_PAGES = new Set(['/', '/ledger', '/contract', '/shorts', '/plays', '/wallets', '/launch', '/partners', '/earning', '/games', '/blog', '/whats-new', '/leaderboard', '/friday', '/wednesday', '/refuel', '/conversion-tracking', '/presentation', '/support', '/bixpay']);
let tankWaitCache = null; // dashboard: who is waiting for a sponsor (refreshed every minute) let tankWaitCache = null; // dashboard: who is waiting for a sponsor (refreshed every minute)
const geo = require('./geo'); // viewer country -> tier (DB-IP lite), for campaign targeting const geo = require('./geo'); // viewer country -> tier (DB-IP lite), for campaign targeting
const burner = require('./burner'); // automatic on-chain credit burns (inert without ENGINE_KEY) const burner = require('./burner'); // automatic on-chain credit burns (inert without ENGINE_KEY)
@@ -551,7 +553,7 @@ async function boot() {
messages.init({ dataDir: DATA_DIR }); messages.init({ dataDir: DATA_DIR });
reports.init({ dataDir: DATA_DIR }); reports.init({ dataDir: DATA_DIR });
drip.init({ dataDir: DATA_DIR, mailer, accounts, chain, site: 'https://instantadpay.com' }); drip.init({ dataDir: DATA_DIR, mailer, accounts, chain, site: 'https://instantadpay.com' });
chatbot.init({ dataDir: DATA_DIR, chain, gameLive: slug => String(siteConfig().gamesLive == null ? 'polhunter' : siteConfig().gamesLive).split(',').map(x => x.trim().toLowerCase()).includes(slug), refuelOn: () => refuel.cfg().on, passTiers: () => { const c = gamepass.cfg(); return { on: c.enabled && c.tierSales, rows: gamepass.TIER_DEFS.filter(d => d.key !== 'weekly').map(d => ({ name: d.name, perks: d.perks, price: c.tiers[d.key].price, usd: c.tiers[d.key].price / 100, days: c.tiers[d.key].days, sale: c.tiers[d.key].sale })) }; } }); // pass tiers fact follows sovTiers (2026-10-22) chatbot.init({ dataDir: DATA_DIR, chain, bixLive: () => bixpay.live(), gameLive: slug => String(siteConfig().gamesLive == null ? 'polhunter' : siteConfig().gamesLive).split(',').map(x => x.trim().toLowerCase()).includes(slug), refuelOn: () => refuel.cfg().on, passTiers: () => { const c = gamepass.cfg(); return { on: c.enabled && c.tierSales, rows: gamepass.TIER_DEFS.filter(d => d.key !== 'weekly').map(d => ({ name: d.name, perks: d.perks, price: c.tiers[d.key].price, usd: c.tiers[d.key].price / 100, days: c.tiers[d.key].days, sale: c.tiers[d.key].sale })) }; } }); // pass tiers fact follows sovTiers (2026-10-22)
setTimeout(() => ads.dailySweep().catch(e => console.error('sweep', e.message)), 60 * 1000); setTimeout(() => ads.dailySweep().catch(e => console.error('sweep', e.message)), 60 * 1000);
setInterval(() => ads.dailySweep().catch(e => console.error('sweep', e.message)), 60 * 60 * 1000); setInterval(() => ads.dailySweep().catch(e => console.error('sweep', e.message)), 60 * 60 * 1000);
setInterval(() => ads.scheduleSweep().catch(e => console.error('schedule sweep', e.message)), 5 * 60 * 1000); // scheduled starts/ends setInterval(() => ads.scheduleSweep().catch(e => console.error('schedule sweep', e.message)), 5 * 60 * 1000); // scheduled starts/ends
@@ -650,6 +652,7 @@ async function boot() {
setInterval(() => lssync.tick().catch(e => console.error('lssync', e.message)), 2 * 60 * 1000); setInterval(() => lssync.tick().catch(e => console.error('lssync', e.message)), 2 * 60 * 1000);
setInterval(() => follow.retryPending().catch(e => console.error('sponsorfollow retry', e.message)), 2 * 60 * 1000); // follows waiting on a chain read or a sponsor account setInterval(() => follow.retryPending().catch(e => console.error('sponsorfollow retry', e.message)), 2 * 60 * 1000); // follows waiting on a chain read or a sponsor account
walletnudge.init({ dataDir: DATA_DIR, accounts, chain, mailer, optedIn: updates.optedIn, site: 'https://instantadpay.com', walletnudge.init({ dataDir: DATA_DIR, accounts, chain, mailer, optedIn: updates.optedIn, site: 'https://instantadpay.com',
bixLine: a => bixpay.nudgeLine(a ? (a.username || a.code) : ''), // one BixPay sentence in the nudge, only while bixpayLive (2026-10-29)
message: async (to, subject, html) => { await messages.deliver(1, ADMIN_EMAIL || 'house@instantadpay.com', [to], subject, html, 'notice'); } }); message: async (to, subject, html) => { await messages.deliver(1, ADMIN_EMAIL || 'house@instantadpay.com', [to], subject, html, 'notice'); } });
setTimeout(() => walletnudge.tick().catch(e => console.error('walletnudge', e.message)), 3 * 60 * 1000); // past the deploy overlap window setTimeout(() => walletnudge.tick().catch(e => console.error('walletnudge', e.message)), 3 * 60 * 1000); // past the deploy overlap window
setInterval(() => walletnudge.tick().catch(e => console.error('walletnudge', e.message)), 60 * 60 * 1000); setInterval(() => walletnudge.tick().catch(e => console.error('walletnudge', e.message)), 60 * 60 * 1000);
@@ -666,9 +669,10 @@ async function boot() {
} }
legacy.init({ dataDir: DATA_DIR }); legacy.init({ dataDir: DATA_DIR });
traffic.init({ dataDir: DATA_DIR }); traffic.init({ dataDir: DATA_DIR });
bixpay.init({ dataDir: DATA_DIR, accounts, siteConfig, refAccount });
loginShows.init({ dataDir: DATA_DIR }); loginShows.init({ dataDir: DATA_DIR });
promos.init({ dataDir: DATA_DIR }); promos.init({ dataDir: DATA_DIR });
blog.init({ dataDir: DATA_DIR }); blog.init({ dataDir: DATA_DIR, extraPages: () => bixpay.live() ? ['/bixpay'] : [] });
adminMember.init({ accounts, ads, chain, tank, legacy, promos, messages, dataDir: DATA_DIR }); adminMember.init({ accounts, ads, chain, tank, legacy, promos, messages, dataDir: DATA_DIR });
gamepass.init({ dataDir: DATA_DIR, siteConfig, accounts, marks, isProd: IS_PROD, persistedMap, polUsd: polUsdLive, gamepass.init({ dataDir: DATA_DIR, siteConfig, accounts, marks, isProd: IS_PROD, persistedMap, polUsd: polUsdLive,
blockTime: async n => { const blk = await chain.rpc('eth_getBlockByNumber', ['0x' + Number(n).toString(16), false]); return blk && blk.timestamp ? parseInt(blk.timestamp, 16) : 0; }, // a pass order is fulfilled only by a purchase mined after it blockTime: async n => { const blk = await chain.rpc('eth_getBlockByNumber', ['0x' + Number(n).toString(16), false]); return blk && blk.timestamp ? parseInt(blk.timestamp, 16) : 0; }, // a pass order is fulfilled only by a purchase mined after it
@@ -816,6 +820,10 @@ function siteConfig() {
// /join/<username> here, so shared links do not carry instantadpay.com (Spamhaus DBL). '' = old instantadpay.com/join links. // /join/<username> here, so shared links do not carry instantadpay.com (Spamhaus DBL). '' = old instantadpay.com/join links.
// Switch to the spare (mylinehq.com) if one gets flagged. Old links keep working either way. // Switch to the spare (mylinehq.com) if one gets flagged. Old links keep working either way.
shareDomain: 'ctbgo.com', shareDomain: 'ctbgo.com',
// BixPay Visa card (2026-10-29, docs/BIXPAY-INTEGRATION.md): '0' = nothing shows anywhere (no Profile field, Wallet card,
// Overview card, promo tab, /bixpay guide, chatbot says coming soon). bixCompanyLink = the network fallback partner link
// (Marty's own PARTNER link, IB12143793); bixpayLiveSince is stamped when the switch is flipped on (the Overview card runs a week).
bixpayLive: '0', bixCompanyLink: bixpay.DEFAULT_COMPANY_LINK, bixpayLiveSince: '',
pnlFixedMonthlyUsd: 0 pnlFixedMonthlyUsd: 0
}, saved); }, saved);
} }
@@ -1356,9 +1364,11 @@ async function emailOnEvent(ev) {
const pct = PCT[ev.tier] || 0; const pur = purchaseOf(ev.tx); const pct = PCT[ev.tier] || 0; const pur = purchaseOf(ev.tx);
let buyer = 'a member on your level ' + ev.tier; try { buyer = await memberLabel(ev.buyerId); } catch (e) {} let buyer = 'a member on your level ' + ev.tier; try { buyer = await memberLabel(ev.buyerId); } catch (e) {}
const pol = weiToPol(ev.amountWei); const pol = weiToPol(ev.amountWei);
// BixPay (2026-10-29): one sentence after the amount, the recipient's resolved partner link behind a counted /go link; only while live
let bixLine = ''; try { if (bixpay.live()) { const ra = await accounts.byMemberId(ev.recipientId); bixLine = bixpay.emailLine(ra ? (ra.username || ra.code) : ''); } } catch (e) { bixLine = ''; }
await tell(ev.recipientId, 'You just got paid ' + pol + ' POL on InstantAdPay', await tell(ev.recipientId, 'You just got paid ' + pol + ' POL on InstantAdPay',
buyer + ' just bought an ad package on your level ' + ev.tier + (pur ? ' ($' + (pur.priceCents / 100).toFixed(2).replace(/\.00$/, '') + ')' : '') + '. Your ' + pct + ' percent share, ' + pol + ' POL' + usdShare(pur, pct) + ', landed in your wallet in the same transaction' + (ev.hops ? ', passed up to you because someone between you was not qualified for this level' : '') + '.\n\n' + buyer + ' just bought an ad package on your level ' + ev.tier + (pur ? ' ($' + (pur.priceCents / 100).toFixed(2).replace(/\.00$/, '') + ')' : '') + '. Your ' + pct + ' percent share, ' + pol + ' POL' + usdShare(pur, pct) + ', landed in your wallet in the same transaction' + (ev.hops ? ', passed up to you because someone between you was not qualified for this level' : '') + '.\n\n' +
'Transaction: ' + txUrlOf(ev.tx) + '\n\nYour dashboard: https://instantadpay.com/my'); (bixLine ? bixLine + '\n\n' : '') + 'Transaction: ' + txUrlOf(ev.tx) + '\n\nYour dashboard: https://instantadpay.com/my');
} }
else if (ev.type === 'AwardPaid') { else if (ev.type === 'AwardPaid') {
const ov = override.txInfo(ev.tx); // a level-4 override payment from the weekly payer const ov = override.txInfo(ev.tx); // a level-4 override payment from the weekly payer
@@ -1505,10 +1515,15 @@ async function tankReadyTick() {
const clean = t => String(t || '').replace(/[<>&]/g, ''); const clean = t => String(t || '').replace(/[<>&]/g, '');
const link = 'https://instantadpay.com/my#line'; const link = 'https://instantadpay.com/my#line';
if (r.fresh.length <= 3) { if (r.fresh.length <= 3) {
for (const w of r.fresh) await telegramSend(sc.telegramEchoChatId, '\u{1F7E2} ' + (w.username ? '@' + clean(w.username) : 'A new member') + ' linked a wallet and is ready to switch on payouts. Adopt them from the holding tank in the next 24 hours: ' + link, sc.telegramEchoTopicId).catch(() => {}); // a fresh link says so; a wallet that predates this tank visit (a dormant member returned by a sponsor) says "already
// linked" with the last sign-in, so adopters can judge (Marty 2026-10-29: the old wording read as a live member)
const seen = ms => { try { return new Date(ms).toLocaleDateString('en-US', { month: 'short', day: 'numeric', timeZone: 'America/Chicago' }); } catch (e) { return ''; } };
for (const w of r.fresh) await telegramSend(sc.telegramEchoChatId, '\u{1F7E2} ' + (w.username ? '@' + clean(w.username) : 'A new member')
+ (w.linkedNow ? ' linked a wallet and is ready to switch on payouts. Adopt them from the holding tank in the next 24 hours: '
: ' is in the holding tank with a wallet already linked' + (w.lastSeen ? ' (last seen ' + seen(w.lastSeen) + ')' : '') + '. Adopt them in the next 24 hours: ') + link, sc.telegramEchoTopicId).catch(() => {});
} else { // first run after deploy (the members already linked) or a busy quarter hour: one digest, not a wall of posts } else { // first run after deploy (the members already linked) or a busy quarter hour: one digest, not a wall of posts
const named = r.fresh.filter(w => w.username).map(w => '@' + clean(w.username)); const named = r.fresh.filter(w => w.username).map(w => '@' + clean(w.username));
await telegramSend(sc.telegramEchoChatId, '\u{1F7E2} ' + r.fresh.length + ' members linked a wallet and are ready to switch on payouts' + (named.length ? ': ' + named.slice(0, 12).join(', ') + (named.length > 12 ? ' and ' + (named.length - 12) + ' more' : '') : '') + '. Adopt them from the holding tank in the next 24 hours: ' + link, sc.telegramEchoTopicId).catch(() => {}); await telegramSend(sc.telegramEchoChatId, '\u{1F7E2} ' + r.fresh.length + ' members in the holding tank have a wallet linked and are ready to switch on payouts' + (named.length ? ': ' + named.slice(0, 12).join(', ') + (named.length > 12 ? ' and ' + (named.length - 12) + ' more' : '') : '') + '. Adopt them from the holding tank in the next 24 hours: ' + link, sc.telegramEchoTopicId).catch(() => {});
} }
return r; return r;
} }
@@ -1879,8 +1894,8 @@ function doorHouseList() {
const l = ads.rates().doorHouseAds; const l = ads.rates().doorHouseAds;
return (Array.isArray(l) ? l : []).filter(x => x && String(x.name || '').trim() && /^https:\/\/[^\s"'<>]+$/i.test(String(x.url || ''))).slice(0, 20); return (Array.isArray(l) ? l : []).filter(x => x && String(x.name || '').trim() && /^https:\/\/[^\s"'<>]+$/i.test(String(x.url || ''))).slice(0, 20);
} }
async function doorHousePick(email, claimedUsername) { async function doorHousePick(email, claimedUsername, skipName) {
const list = doorHouseList(); if (!list.length) return null; const list = doorHouseList().filter(x => !skipName || String(x.name).toLowerCase() !== String(skipName).toLowerCase()); if (!list.length) return null;
const day = todayCT(); const prev = doorHouse.get(email) || {}; const shown = prev.day === day ? Object.assign({}, prev.shown) : {}; const day = todayCT(); const prev = doorHouse.get(email) || {}; const shown = prev.day === day ? Object.assign({}, prev.shown) : {};
const pool = list.length > 1 ? list.filter(x => x.name !== prev.last) : list; const pool = list.length > 1 ? list.filter(x => x.name !== prev.last) : list;
const h = pool.slice().sort((a, b) => (shown[a.name] || 0) - (shown[b.name] || 0))[0]; // never shown today sorts first, list order breaks ties const h = pool.slice().sort((a, b) => (shown[a.name] || 0) - (shown[b.name] || 0))[0]; // never shown today sorts first, list order breaks ties
@@ -2240,6 +2255,7 @@ const server = http.createServer(async (req, res) => {
// -- the pages a member can turn into a viral link (promo tools > Viral links) // -- the pages a member can turn into a viral link (promo tools > Viral links)
if (p === '/api/pages' && req.method === 'GET') { if (p === '/api/pages' && req.method === 'GET') {
const pages = [{ path: '/', title: 'Home page' }, { path: '/blog', title: 'Blog' }, { path: '/earning', title: 'How earning works' }, { path: '/games', title: 'Games that pay POL' }, { path: '/ledger', title: 'Live ledger' }, { path: '/leaderboard', title: 'Leaderboard' }, { path: '/contract', title: 'The contract' }, { path: '/plays', title: 'Team-building plays' }, { path: '/wallets', title: 'Wallet guide' }, { path: '/friday', title: 'Five Dollar Friday' }, { path: '/refuel', title: 'Fuel Your Offers: the Monthly Refuel guide' }, { path: '/conversion-tracking', title: 'Conversion tracking: how to set it up' }, { path: '/whats-new', title: "What's new" }, { path: '/shorts', title: 'Shorts' }, { path: '/presentation', title: 'The presentation (narrated video)' }]; const pages = [{ path: '/', title: 'Home page' }, { path: '/blog', title: 'Blog' }, { path: '/earning', title: 'How earning works' }, { path: '/games', title: 'Games that pay POL' }, { path: '/ledger', title: 'Live ledger' }, { path: '/leaderboard', title: 'Leaderboard' }, { path: '/contract', title: 'The contract' }, { path: '/plays', title: 'Team-building plays' }, { path: '/wallets', title: 'Wallet guide' }, { path: '/friday', title: 'Five Dollar Friday' }, { path: '/refuel', title: 'Fuel Your Offers: the Monthly Refuel guide' }, { path: '/conversion-tracking', title: 'Conversion tracking: how to set it up' }, { path: '/whats-new', title: "What's new" }, { path: '/shorts', title: 'Shorts' }, { path: '/presentation', title: 'The presentation (narrated video)' }];
if (bixpay.live()) pages.push({ path: '/bixpay', title: 'BixPay: a Visa card for your POL' }); // the guide resolves the sharer's partner link from ?ref (2026-10-29)
try { for (const b of (await blog.listPublished()).slice(0, 40)) pages.push({ path: '/blog/' + b.slug, title: 'Article: ' + b.title, cover: b.cover || null }); } catch (e) {} try { for (const b of (await blog.listPublished()).slice(0, 40)) pages.push({ path: '/blog/' + b.slug, title: 'Article: ' + b.title, cover: b.cover || null }); } catch (e) {}
return json(res, 200, { pages }); return json(res, 200, { pages });
} }
@@ -2786,6 +2802,9 @@ const server = http.createServer(async (req, res) => {
socials: (acct && acct.socials) || null, socials: (acct && acct.socials) || null,
wallOffers: parseWallOffers(acct), wallOffers: parseWallOffers(acct),
lineBannerUrl: (acct && acct.lineBannerUrl) || null, lineTargetUrl: (acct && acct.lineTargetUrl) || null }; lineBannerUrl: (acct && acct.lineBannerUrl) || null, lineTargetUrl: (acct && acct.lineTargetUrl) || null };
// BixPay (2026-10-29): the member's own partner link plus the one their pages resolve to (own > sponsor chain > network)
if (bixpay.live()) { try { const r = await bixpay.resolve(acct); const tok = (acct && (acct.username || acct.code)) || ''; out.bix = { live: true, own: (acct && acct.bixPartnerLink) || null, link: r.link, whose: r.whose, name: r.name, using: bixpay.usingLine(r), go: { wallet: bixpay.goLink('wallet'), overview: bixpay.goLink('overview'), promo: bixpay.goLink('promo', tok) }, announce: bixpay.announcing(), clicks: bixpay.memberClicks(acct && acct.email) }; } catch (e) { out.bix = { live: true, error: true }; } }
else out.bix = { live: false };
if (memberId) { if (memberId) {
try { try {
const mm = await chain.member(memberId); const mm = await chain.member(memberId);
@@ -3325,6 +3344,14 @@ const server = http.createServer(async (req, res) => {
return json(res, 404, { error: 'unknown op' }); return json(res, 404, { error: 'unknown op' });
} }
// -- the Engine Room, partner side: this site's facts for one member + the streak (LinkSpin builds its own panel from them) // -- the Engine Room, partner side: this site's facts for one member + the streak (LinkSpin builds its own panel from them)
// -- BixPay link for one member, the same resolver (own > sponsor chain > network), for LinkSpin / CTB cards (2026-10-29, read-only there)
if (p === '/api/partner/bixpay' && req.method === 'POST') {
const sg = await readLsSigned(req, 64000); if (!sg.body) return json(res, sg.status, { error: sg.error });
const email = String(sg.body.email || '').trim().toLowerCase(); if (!email) return json(res, 400, { error: 'Which member?' });
if (!bixpay.live()) return json(res, 200, { ok: true, live: false });
const a = await accounts.byEmail(email); const r = await bixpay.resolve(a);
return json(res, 200, { ok: true, live: true, own: (a && a.bixPartnerLink) || null, link: r.link, whose: r.whose, name: r.name, using: bixpay.usingLine(r), editUrl: 'https://instantadpay.com/my#profile', guide: 'https://instantadpay.com/bixpay' });
}
if (p === '/api/partner/engine' && req.method === 'POST') { if (p === '/api/partner/engine' && req.method === 'POST') {
const sg = await readLsSigned(req, 64000); if (!sg.body) return json(res, sg.status, { error: sg.error }); const sg = await readLsSigned(req, 64000); if (!sg.body) return json(res, sg.status, { error: sg.error });
const email = String(sg.body.email || '').trim().toLowerCase(); if (!email) return json(res, 400, { error: 'Which member?' }); const email = String(sg.body.email || '').trim().toLowerCase(); if (!email) return json(res, 400, { error: 'Which member?' });
@@ -3415,6 +3442,7 @@ const server = http.createServer(async (req, res) => {
if (p === '/api/admin/traffic' && req.method === 'GET') { if (p === '/api/admin/traffic' && req.method === 'GET') {
if (!isAdmin(req)) return json(res, 401, { error: 'auth' }); if (!isAdmin(req)) return json(res, 401, { error: 'auth' });
const days = Math.min(365, Math.max(1, Number(u.searchParams.get('days')) || 30)); const days = Math.min(365, Math.max(1, Number(u.searchParams.get('days')) || 30));
const bix = bixpay.adminView(days); try { for (const m of bix.members) { const a = await accounts.byEmail(m.email); m.name = a ? (a.username ? '@' + a.username : a.email) : m.email; } } catch (e) {} // BixPay clicks per surface and per member (2026-10-29)
const since = Date.now() - days * 86400000, sinceDay = new Date(since).toISOString().slice(0, 10); const since = Date.now() - days * 86400000, sinceDay = new Date(since).toISOString().slice(0, 10);
const hosts = {}, paths = {}, daily = {}, angles = {}; const hosts = {}, paths = {}, daily = {}, angles = {};
const H = k => (hosts[k] = hosts[k] || { source: k, hits: 0, joinViews: 0, signups: 0, registered: 0, buyers: 0 }); const H = k => (hosts[k] = hosts[k] || { source: k, hits: 0, joinViews: 0, signups: 0, registered: 0, buyers: 0 });
@@ -3429,7 +3457,7 @@ const server = http.createServer(async (req, res) => {
const k = a.joinedVia || 'plain'; angles[k] = angles[k] || { angle: k, views: 0, signups: 0 }; angles[k].signups += 1; const k = a.joinedVia || 'plain'; angles[k] = angles[k] || { angle: k, views: 0, signups: 0 }; angles[k].signups += 1;
} }
const sources = Object.values(hosts).sort((x, y) => (y.hits + y.joinViews + y.signups * 10) - (x.hits + x.joinViews + x.signups * 10)); const sources = Object.values(hosts).sort((x, y) => (y.hits + y.joinViews + y.signups * 10) - (x.hits + x.joinViews + x.signups * 10));
return json(res, 200, { starter: starter.adminView(), days, sources, paths: Object.entries(paths).map(([path, hits]) => ({ path, hits })).sort((x, y) => y.hits - x.hits), return json(res, 200, { starter: starter.adminView(), bixpay: Object.assign(bix, { live: bixpay.live() }), days, sources, paths: Object.entries(paths).map(([path, hits]) => ({ path, hits })).sort((x, y) => y.hits - x.hits),
angles: Object.values(angles).sort((x, y) => y.views - x.views), daily: Object.values(daily).sort((x, y) => x.day < y.day ? -1 : 1), angles: Object.values(angles).sort((x, y) => y.views - x.views), daily: Object.values(daily).sort((x, y) => x.day < y.day ? -1 : 1),
totals: { hits: sources.reduce((n, s) => n + s.hits, 0), joinViews: sources.reduce((n, s) => n + s.joinViews, 0), signups: sources.reduce((n, s) => n + s.signups, 0), buyers: sources.reduce((n, s) => n + s.buyers, 0) } }); totals: { hits: sources.reduce((n, s) => n + s.hits, 0), joinViews: sources.reduce((n, s) => n + s.joinViews, 0), signups: sources.reduce((n, s) => n + s.signups, 0), buyers: sources.reduce((n, s) => n + s.buyers, 0) } });
} }
@@ -3964,18 +3992,24 @@ const server = http.createServer(async (req, res) => {
const email = String(c.email).toLowerCase(); const email = String(c.email).toLowerCase();
const status = await ads.visitStatus(email, 'refuel'); // refuels have their own daily allowance const status = await ads.visitStatus(email, 'refuel'); // refuels have their own daily allowance
if (status.count >= status.cap) return json(res, 200, Object.assign({ none: true, why: 'cap', ret: c.ret }, G)); if (status.count >= status.cap) return json(res, 200, Object.assign({ none: true, why: 'cap', ret: c.ret }, G));
const ad = await ads.serveVisit(email, viewerGeo(req)); // 2026-10-28 (Marty): a sponsor never seen first, then one seen longest ago after the cooldown (doorRepeatDays), then a
// member video, then a house sponsor (one of Marty's programs, never the game the player is in), so the visit is never empty
const ad = await ads.serveVisit(email, viewerGeo(req), { kind: 'refuel' });
if (ad) t = { kind: 'visit', email, memberId: Number(c.memberId), id: ad.id, title: ad.title, target: ad.target, ts: Date.now(), ret: c.ret, challenge: null, done: false }; if (ad) t = { kind: 'visit', email, memberId: Number(c.memberId), id: ad.id, title: ad.title, target: ad.target, ts: Date.now(), ret: c.ret, challenge: null, done: false };
else { // every visit pack already visited: a member video ad instead (2026-09-30) else { // every visit pack already visited: a member video ad instead (2026-09-30)
const v = await ads.serveVideo(Object.assign({ excludeEmail: email, refuel: true }, viewerGeo(req))); const v = await ads.serveVideo(Object.assign({ excludeEmail: email, refuel: true }, viewerGeo(req)));
if (!v) return json(res, 200, Object.assign({ none: true, why: 'empty', ret: c.ret }, G)); if (!v) {
t = { kind: 'video', email, memberId: Number(c.memberId), id: v.id, title: v.title, videoUrl: v.videoUrl, secs: v.watchSecs, width: v.width, height: v.height, ts: Date.now(), ret: c.ret, challenge: null, done: false }; const h = await doorHousePick(email, c.username, G.game);
if (!h) return json(res, 200, Object.assign({ none: true, why: 'empty', ret: c.ret }, G));
t = { kind: 'house', email, memberId: Number(c.memberId), id: 0, program: h.name, title: h.title, target: h.target, ts: Date.now(), ret: c.ret, challenge: null, done: false };
}
else t = { kind: 'video', email, memberId: Number(c.memberId), id: v.id, title: v.title, videoUrl: v.videoUrl, secs: v.watchSecs, width: v.width, height: v.height, ts: Date.now(), ret: c.ret, challenge: null, done: false };
} }
t.game = game; t.cb = c.cb || null; t.game = game; t.cb = c.cb || null;
refuelTokens.set(c.nonce, t); refuelTokens.set(c.nonce, t);
} }
if (t.kind === 'video') return json(res, 200, Object.assign({ mode: 'video', title: t.title, video: { url: t.videoUrl, width: t.width, height: t.height }, dwell: t.secs, ret: t.ret, elapsed: Math.floor((Date.now() - t.ts) / 1000) }, G)); if (t.kind === 'video') return json(res, 200, Object.assign({ mode: 'video', title: t.title, video: { url: t.videoUrl, width: t.width, height: t.height }, dwell: t.secs, ret: t.ret, elapsed: Math.floor((Date.now() - t.ts) / 1000) }, G));
return json(res, 200, Object.assign({ mode: 'visit', title: t.title, target: t.target, dwell: ads.rates().visitDwellSeconds || 8, ret: t.ret, elapsed: Math.floor((Date.now() - t.ts) / 1000) }, G)); return json(res, 200, Object.assign({ mode: 'visit', house: t.kind === 'house' || undefined, title: t.title, target: t.target, dwell: ads.rates().visitDwellSeconds || 8, ret: t.ret, elapsed: Math.floor((Date.now() - t.ts) / 1000) }, G));
} }
if (p === '/api/refuel/challenge' && req.method === 'GET') { if (p === '/api/refuel/challenge' && req.method === 'GET') {
const t = refuelTokens.get(String(u.searchParams.get('n') || '')); const t = refuelTokens.get(String(u.searchParams.get('n') || ''));
@@ -3998,6 +4032,10 @@ const server = http.createServer(async (req, res) => {
const tier = await ads.chargeVideoView(t.id); // the advertiser is charged one view, as on the Watch tab const tier = await ads.chargeVideoView(t.id); // the advertiser is charged one view, as on the Watch tab
if (!tier) return json(res, 400, { error: 'That video just ran out of budget. Go back and try again.' }); if (!tier) return json(res, 400, { error: 'That video just ran out of budget. Go back and try again.' });
await ads.markVideoSeen(t.email, t.id); credits = tier.cost; await ads.markVideoSeen(t.email, t.id); credits = tier.cost;
} else if (t.kind === 'house') { // a house sponsor: no advertiser, no pool income, but it is one of the day's refuels
const r = await ads.markHouseVisit(t.email, 'refuel');
if (r.error) return json(res, 400, { error: r.error });
credits = 0;
} else { } else {
const r = await ads.completeVisit(t.email, t.id, { reward: false, note: t.game === 'polminer' ? 'POL Miner supply crate' : t.game === 'polybreak' ? 'PolyBreak paddle' : t.game === 'gemkingdom' ? 'Gem Kingdom continue' : t.game === 'seek' ? 'ClutterHunt hint' : t.game === 'spellwheel' ? 'SpellWheel hint' : 'Drip Runner refuel' }); const r = await ads.completeVisit(t.email, t.id, { reward: false, note: t.game === 'polminer' ? 'POL Miner supply crate' : t.game === 'polybreak' ? 'PolyBreak paddle' : t.game === 'gemkingdom' ? 'Gem Kingdom continue' : t.game === 'seek' ? 'ClutterHunt hint' : t.game === 'spellwheel' ? 'SpellWheel hint' : 'Drip Runner refuel' });
if (r.error) return json(res, 400, r); if (r.error) return json(res, 400, r);
@@ -4616,6 +4654,31 @@ const server = http.createServer(async (req, res) => {
const r = await accounts.setProfile(s.email, avatar, bio, socials); const r = await accounts.setProfile(s.email, avatar, bio, socials);
return json(res, r.error ? 400 : 200, r); return json(res, r.error ? 400 : 200, r);
} }
// -- BixPay partner link (2026-10-29): Profile > BixPay card. Validated (bix.ibportal.io/auth/register, e=, a=1; the
// appId=3 card-customer link is refused with a message); empty clears it. Rides to LinkSpin in the profile row.
if (p === '/api/my/bixpay' && req.method === 'POST') {
const s = await auth.fromRequest(req);
if (!s || !s.email) return json(res, 401, { error: 'Sign in first.' });
if (!bixpay.live()) return json(res, 404, { error: 'Not open yet.' });
const b = await readBody(req);
const raw = String(b.link == null ? '' : b.link).trim();
if (!raw) { const r = await accounts.setBixLink(s.email, null); if (r.error) return json(res, 400, r); const rs = await bixpay.resolve(r.account); return json(res, 200, { ok: true, own: null, link: rs.link, whose: rs.whose, name: rs.name, using: bixpay.usingLine(rs) }); }
const v = bixpay.validate(raw);
if (!v.ok) return json(res, 400, { error: v.error, customerLink: v.error === bixpay.CUSTOMER_LINK_MSG });
const r = await accounts.setBixLink(s.email, v.link);
if (r.error) return json(res, 400, r);
return json(res, 200, { ok: true, own: v.link, link: v.link, whose: 'you', name: null, using: bixpay.usingLine({ whose: 'you' }) });
}
// -- the /bixpay guide's CTA: the viewer's resolved link (their own when signed in, else the ?ref / sponsor cookie's member, else network)
if (p === '/api/public/bixpay' && req.method === 'GET') {
if (!bixpay.live()) return json(res, 200, { live: false });
const s = await auth.fromRequest(req).catch(() => null);
let acct = (s && s.email && await accounts.byEmail(s.email)) || null;
const tok = String(u.searchParams.get('ref') || '').trim().toLowerCase().slice(0, 40) || String(parseCookies(req)['iap.sponsor'] || '').trim().toLowerCase().slice(0, 40);
const r = acct ? await bixpay.resolve(acct) : await bixpay.resolveRef(tok);
const owner = acct || (tok ? await refAccount(tok).catch(() => null) : null);
return json(res, 200, { live: true, whose: r.whose, name: r.name, using: bixpay.usingLine(r), go: bixpay.goLink('guide', owner ? (owner.username || owner.code) : ''), promoGo: owner ? bixpay.goLink('promo', owner.username || owner.code) : null, signedIn: !!acct });
}
// -- wall positions 2 & 3: the member's own offers, unlocked at 2 / 5 qualifying buyers // -- wall positions 2 & 3: the member's own offers, unlocked at 2 / 5 qualifying buyers
if (p === '/api/my/wall-offers' && req.method === 'POST') { if (p === '/api/my/wall-offers' && req.method === 'POST') {
const s = await auth.fromRequest(req); const s = await auth.fromRequest(req);
@@ -5242,7 +5305,8 @@ const server = http.createServer(async (req, res) => {
for (const c of camps) { byStatus[c.status] = (byStatus[c.status] || 0) + 1; byType[c.type] = (byType[c.type] || 0) + 1; } for (const c of camps) { byStatus[c.status] = (byStatus[c.status] || 0) + 1; byType[c.type] = (byType[c.type] || 0) + 1; }
let memberCount = null; try { memberCount = await chain.memberCount(); } catch (e) {} let memberCount = null; try { memberCount = await chain.memberCount(); } catch (e) {}
const cc = chain.getConfig(); const cc = chain.getConfig();
return json(res, 200, { accounts: await accounts.count(), memberCount, campaigns: camps.length, let bixLinks = 0; try { bixLinks = (await accounts.listAll(100000)).filter(a => a.bixPartnerLink).length; } catch (e) {} // members with a BixPay partner link (2026-10-29)
return json(res, 200, { accounts: await accounts.count(), memberCount, campaigns: camps.length, bixLinks, bixpayLive: bixpay.live(),
house: camps.filter(c => c.house).length, byStatus, byType, house: camps.filter(c => c.house).length, byStatus, byType,
openReports: await reports.openCount(), pendingBurns: (await ads.pendingBurns()).length, openReports: await reports.openCount(), pendingBurns: (await ads.pendingBurns()).length,
followups: await drip.stats(), followups: await drip.stats(),
@@ -5598,6 +5662,8 @@ const server = http.createServer(async (req, res) => {
if (!isAdmin(req)) return json(res, 401, { error: 'auth' }); if (!isAdmin(req)) return json(res, 401, { error: 'auth' });
const b = await readBody(req); const b = await readBody(req);
const cur = siteConfig(); const cur = siteConfig();
if (b.bixCompanyLink !== undefined && String(b.bixCompanyLink || '').trim()) { const v = bixpay.validate(b.bixCompanyLink); if (!v.ok) return json(res, 400, { error: 'bixCompanyLink: ' + v.error }); b.bixCompanyLink = v.link; }
if (String(b.bixpayLive) === '1' && String(cur.bixpayLive) !== '1' && !String(cur.bixpayLiveSince || '').trim()) b.bixpayLiveSince = new Date().toISOString(); // the Overview announcement runs a week from the flip
fs.writeFileSync(SITE_FILE, JSON.stringify(Object.assign(cur, b), null, 2)); fs.writeFileSync(SITE_FILE, JSON.stringify(Object.assign(cur, b), null, 2));
return json(res, 200, { ok: true, site: siteConfig() }); return json(res, 200, { ok: true, site: siteConfig() });
} }
@@ -5689,6 +5755,17 @@ const server = http.createServer(async (req, res) => {
if (p === '/friday') return sendFile(res, path.join(PUBLIC_DIR, 'friday.html')); if (p === '/friday') return sendFile(res, path.join(PUBLIC_DIR, 'friday.html'));
if (p === '/wednesday') return sendFile(res, path.join(PUBLIC_DIR, 'wednesday.html')); if (p === '/wednesday') return sendFile(res, path.join(PUBLIC_DIR, 'wednesday.html'));
if (p === '/conversion-tracking') return sendFile(res, path.join(PUBLIC_DIR, 'conversion-tracking.html')); // how to set up the conversion pixel, the member guide (2026-10-24) if (p === '/conversion-tracking') return sendFile(res, path.join(PUBLIC_DIR, 'conversion-tracking.html')); // how to set up the conversion pixel, the member guide (2026-10-24)
if (p === '/bixpay') { if (!bixpay.live()) { res.writeHead(404, baseHeaders({ 'Content-Type': 'text/plain' })); return res.end('Not found'); } return sendFile(res, path.join(PUBLIC_DIR, 'bixpay.html')); } // the BixPay card guide (2026-10-29), public once bixpayLive is on
// counted BixPay click: every surface links here; resolves the member's link (own > sponsor chain > network) and 302s to it
if (p === '/go/bixpay') {
if (!bixpay.live()) { res.writeHead(302, baseHeaders({ Location: '/' })); return res.end(); }
const surface = String(u.searchParams.get('s') || 'other').trim().toLowerCase().slice(0, 12);
const tok = String(u.searchParams.get('m') || '').trim().toLowerCase().slice(0, 40);
let acct = null; try { if (tok) acct = await refAccount(tok); if (!acct) { const s = await auth.fromRequest(req); if (s && s.email) acct = await accounts.byEmail(s.email); } if (!acct) { const ck = String(parseCookies(req)['iap.sponsor'] || '').trim().toLowerCase(); if (ck) acct = await refAccount(ck); } } catch (e) { acct = null; }
const r = await bixpay.resolve(acct);
if (!BOT_UA.test(String(req.headers['user-agent'] || ''))) bixpay.click(surface, acct ? acct.email : null);
res.writeHead(302, baseHeaders({ Location: r.link, 'Cache-Control': 'no-store' })); return res.end();
}
if (p === '/refuel') return sendFile(res, path.join(PUBLIC_DIR, u.searchParams.has('t') ? 'refuel.html' : 'refuel-guide.html')); // ?t=<token>: the games' refuel visit (2026-09-30); no token: the Fuel Your Offers member guide (2026-10-24) if (p === '/refuel') return sendFile(res, path.join(PUBLIC_DIR, u.searchParams.has('t') ? 'refuel.html' : 'refuel-guide.html')); // ?t=<token>: the games' refuel visit (2026-09-30); no token: the Fuel Your Offers member guide (2026-10-24)
if (p === '/door') return sendFile(res, path.join(PUBLIC_DIR, 'door.html')); // Spooky Doors door visit (2026-10-02) if (p === '/door') return sendFile(res, path.join(PUBLIC_DIR, 'door.html')); // Spooky Doors door visit (2026-10-02)
// per-partner kit pages (Marty, 2026-09-29): /partners/<slug> serves public/kits/<slug>.html, one file per reviewer or site owner // per-partner kit pages (Marty, 2026-09-29): /partners/<slug> serves public/kits/<slug>.html, one file per reviewer or site owner
+4 -1
View File
@@ -474,7 +474,10 @@ async function readyTick() {
if (await alignToNetwork(a).catch(() => null)) { aligned++; continue; } if (await alignToNetwork(a).catch(() => null)) { aligned++; continue; }
if (remoteOpen(a.email)) continue; if (remoteOpen(a.email)) continue;
const rec = markReady(a); const rec = markReady(a);
if (rec && !rec.notified) { rec.notified = clock(); fresh.push({ email: a.email, name: nameOf(a), username: a.username || null, until: rec.readyAt + READY_MS }); } // linkedNow: the member was on the site when they became ready, so they linked the wallet just now; otherwise the
// wallet predates this tank visit (e.g. a dormant member returned by a sponsor; Marty 2026-10-29: the notice read as a
// fresh link) and the notice says so, with their last sign-in
if (rec && !rec.notified) { rec.notified = clock(); fresh.push({ email: a.email, name: nameOf(a), username: a.username || null, until: rec.readyAt + READY_MS, lastSeen: a.lastSeen || 0, linkedNow: (a.lastSeen || 0) >= rec.readyAt - 15 * 60 * 1000 }); }
} }
RS.save(); RS.save();
const auto = await autoAssign(); const auto = await autoAssign();
+97
View File
@@ -0,0 +1,97 @@
# BixPay promo banners (2026-10-29): four text-only sizes for Promo tools > BixPay. No BIX logo (brand rules not confirmed),
# the "crypto Visa card" angle in the game-banner style: deep green, mint accent, Sora-like bold display text, a card motif
# drawn with shapes. Run: python tools/gen-bixpay-banners.py <outdir> then upload to Spaces game-banners/bixpay/.
# Copy rules: no income promises, the one fee line, no em dashes.
import sys, os
from PIL import Image, ImageDraw, ImageFont
OUT = sys.argv[1] if len(sys.argv) > 1 else "D:/tmp/bixpay-banners"
os.makedirs(OUT, exist_ok=True)
GREEN = (4, 59, 47); DEEP = (3, 38, 31); MINT = (67, 232, 195); INK = (236, 248, 243); MUTED = (170, 205, 194); AMBER = (255, 178, 56)
FONTS = ["C:/Windows/Fonts/segoeuib.ttf", "C:/Windows/Fonts/arialbd.ttf"]
FONT_R = ["C:/Windows/Fonts/segoeui.ttf", "C:/Windows/Fonts/arial.ttf"]
def font(size, bold=True):
for p in (FONTS if bold else FONT_R):
if os.path.exists(p): return ImageFont.truetype(p, size)
return ImageFont.load_default()
def bg(w, h):
im = Image.new("RGB", (w, h), GREEN)
d = ImageDraw.Draw(im)
# soft diagonal band
for i in range(h):
t = i / max(1, h - 1)
c = tuple(int(GREEN[k] * (1 - t) + DEEP[k] * t) for k in range(3))
d.line([(0, i), (w, i)], fill=c)
return im
def card(d, x, y, w, h):
# a plain card shape: rounded rectangle, a chip, a stripe. No brand marks.
d.rounded_rectangle((x, y, x + w, y + h), radius=int(h * 0.12), fill=MINT)
d.rounded_rectangle((x + w * 0.08, y + h * 0.32, x + w * 0.26, y + h * 0.56), radius=int(h * 0.05), fill=(214, 182, 90))
d.rounded_rectangle((x + w * 0.08, y + h * 0.70, x + w * 0.62, y + h * 0.78), radius=int(h * 0.03), fill=(6, 60, 48))
d.ellipse((x + w * 0.70, y + h * 0.62, x + w * 0.84, y + h * 0.86), fill=(6, 60, 48))
d.ellipse((x + w * 0.79, y + h * 0.62, x + w * 0.93, y + h * 0.86), outline=(6, 60, 48), width=max(2, int(h * 0.03)))
def text_w(d, s, f):
b = d.textbbox((0, 0), s, font=f); return b[2] - b[0], b[3] - b[1]
def fit(d, s, maxw, start, bold=True, floor=10):
sz = start
while sz > floor:
f = font(sz, bold)
if text_w(d, s, f)[0] <= maxw: return f
sz -= 1
return font(floor, bold)
def pill(d, x, y, s, f, pad=10):
# the text's bbox offsets (Segoe sits a few px below the origin) are subtracted so the label is centred in the pill
b = d.textbbox((0, 0), s, font=f); tw, th = b[2] - b[0], b[3] - b[1]
d.rounded_rectangle((x, y, x + tw + pad * 2, y + th + pad * 2), radius=(th + pad * 2) // 2, fill=MINT)
d.text((x + pad - b[0], y + pad - b[1]), s, font=f, fill=(4, 30, 24))
return tw + pad * 2
def pill_size(d, s, f, pad=10):
b = d.textbbox((0, 0), s, font=f); return b[2] - b[0] + pad * 2, b[3] - b[1] + pad * 2
def leaderboard(w, h): # 728x90, 468x60
im = bg(w, h); d = ImageDraw.Draw(im)
ch = int(h * 0.62); cw = int(ch * 1.58); cx = int(h * 0.18); cy = (h - ch) // 2
card(d, cx, cy, cw, ch)
x = cx + cw + int(h * 0.22)
head = "A Visa card for your crypto"
f1 = fit(d, head, w * 0.52, int(h * 0.30)); d.text((x, int(h * 0.12)), head, font=f1, fill=INK)
sub = "Spend POL anywhere Visa is accepted. 3% per purchase, no load fee."
f2 = fit(d, sub, w * 0.55, int(h * 0.17), bold=False); d.text((x, int(h * 0.56)), sub, font=f2, fill=MUTED)
f3 = font(int(h * 0.19)); s = "Get the card"; pad = int(h * 0.09)
pw, ph = pill_size(d, s, f3, pad); pill(d, w - pw - int(h * 0.18), (h - ph) // 2, s, f3, pad=pad)
return im
def rectangle(w, h): # 300x250
im = bg(w, h); d = ImageDraw.Draw(im)
f0 = font(12); d.text((18, 16), "CRYPTO VISA CARD", font=f0, fill=MINT)
cw = 118; ch = 74; card(d, w - cw - 18, 14, cw, ch)
head = "Spend your POL\nanywhere"
f1 = font(26); d.multiline_text((18, 96), head, font=f1, fill=INK, spacing=0)
sub = "A self-custody wallet with a Visa card.\nApple Pay and Google Pay.\n3% per purchase, no load fee."
f2 = font(12, bold=False); d.multiline_text((18, 160), sub, font=f2, fill=MUTED, spacing=3)
f3 = font(14); s = "Get the card"; pw, ph = pill_size(d, s, f3, 9); pill(d, w - pw - 18, h - ph - 14, s, f3, pad=9)
return im
def splash(w, h): # 600x300
im = bg(w, h); d = ImageDraw.Draw(im)
f0 = font(15); d.text((30, 26), "CRYPTO VISA CARD", font=f0, fill=MINT)
card(d, w - 230, 36, 196, 122)
head = "Spend your POL\nanywhere Visa\nis accepted."
f1 = font(40); d.multiline_text((30, 54), head, font=f1, fill=INK, spacing=0)
sub = "A self-custody wallet with a Visa card. Virtual card from $9.99. 3% per purchase, no load fee."
f2 = fit(d, sub, w - 60, 17, bold=False); d.text((30, 218), sub, font=f2, fill=MUTED)
f3 = font(18); s = "Get your card"; pw, ph = pill_size(d, s, f3, 12); pill(d, w - pw - 30, h - ph - 24, s, f3, pad=12)
return im
SIZES = {"728x90": leaderboard, "468x60": leaderboard, "300x250": rectangle, "600x300": splash}
for s, fn in SIZES.items():
w, h = map(int, s.split("x"))
im = fn(w, h)
assert im.size == (w, h)
p = os.path.join(OUT, "bixpay-" + s + ".png"); im.save(p, optimize=True)
print(p, os.path.getsize(p), "bytes")
+8 -3
View File
@@ -80,12 +80,17 @@ async function send(input, opts) {
return { ok: true, test: true, to }; return { ok: true, test: true, to };
} }
if (running) return { error: 'A send is already running (' + running.sent + ' of ' + running.total + '). Wait for it to finish.' }; if (running) return { error: 'A send is already running (' + running.sent + ' of ' + running.total + '). Wait for it to finish.' };
const kind = AUDIENCES[input.audience] ? input.audience : 'optin'; // claim the slot BEFORE the slow recipient list (Sendy opt-in checks take minutes): two sends raced on 2026-10-28 and 475 members got the POL Miner email twice
running = { sent: 0, total: 0, building: true };
let kind, list;
try {
kind = AUDIENCES[input.audience] ? input.audience : 'optin';
unknownOptins = 0; unknownOptins = 0;
let list = await recipients(kind); list = await recipients(kind);
if (Array.isArray(input.to) && input.to.length) { const want = new Set(input.to.map(e => String(e).toLowerCase())); const all = await R.accounts.listAll(20000); list = all.filter(a => a.email && want.has(String(a.email).toLowerCase())); } // explicit list (repairs) if (Array.isArray(input.to) && input.to.length) { const want = new Set(input.to.map(e => String(e).toLowerCase())); const all = await R.accounts.listAll(20000); list = all.filter(a => a.email && want.has(String(a.email).toLowerCase())); } // explicit list (repairs)
if (unknownOptins && !(input.to && input.to.length)) console.log('updates: Sendy gave no answer for', unknownOptins, 'members; they were left out of this send'); if (unknownOptins && !(input.to && input.to.length)) console.log('updates: Sendy gave no answer for', unknownOptins, 'members; they were left out of this send');
if (!list.length) return { error: 'Nobody in that audience.' }; if (!list.length) { running = null; return { error: 'Nobody in that audience.' }; }
} catch (e) { running = null; throw e; }
const rec = { id: Date.now().toString(36), ts: Date.now(), subject: compose(input, null).subject, noteIds, audience: kind, total: list.length, sent: 0, skipped: 0, failed: 0, status: 'running', unknown: unknownOptins, recipients: list.map(a => a.email) }; const rec = { id: Date.now().toString(36), ts: Date.now(), subject: compose(input, null).subject, noteIds, audience: kind, total: list.length, sent: 0, skipped: 0, failed: 0, status: 'running', unknown: unknownOptins, recipients: list.map(a => a.email) };
const l = log(); l.sends.unshift(rec); l.sends = l.sends.slice(0, 50); saveLog(l); running = rec; const l = log(); l.sends.unshift(rec); l.sends = l.sends.slice(0, 50); saveLog(l); running = rec;
(async () => { (async () => {
+8 -5
View File
@@ -74,7 +74,7 @@ function fetchRows(g) {
}); });
} }
// copy (Marty, 2026-10-27): the ask is the LINK step only (one free signature), never "switch on payouts": a linked wallet is paid // copy (Marty, 2026-10-27): the ask is the LINK step only (one free signature), never "switch on payouts": a linked wallet is paid
function copy(games, stage, link) { function copy(games, stage, link, bixLine) {
const total = games.reduce((n, g) => n + g.unpaid, 0); const total = games.reduce((n, g) => n + g.unpaid, 0);
const parts = games.map(g => g.unpaid.toFixed(2) + ' POL in ' + g.name); const parts = games.map(g => g.unpaid.toFixed(2) + ' POL in ' + g.name);
const list = parts.length > 1 ? parts.slice(0, -1).join(', ') + ' and ' + parts[parts.length - 1] : parts[0]; const list = parts.length > 1 ? parts.slice(0, -1).join(', ') + ' and ' + parts[parts.length - 1] : parts[0];
@@ -82,8 +82,11 @@ function copy(games, stage, link) {
const p1 = "You've earned " + list + ". Link your wallet (one free signature) and it's sent automatically, including everything you've earned so far."; const p1 = "You've earned " + list + ". Link your wallet (one free signature) and it's sent automatically, including everything you've earned so far.";
const p2 = 'It is not a transaction and it cannot move funds. Every game pays that same wallet from then on.'; const p2 = 'It is not a transaction and it cannot move funds. Every game pays that same wallet from then on.';
const p3 = stage >= 2 ? 'This is the last reminder about this balance. It stays yours; it just waits for a wallet.' : 'Not sure which wallet to use? SafePal is the one we recommend; MetaMask and Phantom work too. The Wallet tab has a short guide.'; const p3 = stage >= 2 ? 'This is the last reminder about this balance. It stays yours; it just waits for a wallet.' : 'Not sure which wallet to use? SafePal is the one we recommend; MetaMask and Phantom work too. The Wallet tab has a short guide.';
const text = [p1, '', p2, '', 'Link your wallet: ' + link, '', p3].join('\n'); // BixPay (2026-10-29): one sentence after the wallet ask, the member's resolved partner link behind a counted /go link; '' while bixpayLive is off
const html = '<p>' + esc(p1).replace(esc(list), '<b>' + esc(list) + '</b>') + '</p><p>' + esc(p2) + '</p><p><a href="' + esc(link) + '"><b>Link your wallet</b></a></p><p>' + esc(p3) + '</p>'; const bx = String(bixLine || '').trim();
const text = [p1, '', p2, '', 'Link your wallet: ' + link, '', p3].concat(bx ? ['', bx] : []).join('\n');
const bxHtml = bx ? '<p>' + esc(bx).replace(/(https:\/\/\S+)/, '<a href="$1">$1</a>') + '</p>' : '';
const html = '<p>' + esc(p1).replace(esc(list), '<b>' + esc(list) + '</b>') + '</p><p>' + esc(p2) + '</p><p><a href="' + esc(link) + '"><b>Link your wallet</b></a></p><p>' + esc(p3) + '</p>' + bxHtml;
return { subject, text, html, total }; return { subject, text, html, total };
} }
async function tick() { async function tick() {
@@ -132,7 +135,7 @@ async function tick() {
const stage = p.sent.length; if (stage >= STAGES.length) continue; const stage = p.sent.length; if (stage >= STAGES.length) continue;
if (now - p.first < STAGES[stage]) continue; if (now - p.first < STAGES[stage]) continue;
const link = (R.site || 'https://instantadpay.com') + '/my#wallet'; const link = (R.site || 'https://instantadpay.com') + '/my#wallet';
const c = copy(gs, stage, link); const c = copy(gs, stage, link, R.bixLine ? R.bixLine(a) : '');
let ok = false; let ok = false;
try { await R.message(email, c.subject, c.html); ok = true; } catch (e) {} try { await R.message(email, c.subject, c.html); ok = true; } catch (e) {}
if (R.mailer && R.mailer.hasKey && R.mailer.hasKey() && R.optedIn) { try { if (await R.optedIn(email)) { await R.mailer.send(email, c.subject, c.text, c.html); ok = true; } } catch (e) {} } if (R.mailer && R.mailer.hasKey && R.mailer.hasKey() && R.optedIn) { try { if (await R.optedIn(email)) { await R.mailer.send(email, c.subject, c.text, c.html); ok = true; } } catch (e) {} }
@@ -154,4 +157,4 @@ function adminView() {
return { stats: Object.assign({ pushed: 0 }, S.stats), lastRun: S.lastRun, lastRows: S.lastRows, games: games().map(g => ({ key: g.key, name: g.name, url: g.url, nudge: g.nudge !== false })), return { stats: Object.assign({ pushed: 0 }, S.stats), lastRun: S.lastRun, lastRows: S.lastRows, games: games().map(g => ({ key: g.key, name: g.name, url: g.url, nudge: g.nudge !== false })),
pushed: (S.pushLog || []).slice(0, 100), pushRefused: Object.values(S.pushes || {}).filter(x => x.status !== 'ok').sort((a, b) => b.at - a.at).slice(0, 100), waiting: people.filter(p => !p.done), done: people.filter(p => p.done).slice(0, 100) }; pushed: (S.pushLog || []).slice(0, 100), pushRefused: Object.values(S.pushes || {}).filter(x => x.status !== 'ok').sort((a, b) => b.at - a.at).slice(0, 100), waiting: people.filter(p => !p.done), done: people.filter(p => p.done).slice(0, 100) };
} }
module.exports = { init, tick, waitingFor, adminView, games, STAGES }; module.exports = { init, tick, waitingFor, adminView, games, STAGES, copy };