- /api/ads/click/<id> only redirects off-site for an active campaign (or its owner). Ended, paused,
archived and flagged campaigns (488 of them, e.g. #164 -> shrt1.xyz) kept forwarding forever, a
standing instantadpay.com redirector. They now land on the home page, uncounted.
- mailer.js rewrites every instantadpay.com URL in subject/text/html and List-Unsubscribe to
MAIL_BASE (default https://instantadpay.link; '' = off). Email addresses and subdomains untouched.
- Share hosts answer /unsubscribe (GET + RFC 8058 POST) and /banners/* in place; leaderboard, blog,
presentation, partners, launch, plays, bixpay, wall are pages, not usernames (none taken).
- NAS syndicated ad click URLs go out on instantadpay.link (NAS_CLICK_BASE) for new pushes.
- toolkit.js member links (AI writer, handout QR, split-test, partner promo) use shareDomain.
- my.js: banner "copy URL" on the share domain; bridge link (Wednesday/Friday) now builds from the
share-form invite line (it silently fell back to the plain invite). my.js?v=20261117dbl.
iap-qa member: 0 bugs; networksso-partner e2e all passed on rerun.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- promodays.js: reusable date-to-percent bonus map (setting promoDays, kill switch promoDaysOn), once per tx via marks (MySQL):
Fri 11-27 +40% $5+, Sat/Sun +20% $5+, Mon 11-30 +30% $20+. A mapped Friday is paid by friday.js at max(fridayBonusPct, day pct),
one bonus per tx, Game Pass Friday perk intact; Five Dollar Friday +20% resumes 12-04 with no hand edits.
- friday.js: Thanksgiving Thursday 18:00 CT notice + email carry the Black Friday copy (one message); Black Friday kickoff and
wrap-up copy; /api/friday reports the day's real pct and name; IAP_TEST_NOW test clock (ignored in production).
- Weekend Starter Bundle ($20+ in the window: LinkSpin code WEEKEND500 on a purchase notice) and Builder Bundle ($100+: notice +
GET /api/network/weekend-builders for DownlineHydra, X-Weekend-Key = env WEEKEND_BUNDLE_KEY, constant-time compare).
- promos.js: promo_codes.starts (dormant-until gate) for code NETWORKWEEKEND.
- gamepass.js: tier passes paid by a package Fri 11-27 00:00 CT to Fri 12-04 00:00 CT get Explorer/Champion +15 days, Legend +60.
- /weekend deals page (assets/weekend.js), Home strip + Overview card (assets/weekend-card.js), network ribbon (netdeals.js +
assets/netweekend.js via common.js and netline.js), chatbot fact + answer date-gated.
- Share hosts: /weekend, /friday and other page names are pages, not usernames (email links use instantadpay.link: instantadpay.com
is still on the Spamhaus DBL, checked 11-17).
- welcome.js says the day's real pct; common.js/netline.js/welcome.js ?v=20261117nw.
- Tests: qa/promodays.test.cjs (12) + qa/weekend.e2e.mjs (18) at test clocks; bash qa/run.sh weekend; member walk clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Root cause: IAP's networksso `wallets` list was hand-written and had no ViralAdSource line, so
/sso/check?r=viraladsource was refused ("unknown site asking") and the browser was sent to the
IAP dashboard: a signed-out visitor to viraladsource.com/my was even dropped there by the silent
check, and a signed-in IAP member could never be signed in on ViralAdSource through IAP.
- networksso.js: providers also answer every site in the hub's GET /v1/sso-sites; ?return=<site>
&to=/path links remember the way back (nsso.ret, known sites only); /sso/resume finishes it
after the code sign-in; a wallet site with no wallet on the account goes to the Wallet tab
first (nsso.wait, no bounce loop) and the wallet link answers next: /sso/resume; the tap state
lives 1 hour.
- server.js: every /go/<site> and ?return= request goes to networksso (no per-site list; fivex
was missing from it too); walletPath /my#wallet; /api/me nssoBackTo; wallet link next/backTo.
- my.js: "Taking you back to <site>" after the wallet link; one line on the Wallet tab while a
site waits for the wallet. my.js?v=20261117back.
- qa/networksso-return.e2e.mjs: hub-only site, silent check, tap, wallet step, return links,
no open redirect. All network sign-in suites and iap-qa member pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Footer and the network line now read "(c) 2026 TrustClickz"; bump asset
version tags so browsers pick up the new common.js and netline.js.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Chatbot (chatbot.js + netkb.js route): a hand-off pattern still answers first; then the hub's POST /v1/kb/match answers with
this site's entry when it is sure, keeps or overrules the CANNED regex hit, and picks the AI prompt context, this site's own
entries first. 1.5 s timeout, then the hub is skipped for 30 s and the old pattern + BM25 path answers (NETKB_MATCH=0 = off).
Support desk: while a signed-in member types a new ticket, POST /api/my/support/suggest shows the closest help answers (KB
entries only, incl. ones written from past tickets, never another member's ticket; BM25 when the hub is down); Send is never
blocked. support.js?v=20261116sg.
Tests: qa/netkb-semantic.test.mjs (route/suggest decisions, fail soft, shared-file parity; run.sh kb) and
qa/support-suggest.mjs (run.sh member). netkb.js is the same file in all eight network sites.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
networksso.js (the same file on every network site): with HUB_SSO=on /sso/start asks the network hub, /sso/in takes the hub's h1. token (this site's HUB_SECRET, iss hub, aud iap, 60 s, single use, state cookie), and when the hub has nobody the old pairwise provider is tried once (the fallback until every site is switched). networksso.page() on every GET: a signed-in member's real page load tells the hub once (nsso.hp, hub /sso/set and straight back) and pings the hub's /v1/activity once a day (fire and forget), only while the hub answers /health.
Sessions: SESSION_TTL_HOURS (168 = 7 days in production), renewed on use at most hourly; the cookie lives 30 days and the server's sliding expiry decides. auth.endSessions(email, wallet).
Sign out everywhere: POST /api/auth/logout-everywhere (hub /v1/sso/signout, every session of the member here ends) and a "Sign out everywhere" link beside Log out; my.js?v=20261115hub. hubsync: member.blocked and member.signedout end every session of that member here.
Login ad: /api/ads/slot?type=login refuses signed-out callers (no ad drawn, no view counted; bots and probes cannot run up an advertiser's numbers). The games' kit keeps its own route.
Chatbot: a sign-in lasts 7 days and renews; the login ad shows every few hours on its own clock; the silent check is every 2 minutes.
Tests: qa/networksso-hub.e2e.mjs (new, run.sh member; real hub + IAP + LinkSpin + a wallet partner on four cookie hosts): page load pushes to the hub once, LinkSpin signs in through the hub, partner gets the wallet from the hub, sign out everywhere, blocked, replay, forged key, no email code. Partner e2e: signed-out slot on both sites, LinkSpin clock. qa member: ALL PASSED (2 known admin warnings).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Active members with their own paid package ($20+ InstantAdPay, $25+ LinkSpin via the
refuel record) receive tank people in batches: Paid 10, Fueled 20 (counted refuel streak
or a $50+ package), Twin Engine 25 (both engines this cycle or the top package, the live
catalog's highest, $500 today), +5 per further consecutive refuel month up to 50. Every
2 days per sponsor, topped up to their size, dealt by rotation highest tier first from
tank.adoptable() (grace, rule 3, LinkSpin adoptions respected), never self, own upline,
adopted twice, flagged, spam, mistyped, erased or unsubscribed. Same tank.adopt path
(sponsor change, chat, "X is now your sponsor" email, switch-on reminders); one notice
per batch to the sponsor. Uncontacted after 7 days -> back to the tank as 'unreached'
(not counted). Tank feed: payments-topic card + live toast, sponsor/count/level only.
Member panel "How to get fed leads" (tankfeed.js). Every number is a site setting.
5xYourTeam draft gets its own cap (fiveXDraftCap, default 10): open draft picks only;
plain adoptions, the 24-hour safety net and batches each count their own people.
Admin: GET /api/admin/tank/batches/preview (read-only) + /api/admin/tank/batches.
Chatbot: coming soon only. qa/tank-batch.test.mjs (60 checks) in run.sh member.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Login ad: shown on the next member page load whenever the member's last finished view on this site is older than loginAdEveryHours (site setting, default 3), signed in just now or not. One row per member in MySQL (loginadclock.js, table login_ad_views; the same file in LinkSpin): /api/ads/slot?type=login answers notDue inside the window and marks the serve; POST /api/ads/login/seen at the end of the countdown restarts the clock only if the serve was at least dwell-2 s earlier (a reload during the countdown does not skip it). Framed gate, 10 s timer, click relay, frameable fallback, delivery and credit accounting unchanged. Welcome tour still outranks it. Member erase forgets the row. Admin site setting label added.
5xYourTeam loop: IAP answered /sso/check?r=fivex as if LinkSpin asked (fivex was missing from the wallets map), so tokens went to LinkSpin and Marty never got back. fivex added (FIVEX_URL, default https://5xyourteam.com); networksso.js now refuses an unknown r instead of answering as the peer. A pending network hop (nsso.back) is finished after sign-in: the login ad (if due) then /sso/resume; the gate's finish button says Continue and goes back to the site and page the member came from. /api/me carries nssoBack. The session pop-up (welcome.js) waits until the login gate is closed.
networksso.js: loop guard TRIED_AGE 30 min -> 120 s (it blocked Marty's silent sign-in on LinkSpin), NAMES gains fivex. The same file now ships byte-identical in IAP, LinkSpin, VBB, DLB, ViralAdBlitz, DownlineHydra, 5xYourTeam.
Tests: qa/networksso-partner.e2e.mjs (new, in run.sh member): a stand-in wallet partner on its own host; signed in on IAP -> straight back with a session, no dashboard, no ad; signed out -> sign in, login ad, Continue -> back on the partner page; the clock (due, too-soon refused, no re-show on reload or another tab, reload during the countdown brings it back); LinkSpin -> partner. networksso unit test: 2-minute guard, unknown site gets nothing. qa member: ALL PASSED (2 known admin warnings).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gamepass.js: HERO_DEFS kestrel freeAt 20. She is never sold here any more: buyHero refuses her ("free for every player at level 20
in Shards of Valor, so she is not for sale"), a bundle setting that names her drops her, heroOrderPrices/heroOrderOpen skip her, and a
waiting Kestrel order from before is cancelled unpaid (never fulfilled by a package). A member who bought her keeps her (the hand-off
still lists kestrel); nothing refunded. Valda, Morag, Roland, the $50 bundle of those three and every price unchanged.
Member card: Kestrel shows "Free at level 20" and "Not for sale" (my.js?v=20261114kes). Chatbot canned answer + AI fact say so.
qa/sov-heroes-store.cjs reworked for it (old Kestrel buyer kept, stale order cancelled, stats $180). iap-qa member: ALL PASSED.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
networksso.js (same file in both repos): /go/linkspin hop for signed-in members' cross-site links; /sso/start (state cookie +
30-minute loop guard) -> LinkSpin /sso/check -> /sso/in?t=<v1 HMAC-SHA256 token, NETWORK_SSO_SECRET, 60 s, single-use nonce
(MySQL table network_sso_nonces when on the DB, else DATA_DIR file), bound to the browser's state cookie, email, audience and a
same-site relative path>. Member sessions only (admin portal never shared), ordinary 4-hour session, /my lands with ?welcome=1
so the login ad runs as after a code sign-in. An email with no account here or a waiting LinkSpin/BTC4Hits account gets the
normal email-code sign-in, email prefilled; nothing is created. Silent check on /my via public/assets/netsso.js
(/api/sso/status); never for bots/fetches; sign-out pauses it 12 hours. Engine Room + Fuel links go through /go/linkspin.
Chatbot knows it (KNOWLEDGE_DATE 2026-11-12). Off until NETWORK_SSO_SECRET (32+ chars) is set.
qa: networksso.test.cjs all passed, networksso.e2e.mjs (both servers, real browser) 31/31, run.sh member green (0 bugs)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lsreport.js. A click id (lsclk or lsid) arriving on any page is kept in a first-party cookie iap.lsclk, 30 days, last click wins, like the sponsor cookie. The join page also sends its own copy with the code request and verify (the cookie is refused in traffic-exchange frames and never crosses browsers, the 2026-09-29 lesson) and it is remembered per email. It is stored in its own table ls_account_clicks when the account is created or a waiting LinkSpin shell is claimed, on /api/signup, email sign-in and in-game sign-in (a game may pass lsclk; none does yet).
Reports queue in ls_events, whose primary key is the idempotency key (join:<hash>, wallet:<hash>, purchase:<tx>:<log index>), so two app copies in a deploy cannot double a row, and LinkSpin dedupes on the same key. A background loop sends them signed, retrying up to every 5 minutes; a sign-up or a purchase never waits on LinkSpin. The purchase hook runs after the existing ev: claim and its value is the USD price on the chain event. A first purchase finds its buyer through the contract's wallet for that member id, since member_id may not be stored yet. Linked positions count as the account's purchases. Past 30 days from the sign-up nothing is queued (LinkSpin's window is from the click).
Campaigns > Conversion tracking lists everything the member's clicks led to, and joins, wallets and purchases on each campaign row. Guide, privacy page and chatbot (CANNED + FACTS) updated; common.js, join.js and my.js tags bumped.
QA: bash qa/run.sh netconv (54 checks: local InstantAdPay + local LinkSpin + a mock Polygon RPC, a real Purchase log through the real event fan-out, LinkSpin down, two copies racing).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Grace: for 24 hours from an account's created time nobody can adopt the person by hand. They stay on the waiting list after the open ones with an Opens in badge and no Adopt button, and adopt() refuses in plain words. Only sign-up counts, so someone back in the tank later has no grace. Auto-assign does not wait for it: the 24-hour hold still runs from the wallet link and is not stretched. No notice tells people to adopt someone they cannot adopt yet: the wallet-ready post waits for the grace and says the time really left, is skipped when the rotation takes them in that tick, the arrivals post moves to when the grace ends (marks.claim per member), and the Overview note and weekly email count only people who are open.
Prompt: a member with no sponsor and no member number sees the card at the top of Overview, types a username, confirms in an in-page box, and that person becomes their sponsor through setSponsor as a deliberate change with by 'invited', so it follows to LinkSpin and clears the hold. Refused: self, unknown username, already sponsored, member number or wallet already on the contract, a chain loop, a suspended sponsor, a no-payout chain, and a line with nobody on the contract (they would walk up to the company). The network sponsor is tried first. Nobody invited me hides it and a small link brings it back. Not an adoption: status 'invited', no 7-day window, not counted toward the two. The named sponsor gets the referral email and an on-site notice. Switch-on-payouts reminders track the named sponsor.
Chatbot canned + systemPrompt, KNOWLEDGE_DATE 2026-11-07. my.js, admin.js, admin-sponsorcheck.js ?v=20261107tg. qa/tank-hold.mjs, qa/sponsorfollow.test.cjs and qa/sponsorfollow-e2e.mjs extended (SF_E2E_PORT overrides the ports).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paid exactly like a pass: no credits, no POL. POST /api/my/heroes/buy opens a waiting order (kind hero); a fresh package of at least the
price from one of the member's own positions fulfils it in gamepass.onEvent (one package, one order: the highest-priced it covers, pass
or hero; each tx once). Ownership is permanent on the passes record (heroes, heroBundle), never in bought, so hero sales never feed the
Pass Tournament pool. No double charge: an owned hero is refused, a bundle is refused once any of its heroes is owned, and waiting orders
made pointless by a purchase are cancelled.
Settings (Admin > Settings): heroSales '0', heroPrice<Kestrel|Valda|Morag|Roland>Cents 2000 (0 = free for every account),
heroBundlePriceCents 5000, heroBundleHeroes 'valda,morag,roland', heroBundleCap '' (unset: the bundle is heroes only, no cap change).
Hand-off: sovMint (and GET /api/partner/player for shardsofvalor) carries heroes, heroBundle, heroSale { free, bundle, each, bundlePrice },
and heroBundleCap only when set. TIER_DEFS perks: Champion no longer lists the Druid, Sovereign no longer the Necromancer (dropped),
Legend every bonus hero while active. Member Game Pass card: a Bonus heroes block (shown while heroSales is on or to an owner);
Admin > Game Pass: hero test on the admin's own account (test buy / cancel / give / remove) and /api/admin/heroes/stats.
Chatbot: canned sov-bonus-heroes answer + heroesFact following heroSales; KNOWLEDGE_DATE 2026-11-05. my.js?v=20261105hr, admin.js?v=20261105hr.
QA: qa/sov-heroes-store.cjs (39 checks, in member and sov-passes); sov-passes-local expects the hero test panel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
themehead.js is the one source of the tiny inline head script (and of AUTO_DEFAULT, the one constant Marty decides later: 0 = nothing stored keeps the page's current look, dark everywhere on InstantAdPay; 1 = follow the device). It mirrors LinkSpin's themehead.js with only the storage key (iap.theme), the global (window.IAPTheme) and the event name (iap-theme) changed. The script sets data-theme on <html> from iap.theme (auto follows prefers-color-scheme and tracks changes live). tools/stamp-theme-head.cjs writes it into all 28 static site.css pages before the first stylesheet with data-theme-base="dark" on <html>; the blog, the leaderboard, what's-new, the badge page, the unsubscribe page and the wall 404 read the module directly. The site CSP allows inline scripts by hash only, so themehead.CSP_HASH joins script-src (without it the script is silently blocked).
Account side: accounts.theme (JSON store and MySQL, alterSafe theme VARCHAR(8)), in the public account JSON and /api/me; POST /api/my/profile {theme} rides the existing profile save path, never touches the username, and does not tap changed() (appearance is not mirrored to LinkSpin, same as LinkSpin's side). common.js owns the client side for every page: paints every .theme-seg, saves a click to the account, and IAP.themeSync lets the account value win over the local one at sign-in (a local choice is pushed up when the account has none yet); my.js calls it from render(). The Light / Dark / Auto segmented control sits in the member-area header (#boTheme) and in a Profile pane "Appearance" card, and in the admin header for the same session. shorts.html pins the dark ink set on its black video stage; view.html stops reading an undefined --bg. ?v= tags bumped on every changed stylesheet and script (20261101th): site.css on all 28 pages, common.js on 25, welcome.js on 17, support.js, my.js, engine-room.js, admin.js, admin-kits.js, blog-page.js.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Public walls: profile fields (bio, avatar, socials, intro video) render only for a paying member (memberId > 0 or a registered position), on /api/wall and in the OG image; a free account's wall shows the name, the line's ads and the join call. The meta/og description is a fixed site sentence with the handle, never the bio. Outbound profile links are rel="sponsored ugc noopener" target="_blank". A deleted or unknown name is a real 404 with X-Robots-Tag noindex (was a bare "Banner wall" page at 200, a soft 404 that stayed indexed).
Policy (prohibited.js, byte-for-byte copy on LinkSpin): bios may not carry a URL or a domain token ("Links go in the social fields, not the bio"); gambling, adult, pharma, weapons and link-selling terms (Unicode aware, Vietnamese and Portuguese terms included) are refused in bios, social URLs, line banner targets, wall offers and every campaign field, with the refusal logged. lssync applies it on the way out and lsinbound on ingest.
Quarantine rule: a brand-new free account (no wallet, no sponsor, under 24 h) whose first profile save plants a link is saved with profileQuarantined (JSON + MySQL column), never rendered publicly, and told "Your profile links will appear after your first ad package"; the admin member card shows the flag.
Daily link-farm scan (spamscan.js, same copy on LinkSpin): in-app job at 06:30 Central, claimOnce per day, lists memberId-0 walletless accounts with a link plus a farm signal (prohibited term, sign-in over within 15 min, no sponsor), skips the spamScanAllow setting (seeded), writes DATA_DIR/wall-spam-scan.json and sends one Telegram to the private admin chat only when there are candidates. Admin > Members > Link-farm list: rows with "also on LinkSpin", Delete selected (existing DELETE /api/admin/member, on-chain refused, no cascade) and Allow.
Terms section 8 "Prohibited content", bio hint in the profile editor, chatbot canned answer "What content is not allowed?", KNOWLEDGE_DATE 2026-10-30. Test: qa/profile-policy.test.cjs (unit + local copy; runs in qa/run.sh member and policy).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>