Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/xpubs #32

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Feature/xpubs #32

wants to merge 3 commits into from

Conversation

0xBEEFCAF3
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.

@@ -253,13 +253,13 @@ def run_signer(wallet_id=None, key_pair_seed=None, nonce_seed=None):

elif user_input.lower() == SignerCommands.SEND_PUBLIC_KEY.value:
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

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 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.

None yet

2 participants