Skip to content
This repository was archived by the owner on Feb 21, 2026. It is now read-only.

Feature/xpubs#32

Open
arminsabouri wants to merge 3 commits intomainfrom
feature/xpubs
Open

Feature/xpubs#32
arminsabouri wants to merge 3 commits intomainfrom
feature/xpubs

Conversation

@arminsabouri
Copy link
Owner

No description provided.

Copy link
Collaborator

@satsie satsie left a comment

Choose a reason for hiding this comment

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

Have you been able to test this? I'd like to give it a go before merging. Biggest question I have is around a comment I left regarding the private_key vs nostr_private_key variable.

logging.info("Generating and posting the public key...")
handle_create_xpub(wallet, relay_manager, nostr_private_key)

handle_create_xpub(wallet, relay_manager, private_key)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
handle_create_xpub(wallet, relay_manager, private_key)
handle_create_xpub(wallet, relay_manager, nostr_private_key)

I think this should be kept nostr_private_key? I renamed it as part of this cleanup a little over a week ago #18

elif user_input.lower() == SignerCommands.GENERATE_ADDRESS.value:
# TODO bug: you cannot sign or spend with out getting an address first
logging.info("Generating a new address...")
# TODO right now you have to manage your own address indecies
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# TODO right now you have to manage your own address indecies
# TODO right now you have to manage your own address indexes

logging.info(f"Generating a new address at index {index} ...")
address_payload = handle_get_address(
wallet, 0, relay_manager, nostr_private_key)
wallet, index, relay_manager, private_key)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
wallet, index, relay_manager, private_key)
wallet, index, relay_manager, nostr_private_key)


# pk = self.public_key.get_bytes().hex()
# private_key = self.private_key
tweaked_key = private_key * self.cmap[pk]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a thought - is it okay to multiply values like this? I would think for Schnorr it's fine since it has those nice linear properties that ECDSA doesn't, but it could be worth double checking if this is where the negation bug is coming from.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants