cfxdb.xbrnetwork.account

Classes

Account

XBR Network members.

Accounts

Database table for XBR member accounts.

IndexAccountsByEmail

Database (index) table for (user-)email-to-account mapping.

IndexAccountsByUsername

Database (index) table for username-to-account mapping.

IndexAccountsByWallet

Database (index) table for (user-)wallet-to-account mapping.

_AccountGen

Expand methods on the class code generated by flatc.

Module Contents

class Account(from_fbs=None)[source]

Bases: object

XBR Network members.

ACCOUNT_LEVEL[source]

Valid account levels.

ACCOUNT_LEVEL_ACTIVE = 1[source]

Account is active.

ACCOUNT_LEVEL_BLOCKED = 5[source]

Account is currently blocked and cannot current actively participate in the market.

ACCOUNT_LEVEL_NONE = 0[source]

Unset.

ACCOUNT_LEVEL_PENALTY = 4[source]

Account is subject to a temporary penalty.

ACCOUNT_LEVEL_RETIRED = 3[source]

Account is retired.

ACCOUNT_LEVEL_VERIFIED = 2[source]

Account is active and verified.

WALLET_TYPE[source]

Valid account wallet types.

WALLET_TYPE_FROM_STRING[source]

Map of wallet-type-name to wallet-type-code.

WALLET_TYPE_HOSTED = 3[source]

Account wallet in hosted (in this database).

WALLET_TYPE_IMPORTED = 1[source]

Account (primary) wallet was imported (the user provided the wallet public address).

WALLET_TYPE_METAMASK = 2[source]

Account (primary) wallet was imported (the user provided the wallet public address).

WALLET_TYPE_NONE = 0[source]

Wallet type unset (“null”).

WALLET_TYPE_TO_STRING[source]

Map of wallet-type-code to wallet-type-name.

__str__()[source]
_created = None[source]
_email = None[source]
_email_verified = None[source]
_eula = None[source]
_from_fbs = None[source]
_level = None[source]
_oid = None[source]
_profile = None[source]
_recovery_algo = None[source]
_recovery_data = None[source]
_recovery_salt = None[source]
_registered = None[source]
_username = None[source]
_wallet_address = None[source]
_wallet_type = None[source]
build(builder)[source]
static cast(buf)[source]
property created: numpy.datetime64[source]

Timestamp (epoch time in ns) of initial creation of this record.

property email: str[source]

User (primary) email address.

property email_verified: numpy.datetime64[source]

Timestamp (epoch time in ns) when the user email was (last) verified or 0 if unverified.

property eula: str[source]

EULA the member agreed to when joining the market (IPFS Multihash string).

property level: int[source]

Current member level.

marshal()[source]
property oid: uuid.UUID[source]

Globally unique and static member ID.

property profile: str[source]

Optional member profile (IPFS Multihash string).

property recovery_algo: numpy.datetime64[source]

Timestamp (epoch time in ns) of initial creation of this record.

property recovery_data: bytes[source]

Recovery backup data (usually encrypted according to the account backup recovery algo in use).

property recovery_salt: bytes[source]

Salt used for encryption of recovery data.

property registered: int[source]

Block number (on the blockchain) when the member (originally) registered.

property username: str[source]

//xbr.network)

Type:

XBR Network username (must be globally unique on https

property wallet_address: bytes[source]

Public address of user crypto wallet in use.

property wallet_type: int[source]

Type of (primary) user crypto wallet in use.

class Accounts(slot=None, compress=None, build=None, cast=None)[source]

Bases: zlmdb.MapUuidFlatBuffers

Database table for XBR member accounts.

static parse(data)[source]
Parameters:

data

Returns:

class IndexAccountsByEmail(slot=None, compress=None)[source]

Bases: zlmdb.MapStringUuid

Database (index) table for (user-)email-to-account mapping.

class IndexAccountsByUsername(slot=None, compress=None)[source]

Bases: zlmdb.MapStringUuid

Database (index) table for username-to-account mapping.

class IndexAccountsByWallet(slot=None, compress=None)[source]

Bases: zlmdb.MapBytes20Uuid

Database (index) table for (user-)wallet-to-account mapping.

class _AccountGen[source]

Bases: cfxdb.gen.xbrnetwork.Account.Account

Expand methods on the class code generated by flatc.

FIXME: come up with a PR for flatc to generated this stuff automatically.

classmethod GetRootAsAccount(buf, offset)[source]

This method is deprecated. Please switch to GetRootAs.

OidAsBytes()[source]
RegisteredAsBytes()[source]
WalletAddressAsBytes()[source]