-
Notifications
You must be signed in to change notification settings - Fork 88
rollup of many fixes and improvements, windows-compatible #84
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -58,10 +59,6 @@ def bech32(self) -> str: | |||
def hex(self) -> str: | |||
return self.raw_secret.hex() | |||
|
|||
def tweak_add(self, scalar: bytes) -> bytes: |
There was a problem hiding this comment.
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
I already done the work, check https://github.com/holgern/pynostr |
Please see also #52 |
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 |
is there any way to install this via pip? |
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): |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python 3.11 fix
def to_message(self) -> str: | ||
return json.dumps( | ||
[ | ||
def to_json(self) -> list: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useful!
this is the fork im using