Commit Graph

12 Commits

Author SHA1 Message Date
martbost 86a84b9606 GET /api/admin/member-lookup (Marty 2026-11-14, network hub member lookup): read-only, behind the admin token; ?q=<wallet> | #<banner id> | <username> answers myData (banners, credits, rewards) plus known, record, purchases and sponsored (VBBShop Purchase rows with tx), contract, explorer. Smoke 245/245
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 12:53:40 -06:00
martbost 89f79f934b Tracked network links (Marty 2026-11-14: "make sure each of these sites is its own traffic source and link spun so we can track it"). netsites.js: /api/network-sites adds go = the LinkSpin network link for each site with ?src=<this site> (linkspin.app/r/<code>, fixed codes on Marty's LinkSpin account), this site found by NETWORK_SITE_ID or the request host; the footer uses go (rel nofollow), plain url as fallback. Promo kit: every link gets a tracked twin (linkspin.app/r/nwvbb?src=vbb&s1=<member>&s2=<page>, lands on the same page with ?ref=<member>), trackedTemplate; /promote shows both. Same netsites.js in all five sites. common.js?v=7, kitpage.js?v=2. Smoke 242/242
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 11:38:02 -06:00
martbost 2fe3d9e4c0 Trust pack (Marty 2026-11-14): contract proof, live ledger, proof toasts, Telegram sale cards, legal pages, network footer.
- proof.js: /api/ledger (each VBBShop purchase with its split read from the receipt's Paid/PaymentFailed events, else the contract's fixed 30/10/60 math; weekly prize transfers with their transactions), /api/contract (owner, prize wallet, company, keeper, paused, orders, balance and owed, read live and cached 5 min; Sourcify exact match, Polygonscan pending).
- Telegram (CTB Rewards bot, payments topic, TG_TOKEN/TG_CHAT/TG_PAY_TOPIC same as Downline Banners): one photo card per purchase (prebuilt VBB proof image rotated, buyer, sponsor/prize/company split in POL, this week's purchases + prize pot, Polygonscan + ledger links) and one line per confirmed prize payout. Hooks: shop.setHook (newly credited purchases only) and prize.setHook (confirmed transfers); once per tx via an in-process guard plus docstore.claim; nothing older than 2 hours.
- Pages /contract, /ledger, /terms, /disclaimer (Earnings Disclaimer), /privacy (TrustClickz, real mechanics: advertising not income, same-transaction split, prize wallet holds the 10% until Monday, no refunds on-chain, one-time purchases, crypto risk, data incl. hashed visit checks and the network hub); sitemap.
- Footer: Terms, Earnings Disclaimer, Privacy, Contract, Ledger, Support, company line, 'Part of the network' from the hub (netsites.js, /api/network-sites, fallback list), VBB marked current. Toasts add purchases and prize payouts.
- tools/proof-art.mjs renders public/art/proof/vbb-proof-{pink,blue,yellow}.png. common.js?v=5, vbb.css?v=6.
chain.mjs 49/49 (real contract on anvil + stand-in Telegram: exact split, 2 cards, no repost on rescans, 6 prize lines). smoke 241/241.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 10:38:40 -06:00
martbost d049c529ac LinkSpin Banner Spins in Viral Banner Blitz (Marty 2026-11-14: "make sure Viral Banner Blitz incorporates banner spins that could be pulled in just like downline banners"), the Downline Banners pattern. lsspins.js calls LinkSpin's /api/partner/bl/spins with { site: 'vbb' }, signed with NETWORK_SSO_SECRET (by wallet; the network username too for network-verified members). My Banners: "Use my LinkSpin Banner Spin" lists the member's 125x125 / 250x250 spins (GET /api/my/lsspins) and one tap posts one (POST /api/my/banners { spinId }): one credit, same credit + waiting rules, image + link from LinkSpin's signed answer only (https, same host), the image is the spin's rotating image and the link its click link, so clicks count in LinkSpin Reports under a Viral Banner Blitz source. /go/ fills {clickid}, {spot} (banner number) and {type} (loop or waiting). Splash: the loop's open places (one stays "post yours") and the empty waiting line show members' Banner Spins (SPIN tiles, refreshed every 10 minutes, one per member, none for a member with a banner on the page, no image twice, same picks for 2 minutes); they are never in the loop list, never shift it, cycle or earn, and a note says so. Admin status: lsSpins. LS_PARTNER_URL for the smoke stand-in. common.js?v=4, splash.js?v=3, my.js?v=3, vbb.css?v=5. Smoke 227/227 (35 new, stand-in LinkSpin), chain 29/29. Needs LinkSpin 5d630ec.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 10:07:41 -06:00
martbost aee1ccc36a VBB purchases live + weekly prize payouts (Marty 2026-11-14: "why does it say 'coming soon' on all the stuff in it? Shouldn't it all be live already?")
Buying (VBBShop 0x36F6...07D7): Packages page has live Buy buttons for the 10 and 40 credit packs (USD price + live POL from quoteWei, SafePal or any other crypto wallet, one-time, never a subscription, where the payment goes); My Banners has "Add the banner look ($2)" on each waiting or in-loop banner (SKU 3, ref = banner id) and a 40-character teaser editor once it has the look. POST /api/my/order builds the member's buy() call on the server (fresh keeper voucher when the hub knows their sponsor, else no sponsor); the page checks the connected wallet is the member's VBB account (explains how to switch if not), checks the balance, sends with Polygon's fee floor (/api/gas), waits on /api/tx, nudges the watcher (/api/my/paid) and polls until the credits or the look arrive. Public: /api/quote, /api/gas, /api/tx/<hash>; /api/config has shop {live, contract} + explorer. The banner look on the loop: double border + star, hover teaser (always shown on touch screens; default = the link's site). Only Tokens still says coming soon. wallet.js gains sendTx/waitTx/balance (DLB flow).

Weekly prize payouts (prize.js): each Central-time week's pot = 10% of its VBBShop sales (usdCents of Purchase events by block time), $20 floor (company top-up shown to admin), $50 cap internal, half per board, 50/30/20. Every Monday the app prepares last week's plan (winners, wallets, USD; POL quoted live from the Chainlink feed the contract uses). /admin "Approve and pay" (two clicks): refuses unless PRIZE_KEY is the contract's prizeWallet(), the feed is fresh and the wallet holds the POL + gas (says how much more to send); then once per week (docstore.claim in MySQL + plan status), consecutive nonces, each hash saved as sent, stops at the first unclear send (never auto-retried), receipts watched. Ties: earlier to reach the count wins (leaderboards use the same rule). A winner that cannot be paid (the prize or company wallet) is skipped and the rest move up; an unfilled place stays in the prize wallet. /leaders shows past winners with transaction links. Posts nothing anywhere. Compose passes PRIZE_KEY.

Tests: smoke 192/192 (stand-in chain answers quoteWei + receipts: quote, order calldata + voucher, look purchase, teaser, prizes API, UI Buy buttons). New qa/chain.mjs on a local anvil with the real VBBShop + mock feed: buy -> Purchase -> credits, voucher binds sponsor, 30/10/60 split, overpay refunded, banner look; prize prepare -> short refusal -> pay 6 transfers exact POL -> paid once: 29/29. common.js?v=3, vbb.css?v=4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:47:58 -06:00
martbost a6a9b3cace Promo kit (Marty 2026-11-14: "get all the creatives built ... and put them in all the places they need to go"): promokit.js is the one source for the VBB kit, published as GET /api/promo-kit?u=<network username or wallet> (public, CORS open, read by /promote and InstantAdPay's promo center): personal links (?ref=), 21 creatives (3 angles: free daily post / every visitor pushes the loop / weekly prizes, in 125x125, 468x60, 728x90, 300x250, 160x600, 1200x630, 1080x1080) at /art/kit/vbb-<angle>-<shape>.png (ad-blocker-neutral names, rendered by tools/kit-art.mjs with Playwright), 5 lines, 3 headlines, 1 email, 2 posts built from config (perShift, viewsPerCycle, prize floor shown as "at least", never the cap). /promote page (kitpage.js + promote.js + kit.css): username from sign-in, ?u= or typed. Nav + footer link Promote. Network zones wired like DLB (common.js ZONES: footer wide/phone, Leaderboards, My Banners, How it works; 404 in server.js ZONE_404), never on the loop page; ids empty until the LinkSpin zones exist. CSP admits linkspin.app. common.js?v=2, vbb.css?v=3. Smoke 160/160 on this commit alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:41:50 -06:00
martbost 840161b367 Membership and sponsors through the network hub (Marty 2026-11-14): hubpeople.js (the Downline Banners module, signed as vbb, cached 5 minutes, never waits on a down hub); netMember asks the hub first, InstantAdPay only when the hub is unreachable. Free daily credits: verified = the hub knows this wallet, or the network member who signed in through InstantAdPay/LinkSpin (by the token's email, never stored); InstantAdPay or a network sign-in counts only while the hub is unreachable. /api/my/voucher: sponsor = the hub network sponsor for the wallet, resolved to a wallet by hub id; hub unreachable = no voucher (why hub-unavailable). Admin status shows hubLookup. Smoke 142/142 (stand-in hub answers /v1/resolve)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:25:57 -06:00
martbost be9de262db Launch prep: /health + Dockerfile HEALTHCHECK; old site links (/?<old username>, /splashpg.php?pid=N&r=, /lcp.php?pid=N&r= -> /?ref=<network username> from the oldrefs.json MySQL document, loaded by POST /api/admin/oldrefs; any other *.php -> /), checked before any page; hubreport.js (DLB pattern): each VBBShop purchase reported to the network hub by wallet, first as contract-bind with the sponsor, later as contract-spend, signed as vbb, off unless HUB_ENABLED; compose passes HUB_* + RPC_URLS + CHAIN_ID. Smoke 134/134
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 08:03:26 -06:00
martbost 07cc1944e6 VBBShop hooks (inert until configured, nothing deployed): GET /api/my/voucher signs an EIP-712 sponsor voucher with KEEPER_KEY when the hub lookup names the member's network sponsor (new optional sponsor field; none or self = no voucher); shop.js watcher reads Purchase logs (CONTRACT_ADDRESS + CHAIN_RPC, confirmed blocks, 1,000-block ranges) and credits packs once per txHash:logIndex, dedupe marks saved in vbb.json with the credits; admin status shows the watcher, never the key. Packages page stays coming soon. Smoke 117/117 (fake chain + voucher checks)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:20:24 -06:00
martbost 885187bfb1 Free daily post credits for network-verified members only (Marty 2026-11-13): InstantAdPay/LinkSpin sign-in or a wallet the network knows; plain wallets rechecked each visit; copy on My Banners, How and Packages; smoke 102/102
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 15:48:30 -06:00
martbost cb77582926 Weekly prize pot (Marty 2026-11-13): 10% of the week's sales, $20 floor topped up by the company, $50 cap kept internal; half per leaderboard, split 50/30/20; leaderboard page shows the live pot, never the cap; smoke 100/100
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 15:42:03 -06:00
martbost 832395daa4 VBB v1: Marty's approved numbers as config defaults (1 free credit/day; packs 10 for $3, 40 for $10; look $2; split 30/70 kept for later; 150 views per cycle; weekly prizes $15/$7/$3 per leaderboard, display only); packages page shows planned prices as coming soon; smoke test (99/99); OG image + icon; env example + compose (not deployed)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 15:30:19 -06:00