pybitcointools icon indicating copy to clipboard operation
pybitcointools copied to clipboard

ElectrumX servers

Open maxclax opened this issue 2 years ago • 5 comments

Hello, when test new major branch with ElectrumX I have problem with servers. Some servers from .json files are down. And I can't check unspent, balance. Scrypt take one of them without check works it or not. How to update servers list and hold actual only?

api = Doge(testnet=False)
print(f"coin_symbol: {api.coin_symbol}")

priv = sha256('a big long brainwallet password')
pub = api.privtopub(priv)
addr = api.pubtoaddr(pub)
api.get_balances(addr)
print(f"priv: {priv}")
print(f"pub: {pub}")
print(f"addr: {addr}")
print(f"Balance: {api.get_balances(addr)}")

TimeoutError: 493 finally:
    494     timeout_handle.cancel()

maxclax avatar Jun 14 '23 07:06 maxclax

This project is dead, don't expect answers.

I hope not, because last month owner had added new major update with ElectrumX. I have testet it and only with Doge servers problem and sometime with other. Need some logic for update servers

maxclax avatar Jun 16 '23 14:06 maxclax

Hi @maxclax,

If you know of any Doge ElectrumX servers than you can provide them as input to the Doge coin class.

Create a servers.json file like this:

{
    "hostname_or_ip_address": {
        "pruning": "-",
        "t": "50001",
        "s": "50002",
        "version": "1.4"
    }
}

Once you have the .json file you can try this:

d = Doge(client_kwargs={'server_file': 'servers.json'})

You can also let me know any Doge ElectrumX servers you know about and I can update it in the file in this repository (cryptos/electrumx_client/servers/doge.json) so they will be in future releases.

primal100 avatar Jun 29 '23 10:06 primal100

Can this servers be used:

https://docs.komodoplatform.com/mmV1/coin-integration/electrum-servers-list.html#world-2

x011 avatar Jul 17 '23 02:07 x011

Thanks @x011 that's a great resource. Will try in the next day or two.

primal100 avatar Jul 17 '23 10:07 primal100

Version 2.0.9 up on pypi now with added servers for Doge and Dash. Your example is working now @maxclax.

python -m pip install --upgrade cryptos
>>> api.get_balances(addr)
[{'confirmed': 0, 'unconfirmed': 0, 'address': 'DLvceoVN5AQgXkaQ28q9qq7BqPpefFRp4E'}]

primal100 avatar Jul 18 '23 15:07 primal100