aboutsummaryrefslogtreecommitdiffstats
path: root/names/ownership.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-18 23:12:18 -0700
committerAdam Soltys <[email protected]>2026-09-18 23:12:18 -0700
commit0ba71aa0757af0d5ab6902c8c405d5a3cc8c65a9 (patch)
treea9353ee09c620e325b634a87807549525f36a0a6 /names/ownership.js
parent13b3e9d0272b3ab8aed26b15cd8db6177a5e9400 (diff)
downloadcoinosv3-server-0ba71aa0757af0d5ab6902c8c405d5a3cc8c65a9.tar.gz
coinosv3-server-0ba71aa0757af0d5ab6902c8c405d5a3cc8c65a9.zip
Accounts from the header, snapshot-first Spending restore, name ownership grants.
Header buttons always leave the current feature screen; an account with no remembered nostr identity opens Accounts instead of nothing. Logout confirms in place. A scan finishing after logout or an account switch no longer drops the new session into offline mode (stateGeneration guards in sync + ark). Spending restores from the snapshot first. A migration grant names the identity that owns an address; its manager may register it without becoming that identity (names/ownership.js). Browser tests for account access, profile retry, spending restore, thread reply focus, custom-emoji reactions and registry ownership. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'names/ownership.js')
-rw-r--r--names/ownership.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/names/ownership.js b/names/ownership.js
new file mode 100644
index 0000000..19ae4ef
--- /dev/null
+++ b/names/ownership.js
@@ -0,0 +1,10 @@
+// A migration grant names the identity that owns the address. Its manager
+// may submit the registration without becoming that identity.
+export function registrationIdentity({ existing, signer, manager, grant, granted }) {
+ const pubkey = existing?.pubkey || (granted ? grant.pubkey : signer);
+ const nominated = /^[0-9a-f]{64}$/.test(manager || '') && manager !== pubkey;
+ return {
+ pubkey,
+ manager: nominated ? manager : existing?.manager || (granted ? grant.manager : undefined),
+ };
+}