diff options
| author | Adam Soltys <[email protected]> | 2026-09-18 23:12:18 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-18 23:12:18 -0700 |
| commit | 703ee6e1281e72ec00f65768d7de7a015c242abb (patch) | |
| tree | 8a643d0f1ad6d6e49db210aec45341a7b119e5ab /names/ownership.js | |
| parent | 9e0f9528cd6726836386658c4f38ba8a42bea3ac (diff) | |
| download | coinosv3-703ee6e1281e72ec00f65768d7de7a015c242abb.tar.gz coinosv3-703ee6e1281e72ec00f65768d7de7a015c242abb.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.js | 10 |
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), + }; +} |
