Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ElectrumX servers #57

Open
maxclax opened this issue Jun 14, 2023 · 5 comments
Open

ElectrumX servers #57

maxclax opened this issue Jun 14, 2023 · 5 comments

Comments

@maxclax
Copy link

maxclax commented Jun 14, 2023

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
Copy link
Author

maxclax commented Jun 16, 2023

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

@primal100
Copy link
Owner

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.

@x011
Copy link

x011 commented Jul 17, 2023

@primal100
Copy link
Owner

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

@primal100
Copy link
Owner

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'}]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants