Link the wallet that should receive your payouts. One free signature, no transaction. SafePal is the recommended wallet; MetaMask, Phantom and any WalletConnect wallet work too.
Nothing yet. Your first package shows here with its transaction, what you paid in POL, and who in your line was paid.
';
+ }
+ async function guard(btn, fn) { if (btn.disabled) return; btn.disabled = true; try { await fn(); } catch (e) { CR.toast((e && e.message) || 'Something went wrong.', true); } finally { btn.disabled = false; } }
+
+ // a named sponsor that cannot be paid right now: hold the transaction and say why (never credit the company by default)
+ function holdText(sp) {
+ const who = sp.sponsorName ? ('@' + String(sp.sponsorName).replace(/^@/, '')) : 'your sponsor';
+ if (sp.sponsorBlocked === 'claim' && sp.claim) return (sp.claim.nobody ? 'Nobody above you on LinkSpin has a wallet yet, so there is no one for the contract to pay. ' : who + ' has not linked a wallet on LinkSpin yet. ') + 'Your first purchase waits until ' + (sp.claim.deadline ? new Date(sp.claim.deadline).toLocaleDateString() : 'they do') + ', then it goes ahead with the nearest member above who has one. Nothing was charged.';
+ if (sp.sponsorBlocked === 'notActivated') return who + ' has not switched on payouts yet, so this purchase would credit the company instead of them. Ask them to switch on payouts first (one free transaction).';
+ if (sp.sponsorBlocked === 'rpc') return 'Could not confirm your sponsor on the chain just now. Try again in a minute; nothing was charged.';
+ return 'Your sponsor link could not be matched to a member. Message support before buying so ' + who + ' gets credit.';
+ }
+ async function linkWallet() { CR.toast('Check your wallet for the free link signature…'); await IAPWallet.signIn(); CR.toast('Wallet linked. Earnings pay there from now on.'); await load(); }
+ async function activate() {
+ const me = await CR.me(true); if (me.sponsorBlocked) { $('holdBox').textContent = holdText(me); $('holdBox').hidden = false; return; }
+ CR.toast('Confirm the free activation in your wallet…');
+ const r = await IAPWallet.activate(me.sponsorId || 0);
+ if (!r.receipt || r.receipt.status !== '0x1') throw new Error('Transaction reverted. Check the explorer.');
+ CR.toast('Payouts are on. Your invite link is live.'); await load();
+ }
+ async function buy() {
+ const p = sel(); if (!p || !p.costWei) return;
+ $('holdBox').hidden = true;
+ let me = await CR.me(true);
+ if (!me.address) { CR.toast('Link your wallet first: one quick signature…'); await IAPWallet.signIn(); me = await CR.me(true); }
+ const want = String(me.address || '').toLowerCase(); if (!want) throw new Error('No wallet linked.');
+ await IAPWallet.connect();
+ let cur = String(await IAPWallet.activeAddress() || '').toLowerCase();
+ if (cur !== want) { CR.toast('Pick ' + want.slice(0, 6) + '…' + want.slice(-4) + ' in your wallet\'s account picker…'); cur = String(await IAPWallet.pickAccount() || '').toLowerCase(); }
+ if (cur !== want) throw new Error('Your wallet connected as ' + cur.slice(0, 6) + '…' + cur.slice(-4) + ' but your linked wallet is ' + want.slice(0, 6) + '…' + want.slice(-4) + '. Switch accounts in the wallet app and try again.');
+ const sp = await CR.get('/api/sponsor');
+ if (!me.memberId && sp.sponsorBlocked) { $('holdBox').textContent = holdText(sp); $('holdBox').hidden = false; return; }
+ try { // pre-flight: the POL has to be there; Trust Wallet refuses transactions that spend most of a balance
+ const need = BigInt(p.costWei) + BigInt(p.costWei) / 50n;
+ const bal = await IAPWallet.balance(want);
+ if (bal < need) { CR.toast('That wallet holds ' + pol(bal.toString()) + ' POL, but this package needs about ' + pol(need.toString()) + ' POL plus a little for gas. Top it up and try again.', true); return; }
+ const pct = Number(need * 100n / bal);
+ if (/trust/i.test(IAPWallet.walletName() || '') && pct > 55) {
+ const ok = await CR.dialog({ title: 'Heads up for Trust Wallet', text: 'This purchase uses about ' + pct + '% of the POL in your wallet, and Trust Wallet refuses transactions that spend most of a balance. Add some POL first, or continue and see if it lets it through.', ok: 'Continue' });
+ if (!ok) return;
+ }
+ } catch (e) { /* balance read failed: let the wallet decide */ }
+ CR.toast('Confirm the purchase in your wallet…');
+ const r = await IAPWallet.buy(Number(p.id), sp.sponsorId || 0, p.costWei);
+ if (!r.receipt || r.receipt.status !== '0x1') throw new Error('Transaction reverted. Nothing was charged beyond gas.');
+ CR.toast('Settled on-chain. Your credits are in Ads now.');
+ await load();
+ }
+ $('buyBtn').addEventListener('click', () => guard($('buyBtn'), buy));
+ $('cardBtn').addEventListener('click', () => guard($('cardBtn'), async () => {
+ const p = sel(); const need = p && p.costWei ? Math.max(10, Math.ceil(Number(BigInt(p.costWei) / 1000000000000000000n)) + 3) : 30;
+ const q = '/api/moonpay-url?pol=' + need + (ME && ME.address ? '&address=' + encodeURIComponent(ME.address) : '');
+ const r = await CR.get(q); if (!r.url) throw new Error('The card on-ramp is not available right now.');
+ window.open(r.url, '_blank', 'noopener'); CR.toast('MoonPay opened in a new tab. POL lands straight in your own wallet.');
+ }));
+
+ async function load() {
+ try { [CFG, ME] = await Promise.all([CR.get('/api/config'), CR.me(true)]); } catch (e) { CR.sub('could not load'); return; }
+ let cat = null, E = null;
+ try { [cat, CAMP, DASH, E] = await Promise.all([CR.get('/api/catalog'), CR.get('/api/my/campaigns'), CR.get('/api/my/dashboard'), CR.get('/api/my/activity')]); } catch (e) {}
+ CAT = (cat && cat.products) || [];
+ CR.sub((CAMP ? fmt(CAMP.availableCredits) + ' free to spend · ' + fmt(CAMP.inCampaigns) + ' in live ads' : '') + (CAT[0] && CAT[0].costWei ? '' : ' · price feed catching up'));
+ paintTiles(); paintPkgs(); paintQuote(); paintGoes(); paintWallet(); paintBuys(E);
+ const spName = ME.sponsorName ? ('@' + String(ME.sponsorName).replace(/^@/, '')) : null;
+ $('sponsorLine').innerHTML = spName
+ ? 'Your sponsor ' + esc(spName) + ' is placed on the contract. The moment you confirm, half of the package lands in their wallet and the rest splits as shown. Credits appear in Ads right away.'
+ : 'No sponsor is recorded on your account. Your purchase still works; the sponsor share goes to the platform position. If someone invited you, open their invite link first.';
+ if (ME.sponsorBlocked) { $('holdBox').textContent = holdText(ME); $('holdBox').hidden = false; }
+ }
+ CR.requireSession(load);
+})();
diff --git a/public/assets/join.js b/public/assets/join.js
index 8e62f65..41cf64d 100644
--- a/public/assets/join.js
+++ b/public/assets/join.js
@@ -1,112 +1,66 @@
-// Invite / lead-capture page: /join/[?v=]
-// Email first (code sign-in creates the account), wallet later inside the
-// member area. The angle only changes the hook copy; the sponsor cookie was
-// set by the server when this page was served.
+// Join / sign-in page: /join, /join/[?v=] (2026-10-07, Instrument scheme). Email first, the code
+// door creates the account, wallet later inside the Control Room. The sponsor cookie was set by the server when
+// this page was served; ?v= only changes the hook copy. Uses IAP.requestCode from common.js for the sign-up guard
+// (honeypot, form age, icon check) so the door stays the same one the engine protects.
(function () {
const $ = id => document.getElementById(id);
- const LEG = (brand, seg) => seg === 'adv'
- ? { eyebrow: 'For former ' + brand + ' advertisers', h: 'Your next ad budget pays you back.',
- lead: brand + ' is closed. The people who bought ads there are exactly who LinkSpin was built for: real ad packages from $5, seven formats, and every package in your line paid out by a verified contract on Polygon in the same transaction.',
- points: ['Welcome-back credits land the moment your account exists: enough to run a real banner or text campaign today, on us.', 'Seven formats: banners, text ads, login ads, solo ads to member inboxes, video, featured links and verified visits. Views are timed on the server, so a real person saw your ad.', 'When anyone in your line buys ads, the contract pays you in that same transaction. Public on Polygonscan, nothing held, nothing to withdraw.'],
- cta: 'Claim your welcome-back credits', sub: 'Free account by email. No password, no wallet today. Use the email you had on ' + brand + ': the credits are tied to it.', video: false }
- : { eyebrow: 'For former ' + brand + ' members', h: 'Same daily habit. Real payouts on-chain.',
- lead: 'You viewed ads on ' + brand + '. Here you view ads to earn credits, run your own campaign with them for free, and when anyone in your line buys ads you are paid in POL to your own wallet in the same transaction.',
- points: ['Welcome-back credits on day one, so your first campaign runs before you have viewed a single ad.', 'Join with just an email. No password, no wallet today. Link a wallet later, only when you want payouts switched on.', 'Every payout is a public transaction on Polygon. Nothing is held, so there is nothing to withdraw and nothing to wait for.'],
- cta: 'Claim your welcome-back credits', sub: 'Free account by email. Use the email you had on ' + brand + ': the credits are tied to it.', video: false };
+ const esc = s => String(s == null ? '' : s).replace(/[&<>"]/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c]));
+ const framed = (() => { try { return window.top !== window.self; } catch (e) { return true; } })();
+ // hook angles (LinkSpin copy only; the legacy Faucet Wave / Tier One Ads angles fall back to the default)
const ANGLES = {
- 'fw-adv': LEG('Faucet Wave', 'adv'), 'fw-earn': LEG('Faucet Wave', 'earn'), 't1-adv': LEG('Tier One Ads', 'adv'), 't1-earn': LEG('Tier One Ads', 'earn'),
- instant: { eyebrow: 'Same-transaction payouts', h: 'Paid before the page reloads.', lead: 'What if your commission landed before the thank-you page finished loading? On LinkSpin that is not a metaphor. A smart contract on Polygon splits every ad package the moment it sells.',
- points: ['A verified contract splits every package in the same transaction it sells: 50 percent to the sponsor, 20 and 10 up the line, 20 to the platform.', 'It lands in your own wallet in seconds. There is no balance to withdraw because nothing is ever held.', 'Every payment is public on Polygonscan, so you can check the claim before you spend a dollar.'],
- cta: 'See a payout land in seconds', sub: 'Free account by email. No password, no wallet today. Your invite link is live the moment you are in.' },
- adspend: { eyebrow: 'For marketers who buy traffic', h: 'You were buying ads anyway.', lead: 'Every ad dollar you ever spent went one direction: out. Here the ad spend in your line pays you, in the same transaction, on a public ledger. Seven formats, dwell-timed views, packages from $5.',
- points: ['Seven formats: banners, text ads, login ads, solo ads to member inboxes, video, featured links and verified visits.', 'Views are timed on the server, so a real person saw your ad. Banners and text also run across a partner ad network.', 'When anyone in your line buys ads, the contract pays you in that same transaction.'],
- cta: 'Put your next ad dollar where it pays you back', sub: 'Free account by email. See every format and the live rates before you buy anything.' },
- free: { eyebrow: 'Costs nothing to try', h: 'Watch first. Spend never.', lead: 'Join free, view a few ads, earn credits, and run your first campaign for zero dollars. Upgrade only if you want more reach.',
- points: ['Join with just an email. No password, no wallet today.', 'View a few ads each day and earn credits you can spend on your own banner or text campaign.', 'Buy a package only if you want more reach. They start at $5, and every payout on them is public.'],
- cta: 'Start for free. No card, no wallet.', sub: 'Type your email and we send a 6-digit code. That is the whole signup.' },
- ledger: { eyebrow: 'No back office', h: 'No back office. No payday.', lead: 'Your last program paid you on the 15th, if it paid you. Here every payout is a public transaction on Polygon you can read yourself, and nothing is ever held.',
- points: ['Every payout is a public transaction on Polygon. Click it, read it, verify it yourself.', 'The contract holds zero balance. It splits and sends in the same transaction, with no pause switch and no upgrade path.', 'No back office means nobody can delay, reverse or review your commission.'],
- cta: 'Check the ledger yourself, then decide', sub: 'Free account by email. The public ledger and the verified contract are one click from your dashboard.' },
- two: { eyebrow: 'The referral side, exactly as coded', h: 'Two buyers open level two.', lead: 'Every direct buyer pays you 50 percent from their first package. Two qualifying buyers open level two, five open level three. Written as constants in a verified contract.',
- points: ['Every direct buyer pays you 50 percent from their very first package.', 'Two qualifying buyers open level two at 20 percent. Five open level three at 10 percent. Constants in a verified contract.', 'Until a level opens, its share climbs to the next qualified member above, so the plan rewards the people who build.'],
- cta: 'Start your line. Two buyers is the target.', sub: 'Free account by email. Your invite link and the team-building plays are waiting inside.' }
+ instant: { eyebrow: 'Same-transaction payouts', h: 'Paid before the page reloads.', lead: 'A verified contract on Polygon splits every ad package the moment it sells: half to the sponsor, 20 and 10 up the line, 20 to the platform. It lands in your own wallet in seconds, on a public ledger.', points: ['Nothing is held by the site. Nothing is promised for later.', 'Every payout is a transaction you can open and read.', 'Join free by email. Link a wallet only when you want to be paid.'], cta: 'See a payout land in seconds', sub: 'free account by email' },
+ free: { eyebrow: 'Costs nothing to try', h: 'One link. Zero dollars.', lead: 'Spin links, bridge and review pages, and an ad zone for your own site are free. View a few ads a day and you earn credits to run your own banner or text ad. Buy a package only if you want more.', points: ['Join with just an email. No password, no wallet today.', 'Your first spin link is live the second you make it.', 'Credits from viewing ads pay for your first campaign.'], cta: 'Start for free. No card, no wallet.', sub: 'type your email, get a code, that is the whole signup' },
+ ledger: { eyebrow: 'No back office', h: 'No back office. No payday.', lead: 'Your last program paid you on the 15th, if it paid you. Here every payout is a public transaction on Polygon you can read yourself, and the contract holds zero balance.', points: ['Every payout is public. Click it, read it, verify it.', 'The contract has no pause button and no owner power over money.', 'Join free by email. The ledger is one click from your dashboard.'], cta: 'Check the ledger yourself, then decide', sub: 'free account by email' },
+ two: { eyebrow: 'The referral side, exactly as coded', h: 'Two buyers open level two.', lead: 'Every direct buyer pays you half of their package from their very first purchase. Two qualifying buyers open level two at 20 percent. Five open level three at 10 percent. Constants in a verified contract.', points: ['Half of every direct purchase, instantly.', 'Level 2 at two qualifying buyers, level 3 at five.', 'Your invite link is live the moment you are in.'], cta: 'Start your line. Two buyers is the target.', sub: 'free account by email' },
+ adspend: { eyebrow: 'For marketers who buy traffic', h: 'You were buying ads anyway.', lead: 'Every ad dollar you ever spent went one direction: out. Here the ad spend in your line pays you, in the same transaction, on a public ledger. Banner, text and login ads, packages from $10.', points: ['Views are timed on the server, so a real person saw your ad.', 'Your ads run in the viewer, on member sites and across the partner network.', 'Rotate the pages you promote with one spin link, free.'], cta: 'Put your next ad dollar where it pays you back', sub: 'free account by email, see every rate before you buy' }
};
- // ?name=First personalises the page (site-owner links, Marty 2026-09-12): letters, spaces, hyphens,
- // apostrophes only, 30 chars. On the company placement links it says the top spot is reserved.
- const who = String(new URLSearchParams(location.search).get('name') || '').replace(/[^A-Za-z\u00C0-\u024F' -]/g, '').trim().slice(0, 30);
- if (who) {
- const top = /^\/join\/(company|top)$/i.test(location.pathname);
- const h = $('jnHello');
- if (h) { h.textContent = who + (top ? ', your spot directly under the company at the top is reserved for you. Activate with the $20 package to claim it.' : ', this invitation is for you.'); h.hidden = false; }
- }
- const v = new URLSearchParams(location.search).get('v') || (document.cookie.match(/(?:^|; )iap\.angle=([^;]+)/) || [])[1] || '';
- const a = v && ANGLES[v];
+ const v = (new URLSearchParams(location.search).get('v') || (document.cookie.match(/(?:^|; )iap\.angle=([^;]+)/) || [])[1] || '').toLowerCase();
+ const a = ANGLES[v];
if (a) {
- document.body.classList.add('squeeze'); // server sets it too; this covers cached HTML
- $('jnEyebrow').textContent = '· ' + a.eyebrow; $('jnHead').innerHTML = a.h; $('jnLead').textContent = a.lead;
- if (a.cta) { $('jnCapH').textContent = a.cta; $('jnCapSub').textContent = a.sub || ''; }
- // the matching hook video + this angle's three points replace the worked example
- const VID = 'https://coolify-saasytop.nyc3.digitaloceanspaces.com/promo/';
- const vid = $('jnVideo');
- if (a.video === false) vid.hidden = true; else { vid.src = VID + v + '.mp4'; vid.poster = VID + v + '.jpg'; }
- $('jnPoints').innerHTML = (a.points || []).map(t => '
+ LinkSpin
+
+ already a member? the same form signs you in
+
-
-
Personal invitation from
-
LinkSpin· Advertise and earn on Polygon
-
-
Advertise and earn. Paid on-chain, instantly.
-
Every ad package splits to real wallets in the same transaction it sells. No pending payouts, no withdraw button, and every payment is public.
-
-
-
-
-
-
+
+
+
+
Invited bysponsor set
+
+
+
Email first. Wallet when you want to be paid.
+
A free account gives you spin links, pages and a zone for your own site. Nothing to install, no password to remember. When you buy a package or want payouts, you link a wallet from inside the Control Room.
+
+
+
Step 1Enter your email. We send a six-digit code.
+
Step 2Pick a username. It becomes your invite link.
+
Step 3You land in Links with your first spin ready to fill.
-
-
-
{{SITE_HOST}}/ledger · worked example
-
-
🧾 member #7 bought package #2 ($20.00)paid
-
💸 level 1 payout → member #3 (50%)same block
-
💸 level 2 payout → member #2 (20%)same block
-
💸 level 3 payout → member #1 (10%)same block
-
🏛 platform fee settled (20%)same block
-
⭐ member #3 now has 2 qualifying buyerslevel 2 ✓
+
+ Free forever for links and pages
+ One account per person
+
+
Sign-ups are not open yet. Members can still sign in with their email.
+
By continuing you agree to the terms and privacy policy. Ad packages are advertising purchases, not investments. Payouts come only from purchases in your line, and the contract that pays them is public.
+
-
-
-
Join free
-
Type your email and we send a 6-digit code. No password, no wallet needed today.
-
-
-
-
-
-
-
-
-
-
-
Advertising, not investing. No income is guaranteed; results depend on your effort. Crypto carries risk of loss.
-
-
+
-
-
- Paid in POL, Polygon's own coin, to your wallet
- Same transaction payouts
- Public ledger on Polygon
- Free to join by email
-
-
The one crypto here is POL on the Polygon network: packages are paid in POL and every payout arrives as POL in your own wallet. Any Polygon wallet works (MetaMask, SafePal, Phantom, Coinbase Wallet). Never held crypto? Buy POL with a card inside the member area.
Linking a wallet and buying a package live on the Credits screen.
How you get paid
Every package splits in the same transaction: 50% direct sponsor, 20% level 2, 10% level 3, 20% platform. Nothing is held by the site, ever. Your sponsor is paid the moment your purchase settles.
diff --git a/server.js b/server.js
index 1c85b8f..911e67e 100644
--- a/server.js
+++ b/server.js
@@ -332,12 +332,12 @@ async function handleUpload(req, res, who) {
const JOIN_ALIASES = { company: 'martbost', top: 'martbost' }; // neutral partner links -> the top position
const JOIN_ANGLES = {
// legacy bridge pages (/from/): former members of Marty's closed EvolutionScript sites
- 'fw-adv': { t: 'Your next ad budget pays you back.', d: 'Faucet Wave closed. LinkSpin was built for the people who bought ads there: packages from $5, seven formats, every package in your line paid out on Polygon in the same transaction. Welcome-back credits waiting.', url: SITE_URL + '/from/faucetwave?seg=advertiser' },
+ 'fw-adv': { t: 'Your next ad budget pays you back.', d: 'Faucet Wave closed. LinkSpin was built for the people who bought ads there: packages from $10, banner, text and login ads, every package in your line paid out on Polygon in the same transaction. Welcome-back credits waiting.', url: SITE_URL + '/from/faucetwave?seg=advertiser' },
'fw-earn': { t: 'Same daily habit. Real payouts on-chain.', d: 'You viewed ads on Faucet Wave. Here you view ads to earn credits, run your own campaign free, and get paid in POL to your own wallet when your line buys ads. Welcome-back credits waiting.', url: SITE_URL + '/from/faucetwave' },
- 't1-adv': { t: 'Your next ad budget pays you back.', d: 'Tier One Ads closed. LinkSpin was built for the people who bought ads there: packages from $5, seven formats, every package in your line paid out on Polygon in the same transaction. Welcome-back credits waiting.', url: SITE_URL + '/from/tieroneads?seg=advertiser' },
+ 't1-adv': { t: 'Your next ad budget pays you back.', d: 'Tier One Ads closed. LinkSpin was built for the people who bought ads there: packages from $10, banner, text and login ads, every package in your line paid out on Polygon in the same transaction. Welcome-back credits waiting.', url: SITE_URL + '/from/tieroneads?seg=advertiser' },
't1-earn': { t: 'Same daily habit. Real payouts on-chain.', d: 'You viewed ads on Tier One Ads. Here you view ads to earn credits, run your own campaign free, and get paid in POL to your own wallet when your line buys ads. Welcome-back credits waiting.', url: SITE_URL + '/from/tieroneads' },
instant: { t: 'Paid before the page reloads.', d: 'A smart contract on Polygon splits every ad package the moment it sells. Same transaction, real wallets, public ledger. Join free by email.' },
- adspend: { t: 'You were buying ads anyway.', d: 'Here the ad spend in your line pays you, in the same transaction, on a public ledger. Seven formats, packages from $5. Join free.' },
+ adspend: { t: 'You were buying ads anyway.', d: 'Here the ad spend in your line pays you, in the same transaction, on a public ledger. Banner, text and login ads, packages from $10. Join free.' },
free: { t: 'Watch first. Spend never.', d: 'Join free, view a few ads, earn credits, run your first campaign for zero dollars. Every payout public on Polygon.' },
ledger: { t: 'No back office. No payday.', d: 'Every payout is a public transaction on Polygon you can read yourself. Nothing is ever held. Join free by email.' },
two: { t: 'Two buyers open level two.', d: 'Every direct buyer pays you 50 percent from their first package. Two qualifying buyers open level two, five open level three. Written in a verified contract.' }
@@ -3004,6 +3004,8 @@ const server = http.createServer(async (req, res) => {
if (p === '/ads') return sendFile(res, path.join(PUBLIC_DIR, 'ads.html'));
if (p === '/team') return sendFile(res, path.join(PUBLIC_DIR, 'team.html'));
if (p === '/wallet') return sendFile(res, path.join(PUBLIC_DIR, 'wallet.html'));
+ if (p === '/credits') return sendFile(res, path.join(PUBLIC_DIR, 'credits.html')); // Control Room: buy packages, link wallet, payouts on (2026-10-07)
+ if (p === '/join') return serveJoinPage(res, '', '', null, []); // bare join: sponsor from the cookie if any (home-page CTAs)
if (p === '/admin') return sendFile(res, path.join(PUBLIC_DIR, 'admin.html'));
if (p === '/shorts') return sendFile(res, path.join(PUBLIC_DIR, 'shorts.html'));
if (p === '/plays') return sendFile(res, path.join(PUBLIC_DIR, 'plays.html'));