mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-14 12:43:24 +02:00
* Run itest with direct connection to server * Add dummy blockchain client * Got itest working with direct post to server * Rename lnd rpc proto module * Making lnd lightning client able to take proto module as param * Pass ln proto module as param to lnd lightning client * Able to import lnd client in test container * Able to get wallet balance in test direct from rpc client
25 lines
638 B
Python
25 lines
638 B
Python
import time
|
|
|
|
|
|
from bitcoin.core import lx, x
|
|
from squeak.core import CSqueak
|
|
from squeak.core import HASH_LENGTH
|
|
from squeak.core import MakeSqueakFromStr
|
|
from squeak.core.signing import CSigningKey
|
|
|
|
|
|
def generate_signing_key():
|
|
return CSigningKey.generate()
|
|
|
|
|
|
def make_squeak(signing_key: CSigningKey, content: str, reply_to: bytes = b'\x00'*HASH_LENGTH):
|
|
block_height = 0
|
|
block_hash = lx('4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b')
|
|
timestamp = int(time.time())
|
|
return MakeSqueakFromStr(
|
|
signing_key,
|
|
content,
|
|
block_height,
|
|
block_hash,
|
|
timestamp,
|
|
)
|