Is a client Python wrapper library around XCASH Foundation ecosystem products.
- Blockchain Explorer api wrapper
- Delegates Explorer api wrapper
- Shared Delegate api wrapper
- RPC wallet
- PyPi published
Package can be installed with pip, the python package index.
pip3 install xcash
or
pip install xcash
To access products you are required to import packages and initiate them:
# Access to blockchain data
from xcash.blockchainExplorer import BlockchainExplorer
blockchain_api = BlockchainExplorer()
# Access Delegates Explorer of DPOPS system
from xcash.delegatesExplorer import DelegatesExplorer
delegates_api = DelegatesExplorer()
# Access Shared delegate through api
from xcash.sharedDelegate import SharedDelegate
delegate_api = SharedDelegate(delegate_url="DELEGATE URL")
from xcash.blockchainExplorer import BlockchainExplorer
from pprint import pprint
# Initiate blockchain explorer client
blockchain_api = BlockchainExplorer()
# Get blockchain data
blockchain_data = blockchain_api.get_blockchain_data()
# Print data
pprint(blockchain_data)
Examples on all available methods to communicate with XCASH blockchain Rest API can be found here
from xcash.delegatesExplorer import DelegatesExplorer
from pprint import pprint
# Initiate delegates explorer client
delegates_api = DelegatesExplorer()
# Get delegates/DPOPS statistics
statistics = delegates_api.get_delegate_website_statistics()
# Print data
pprint(statistics)
Examples on all available methods to communicate with XCASH DPOPS Delegates Explorer Rest API can be found here
from xcash.sharedDelegate import SharedDelegate
from pprint import pprint
# Initiate shared delegate and provide delegates address as param to access API
url = "http://xpayment.x-network.eu"
delegate_api = SharedDelegate(delegate_url=url)
# Delegate statistics data from delegate website
statistics = delegate_api.get_delegate_website_statistic()
# Print data
pprint(statistics)
Examples on all available methods to communicate with Shared Delegate Rest API can be found here