argus/src
Local Dev 2d80e68ef8 feat(registrar): 90/10 revenue split — TLD owner earns from name mints
Every second-level name registration under a TLD now routes 90% of the
service fee to whoever holds that TLD's certificate on chain, with 10%
going to the platform address. That's the economic incentive for
minting a TLD: you earn from every name registered under it.

The mechanism, end to end:

1. resolver-web.js fetchTldMap now also records mintScriptHex — the
   scriptPubKey of the TREG output that carries each TLD's NFT.
   Exported so registrar can decode it into a cashaddr with libauth.
   MVP: this is the ORIGINAL owner; NFT transfers after mint are not
   traced yet (a follow-up will walk the chain of transfers).

2. registrar.js gains findTldOwnerAddress(client, tld) and
   splitServiceFee(sats). The split constants live at the top of the
   file (TLD_OWNER_SHARE_NUM/DEN = 90/100) so the ratio moves in one
   place. Rounding: BigInt division favours the platform on odd sat
   counts so the two shares always sum EXACTLY to the input.

3. quoteRegistration wraps the existing flow: it derives the TLD from
   the name, looks up the TLD owner, and if the owner ≠ buyer it asks
   buildRegistrationTx to add a second fee output. If the owner
   couldn't be resolved (TLD not registered, decode failure) the full
   fee stays on the platform address — the buyer still pays the same
   amount either way.

4. register-tx.js buildRegistrationTx accepts tldFeeAddress/tldFeeSats
   and, when set, emits an extra P2PKH output for the TLD owner. Sits
   between the beacon dust and the platform-fee output; outputMap
   records .tldOwnerFee so callers can find it. costs also carries
   tldOwnerFeeSats and netCostSats includes it.

5. priceSummary in registrar-config splits the 'Service fee' row into
   'Service fee — TLD owner (90%)' + 'Service fee — platform (10%)'
   whenever tldOwnerFeeSats > 0, with a per-line note explaining
   where the money goes.

Bundle: re-exported findTldOwnerAddress + splitServiceFee from
register-entry.js. Rebuilt bns-register.js (~34 kB) and deployed;
cache-buster bumped to ?v=20260908split on portal / admin /
register-flow.js.

Verified live: findTldOwnerAddress('.bch') returns the operator
cashaddr; quoteRegistration('tester42.bch') builds cleanly with a
9,000/1,000 split output pair on a 10,000-sat fee; priceSummary
renders both lines. No regressions on the TLD-mint flow (buyer IS
the TLD owner there — split short-circuits and it stays a single
fee output as before).
2026-09-08 02:42:16 +02:00
..
daemon resolver: echo EDNS OPT record so strict clients stop failing 2026-08-02 01:19:09 +02:00
gateway feat(sirius-x): admin TLD hide/unhide + tabbed sign-in modal (4 direct actions) 2026-09-08 02:19:41 +02:00
indexer BNS: per-TLD on-chain registry, multi-beacon indexer, enforcement gate 2026-08-29 17:11:02 +02:00
lib feat(registrar): 90/10 revenue split — TLD owner earns from name mints 2026-09-08 02:42:16 +02:00
web feat(registrar): 90/10 revenue split — TLD owner earns from name mints 2026-09-08 02:42:16 +02:00
config.js BNS: per-TLD on-chain registry, multi-beacon indexer, enforcement gate 2026-08-29 17:11:02 +02:00
generate-mobile-index.mjs Ariadne mobile 0.10: bundle BNS starter index in APK 2026-08-30 22:15:10 +02:00
publish-name-mirror.mjs Ship Ariadne 0.11: Sia CDN pull + gitignore _prev/ 2026-08-31 01:05:20 +02:00
publish-tld-mirror.mjs BNS: per-TLD on-chain registry, multi-beacon indexer, enforcement gate 2026-08-29 17:11:02 +02:00
register-electrum-list.mjs BNS: Sia+Nostr snapshot mirror, Theseus warm-start, VPS playbook, electrum.bch 2026-08-30 09:59:01 +02:00
register-hermes-chipnet.mjs Hermes: wire NIP-17 messaging into Theseus, provision chipnet hermes.bch 2026-08-18 20:14:43 +02:00
register.js Initial commit — Silent Mode baseline (2026-07-29) 2026-07-29 13:54:34 +02:00
registrar-config.js feat(registrar): 90/10 revenue split — TLD owner earns from name mints 2026-09-08 02:42:16 +02:00
resolve.js Theseus navigator UI overhaul, BNS-only indexer, site restructure 2026-07-30 08:16:55 +02:00
revert-silentmode-bch.mjs BNS: Sia+Nostr snapshot mirror, Theseus warm-start, VPS playbook, electrum.bch 2026-08-30 09:59:01 +02:00
seed-tld-beacon.mjs sirius/registrar: seed .vpn TLD + add to registrar UI 2026-09-06 17:29:37 +02:00
snapshot-name-to-file.mjs BNS: Sia+Nostr snapshot mirror, Theseus warm-start, VPS playbook, electrum.bch 2026-08-30 09:59:01 +02:00
update.js Initial commit — Silent Mode baseline (2026-07-29) 2026-07-29 13:54:34 +02:00
wallet-app.js Initial commit — Silent Mode baseline (2026-07-29) 2026-07-29 13:54:34 +02:00