Skip to content

Feat: Add Spark connector - #3437

Draft
rolznz wants to merge 14 commits into
masterfrom
feat/spark
Draft

Feat: Add Spark connector#3437
rolznz wants to merge 14 commits into
masterfrom
feat/spark

Conversation

@rolznz

@rolznz rolznz commented Sep 17, 2025

Copy link
Copy Markdown
Member

spark connector

image

Comment thread src/extension/background-script/connectors/spark.ts Outdated
@rolznz

rolznz commented Sep 18, 2025

Copy link
Copy Markdown
Member Author

@pavanjoshi914 I think we should fix this before merging. The link to setup the keys is also broken because it shows steps to create a new master key.
image

image

I think it would be simpler to derive the nostr key too when generating the master key and extract the code so the same things happen when we generate a master key for Spark as what happens if you generate a master key normally.

CC @reneaaron @bumi

Comment thread src/common/lib/api.ts Outdated
data: nostrPrivateKey,
};
nostrPrivateKey = mnemonic.deriveNostrPrivateKeyHex();
} else if (message.args?.mnemonic) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just wondering if this is the best approach since we add more complexity to these functions to both handle accounts and non-accounts.

But I can't see any other way except actually creating the account before we validate it 🤔

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

creating account before validating will go totally opposite to the existing flows that we have for other connectors. instead its better to handle this at script level

it just generates key in two way. either getting mnemonic from account id or if its passed explicitly. i guess this is more better to do somehow

@rolznz
rolznz requested review from bumi and reneaaron September 21, 2025 14:08
@rolznz

rolznz commented Sep 21, 2025

Copy link
Copy Markdown
Member Author

@bumi @reneaaron we introduce something new here with the mnemonic generation before the account creation, and it creates a bit of complexity in the code. Not sure if this is OK for now or there is a better way we could do it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants