xbr._blockchain

Classes

SimpleBlockchain

Simple Ethereum blockchain XBR client.

Module Contents

class SimpleBlockchain(gateway=None)[source]

Bases: object

Simple Ethereum blockchain XBR client.

DomainStatus_ACTIVE = 1[source]
DomainStatus_CLOSED = 2[source]
DomainStatus_NULL = 0[source]
NodeLicense_FREE = 2[source]
NodeLicense_INFINITE = 1[source]
NodeLicense_NULL = 0[source]
NodeType_CORE = 2[source]
NodeType_EDGE = 3[source]
NodeType_MASTER = 1[source]
NodeType_NULL = 0[source]
_gateway = None[source]
_w3 = None[source]
backgroundCaller = None[source]
abstractmethod get_actor_status(delegate_adr)[source]
Parameters:

delegate_adr (bytes)

Returns:

Return type:

dict

async get_balances(account_adr)[source]

Return current ETH and XBR balances of account with given address.

Parameters:

account_adr (bytes) – Ethereum address of account to get balances for.

Returns:

A dictionary with "ETH" and "XBR" keys and respective current on-chain balances as values.

Return type:

dict

abstractmethod get_channel_status(channel_adr)[source]
Parameters:

channel_adr (bytes)

Returns:

Return type:

dict

get_contract_adrs()[source]

Get XBR smart contract addresses.

Returns:

A dictionary with "XBRToken" and "XBRNetwork" keys and Ethereum contract addresses as values.

Return type:

dict

abstractmethod get_delegate_status(delegate_adr)[source]
Parameters:

delegate_adr (bytes)

Returns:

Return type:

dict

async get_domain_status(domain_id)[source]
Parameters:

domain_id (bytes)

Returns:

Return type:

dict

async get_market_status(market_id)[source]
Parameters:

market_id

Returns:

async get_member_status(member_adr)[source]
Parameters:

member_adr (bytes)

Returns:

Return type:

dict

abstractmethod get_node_status(delegate_adr)[source]
Parameters:

delegate_adr (bytes)

Returns:

Return type:

dict

log = None[source]
start()[source]

Start the blockchain client using the configured blockchain gateway.

stop()[source]

Stop the blockchain client.