From 559eb6996ada6840d6fa142bf6badd0bcd9a0157 Mon Sep 17 00:00:00 2001 From: Local Dev Date: Tue, 6 Oct 2026 00:40:00 +0200 Subject: [PATCH] sirius-x: the dashboard knows covenant-held names, and can register with a commit first Covenant-held names now list under their owner with an expiry badge, warn from sixty days out, and get an Expiry tab: move an ordinary name into the covenant (one payment, no way back - the page says so), or renew. Records, transfer and release go through the covenant for such a name; a listing cannot, and the Sell tab says why. A name just sent into the covenant is remembered until its block, so it does not vanish from the list meanwhile. Registering offers "Commit first": a hash goes out now and the name a block later, so it cannot be copied out of the mempool. The pending commit is stored before it is broadcast, the open tab reveals by itself once the commit is mined, and the dashboard lists registrations in progress and can finish one the tab did not live to complete. Also: a one-cent name's platform share of the fee was below the dust limit, which made the registration unmineable; a dust-sized share now goes with the other one. --- src/lib/registrar.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/lib/registrar.js b/src/lib/registrar.js index 844af12..80a3cbd 100644 --- a/src/lib/registrar.js +++ b/src/lib/registrar.js @@ -70,8 +70,17 @@ export async function findTldOwnerAddress(client, tld, prefix = REGISTRAR.addres */ export function splitServiceFee(serviceFeeSats) { const total = BigInt(serviceFeeSats ?? 0n); - const tldOwner = (total * TLD_OWNER_SHARE_NUM) / TLD_OWNER_SHARE_DEN; - const platform = total - tldOwner; + let tldOwner = (total * TLD_OWNER_SHARE_NUM) / TLD_OWNER_SHARE_DEN; + let platform = total - tldOwner; + // An output below the dust limit is rejected by the network, so a cheap + // name's split would make its registration unmineable. The small share + // then goes with the big one: the TLD owner keeps all of a fee whose + // platform share is dust, and the platform keeps all of a fee that is + // too small to split at all. + const DUST = 546n; + if (platform > 0n && platform < DUST) { tldOwner = total; platform = 0n; } + if (tldOwner > 0n && tldOwner < DUST) { platform = total; tldOwner = 0n; } + if (platform < DUST) platform = 0n; // a fee below the dust limit cannot be paid at all return { tldOwnerFeeSats: tldOwner, platformFeeSats: platform }; }