autobahn.xbr._blockchain


Module Contents

Classes

SimpleBlockchain

Simple Ethereum blockchain XBR client.

class autobahn.xbr._blockchain.SimpleBlockchain(gateway=None)[source]

Bases: object

Simple Ethereum blockchain XBR client.

DomainStatus_NULL = 0
DomainStatus_ACTIVE = 1
DomainStatus_CLOSED = 2
NodeType_NULL = 0
NodeType_MASTER = 1
NodeType_CORE = 2
NodeType_EDGE = 3
NodeLicense_NULL = 0
NodeLicense_INFINITE = 1
NodeLicense_FREE = 2
log
backgroundCaller
start()[source]

Start the blockchain client using the configured blockchain gateway.

stop()[source]

Stop the blockchain client.

async get_market_status(market_id)[source]
Parameters

market_id

Returns

async get_domain_status(domain_id)[source]
Parameters

domain_id (bytes) –

Returns

Return type

dict

abstract get_node_status(delegate_adr)[source]
Parameters

delegate_adr (bytes) –

Returns

Return type

dict

abstract get_actor_status(delegate_adr)[source]
Parameters

delegate_adr (bytes) –

Returns

Return type

dict

abstract get_delegate_status(delegate_adr)[source]
Parameters

delegate_adr (bytes) –

Returns

Return type

dict

abstract get_channel_status(channel_adr)[source]
Parameters

channel_adr (bytes) –

Returns

Return type

dict

async get_member_status(member_adr)[source]
Parameters

member_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

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