Skip to main content

Custom Ethereum client and utilities used by XChainPY clients

Project description

xchainpy/xchainpy_ethereum

Ethereum Module for XChainPy Clients

Modules

  • client - Custom client for communicating with ethereum-lib

Following dependencies have to be installed into your project

faster-than-requests==20.10.19
web3==5.16.0
websockets==8.1

Service Providers

This package uses Infura WSS API, head to https://infura.io/ to get your own websocket token. In addition, if you want to interact with non-ERC20 token, head to https://etherscan.io/ to get your etherscan token.

Initialize mainnet client:

client = Client(phrase="mnemonimic", network="wss://mainnet.infura.io/ws/v3/...", network_type="mainnet", ether_api="...")

Initialize ropsten(testnet) client:

client = Client(phrase="mnemonimic", network="wss://ropsten.infura.io/ws/v3/...", network_type="ropsten", ether_api="...")

You can generate mnemonic phrase using crypto.py, head to test/test_ropsten_client.py to see a more comprehensive way to using this client.

Tests

These packages needed to run tests:

  • pytest pip install pytest
  • pytest-asyncio pip install pytest-asyncio

How to run test ?

Ropsten

$ pytest test/test_ropsten_client.py

Mainnet

$ pytest test/test_mainnet_client.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xchainpy_ethereum-0.2.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

xchainpy_ethereum-0.2.0-py3.9.egg (28.3 kB view details)

Uploaded Egg

xchainpy_ethereum-0.2.0-py3.8.egg (25.7 kB view details)

Uploaded Egg

xchainpy_ethereum-0.2.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file xchainpy_ethereum-0.2.0.tar.gz.

File metadata

  • Download URL: xchainpy_ethereum-0.2.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6

File hashes

Hashes for xchainpy_ethereum-0.2.0.tar.gz
Algorithm Hash digest
SHA256 52eacf67f063e6086d02cb3193cf123f0747c4aef3c4695cd7df0f52955ac62d
MD5 6e3417a2a5a9540341743140279efad8
BLAKE2b-256 9dad96077cb31154c407fc3ed5ea4af6416392b60ece5d31690b2569a5c2ef4f

See more details on using hashes here.

File details

Details for the file xchainpy_ethereum-0.2.0-py3.9.egg.

File metadata

  • Download URL: xchainpy_ethereum-0.2.0-py3.9.egg
  • Upload date:
  • Size: 28.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for xchainpy_ethereum-0.2.0-py3.9.egg
Algorithm Hash digest
SHA256 ef7cca8882333e8a702aa09dd7fddf289502772e0ae4006fad1b2a64459d7c38
MD5 a4d6c05f3e373f60918d44785b8c137f
BLAKE2b-256 31b4f7a1457a590c92a5ba3061e40b42ca1ff7b66f52191e6fbd1b384a04e279

See more details on using hashes here.

File details

Details for the file xchainpy_ethereum-0.2.0-py3.8.egg.

File metadata

  • Download URL: xchainpy_ethereum-0.2.0-py3.8.egg
  • Upload date:
  • Size: 25.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for xchainpy_ethereum-0.2.0-py3.8.egg
Algorithm Hash digest
SHA256 95f74eb40f96f94c3848949c90dcb9465dfc160d6b1583d90fff30fcbd359e93
MD5 87ffc66349e89409cc77afa8137f3992
BLAKE2b-256 3d1c87bd8c32e74f3889cf223ecb607be302e63b52318fc73b0b52326a7d413b

See more details on using hashes here.

File details

Details for the file xchainpy_ethereum-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: xchainpy_ethereum-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6

File hashes

Hashes for xchainpy_ethereum-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a92b36acea88de1d33d7467fa5e9666104ea8c610115ebccee90ea2fa6b26924
MD5 9ac5c66b94ed49270445faa56d874113
BLAKE2b-256 8d9f90c35ab5f984627d307b31c37f3e85706f02b7987f9c2c1dc1f445ddfb01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page