Tips on how to talk with ElectrumX servers utilizing command line instruments

on

|

views

and

comments


I would love to have the ability to get some response from ElectrumX/Fulcrum servers utilizing Linux command line instruments. I do know I can question servers utilizing Python and different programming language however I’m wondering if it is simply presumably in bash or related shells.

Python instance:

import socket
import ssl
from time import sleep

hostname="chipnet.c3-soft.com"
port = 64002

context = ssl.create_default_context()

knowledge = """{"technique":"server.model","params":[],"id":194}"""

with socket.create_connection((hostname, port)) as sock:
    with context.wrap_socket(sock, server_hostname=hostname) as ssock:
        ssock.ship(knowledge.encode('utf-8')+b'n')
        sleep(0.5)
        print(ssock.recv(1024))

Servers are often availables as TCP, SSL, WS or WSS, I am principally of connecting to TCP or SSL.

Share this
Tags

Must-read

Waymo raises $16bn to gas international robotaxi enlargement | Know-how

Self-driving automobile firm Waymo on Monday stated it raised $16bn in a funding spherical that valued the Alphabet subsidiary at $126bn.Waymo co-chief executives...

Self-driving taxis are coming to London – ought to we be anxious? | Jack Stilgoe

At the top of the nineteenth century, the world’s main cities had an issue. The streets had been flooded with manure, the unintended...

US regulators open inquiry into Waymo self-driving automobile that struck youngster in California | Expertise

The US’s federal transportation regulator stated Thursday it had opened an investigation after a Waymo self-driving car struck a toddler close to an...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here