It is used to listen to the read nodes of TransferChain and send requests to the Block Explorer.
This client requires python>=3.8
pip install tcabci-read-client
pip install git+https://github.com/TransferChain/tcabci-read-python-client@main
wss://read-node-01.transferchain.io/ws
https://read-node-01.transferchain.io
from tcabci_read_client import WsClient
def message_callback(message):
print(f"Received message: {message}")
def error_callback(error):
print(f"Error: {error}")
client = WsClient("wss://read-node-01.transferchain.io/ws",
message_callback=message_callback,
error_callback=error_callback)
client.start()
client.subscribe(['addresses'])
client.unsubscribe(['addresses'])
client.get_subscribe_addresses()
from tcabci_read_client import HttpClient
client = HttpClient("https://read-node-01.transferchain.io")
client.get_last_block()
'''
client.tx_search params;
limit, order_field,offset,order_by,hashes,typ,sender_addrs,recipient_addrs
'''
client.tx_search(sender_addrs='test_address', recipient_addrs='test_address2')
client.broadcast(tx_id="", version=1, fee=0, data="", sign="", tx_type="", sender_address="from", recipient_address="to")
MIT