Trust pack (Marty 2026-11-14): legal pages, network footer, Telegram image + week stats.

- /terms, /disclaimer (Earnings Disclaimer), /privacy: TrustClickz, 615 Green Valley Drive, Moody, AL 35004; written from the real mechanics: a $5 spot buys advertising (300 guaranteed views + a place in the line), same-transaction split 30/55/10/5, the contract holds only the momentum fund, paid only when later spots sell, nothing held or withdrawn, no refunds on-chain, one-time purchases, crypto risk, data (wallet, username from the hub, hashed visit checks, cookies, no email stored) and one account across the network through the hub. No earnings cap shown. Sitemap.
- Footer: Terms, Earnings Disclaimer, Privacy, Contract, Ledger, Support, company line, 'Part of the network' from the hub (netsites.js, GET /api/network-sites, 10 min cache, fallback list), Downline Banners marked current.
- tgproof.js: each sale message adds this week's spot numbers (Central-time week, bought vs gifted) and shows a large kit image above the text via link_preview_options (rotated, no caption length limit); TG_API for the test stand-in.
common.js?v=20261114t, line.css?v=8. Smoke 122/122 (stand-in Telegram: one message per sale, never two per tx; stand-in hub serves the list; legal pages; footer on phone).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-14 10:50:37 -06:00
parent 920efd72d6
commit da16bfaf4d
18 changed files with 266 additions and 26 deletions
+40
View File
@@ -0,0 +1,40 @@
// The network sites list for the footer's "Part of the network" line (Marty 2026-11-14 trust pack).
// One source: the hub's public GET /v1/network-sites (HUB_URL). Cached 10 minutes, refreshed in the background, never waits on a
// slow hub (2.5 s timeout), and falls back to the same built-in list. Never RM Circle, never the games.
// The same file lives in every network site (InstantAdPay, LinkSpin, Downline Banners, VBB, Stack POL).
const FALLBACK = [
{ id: 'iap', name: 'InstantAdPay', url: 'https://instantadpay.com' },
{ id: 'linkspin', name: 'LinkSpin', url: 'https://linkspin.app' },
{ id: 'dlb', name: 'Downline Banners', url: 'https://downlinebanners.com' },
{ id: 'vbb', name: 'Viral Banner Blitz', url: 'https://viralbannerblitz.com' },
{ id: 'stackpol', name: 'Stack POL', url: 'https://stackpol.com' },
{ id: 'earnerscorner', name: 'Earners Corner', url: 'https://earnerscorner.com' }
];
const TTL = 10 * 60 * 1000;
let cache = { at: 0, list: FALLBACK, from: 'fallback' };
let inflight = null;
const hubUrl = () => String(process.env.HUB_URL || 'https://hub.saasy.top').trim().replace(/\/+$/, '');
function clean(list) {
if (!Array.isArray(list)) return null;
const ok = list.filter(s => s && typeof s.name === 'string' && /^https:\/\/[a-z0-9.-]+(\/[^\s"'<>]*)?$/i.test(String(s.url || '')))
.slice(0, 30).map(s => ({ id: String(s.id || s.name).toLowerCase().replace(/[^a-z0-9]+/g, '').slice(0, 30), name: String(s.name).slice(0, 60), url: String(s.url).replace(/\/+$/, '') }));
return ok.length ? ok : null;
}
function refresh() {
if (inflight || process.env.NETWORK_SITES_HUB === '0') return inflight;
const ac = new AbortController(); const t = setTimeout(() => ac.abort(), 2500);
inflight = fetch(hubUrl() + '/v1/network-sites', { signal: ac.signal })
.then(r => (r.ok ? r.json() : null))
.then(j => { const l = clean(j); if (l) cache = { at: Date.now(), list: l, from: 'hub' }; else cache.at = Date.now(); })
.catch(() => { cache.at = Date.now() - TTL + 60 * 1000; }) // hub down: try again in a minute, keep the last good list
.finally(() => { clearTimeout(t); inflight = null; });
return inflight;
}
function list() { if (Date.now() - cache.at > TTL) refresh(); return cache.list; }
// GET /api/network-sites: public, cacheable, the same answer on every page
function handle(req, res) {
res.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8', 'Cache-Control': 'public, max-age=300', 'X-Content-Type-Options': 'nosniff' });
res.end(JSON.stringify(list()));
}
module.exports = { list, handle, refresh, FALLBACK, _state: () => cache };
+15 -1
View File
@@ -37,10 +37,24 @@ window.BL = (function () {
f.className = 'bl-foot';
f.innerHTML = '<div class="wrap"><p>Part of the Crypto Team Build Network</p>'
+ '<p class="muted small">A spot buys 300 guaranteed views on the board and a place in the line. Nothing is promised: you are paid only when spots sell after yours, and a spot can earn back less than it cost.</p>'
+ '<p class="small"><a href="/how">How it works</a> &middot; <a href="/board">Board</a> &middot; <a href="/ledger">Live ledger</a> &middot; <a href="/contract">Contract proof</a> &middot; <a href="/promote">Promote</a> &middot; <a href="/my">My Spots</a></p></div>';
+ '<p class="small"><a href="/how">How it works</a> &middot; <a href="/board">Board</a> &middot; <a href="/ledger">Live ledger</a> &middot; <a href="/contract">Contract proof</a> &middot; <a href="/promote">Promote</a> &middot; <a href="/my">My Spots</a></p>'
// trust pack (Marty 2026-11-14): legal + proof links, company line, and the network line served by the hub
+ '<p class="small legal-links"><a href="/terms">Terms</a> &middot; <a href="/disclaimer">Earnings Disclaimer</a> &middot; <a href="/privacy">Privacy</a> &middot; <a href="/contract">Contract</a> &middot; <a href="/ledger">Ledger</a> &middot; <a href="https://instantadpay.com/support" target="_blank" rel="noopener">Support</a></p>'
+ '<p class="muted small">TrustClickz &middot; 615 Green Valley Drive, Moody, AL 35004</p><p class="small netline"></p></div>';
document.body.appendChild(f);
netLine(f.querySelector('.netline'));
toasts();
}
// "Part of the network": the list comes from the hub through /api/network-sites, the built-in copy if it does not answer
const NET = [['iap', 'InstantAdPay', 'https://instantadpay.com'], ['linkspin', 'LinkSpin', 'https://linkspin.app'], ['dlb', 'Downline Banners', 'https://downlinebanners.com'],
['vbb', 'Viral Banner Blitz', 'https://viralbannerblitz.com'], ['stackpol', 'Stack POL', 'https://stackpol.com'], ['earnerscorner', 'Earners Corner', 'https://earnerscorner.com']].map(a => ({ id: a[0], name: a[1], url: a[2] }));
function netLine(el) {
if (!el) return;
const paint = list => { el.innerHTML = '<b>Part of the network</b> &middot; One account across the network: ' + list.map(s => (s.id === 'dlb' || /downlinebanners\.com/.test(s.url))
? '<span class="here" aria-current="page">' + esc(s.name) + '</span>' : '<a href="' + esc(s.url) + '" target="_blank" rel="noopener">' + esc(s.name) + '</a>').join(' &middot; '); };
paint(NET);
fetch('/api/network-sites').then(r => r.json()).then(l => { if (Array.isArray(l) && l.length) paint(l); }).catch(() => {});
}
// one spot tile; href goes through the /go relay, which counts the click
function tile(t, opts) {
const a = document.createElement('a');
+2
View File
@@ -0,0 +1,2 @@
// Terms, Earnings Disclaimer, Privacy (trust pack 2026-11-14): nav + footer only.
(async function () { await BL.renderNav(location.pathname); BL.renderFooter(); })();
+5
View File
@@ -63,3 +63,8 @@ nav .links a.active{color:var(--mint-ink);background:var(--mint)}
.bl-zone{display:flex;flex-direction:column;align-items:center;gap:3px;margin:16px auto;max-width:100%;overflow:hidden}
.bl-zone-label{font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);opacity:.7}
.bl-zone-foot{margin-top:28px}
/* trust pack (2026-11-14): footer legal links, network line, legal pages */
.bl-foot .legal-links{margin-top:12px}
.bl-foot .netline{margin-top:12px;padding-top:12px;border-top:1px solid var(--line);line-height:1.9}
.bl-foot .netline .here{color:var(--mint-ink);background:var(--mint);font-weight:700;border-radius:999px;padding:1px 9px}
.legal .card h2{font-size:21px} .legal .card p,.legal .card li{max-width:760px;color:var(--ink)} .legal .card ul{padding-left:20px} .legal .card li{margin:6px 0}
+2 -2
View File
@@ -21,7 +21,7 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=2">
<link rel="stylesheet" href="/assets/line.css?v=7">
<link rel="stylesheet" href="/assets/line.css?v=8">
</head>
<body>
<main class="wrap">
@@ -31,7 +31,7 @@
<div class="card"><h3>The line so far</h3><div id="stats" class="grid2"></div></div>
<div id="status" class="note" hidden></div>
</main>
<script src="/assets/common.js?v=20261114p"></script>
<script src="/assets/common.js?v=20261114t"></script>
<script src="/assets/board.js?v=1"></script>
</body>
</html>
+2 -2
View File
@@ -21,7 +21,7 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=2">
<link rel="stylesheet" href="/assets/line.css?v=7">
<link rel="stylesheet" href="/assets/line.css?v=8">
</head>
<body>
<main class="wrap">
@@ -35,7 +35,7 @@
<li>Open any sale in the <a href="/ledger">live ledger</a> and look at its <b>Logs</b>: one SpotBought event, then one Paid event per payment.</li></ol></div>
<div id="zContract"></div>
</main>
<script src="/assets/common.js?v=20261114p"></script>
<script src="/assets/common.js?v=20261114t"></script>
<script src="/assets/contract.js?v=z1"></script>
</body>
</html>
+39
View File
@@ -0,0 +1,39 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>Earnings Disclaimer | Downline Banners</title>
<meta name="description" content="Downline Banners sells advertising, not income. No earnings are promised; any payment happens only on-chain when later purchases happen.">
<link rel="canonical" href="https://downlinebanners.com/disclaimer">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Downline Banners">
<meta property="og:title" content="Earnings Disclaimer | Downline Banners">
<meta property="og:description" content="Downline Banners sells advertising, not income. No earnings are promised; any payment happens only on-chain when later purchases happen.">
<meta property="og:url" content="https://downlinebanners.com/disclaimer">
<meta property="og:image" content="https://downlinebanners.com/art/og-share.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="Downline Banners: banner real estate in one line, paid instantly on-chain">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Earnings Disclaimer | Downline Banners">
<meta name="twitter:description" content="Downline Banners sells advertising, not income. No earnings are promised; any payment happens only on-chain when later purchases happen.">
<meta name="twitter:image" content="https://downlinebanners.com/art/og-share.png">
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=2">
<link rel="stylesheet" href="/assets/line.css?v=8">
</head>
<body>
<main class="wrap legal">
<section class="hero"><h1>Earnings Disclaimer</h1><p class="lead">Please read this before you buy anything.</p><p class="muted small">Last updated November 14, 2026</p></section>
<div class="card"><h2>Advertising, not an investment</h2><p>Downline Banners sells advertising. It is not an investment, a security, a savings plan or an income opportunity, and nothing you buy here is a promise of money back.</p></div>
<div class="card"><h2>No earnings promised</h2><p>The only money a spot can bring back is its share of spots bought after it (and the sponsor share when someone you introduced buys). That depends entirely on other people choosing to buy later. If nobody buys after you, you receive nothing.</p><p>Most members who do not introduce anyone should expect to get back less than they paid, and possibly nothing. Members who introduce others are paid only when those people actually buy.</p><p>We do not promise, project or guarantee any earnings. Any numbers in examples, posts, banners or videos are illustrations or one member's results, not what you should expect.</p></div>
<div class="card"><h2>How any payment happens</h2><p>Any payment to you happens only on the blockchain, when a later purchase happens, and is paid by the smart contract in that same transaction. Nothing is held for you and there is nothing to withdraw. If no later purchase happens, no payment happens.</p></div>
<div class="card"><h2>Crypto risk</h2><ul><li>The price of POL moves. The dollar value of a payment can be higher or lower later than when it was paid.</li><li>You are responsible for your wallet and its recovery phrase. Nobody, including us, can recover a lost wallet or reverse a payment sent from it.</li><li>Blockchain transactions are final. Each one costs a small network fee (gas) in POL, paid to the network, not to us.</li><li>Use SafePal or any other crypto wallet you trust, and never share your recovery phrase with anyone. We will never ask for it.</li></ul></div>
<div class="card"><h2>Your decision</h2><p>Only spend what you can afford to lose completely. This is not financial, legal or tax advice. You are responsible for any taxes on what you receive.</p></div>
<div class="card"><h2>Contact</h2><p>Questions, problems or a request about your data: <a href="https://instantadpay.com/support" target="_blank" rel="noopener">network support</a>, or write to TrustClickz, 615 Green Valley Drive, Moody, AL 35004.</p></div>
</main>
<script src="/assets/common.js?v=20261114t"></script>
<script src="/assets/legal.js?v=1"></script>
</body>
</html>
+2 -2
View File
@@ -21,7 +21,7 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=2">
<link rel="stylesheet" href="/assets/line.css?v=7">
<link rel="stylesheet" href="/assets/line.css?v=8">
</head>
<body>
<main class="wrap">
@@ -39,7 +39,7 @@
<div class="card"><h3>The momentum fund</h3><p>When no spot has sold for 4 hours, the fund buys one (at most 12 a day). It gifts the spot to an active member who owns a paid spot and has not had a gift in 7 days, members who referred someone recently first. If nobody qualifies, the fund keeps the spot and its line money goes back into the fund.</p></div>
<div class="card"><h3>The rest of the network</h3><p>Open board slots show network sites such as InstantAdPay and LinkSpin. On InstantAdPay, ad credits buy advertising, not income.</p></div>
</main>
<script src="/assets/common.js?v=20261114p"></script>
<script src="/assets/common.js?v=20261114t"></script>
<script src="/assets/how.js?v=z1"></script>
</body>
</html>
+2 -2
View File
@@ -22,7 +22,7 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=2">
<link rel="stylesheet" href="/assets/line.css?v=7">
<link rel="stylesheet" href="/assets/line.css?v=8">
</head>
<body>
<main class="wrap">
@@ -52,7 +52,7 @@
</section>
<div id="status" class="note" hidden></div>
</main>
<script src="/assets/common.js?v=20261114p"></script>
<script src="/assets/common.js?v=20261114t"></script>
<script src="/assets/gate.js?v=1"></script>
</body>
</html>
+2 -2
View File
@@ -21,7 +21,7 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=2">
<link rel="stylesheet" href="/assets/line.css?v=7">
<link rel="stylesheet" href="/assets/line.css?v=8">
</head>
<body>
<main class="wrap">
@@ -48,7 +48,7 @@
<div id="status" class="note" hidden></div>
<div class="card" id="doneCard" hidden><h3>Your spot is in the line</h3><p>Next: add your image and link in My Spots. One free signature signs you in (it cannot move funds).</p><div class="row"><button class="btn" id="toMyBtn">Open My Spots</button></div><p class="small mono" id="txLink"></p><div id="zBought"></div></div>
</main>
<script src="/assets/common.js?v=20261114p"></script>
<script src="/assets/common.js?v=20261114t"></script>
<script src="/assets/wallet.js?v=1"></script>
<script src="/assets/join.js?v=20261114h"></script>
</body>
+2 -2
View File
@@ -21,7 +21,7 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=2">
<link rel="stylesheet" href="/assets/line.css?v=7">
<link rel="stylesheet" href="/assets/line.css?v=8">
</head>
<body>
<main class="wrap">
@@ -30,7 +30,7 @@
<div class="card"><div class="row" style="justify-content:space-between"><h3 style="margin:0">Spot sales</h3><span class="muted small" id="upd"></span></div>
<div id="rows"><p class="muted">Loading the ledger...</p></div><div id="zLedger"></div><div id="rows2"></div></div>
</main>
<script src="/assets/common.js?v=20261114p"></script>
<script src="/assets/common.js?v=20261114t"></script>
<script src="/assets/ledger.js?v=z1"></script>
</body>
</html>
+2 -2
View File
@@ -22,7 +22,7 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=2">
<link rel="stylesheet" href="/assets/line.css?v=7">
<link rel="stylesheet" href="/assets/line.css?v=8">
</head>
<body>
<main class="wrap">
@@ -41,7 +41,7 @@
</div>
<div id="status" class="note" hidden></div>
</main>
<script src="/assets/common.js?v=20261114p"></script>
<script src="/assets/common.js?v=20261114t"></script>
<script src="/assets/wallet.js?v=1"></script>
<script src="/assets/my.js?v=z1"></script>
</body>
+40
View File
@@ -0,0 +1,40 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>Privacy Policy | Downline Banners</title>
<meta name="description" content="What Downline Banners collects (wallet, username, visit checks), how the network shares one account through the hub, and what is public on the blockchain.">
<link rel="canonical" href="https://downlinebanners.com/privacy">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Downline Banners">
<meta property="og:title" content="Privacy Policy | Downline Banners">
<meta property="og:description" content="What Downline Banners collects (wallet, username, visit checks), how the network shares one account through the hub, and what is public on the blockchain.">
<meta property="og:url" content="https://downlinebanners.com/privacy">
<meta property="og:image" content="https://downlinebanners.com/art/og-share.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="Downline Banners: banner real estate in one line, paid instantly on-chain">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Privacy Policy | Downline Banners">
<meta name="twitter:description" content="What Downline Banners collects (wallet, username, visit checks), how the network shares one account through the hub, and what is public on the blockchain.">
<meta name="twitter:image" content="https://downlinebanners.com/art/og-share.png">
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=2">
<link rel="stylesheet" href="/assets/line.css?v=8">
</head>
<body>
<main class="wrap legal">
<section class="hero"><h1>Privacy Policy</h1><p class="lead">What we collect, why, and who sees it.</p><p class="muted small">Last updated November 14, 2026</p></section>
<div class="card"><h2>Who we are</h2><p>Downline Banners is run by TrustClickz, 615 Green Valley Drive, Moody, AL 35004. This policy says what we collect, why, and who sees it.</p></div>
<div class="card"><h2>What we collect</h2><ul><li><b>Your wallet address</b>, which you prove by signing a message (signing costs nothing and moves no money).</li><li><b>Your network username and sponsor</b>, looked up from the network hub when you sign in through InstantAdPay or LinkSpin. Downline Banners does not store your email address.</li><li><b>Your banner</b>: the image and the link you post, and how many views and clicks it gets.</li><li><b>Visit verification</b>: your IP address and browser type, combined into a one-way code, to count each viewer once and keep out bots. We do not keep the raw IP address with your views.</li><li><b>Cookies</b>: a sign-in cookie; a referral cookie (90 days) and a welcome-link cookie that remember who sent you; a random visitor code (1 year) and a short-lived pass for the board check, so views are counted fairly.</li></ul></div>
<div class="card"><h2>One account across the network</h2><p>The Crypto Team Build Network shares one account across its sites through the network hub. The hub keeps your email address, username, wallet and sponsor, and each network site (InstantAdPay, LinkSpin, Downline Banners, Viral Banner Blitz, Stack POL, Earners Corner) asks it who you are, so you have one identity and one sponsor everywhere. Sites only see what they need.</p></div>
<div class="card"><h2>What is public</h2><p>Purchases and payments on the blockchain are public and permanent: anyone can see the wallet addresses and amounts, and nobody can delete them. Our live ledger, leaderboards and toasts show your network username or a shortened wallet. When a spot sells, a payment message with the buyer's username (or a shortened wallet) and the amounts paid is posted to the network's Telegram payments topic.</p></div>
<div class="card"><h2>Who else sees it</h2><p>We do not sell your data. We use service providers to run the site (hosting, databases, blockchain connections, and Telegram for the payment messages), and we share data if the law requires it.</p></div>
<div class="card"><h2>Your choices</h2><p>You can ask us to delete your account data on this site or on the network hub. Records on the blockchain cannot be deleted by anyone. You can clear the cookies in your browser at any time; you will need to sign in again.</p></div>
<div class="card"><h2>Contact</h2><p>Questions, problems or a request about your data: <a href="https://instantadpay.com/support" target="_blank" rel="noopener">network support</a>, or write to TrustClickz, 615 Green Valley Drive, Moody, AL 35004.</p></div>
</main>
<script src="/assets/common.js?v=20261114t"></script>
<script src="/assets/legal.js?v=1"></script>
</body>
</html>
+2 -2
View File
@@ -21,7 +21,7 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=2">
<link rel="stylesheet" href="/assets/line.css?v=7">
<link rel="stylesheet" href="/assets/line.css?v=8">
<link rel="stylesheet" href="/assets/kit.css?v=1">
</head>
<body>
@@ -33,7 +33,7 @@
<div id="status" class="note" hidden></div>
<div id="kit"><p class="muted">Loading the kit...</p></div>
</main>
<script src="/assets/common.js?v=20261114p"></script>
<script src="/assets/common.js?v=20261114t"></script>
<script src="/assets/kitpage.js?v=1"></script>
<script src="/assets/promote.js?v=1"></script>
</body>
+45
View File
@@ -0,0 +1,45 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>Terms and Conditions | Downline Banners</title>
<meta name="description" content="The terms for using Downline Banners: what you buy (advertising), how each payment is split on-chain, no refunds, crypto risk and fair use.">
<link rel="canonical" href="https://downlinebanners.com/terms">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Downline Banners">
<meta property="og:title" content="Terms and Conditions | Downline Banners">
<meta property="og:description" content="The terms for using Downline Banners: what you buy (advertising), how each payment is split on-chain, no refunds, crypto risk and fair use.">
<meta property="og:url" content="https://downlinebanners.com/terms">
<meta property="og:image" content="https://downlinebanners.com/art/og-share.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="Downline Banners: banner real estate in one line, paid instantly on-chain">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Terms and Conditions | Downline Banners">
<meta name="twitter:description" content="The terms for using Downline Banners: what you buy (advertising), how each payment is split on-chain, no refunds, crypto risk and fair use.">
<meta name="twitter:image" content="https://downlinebanners.com/art/og-share.png">
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=2">
<link rel="stylesheet" href="/assets/line.css?v=8">
</head>
<body>
<main class="wrap legal">
<section class="hero"><h1>Terms and Conditions</h1><p class="lead">The rules for using Downline Banners, in plain English.</p><p class="muted small">Last updated November 14, 2026</p></section>
<div class="card"><h2>Who we are</h2><p>Downline Banners (downlinebanners.com) is run by TrustClickz, 615 Green Valley Drive, Moody, AL 35004. It is part of the Crypto Team Build Network: one network account works across InstantAdPay, LinkSpin, Downline Banners, Viral Banner Blitz, Stack POL and Earners Corner. By using Downline Banners you agree to these terms.</p></div>
<div class="card"><h2>What Downline Banners is</h2><p>Downline Banners is one global line of 468x60 banner spots on the Polygon blockchain.</p></div>
<div class="card"><h2>What you buy</h2><p>A spot costs $5, paid in POL at the Chainlink POL/USD price the contract reads at the moment you buy. Anything you send above the price comes back to you in the same transaction.</p><p>A spot buys advertising: 300 guaranteed views of your banner and link on the board, delivered within 30 days, and a place in the line. It does not buy income, a share of a business or an investment.</p><p>Every spot is a single, one-time purchase. Nothing renews and nothing is ever billed again. There are no subscriptions.</p></div>
<div class="card"><h2>How a payment is split</h2><p>The Downline Banners contract splits each $5 in the same transaction it is paid: 30% to the buyer's sponsor (no sponsor: the momentum fund), 55% to the owners of the 10 spots bought just before it (5.5% each), 10% to the company and 5% to the momentum fund.</p><p>The contract holds nothing except the momentum fund, which can only buy spots. When no spot has sold for a while, the fund buys one and gifts it to an active member, following the rules on the How it works page. The split is fixed in the contract code and there is no owner withdraw.</p><p>You are paid only when spots sell after yours. A payment goes straight to your wallet in the transaction of the later purchase. Nothing is held for you and there is nothing to withdraw.</p><p>The sponsor paid for a spot is decided when you buy: the network sponsor the network hub knows for the wallet that will own the spot, else the welcome link or referral link you arrived through. It is recorded on the contract with the purchase.</p></div>
<div class="card"><h2>Nothing is promised</h2><p>We do not promise or guarantee any income, payout, prize or result. Read the <a href="/disclaimer">Earnings Disclaimer</a>.</p></div>
<div class="card"><h2>No refunds</h2><p>Payments are made on the blockchain and are final once confirmed. We cannot reverse, cancel or refund them. Check the amount and what you are buying before you confirm in your wallet.</p></div>
<div class="card"><h2>Crypto risk</h2><ul><li>The price of POL moves. The dollar value of a payment can be higher or lower later than when it was paid.</li><li>You are responsible for your wallet and its recovery phrase. Nobody, including us, can recover a lost wallet or reverse a payment sent from it.</li><li>Blockchain transactions are final. Each one costs a small network fee (gas) in POL, paid to the network, not to us.</li><li>Use SafePal or any other crypto wallet you trust, and never share your recovery phrase with anyone. We will never ask for it.</li></ul></div>
<div class="card"><h2>Fair use</h2><p>Board views are counted for real browsers only. Bots, crawlers and repeated views from the same visitor do not count. We decide what counts as a view so the count stays honest for every advertiser.</p><p>Your banner must be your own or one you have the right to use, and its link must lead to a lawful page. No adult content, malware, phishing, deceptive offers, hate, or anything illegal where you or your visitors live. We may take a banner off the board and close an account that breaks these rules. A spot already bought stays on the blockchain; its views may stop if its banner breaks the rules.</p><p>Do not try to break, overload or game the site, and do not use more than one account to get extra free credits, views or prizes.</p></div>
<div class="card"><h2>Your account</h2><p>You sign in with your wallet or through InstantAdPay or LinkSpin. Your network account, username and sponsor are shared across the network through the network hub, as described in the <a href="/privacy">Privacy Policy</a>. You must be old enough to make a binding agreement where you live, and using crypto must be legal there.</p></div>
<div class="card"><h2>The service</h2><p>The site is provided as it is. We work to keep it running but cannot promise it will always be available or free of errors. The smart contract runs on Polygon on its own; its rules are public and can be checked on the <a href="/contract">contract page</a>. We may change features, prices of future purchases or these terms; changes apply from the date they are posted here.</p></div>
<div class="card"><h2>Limits</h2><p>As far as the law allows, we are not responsible for losses caused by the blockchain, your wallet, the price of POL, third-party websites in banners, or events outside our control, and our total responsibility to you is limited to what you paid for the purchase in question. These terms are governed by the laws of the State of Alabama, USA.</p></div>
<div class="card"><h2>Contact</h2><p>Questions, problems or a request about your data: <a href="https://instantadpay.com/support" target="_blank" rel="noopener">network support</a>, or write to TrustClickz, 615 Green Valley Drive, Moody, AL 35004.</p></div>
</main>
<script src="/assets/common.js?v=20261114t"></script>
<script src="/assets/legal.js?v=1"></script>
</body>
</html>
+35 -3
View File
@@ -29,11 +29,19 @@ const ok = (cond, what, extra) => { if (cond) { pass++; console.log(' ok ' +
// hub is unreachable). HUB.people: {id, username, wallet, sponsorId}; HUB.down makes every hub call fail with 503.
const HUB = { people: [], down: false, calls: 0, badSig: 0 }; const HUB_PORT = APP_PORT + 7, HUB_SECRET = 'b'.repeat(40);
const IAPNET = new Map(); const IAP_PORT = APP_PORT + 8;
const TG = []; const TG_PORT = APP_PORT + 9; // stand-in Telegram Bot API (trust pack 2026-11-14): never the real group
const hubView = p => p ? { id: p.id, username: p.username, wallet: p.wallet, sponsor: (x => x ? { id: x.id, username: x.username } : null)(HUB.people.find(y => y.id === p.sponsorId)), blocked: false, locked: false } : null;
function startStandIns() {
const http = require('node:http'); const crypto = require('node:crypto');
http.createServer(async (q, r) => { let b = ''; for await (const c of q) b += c; HUB.calls++;
http.createServer((q, r) => { let b = ''; q.on('data', c => { b += c; }); q.on('end', () => { let j = {}; try { j = JSON.parse(b || '{}'); } catch (e) {}
TG.push({ method: q.url.split('/').pop(), token: q.url.split('/')[1], body: j }); r.setHeader('Content-Type', 'application/json'); r.end('{"ok":true,"result":{}}'); }); }).listen(TG_PORT, '127.0.0.1');
http.createServer(async (q, r) => { let b = ''; for await (const c of q) b += c;
r.setHeader('Content-Type', 'application/json');
// the real hub serves the footer's network list publicly, unsigned (GET /v1/network-sites)
if (q.method === 'GET' && q.url === '/v1/network-sites') return r.end(JSON.stringify([{ id: 'iap', name: 'InstantAdPay', url: 'https://instantadpay.com' }, { id: 'linkspin', name: 'LinkSpin', url: 'https://linkspin.app' },
{ id: 'dlb', name: 'Downline Banners', url: 'https://downlinebanners.com' }, { id: 'vbb', name: 'Viral Banner Blitz', url: 'https://viralbannerblitz.com' }, { id: 'stackpol', name: 'Stack POL', url: 'https://stackpol.com' },
{ id: 'earnerscorner', name: 'Earners Corner', url: 'https://earnerscorner.com' }, { id: 'newsite', name: 'Hub Test Site', url: 'https://example.org' }]));
HUB.calls++;
if (HUB.down) { r.statusCode = 503; return r.end('{"error":"superseded"}'); }
const want = crypto.createHmac('sha256', HUB_SECRET).update(q.headers['x-hub-ts'] + '\n' + b).digest('hex');
if (q.headers['x-hub-sig'] !== want || q.headers['x-hub-site'] !== 'bannerline') { HUB.badSig++; r.statusCode = 401; return r.end('{"error":"unauthorized"}'); }
@@ -107,7 +115,8 @@ async function main() {
fs.writeFileSync(path.join(DATA, 'house.json'), JSON.stringify([{ key: 'one', title: 'Test house 1', img: '/art/house-iap.svg', link: 'https://example.com/' }, { key: 'two', title: 'Test house 2', img: '/art/house-linkspin.svg', link: 'https://example.net/' }]));
const env = Object.assign({}, process.env, { PORT: String(APP_PORT), DATA_DIR: DATA, CHAIN_ID: '31337', RPC_URLS: 'http://127.0.0.1:' + RPC_PORT, CONTRACT_ADDRESS: CA,
DEPLOY_BLOCK: String(deployBlock), POLL_MS: '1000', ADMIN_TOKEN: ADMIN, KEEPER_ENABLED: '1', KEEPER_KEY: W[7].signer.privateKey, KEEPER_STALL_HOURS: '0.01', KEEPER_EVERY_MIN: '0.25', NODE_ENV: 'development',
HUB_URL: 'http://127.0.0.1:' + HUB_PORT, HUB_SECRET, HUB_SITE: 'bannerline', HUB_ENABLED: '0', HUB_DOWN_MS: '400', NETWORK_LOOKUP_URL: 'http://127.0.0.1:' + IAP_PORT + '/api/network/member' });
HUB_URL: 'http://127.0.0.1:' + HUB_PORT, HUB_SECRET, HUB_SITE: 'bannerline', HUB_ENABLED: '0', HUB_DOWN_MS: '400', NETWORK_LOOKUP_URL: 'http://127.0.0.1:' + IAP_PORT + '/api/network/member',
TG_TOKEN: 'standin-token', TG_CHAT: '-100123', TG_PAY_TOPIC: '632242', TG_API: 'http://127.0.0.1:' + TG_PORT });
startStandIns();
const hid = n => 'h_' + String(n).padStart(16, '0');
const ZW = ethers.Wallet.createRandom().address.toLowerCase(); // a network member with no spot here
@@ -126,6 +135,13 @@ async function main() {
const qq = await u.json('/api/quote'); ok(qq.wei === q.toString() && qq.source === 'contract.quoteWei', '/api/quote reads quoteWei()', qq);
for (const p of ['/', '/board', '/join', '/my', '/how', '/assets/site.css', '/art/house-line.svg']) { const r = await u.req(p); ok(r.status === 200, 'GET ' + p + ' 200'); }
const r404 = await u.req('/nope'); ok(r404.status === 404, 'unknown path 404');
// trust pack (2026-11-14): legal pages + the network list from the hub
for (const p of ['/terms', '/disclaimer', '/privacy']) { const r = await u.req(p); const h = await r.text();
ok(r.status === 200 && h.includes('TrustClickz, 615 Green Valley Drive, Moody, AL 35004') && !h.includes('—') && !/at most 10 times|\$2\.75/.test(h), 'GET ' + p + ' 200 (TrustClickz, no em dash, no cap)'); }
{ const legal = (await (await u.req('/terms')).text()) + (await (await u.req('/disclaimer')).text()) + (await (await u.req('/privacy')).text());
ok(/300 guaranteed views/.test(legal) && /ever billed again/.test(legal) && /final once confirmed/.test(legal) && /momentum fund/.test(legal) && /network hub/.test(legal) && /not an investment/.test(legal), 'legal pages state the real mechanics (advertising, one-time, no refunds on-chain, momentum fund, the hub)'); }
{ let ns; for (let i = 0; i < 20; i++) { ns = await (await u.req('/api/network-sites')).json(); if (Array.isArray(ns) && ns.length === 7) break; await sleep(150); }
ok(Array.isArray(ns) && ns.length === 7 && ns[6].name === 'Hub Test Site', '/api/network-sites serves the hub list (a site added on the hub shows up)', ns && ns.map(x => x.name)); }
// promo kit (2026-11-14): one public feed read by /promote and by InstantAdPay's promo center
{
const kr = await u.req('/api/promo-kit?u=alpha'); const k = await kr.json();
@@ -240,6 +256,14 @@ async function main() {
const wv = client(); await wv.req('/w/' + wc); sp = await wv.json('/api/sponsor');
ok(sp.address === addr[B].toLowerCase() && sp.via === 'line', '/w/ welcome line: usernames resolved through the hub, first one with a spot here', sp);
ok(HUB.badSig === 0 && HUB.calls > 0, 'every hub call is signed as bannerline with HUB_SECRET', HUB);
// Telegram payment proof (stand-in API): one message per sale, with this week's numbers and an image above the text
{ const stt = await u.json('/api/stats'); let msgs = []; for (let i = 0; i < 40; i++) { msgs = TG.filter(c => c.method === 'sendMessage'); if (msgs.length >= stt.totals.spots) break; await sleep(250); }
const txs = msgs.map(c => (String(c.body.text).match(/\/tx\/(0x[0-9a-f]{64})/) || [])[1]);
ok(msgs.length === stt.totals.spots && new Set(txs).size === msgs.length && txs.every(Boolean), 'one Telegram message per spot sale, never two for the same tx', { msgs: msgs.length, spots: stt.totals.spots });
ok(msgs.every(c => c.token === 'botstandin-token' && c.body.chat_id === '-100123' && c.body.message_thread_id === 632242 && /This week: \d+ spots? .*\d+ spots in the line/.test(c.body.text)
&& c.body.link_preview_options && /^https:\/\/[^/]+\/art\/kit\/dlb-(spot|line|instant)-social\.png$/.test(c.body.link_preview_options.url) && c.body.link_preview_options.show_above_text === true && !c.body.text.includes('—')),
'each message: payments topic, this week\'s spot numbers, a large kit image above the text', msgs[0] && msgs[0].body);
ok(new Set(msgs.map(c => c.body.link_preview_options && c.body.link_preview_options.url)).size > 1, 'the image rotates between messages'); }
HUB.down = true;
sp = await u.json('/api/sponsor?ref=iapfallback'); ok(sp.address === addr[D].toLowerCase(), 'hub unreachable: InstantAdPay answers the username lookup', sp);
const t0 = Date.now(); sp = await rv.json('/api/sponsor?for=' + ethers.Wallet.createRandom().address); ok(sp.via === 'ref' && Date.now() - t0 < 2000, 'hub unreachable: the sponsor pick falls back at once (no wait on the hub)', [sp, Date.now() - t0]);
@@ -270,7 +294,7 @@ async function main() {
const watch = (pg, name) => { pg.on('console', msg => { if (msg.type() === 'error') errors.push(name + ': ' + msg.text() + ' @ ' + ((msg.location() || {}).url || '')); }); pg.on('pageerror', e => errors.push(name + ': ' + e.message)); };
// member context: signed in, gate skipped
const ctxM = await browser.newContext(); await ctxM.addCookies([{ name: 'bl.sid', value: m.jar['bl.sid'], url: BASE }]);
for (const p of ['/', '/board', '/how', '/join', '/my', '/promote']) {
for (const p of ['/', '/board', '/how', '/join', '/my', '/promote', '/terms', '/disclaimer', '/privacy']) {
const pg = await ctxM.newPage(); watch(pg, 'member ' + p);
await pg.goto(BASE + p, { waitUntil: 'networkidle' });
await pg.screenshot({ path: path.join(OUT, 'member' + (p === '/' ? '-home' : p.replace('/', '-')) + '.png'), fullPage: true });
@@ -281,6 +305,14 @@ async function main() {
await pg.waitForTimeout(500); await pg.screenshot({ path: path.join(OUT, 'member-promote.png'), fullPage: true });
await pg.setViewportSize({ width: 390, height: 844 }); await pg.waitForTimeout(300); await pg.screenshot({ path: path.join(OUT, 'member-promote-phone.png'), fullPage: true }); }
if (p === '/join') { await pg.waitForSelector('#buyCard:not([hidden])', { timeout: 8000 }).catch(() => {}); const price = await pg.textContent('#price'); ok(/^0\.0025/.test(price), '/join shows price ' + price); }
if (p === '/how') { await pg.waitForFunction(() => /Hub Test Site/.test((document.querySelector('footer .netline') || {}).textContent || ''), null, { timeout: 6000 }).catch(() => {});
const ft = (await pg.textContent('footer')).replace(/\s+/g, ' '); const hrefs = await pg.$$eval('footer a', as => as.map(a => a.getAttribute('href')));
ok(['/terms', '/disclaimer', '/privacy', '/contract', '/ledger'].every(h => hrefs.includes(h)) && /Support/.test(ft) && /TrustClickz · 615 Green Valley Drive, Moody, AL 35004/.test(ft)
&& /Part of the network · One account across the network: InstantAdPay · LinkSpin · Downline Banners · Viral Banner Blitz · Stack POL · Earners Corner · Hub Test Site/.test(ft) && !/RM Circle|rmcircle/i.test(ft)
&& (await pg.textContent('footer .netline .here')) === 'Downline Banners', 'footer: legal + proof links, company line, the hub network list with DLB as current, never RM Circle', ft.slice(-420));
await pg.locator('footer').screenshot({ path: path.join(OUT, 'footer-desktop.png') });
await pg.setViewportSize({ width: 390, height: 844 }); await pg.waitForTimeout(200);
ok(await pg.evaluate(() => document.documentElement.scrollWidth <= 390), 'footer fits a phone (no sideways scroll)'); await pg.locator('footer').screenshot({ path: path.join(OUT, 'footer-phone.png') }); }
const em = await pg.evaluate(() => document.body.innerText.includes('\u2014')); ok(!em, p + ' has no em dash');
await pg.close();
}
+20 -3
View File
@@ -15,6 +15,7 @@ const keeper = require('./keeper');
const { iface } = require('./abi');
const dlbnas = require('./dlbnas'); // Network Ad Space: standing house banner + finishing spots still owed views after 30 days (2026-11-13)
const refuelspots = require('./refuelspots'); // refuel spots: $50+ Monthly Refuels earn a spot, engine wallet pays (2026-11-13)
const netsites = require('./netsites'); // footer network list from the hub (trust pack 2026-11-14)
const tgproof = require('./tgproof'); // payment proof in the Telegram payments topic, one message per spot sale (2026-11-13)
const hubreport = require('./hubreport'); // network hub, shadow mode: members reported by wallet (2026-11-13), off unless HUB_ENABLED
const promokit = require('./promokit'); // promo kit feed /api/promo-kit, the /promote page, /art/kit/* creatives (2026-11-14)
@@ -286,7 +287,8 @@ const server = http.createServer(async (req, res) => {
let OR = {}; try { OR = JSON.parse(fs.readFileSync(path.join(C.dataDir, 'oldrefs.json'), 'utf8')); } catch (e) {}
const net = old && OR[old]; res.writeHead(301, { Location: net ? '/?ref=' + encodeURIComponent(net) : '/', 'Cache-Control': 'no-store' }); return res.end();
}
const PAGES = { '/': 'index.html', '/board': 'board.html', '/join': 'join.html', '/my': 'my.html', '/how': 'how.html', '/ledger': 'ledger.html', '/contract': 'contract.html' };
const PAGES = { '/': 'index.html', '/board': 'board.html', '/join': 'join.html', '/my': 'my.html', '/how': 'how.html', '/ledger': 'ledger.html', '/contract': 'contract.html',
'/terms': 'terms.html', '/disclaimer': 'disclaimer.html', '/privacy': 'privacy.html' }; // legal pages: trust pack 2026-11-14
if (PAGES[p]) {
const set = [];
if (setVid) set.push(setVid);
@@ -299,7 +301,7 @@ const server = http.createServer(async (req, res) => {
// sitemap (2026-11-13, SEO): the public pages only
if (p === '/sitemap.xml') {
const day = new Date().toISOString().slice(0, 10);
const urls = ['/', '/board', '/how', '/ledger', '/contract', '/join', '/promote'].map(u => '<url><loc>https://' + C.site + u + '</loc><lastmod>' + day + '</lastmod></url>').join('');
const urls = ['/', '/board', '/how', '/ledger', '/contract', '/join', '/promote', '/terms', '/disclaimer', '/privacy'].map(u => '<url><loc>https://' + C.site + u + '</loc><lastmod>' + day + '</lastmod></url>').join('');
res.writeHead(200, headers({ 'Content-Type': 'application/xml; charset=utf-8', 'Cache-Control': 'public, max-age=3600' }));
return res.end('<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' + urls + '</urlset>');
}
@@ -341,6 +343,7 @@ const server = http.createServer(async (req, res) => {
}
// -- public API
if (p === '/api/network-sites' && req.method === 'GET') return netsites.handle(req, res);
if (p === '/api/config' && req.method === 'GET') {
return json(res, 200, { site: C.site, chainId: C.chainId, chainName: C.chainName, contract: C.contract, rpc: C.publicRpc, explorer: C.explorer,
walletConnectProjectId: C.walletConnectProjectId, viewsOwed: C.viewsOwed, spotDays: C.spotDays, priceUsd: 5, ready: !!C.contract, sel: SEL }, extra);
@@ -537,12 +540,26 @@ const server = http.createServer(async (req, res) => {
}
});
// this Central-time week (from Monday 12:00 AM CT): spots taken, bought vs gifted by the momentum fund, plus the all-time count
function ctWeekStart(now) {
const p = Object.fromEntries(new Intl.DateTimeFormat('en-US', { timeZone: 'America/Chicago', weekday: 'short', hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false })
.formatToParts(new Date(now)).map(x => [x.type, x.value]));
const back = { Mon: 0, Tue: 1, Wed: 2, Thu: 3, Fri: 4, Sat: 5, Sun: 6 }[p.weekday] || 0;
return now - back * 86400000 - ((Number(p.hour) % 24) * 3600 + Number(p.minute) * 60 + Number(p.second)) * 1000;
}
function weekLine() {
const from = ctWeekStart(Date.now()); const all = chain.spots(); const wk = all.filter(s => s.boughtAt >= from);
const gifted = wk.filter(s => s.kind === 2).length;
return '\u{1F4CA} This week: ' + wk.length + ' spot' + (wk.length === 1 ? '' : 's') + (gifted ? ' (' + (wk.length - gifted) + ' bought, ' + gifted + ' gifted by the momentum fund)' : '') + ' · ' + all.length + ' spots in the line';
}
(async () => {
await docstore.init({}); // before anything reads its data
process.on('SIGTERM', () => { docstore.drain(8000).finally(() => process.exit(0)); });
store.load();
tgproof.init({ nameOf, contract: C.contract, explorer: C.explorer || 'https://polygonscan.com', site: C.site,
feeWallets: ['0x7627fc78876948ac9d95c1c9eb061e7d6d647b70', '0x8b7d33849a2c4d92c985be31e46dc564ba901ad2'] }); // contract feeA / feeB
feeWallets: ['0x7627fc78876948ac9d95c1c9eb061e7d6d647b70', '0x8b7d33849a2c4d92c985be31e46dc564ba901ad2'], // contract feeA / feeB
weekLine }); // this week's spot numbers on every sale message (trust pack 2026-11-14)
chain.init({ onEvent: tgproof.onEvent }); // every spot sale -> one payment-proof message in the payments topic
hubreport.init({ dataDir: C.dataDir, members: () => chain.allMembers() });
refuelspots.init({ lock: () => keeper.busy() }); keeper.setOtherBusy(() => refuelspots.busy());
+9 -3
View File
@@ -4,16 +4,20 @@
// dollar value at the contract's own price, then one line for the company + momentum fund share, then the Polygonscan link.
// Built from the chain events of the transaction (SpotBought first, then Paid / PaymentFailed in contract order). Sent once across
// app copies (docstore.claim). Never posts events older than 2 hours (a re-index after downtime must not flood the topic).
// Trust pack (Marty 2026-11-14, "post a Telegram with some kind of image and stats"): the message also carries this week's spot
// numbers (weekLine from server.js) and shows a large image above the text (Downline Banners' own kit art, rotated) through
// Telegram's link preview, so the full payout list never hits a photo caption's length limit. TG_API (tests only) = a stand-in.
'use strict';
const docstore = require('./docstore');
const ROLE = { SPONSOR: 0, LEVEL: 1, FEE_A: 2, FEE_B: 3, FUND: 4 };
let X = null; const buf = new Map();
const CARDS = ['/art/kit/dlb-spot-social.png', '/art/kit/dlb-line-social.png', '/art/kit/dlb-instant-social.png']; let card = 0;
const on = () => !!(process.env.TG_TOKEN && process.env.TG_CHAT);
const esc = s => String(s == null ? '' : s).replace(/[&<>]/g, c => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;' }[c]));
const pol = wei => { const v = Number(BigInt(wei) / 10n ** 12n) / 1e6; return v >= 100 ? v.toFixed(2) : v.toFixed(4); };
function init(deps) { X = deps; } // { nameOf(addr) -> username|null, contract, explorer, site }
function init(deps) { X = deps; } // { nameOf(addr) -> username|null, contract, explorer, site, feeWallets, weekLine() -> text|null }
function onEvent(ev) {
if (!on() || !ev || !ev.tx || !['SpotBought', 'Paid', 'PaymentFailed'].includes(ev.type)) return;
if (ev.ts && Date.now() - ev.ts > 2 * 3600000) return;
@@ -30,9 +34,10 @@ async function who(addr) {
async function send(tx, evs) {
const text = await compose(tx, evs); if (!text) return;
if (!(await docstore.claim('tgproof:' + tx))) return; // another app copy already posted this sale
const body = { chat_id: process.env.TG_CHAT, text, parse_mode: 'HTML', disable_web_page_preview: true };
const img = 'https://' + X.site + CARDS[card++ % CARDS.length];
const body = { chat_id: process.env.TG_CHAT, text, parse_mode: 'HTML', link_preview_options: { url: img, prefer_large_media: true, show_above_text: true } };
if (process.env.TG_PAY_TOPIC) body.message_thread_id = Number(process.env.TG_PAY_TOPIC);
const r = await fetch('https://api.telegram.org/bot' + process.env.TG_TOKEN + '/sendMessage', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body), signal: AbortSignal.timeout(15000) });
const r = await fetch(String(process.env.TG_API || 'https://api.telegram.org').replace(/\/+$/, '') + '/bot' + process.env.TG_TOKEN + '/sendMessage', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body), signal: AbortSignal.timeout(15000) });
const j = await r.json().catch(() => ({}));
if (!j.ok) console.error('tgproof send failed', r.status, String(j.description || '').slice(0, 120));
else console.log('tgproof posted', String(tx).slice(0, 12));
@@ -59,6 +64,7 @@ async function compose(tx, evs) {
else if (e.role === ROLE.LEVEL) lines.push('\u{1F4B8} Line ' + level + ' (spot #' + (sb.id - level) + '): ' + pol(e.amount) + ' POL' + usd(e.amount) + ' → ' + await who(e.to));
}
if (house > 0n) lines.push('\u{1F3E6} Company + momentum fund: ' + pol(house.toString()) + ' POL' + usd(house.toString()));
if (X.weekLine) { try { const w = X.weekLine(); if (w) lines.push(w); } catch (e) {} }
lines.push('· <a href="' + esc(X.explorer) + '/tx/' + esc(tx) + '">Verify on Polygonscan</a> · <a href="https://' + esc(X.site) + '/ledger">Live ledger</a>');
return lines.join('\n');
}