Skip to content

Instantly share code, notes, and snippets.

@yuyaogawa
Created June 13, 2023 01:09
Show Gist options
  • Select an option

  • Save yuyaogawa/487f88b9ee1996cc5b50245ff8396eb8 to your computer and use it in GitHub Desktop.

Select an option

Save yuyaogawa/487f88b9ee1996cc5b50245ff8396eb8 to your computer and use it in GitHub Desktop.
from glclient import TlsConfig, Scheduler, Signer
seed=b'my-seed'
cert = "my-cert"
key = "my-key"
node_id = bytes.fromhex("02a5b6a3fe53c39edb348818b4a145c830db90cbc410ac52ce16e985e7f0b37e86")
network = "mainnet"
tls = TlsConfig()
tls = tls.identity(cert, key)
scheduler = Scheduler(node_id, network, tls)
node = scheduler.node()
signer = Signer(seed, network="mainnet", tls=tls)
signer.run_in_thread()
info = node.get_info()
print(info)
@yuyaogawa
Copy link
Author

Wait... Actually I have to set network option to bitcoin for mainnet. That's why I got the error???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment