xbr._gui

Attributes

Classes

Application

Main XBR member application.

ApplicationClient

WAMP application session for Twisted-based applications.

ApplicationWindow

Main application window which provides UI for the following functions:

Functions

_main()

GUI entry point, parsing command line arguments and then starting the

main(reactor, url, realm, profile)

Load the named user profile (or create a new one), overriding URL/realm,

Module Contents

class Application[source]

Bases: object

Main XBR member application.

DOTDIR = b'.'[source]
DOTFILE = 'config.ini'[source]
log[source]
async start(reactor, url=None, realm=None, profile=None)[source]

Start main application. This will read the user configuration, potentially asking for a user password.

Parameters:
  • reactor – Twisted reactor to use.

  • url – Optionally override network URL as defined in profile.

  • realm – Optionally override network URL as defined in profile.

  • profile – User profile name to load.

Returns:

class ApplicationClient(config=None)[source]

Bases: xbr._cli.Client

WAMP application session for Twisted-based applications.

Implements:

get_member(ethadr_raw)[source]
get_status()[source]
async onJoin(details)[source]

Implements autobahn.wamp.interfaces.ISession.onJoin()

class ApplicationWindow(reactor, session, config, config_path, profile, profile_name)[source]

Bases: gi.repository.Gtk.Assistant

Main application window which provides UI for the following functions:

    1. New account

    1. Recover account:

    • R1) Backup cloud device in account enabled => download encrypted account data

      from cloud backup device, requires email (and 2FA) verification and password

    • R2) At least one device left in account and at hand => synchronize with existing device,

      direct device-to-device encrypted account data transfer

    • R3) Only cold storage recovery seed phrase left => account from seed-phrase full

      recovery, including new email and 2FA verification.

See also: * https://python-gtk-3-tutorial.readthedocs.io/en/latest/ * https://twistedmatrix.com/documents/current/core/howto/choosing-reactor.html

SELECTED_NEW = 1[source]
SELECTED_NONE = 0[source]
SELECTED_RECOVER = 3[source]
SELECTED_SYNCRONIZE = 2[source]
_setup_page1()[source]

Setup page shown when no config/profile could be found. Allows to select from:

  • new account

  • synchronize device

  • recover account

_setup_page2()[source]

Setup page shown to generate a new seed phrase.

_setup_page3()[source]
Returns:

_setup_page4()[source]

Page shown when member registration request was submitted, a verification email sent, and the verification request ID returned. The user now should check the email inbox for the received verification code, and continue verifying the code.

Returns:

_setup_page5()[source]

Page shown for a user (private eth key) that already is member.

Returns:

config[source]
config_path[source]
input_email = None[source]
input_password = None[source]
input_seedphrase = None[source]
log[source]
on_complete_toggled(checkbutton)[source]
output_account = None[source]
output_ethadr = None[source]
output_ethadr_raw = None[source]
output_member_data = None[source]
output_member_data_oid[source]
profile[source]
profile_name[source]
reactor[source]
session[source]
start()[source]
LOGO_RESOURCE = ''[source]
_main()[source]

GUI entry point, parsing command line arguments and then starting the actual main GUI program with parsed parameters.

To use, run:

xbrnetwork-ui --profile default --url ws://localhost:8090/ws --realm xbrnetwork

This will load the user profile "default" from the user configuration, but overriding any network URL and realm found therin.

async main(reactor, url, realm, profile)[source]

Load the named user profile (or create a new one), overriding URL/realm, connect to a network node, and start the network member on-boarding.

If the user credentials are already for a member, fetch member information and display member page.

Parameters:
  • reactor – Twisted reactor to use.

  • url – Override network URL from user profile with this value.

  • realm – Override network realm from user profile with this value.

  • profile – Name of user profile within user configuration to load (eg from $HOME/.xbrnetwork/config.ini)