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

rollup of many fixes and improvements, windows-compatible #84

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

Conversation

earonesty
Copy link

@earonesty earonesty commented Feb 27, 2023

this is the fork im using

@@ -58,10 +59,6 @@ def bech32(self) -> str:
def hex(self) -> str:
return self.raw_secret.hex()

def tweak_add(self, scalar: bytes) -> bytes:
Copy link
Author

Choose a reason for hiding this comment

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

got rid of this because it's not used, and not tested

@holgern
Copy link

holgern commented Feb 27, 2023

I already done the work, check https://github.com/holgern/pynostr

@holgern
Copy link

holgern commented Feb 27, 2023

Please see also #52

@earonesty
Copy link
Author

earonesty commented Feb 28, 2023

yeah, i realized that later. but your fork is very far behind master, and it makes a lot more changes to the code. nicer to have it all in one place, and just import a different module... no code change to the main. now i can maintain the fork with no effort, or even switch to embit easily

@davidtavarez
Copy link

is there any way to install this via pip?

@earonesty
Copy link
Author

seriously considering just releasing this separately to pypi

@@ -51,17 +52,18 @@ def from_nsec(cls, nsec: str):
raw_secret = bech32.convertbits(data, 5, 8)[:-1]
return cls(bytes(raw_secret))

@classmethod
def from_hex(cls, hex: str):
Copy link
Author

Choose a reason for hiding this comment

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

added from_hex

@@ -34,7 +34,7 @@ class RelayProxyConnectionConfig:
class Relay:
url: str
message_pool: MessagePool
policy: RelayPolicy = RelayPolicy()
policy: RelayPolicy = field(default_factory=RelayPolicy)
Copy link
Author

Choose a reason for hiding this comment

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

python 3.11 fix

@earonesty earonesty changed the title windows compatible nostr lib windows compatible nostr lib, and other fixes Jul 30, 2023
@earonesty earonesty changed the title windows compatible nostr lib, and other fixes rollup of many fixes and improvements Jul 30, 2023
def to_message(self) -> str:
return json.dumps(
[
def to_json(self) -> list:
Copy link
Author

Choose a reason for hiding this comment

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

useful!

@earonesty earonesty changed the title rollup of many fixes and improvements rollup of many fixes and improvements, windows-compatible Jul 30, 2023
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.

5 participants