From 643046319fa9a393374fc2348381d9505fe143eb Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 15 Aug 2026 14:32:28 -0700 Subject: Wallets go flat: every Spending and Savings is a top-level wallet in the switcher, named for its purpose, renamable apart — and a new wallet can carry its own seed or live at the next BIP84 account of one you already back up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_014tE4U5nEjGTQy8PwYqamfv --- src/nostr.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/nostr.js') diff --git a/src/nostr.js b/src/nostr.js index 8615f7d..2166880 100644 --- a/src/nostr.js +++ b/src/nostr.js @@ -252,8 +252,10 @@ export class NostrSync { setDtag(d) { this.dtag = d || DTAG; } - load(mnemonic, passphrase = '') { - this.sk = nip06.privateKeyFromSeedWords(mnemonic, passphrase || undefined); + load(mnemonic, passphrase = '', accountIndex = 0) { + // a derived sibling wallet (same seed, higher BIP84 account) gets its own + // nostr identity and sync slots — nip06 shifts by account index + this.sk = nip06.privateKeyFromSeedWords(mnemonic, passphrase || undefined, accountIndex || 0); this.pk = getPublicKey(this.sk); this.ck = nip44.getConversationKey(this.sk, this.pk); } -- cgit v1.2.3