cfxdb.xbrnetwork¶
Submodules¶
Classes¶
XBR Network members. |
|
Database table for XBR member accounts. |
|
Database (index) table for (user-)email-to-account mapping. |
|
Database (index) table for username-to-account mapping. |
|
Database (index) table for (user-)wallet-to-account mapping. |
|
Database (index) table for (member_oid, created) -> userkey mapping. |
|
XBR Network backend database schema. |
|
User client (public) keys. |
|
Database table for user client keys. |
|
User actions (such as "on-board new user") yet to be verified. Actions to be verified are |
|
Database table for verification/verified actions, eg on-boarding new XBR members. |
|
Package Contents¶
- class Account(from_fbs=None)[source]¶
Bases:
objectXBR Network members.
- ACCOUNT_LEVEL¶
Valid account levels.
- ACCOUNT_LEVEL_ACTIVE = 1¶
Account is active.
- ACCOUNT_LEVEL_BLOCKED = 5¶
Account is currently blocked and cannot current actively participate in the market.
- ACCOUNT_LEVEL_NONE = 0¶
Unset.
- ACCOUNT_LEVEL_PENALTY = 4¶
Account is subject to a temporary penalty.
- ACCOUNT_LEVEL_RETIRED = 3¶
Account is retired.
- ACCOUNT_LEVEL_VERIFIED = 2¶
Account is active and verified.
- WALLET_TYPE¶
Valid account wallet types.
- WALLET_TYPE_FROM_STRING¶
Map of
wallet-type-nametowallet-type-code.
- WALLET_TYPE_HOSTED = 3¶
Account wallet in hosted (in this database).
- WALLET_TYPE_IMPORTED = 1¶
Account (primary) wallet was imported (the user provided the wallet public address).
- WALLET_TYPE_METAMASK = 2¶
Account (primary) wallet was imported (the user provided the wallet public address).
- WALLET_TYPE_NONE = 0¶
Wallet type unset (“null”).
- WALLET_TYPE_TO_STRING¶
Map of
wallet-type-codetowallet-type-name.
- _created = None¶
- _email = None¶
- _email_verified = None¶
- _eula = None¶
- _from_fbs = None¶
- _level = None¶
- _oid = None¶
- _profile = None¶
- _recovery_algo = None¶
- _recovery_data = None¶
- _recovery_salt = None¶
- _registered = None¶
- _username = None¶
- _wallet_address = None¶
- _wallet_type = None¶
- property created: numpy.datetime64¶
Timestamp (epoch time in ns) of initial creation of this record.
- property email_verified: numpy.datetime64¶
Timestamp (epoch time in ns) when the user email was (last) verified or 0 if unverified.
- property recovery_algo: numpy.datetime64¶
Timestamp (epoch time in ns) of initial creation of this record.
- class AccountLevel[source]¶
Bases:
object- ACTIVE = 1¶
- BLOCKED = 5¶
- NONE = 0¶
- PENALTY = 4¶
- RETIRED = 3¶
- VERIFIED = 2¶
- class Accounts(slot=None, compress=None, build=None, cast=None)[source]¶
Bases:
zlmdb.MapUuidFlatBuffersDatabase table for XBR member accounts.
- class IndexAccountsByEmail(slot=None, compress=None)[source]¶
Bases:
zlmdb.MapStringUuidDatabase (index) table for (user-)email-to-account mapping.
- class IndexAccountsByUsername(slot=None, compress=None)[source]¶
Bases:
zlmdb.MapStringUuidDatabase (index) table for username-to-account mapping.
- class IndexAccountsByWallet(slot=None, compress=None)[source]¶
Bases:
zlmdb.MapBytes20UuidDatabase (index) table for (user-)wallet-to-account mapping.
- class IndexUserKeyByAccount(slot=None, compress=None)[source]¶
Bases:
zlmdb.MapUuidTimestampBytes32Database (index) table for (member_oid, created) -> userkey mapping.
- class Schema(db)[source]¶
Bases:
objectXBR Network backend database schema.
- EXPORTED = None¶
- accounts: cfxdb.xbrnetwork.account.Accounts¶
Member accounts database table
xbrnetwork.Accounts.
- static attach(db)[source]¶
Attach database schema to database instance.
- Parameters:
db (
zlmdb.Database) – Database to attach schema to.
- db¶
- idx_accounts_by_email: cfxdb.xbrnetwork.account.IndexAccountsByEmail¶
Index “by email” of member accounts
xbrnetwork.IndexAccountsByEmail.
- idx_accounts_by_username: cfxdb.xbrnetwork.account.IndexAccountsByUsername¶
Index “by username” of member accounts
xbrnetwork.IndexAccountsByUsername.
- idx_accounts_by_wallet: cfxdb.xbrnetwork.account.IndexAccountsByWallet¶
Index “by wallet” of member accounts
xbrnetwork.IndexAccountsByWallet.
- idx_user_key_by_account: cfxdb.xbrnetwork.userkey.IndexUserKeyByAccount¶
Index “by pubkey” of user keys
xbrnetwork.IndexUserKeyByAccount.
- user_keys: cfxdb.xbrnetwork.userkey.UserKeys¶
User client keys database table
xbrnetwork.UserKeys.
- verified_actions: cfxdb.xbrnetwork.vaction.VerifiedActions¶
Verified actions database table
xbrnetwork.VerifiedActions.
- class UserKey(from_fbs=None)[source]¶
Bases:
objectUser client (public) keys.
- _created = None¶
- _from_fbs = None¶
- _owner = None¶
- _pubkey = None¶
- property created: numpy.datetime64¶
Timestamp (epoch time in ns) of initial creation of this record.
- class UserKeys(slot=None, compress=None, build=None, cast=None)[source]¶
Bases:
zlmdb.MapBytes32FlatBuffersDatabase table for user client keys.
- class VerificationStatus[source]¶
Bases:
object- EXPIRED = 4¶
- FAILED = 3¶
- NONE = 0¶
- PENDING = 1¶
- VERIFIED = 2¶
- class VerificationType[source]¶
Bases:
object- MEMBER_CREATEMARKET_EMAIL = 3¶
- MEMBER_JOINMARKET_EMAIL = 4¶
- MEMBER_LOGIN_EMAIL = 2¶
- MEMBER_ONBOARD_EMAIL = 1¶
- NONE = 0¶
- class VerifiedAction(from_fbs=None)[source]¶
Bases:
objectUser actions (such as “on-board new user”) yet to be verified. Actions to be verified are identified using their “Verification Action ID”. A verificatin email is sent to the (primary) email address of the user, and to verify, the user must click the verification link contained in the email. The verification link contains the verification action ID and code.
- VERIFICATION_STATUS¶
All valid verification status codes.
- VERIFICATION_STATUS_EXPIRED = 4¶
Action cannot be verified any longer since it has expired.
- VERIFICATION_STATUS_FAILED = 3¶
Verification has failed.
- VERIFICATION_STATUS_NONE = 0¶
Unset verification action status (“null”).
- VERIFICATION_STATUS_PENDING = 1¶
Verification is still pending.
- VERIFICATION_STATUS_VERIFIED = 2¶
Verification has been successfully completed.
- VERIFICATION_TYPE¶
All valid verification action types.
- VERIFICATION_TYPE_CREATE_CATALOG = 5¶
Verification action type for creation of a catalog via email verification.
- VERIFICATION_TYPE_CREATE_MARKET = 3¶
Verification action type for creation of new data market via email verification.
- VERIFICATION_TYPE_JOIN_MARKET = 4¶
Verification action type for joining an existing market via email verification.
- VERIFICATION_TYPE_LOGIN_MEMBER = 2¶
Verification action type for login of member (client) via email verification.
- VERIFICATION_TYPE_NONE = 0¶
Unset verification action type (“null”).
- VERIFICATION_TYPE_ONBOARD_MEMBER = 1¶
Verification action type for on-boarding new members via email verification.
- VERIFICATION_TYPE_PUBLISH_API = 5¶
Verification action type for publishing on API via email verification.
- _created = None¶
- _from_fbs = None¶
- _oid = None¶
- _vcode = None¶
- _verified_data = None¶
- _verified_oid = None¶
- _vstatus = None¶
- _vtype = None¶
- property created: numpy.datetime64¶
Timestamp (epoch time in ns) of initial creation of this record.
- class VerifiedActions(slot=None, compress=None, build=None, cast=None)[source]¶
Bases:
zlmdb.MapUuidFlatBuffersDatabase table for verification/verified actions, eg on-boarding new XBR members.