mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-23 19:54:18 +01:00
Wallet: Lightning interface (#318)
* mint does not start yet * fix import * revert mint db migrations * handle zero fee case * cli: adjust fee message * wallet: replace requests with httpx * clean up * rename http client decorator * fix pending check in main, todo: TEST PROXIES WITH HTTPX * fix up * use httpx for nostr as well * update packages to same versions as https://github.com/lnbits/lnbits/pull/1609/files * fix proof deserialization * check for string * tests passing * adjust wallet api tests * lockfile * add correct responses to Lightning interface and delete melt_id for proofs for which the payent has failed * fix create_invoice checking_id response * migrations atomic * proofs are stored automatically when created * make format * use bolt11 lib * stricter type checking * add fee response to payments * assert fees in test_melt * test that mint_id and melt_id is stored correctly in proofs and proofs_used * remove traces * refactor: Lightning interface into own file and LedgerCrud with typing * fix tests * fix payment response * rename variable
This commit is contained in:
@@ -18,9 +18,9 @@ def hash_to_point_pre_0_3_3(secret_msg):
|
||||
_hash = hashlib.sha256(msg).hexdigest().encode("utf-8") # type: ignore
|
||||
try:
|
||||
# We construct compressed pub which has x coordinate encoded with even y
|
||||
_hash = list(_hash[:33]) # take the 33 bytes and get a list of bytes
|
||||
_hash[0] = 0x02 # set first byte to represent even y coord
|
||||
_hash = bytes(_hash)
|
||||
_hash_list = list(_hash[:33]) # take the 33 bytes and get a list of bytes
|
||||
_hash_list[0] = 0x02 # set first byte to represent even y coord
|
||||
_hash = bytes(_hash_list)
|
||||
point = PublicKey(_hash, raw=True)
|
||||
except Exception:
|
||||
msg = _hash
|
||||
|
||||
Reference in New Issue
Block a user