ViralAdBlitz as a network site (2026-11-15): network sign-in by wallet to ViralAdBlitz (networksso wallets.viraladblitz = VAB_URL, default https://viraladblitz.com; NAMES viraladblitz), fixed network link nwvab -> https://viraladblitz.com/{s2}?ref={s1} on the admin account, catalog network template viraladblitz + NET_SRC vab/viraladblitz (merged by hand beside d6e8de3's dh entry), netsites CODES viraladblitz: nwvab. qa: netsrc 17/17 (seven network links), partner-dhlinks 13/13. LOCAL ONLY.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-15 06:06:31 -06:00
parent d6e8de3e6a
commit e23d9ecbdb
7 changed files with 23 additions and 8 deletions
+11
View File
@@ -111,6 +111,17 @@
"verified": true,
"source": "network"
},
{
"key": "viraladblitz",
"name": "ViralAdBlitz",
"site": "viraladblitz.com",
"costModel": "",
"params": [],
"postbackUrl": "",
"notes": "Crypto Team Build Network text-ad site. Clicks that arrive from ViralAdBlitz (its footer, its promo kit) carry ?src=viraladblitz and are counted under this source automatically.",
"verified": true,
"source": "network"
},
{
"key": "stackpol",
"name": "Stack POL",
+1
View File
@@ -11,6 +11,7 @@ const SITES = [
{ id: 'linkspin', code: 'nwls', name: 'LinkSpin', url: 'https://linkspin.app/{s2}?ref={s1}' },
{ id: 'dlb', code: 'nwdlb', name: 'Downline Banners', url: 'https://downlinebanners.com/{s2}?ref={s1}' },
{ id: 'vbb', code: 'nwvbb', name: 'Viral Banner Blitz', url: 'https://viralbannerblitz.com/{s2}?ref={s1}' },
{ id: 'viraladblitz', code: 'nwvab', name: 'ViralAdBlitz', url: 'https://viraladblitz.com/{s2}?ref={s1}' },
{ id: 'stackpol', code: 'nwsp', name: 'Stack POL', url: 'https://stackpol.com/{s2}?ref={s1}' },
{ id: 'earnerscorner', code: 'nwec', name: 'Earners Corner', url: 'https://earnerscorner.com/{s2}' }
];
+1 -1
View File
@@ -36,7 +36,7 @@ function list() { if (Date.now() - cache.at > TTL) refresh(); return cache.list;
// entry also gets go = the LinkSpin network link for that site with ?src=<this site>, so a click shows in LinkSpin Reports under the
// site that sent it (LinkSpin netlinks.js: fixed codes on the admin account). This site = NETWORK_SITE_ID, else the request host.
// No go for this site itself, or when this site cannot be told (a test host): the page then uses the plain url.
const CODES = { iap: 'nwiap', linkspin: 'nwls', dlb: 'nwdlb', vbb: 'nwvbb', stackpol: 'nwsp', earnerscorner: 'nwec' };
const CODES = { iap: 'nwiap', linkspin: 'nwls', dlb: 'nwdlb', vbb: 'nwvbb', viraladblitz: 'nwvab', stackpol: 'nwsp', earnerscorner: 'nwec' };
const linksBase = () => String(process.env.NETWORK_LINKS_BASE || 'https://linkspin.app').trim().replace(/\/+$/, '');
const hostOf = u => { try { return new URL(u).hostname.toLowerCase().replace(/^www\./, ''); } catch (e) { return ''; } };
function selfId(req, l) {
+1 -1
View File
@@ -39,7 +39,7 @@ const BACK_AGE = 1200; // seconds: the provider remembers an unf
const TRIED_AGE = 1800; // seconds: one silent check per browser per 30 minutes
const OFF_AGE = 12 * 3600; // seconds: no silent check after a sign-out on this site
const HINT_AGE = 300; // seconds: the email prefill when the member is not here yet
const NAMES = { iap: 'InstantAdPay', linkspin: 'LinkSpin', bannerline: 'Downline Banners', vbb: 'Viral Banner Blitz' }; // vbb = Viral Banner Blitz, a wallet site like Downline Banners (2026-11-14)
const NAMES = { iap: 'InstantAdPay', linkspin: 'LinkSpin', bannerline: 'Downline Banners', vbb: 'Viral Banner Blitz', viraladblitz: 'ViralAdBlitz' }; // vbb = Viral Banner Blitz, a wallet site like Downline Banners (2026-11-14); viraladblitz = ViralAdBlitz, a wallet site like VBB (2026-11-15)
const WALLET_RE = /^0x[0-9a-f]{40}$/;
let C = null; // { self, peer, peerBase(), isProd, dataDir, db, member(req), accept(email, req, v), signIn(email, req, v), landing(to), signinPath(to), defaultPath,
+6 -4
View File
@@ -1,5 +1,5 @@
// Network sites as traffic sources (2026-11-14). Boots server.js on its own port with a throwaway seeded data dir (JSON store, no DB)
// and checks: the admin account gets one fixed network link per site (nwiap, nwls, nwdlb, nwvbb, nwsp, nwec) and one source per
// and checks: the admin account gets one fixed network link per site (nwiap, nwls, nwdlb, nwvbb, nwvab, nwsp, nwec) and one source per
// network site; /r/<code>?src=&s1=&s2= lands on the right page with ?ref=<member>; the click counts under the sending site's source;
// a member's own link with ?src=<site> gets that site's source made on first use; an unknown src changes nothing; a reboot makes
// nothing twice.
@@ -28,9 +28,9 @@ const srcOf = (owner, tpl) => read('sources.json').items.find(x => x.owner === o
try {
await boot();
const rots = read('rotator.json').rotations.filter(r => r.owner === ADMIN);
ok(['nwiap', 'nwls', 'nwdlb', 'nwvbb', 'nwsp', 'nwec'].every(c => rots.some(r => r.code === c)) && rots.length === 6, 'the admin account has the six network links', rots.map(r => r.code));
ok(['nwiap', 'nwls', 'nwdlb', 'nwvbb', 'nwvab', 'nwsp', 'nwec'].every(c => rots.some(r => r.code === c)) && rots.length === 7, 'the admin account has the seven network links', rots.map(r => r.code));
const mineSrc = read('sources.json').items.filter(x => x.owner === ADMIN);
ok(['instantadpay', 'linkspin', 'downlinebanners', 'viralbannerblitz', 'stackpol', 'earnerscorner'].every(t => mineSrc.some(x => x.template === t)) && mineSrc.length === 6, 'and one source per network site', mineSrc.map(x => x.template));
ok(['instantadpay', 'linkspin', 'downlinebanners', 'viralbannerblitz', 'viraladblitz', 'stackpol', 'earnerscorner'].every(t => mineSrc.some(x => x.template === t)) && mineSrc.length === 7, 'and one source per network site', mineSrc.map(x => x.template));
let r = await go('/r/nwdlb?src=iap&s1=bob&s2=how');
ok(r.status === 302 && /^https:\/\/downlinebanners\.com\/how\?ref=bob$/.test(r.loc), 'nwdlb: lands on /how with ?ref=bob', r);
@@ -38,6 +38,8 @@ try {
ok(r.status === 302 && /^https:\/\/instantadpay\.com\/\?ref=amy&lsclk=[a-f0-9]{10}$/.test(r.loc), 'nwiap: home page with ?ref=amy and the click id (InstantAdPay reports joins against it)', r);
r = await go('/r/nwec?src=dlb');
ok(r.status === 302 && /^https:\/\/earnerscorner\.com\/(\?|$)/.test(r.loc), 'nwec: the forum home', r);
r = await go('/r/nwvab?src=vab&s1=bob&s2=boost');
ok(r.status === 302 && /^https:\/\/viraladblitz\.com\/boost\?ref=bob$/.test(r.loc), 'nwvab: ViralAdBlitz page with the member ref', r);
r = await go('/r/nwvbb?src=linkspin', 'https://linkspin.app/contract');
ok(r.status === 302 && /^https:\/\/viralbannerblitz\.com\/\?ref=(&|$)/.test(r.loc), 'nwvbb with no member: an empty ref', r);
await sleep(300);
@@ -58,7 +60,7 @@ try {
ok(read('sources.json').items.filter(x => x.owner === MEM).length === 2, 'an unknown src makes no source');
await stop(); await boot();
ok(read('rotator.json').rotations.filter(x => x.owner === ADMIN).length === 6 && read('sources.json').items.filter(x => x.owner === ADMIN).length === 6, 'a reboot makes nothing twice');
ok(read('rotator.json').rotations.filter(x => x.owner === ADMIN).length === 7 && read('sources.json').items.filter(x => x.owner === ADMIN).length === 7, 'a reboot makes nothing twice');
} catch (e) { fail++; console.error(e); }
finally { await stop(); try { fs.rmSync(DATA, { recursive: true, force: true }); } catch (e) {} }
console.log('\n' + pass + ' passed, ' + fail + ' failed'); process.exit(fail ? 1 : 0);
+2 -1
View File
@@ -645,7 +645,8 @@ async function boot() {
// let in (LS_TESTERS) gets the normal email-code sign-in with the email filled in; nothing is created by the network sign-in.
networksso.init({ self: 'linkspin', peer: 'iap', peerBase: IAP_BASE, isProd: IS_PROD, dataDir: DATA_DIR, db, defaultPath: '/ads',
wallets: { bannerline: () => String(process.env.BL_URL || 'https://downlinebanners.com').replace(/\/+$/, ''), // Downline Banners by wallet (2026-11-13)
vbb: () => String(process.env.VBB_URL || 'https://viralbannerblitz.com').replace(/\/+$/, '') }, // Viral Banner Blitz by wallet (2026-11-14)
vbb: () => String(process.env.VBB_URL || 'https://viralbannerblitz.com').replace(/\/+$/, ''), // Viral Banner Blitz by wallet (2026-11-14)
viraladblitz: () => String(process.env.VAB_URL || 'https://viraladblitz.com').replace(/\/+$/, '') }, // ViralAdBlitz by wallet (2026-11-15; VAB_URL = staging host until the domain switch)
wallet: async s => { const a = await accounts.byEmail(s.email); const addr = String(s.address || (a && a.address) || '').toLowerCase(); return addr ? { address: addr, name: '' } : null; },
member: async req => { // a wallet sign-in carries the address, not the email: find the account that owns the wallet (2026-11-13)
const s = await auth.fromRequest(req); if (!s) return null;
+1 -1
View File
@@ -143,7 +143,7 @@ function meta(owner) { const m = {}; for (const s of mine(owner)) m[s.id] = { na
// source for that site, made from the network catalog template the first time it is needed. Only network templates qualify.
const NET_SRC = { iap: 'instantadpay', instantadpay: 'instantadpay', linkspin: 'linkspin', dlb: 'downlinebanners', downlinebanners: 'downlinebanners',
vbb: 'viralbannerblitz', viralbannerblitz: 'viralbannerblitz', stackpol: 'stackpol', earnerscorner: 'earnerscorner',
dh: 'downlinehydra', downlinehydra: 'downlinehydra' };
dh: 'downlinehydra', downlinehydra: 'downlinehydra', vab: 'viraladblitz', viraladblitz: 'viraladblitz' };
function networkTemplate(src) { const k = NET_SRC[String(src || '').trim().toLowerCase()]; const t = k ? template(k) : null; return t && t.source === 'network' ? t : null; }
function networkSource(owner, src) {
const t = networkTemplate(src); if (!t || !owner) return null;