mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-15 12:50:47 +02:00
* Add buy squeak request * Add payment of invoice in itest * Use latest beta release of lnd * Got connect peer from itest working * Open channel in itest before trying to pay * Add list channels and list peers commands * Got lightning payment working * Got full itest working with payment and decryption
19 lines
312 B
Python
19 lines
312 B
Python
import os
|
|
|
|
|
|
DATA_KEY_LENGTH = 32
|
|
|
|
|
|
def get_hash(squeak):
|
|
return squeak.GetHash()[::-1]
|
|
|
|
|
|
def generate_offer_nonce():
|
|
return os.urandom(DATA_KEY_LENGTH)
|
|
|
|
|
|
def bxor(b1, b2): # use xor for bytes
|
|
result = bytearray()
|
|
for b1, b2 in zip(b1, b2):
|
|
result.append(b1 ^ b2)
|
|
return bytes(result)
|