cfxdb.xbr¶
Submodules¶
Classes¶
XBR Market Actors. |
|
Market actors table, mapping from |
|
|
|
Apis table, mapping from |
|
Blockchain blocks. This table stores information about the series of Ethereum blocks that make up the blockchain. |
|
Blockchain blocks processed. |
|
|
|
Catalogs table, mapping from |
|
|
|
Consents table |
|
Consent-by-member-address index with |
|
Markets-by-actor index with |
|
Markets-by-maker index with |
|
Markets-by-owner index with |
|
|
|
Markets table, mapping from |
|
XBR Network member database object. |
|
XBR members by |
|
CFC edge database schema for ZLMDB. |
|
|
|
Persisted token approvals archive. |
|
|
|
Persisted token transfers archive. |
Package Contents¶
- class Actor(from_fbs=None)[source]¶
Bases:
objectXBR Market Actors.
- _actor = None¶
- _actor_type = None¶
- _from_fbs = None¶
- _joined = None¶
- _market = None¶
- _meta = None¶
- _security = None¶
- _signature = None¶
- _tid = None¶
- _timestamp = None¶
- property joined: int¶
Block number (on the blockchain) when the actor (originally) joined the market.
- property meta: str¶
The XBR market metadata published by the market owner. IPFS Multihash pointing to a RDF/Turtle file with market metadata.
- property tid: bytes¶
Transaction hash of the transaction this change was committed to the blockchain under.
- property timestamp: numpy.datetime64¶
Database transaction time (epoch time in ns) of insert or last update.
- class Actors(slot=None, compress=None, build=None, cast=None)[source]¶
Bases:
zlmdb.MapUuidBytes20Uint8FlatBuffersMarket actors table, mapping from
(market_id|UUID, actor_adr|bytes[20], actor_type|int)tocfxdb.xbr.Actor.
- class Api(from_fbs=None)[source]¶
Bases:
objectXBRNetwork.Apidatabase object.- _catalog_oid = None¶
- _from_fbs = None¶
- _meta = None¶
- _oid = None¶
- _published = None¶
- _schema = None¶
- _signature = None¶
- _tid = None¶
- _timestamp = None¶
- property meta: str¶
The XBR market metadata published by the market owner. IPFS Multihash pointing to a RDF/Turtle file with market metadata.
- property schema: str¶
The XBR market terms set by the market owner. IPFS Multihash pointing to a ZIP archive file with market documents.
- property tid: bytes¶
Transaction hash of the transaction this change was committed to the blockchain under.
- property timestamp: numpy.datetime64¶
Database transaction time (epoch time in ns) of insert or last update.
- class Apis(slot=None, compress=None, build=None, cast=None)[source]¶
Bases:
zlmdb.MapUuidFlatBuffersApis table, mapping from
oid|UUIDtocfxdb.xbr.Api
- class Block(from_fbs=None)[source]¶
Bases:
objectBlockchain blocks. This table stores information about the series of Ethereum blocks that make up the blockchain.
- _block_hash = None¶
- _block_number = None¶
- _cnt_events = None¶
- _from_fbs = None¶
- _timestamp = None¶
- property timestamp: numpy.datetime64¶
Timestamp when record was inserted (Unix epoch time in ns).
- class Blocks(slot=None, compress=None, build=None, cast=None)[source]¶
Bases:
zlmdb.MapBytes32FlatBuffersBlockchain blocks processed.
Map
zlmdb.MapBytes32FlatBuffersfromblock_numbertocfxdb.xbr.Block
- class Catalog(from_fbs=None)[source]¶
Bases:
objectXBRNetwork.FbsRepositorydatabase object.- _from_fbs = None¶
- _meta = None¶
- _oid = None¶
- _owner = None¶
- _seq = None¶
- _signature = None¶
- _terms = None¶
- _tid = None¶
- _timestamp = None¶
- property meta: str¶
The XBR market metadata published by the market owner. IPFS Multihash pointing to a RDF/Turtle file with market metadata.
- property terms: str¶
The XBR market terms set by the market owner. IPFS Multihash pointing to a ZIP archive file with market documents.
- property tid: bytes¶
Transaction hash of the transaction this change was committed to the blockchain under.
- property timestamp: numpy.datetime64¶
Database transaction time (epoch time in ns) of insert or last update.
- class Catalogs(slot=None, compress=None, build=None, cast=None)[source]¶
Bases:
zlmdb.MapUuidFlatBuffersCatalogs table, mapping from
oid|UUIDtocfxdb.xbr.FbsRepository
- class Consent(from_fbs=None)[source]¶
Bases:
objectXBRNetwork.Consentdatabase object.- _catalog_oid = None¶
- _consent = None¶
- _delegate = None¶
- _delegate_type = None¶
- _from_fbs = None¶
- _market_oid = None¶
- _member = None¶
- _service_prefix = None¶
- _signature = None¶
- _synced = None¶
- _tid = None¶
- _timestamp = None¶
- _updated = None¶
- property tid: bytes¶
Transaction hash of the transaction this change was committed to the blockchain under.
- property timestamp: numpy.datetime64¶
Database transaction time (epoch time in ns) of insert or last update.
- class Consents(slot=None, compress=None, build=None, cast=None)[source]¶
Bases:
zlmdb.MapUuidBytes20Bytes20Uint8UuidFlatBuffersConsents table
- class IndexConsentByMemberAddress(slot=None, compress=None)[source]¶
Bases:
zlmdb.MapBytes20TimestampUuidConsent-by-member-address index with
(member_adr|bytes[20], timestamp|int) -> consent_oid|UUIDmapping.
- class IndexMarketsByActor(slot=None, compress=None)[source]¶
Bases:
zlmdb.MapBytes20TimestampUuidMarkets-by-actor index with
(actor_adr|bytes[20], joined|int) -> market_id|UUIDmapping.
- class IndexMarketsByMaker(slot=None, compress=None)[source]¶
Bases:
zlmdb.MapBytes20UuidMarkets-by-maker index with
maker_adr|bytes[20] -> market_id|UUIDmapping.
- class IndexMarketsByOwner(slot=None, compress=None)[source]¶
Bases:
zlmdb.MapBytes20TimestampUuidMarkets-by-owner index with
(owner_adr|bytes[20], created|int) -> market_id|UUIDmapping.
- class Market(from_fbs=None)[source]¶
Bases:
objectXBRNetwork.Marketdatabase object.- _coin = None¶
- _consumer_security = None¶
- _created = None¶
- _from_fbs = None¶
- _maker = None¶
- _market = None¶
- _market_fee = None¶
- _meta = None¶
- _owner = None¶
- _provider_security = None¶
- _seq = None¶
- _signature = None¶
- _terms = None¶
- _tid = None¶
- _timestamp = None¶
- property consumer_security: int¶
The amount of XBR tokens a XBR consumer joining the market must deposit.
- property created: int¶
Block number (on the blockchain) when the actor (originally) joined the market.
- property maker: bytes¶
The address of the XBR market maker that will run this market. The delegate of the market owner.
- property market_fee: int¶
The fee taken by the market (beneficiary is the market owner). The fee is a percentage of the revenue of the XBR Provider that receives XBR Token paid for transactions. The fee must be between 0% (inclusive) and 99% (inclusive), and is expressed as a fraction of the total supply of XBR tokens.
- property meta: str¶
The XBR market metadata published by the market owner. IPFS Multihash pointing to a RDF/Turtle file with market metadata.
- property provider_security: int¶
The amount of XBR tokens a XBR provider joining the market must deposit.
- property terms: str¶
The XBR market terms set by the market owner. IPFS Multihash pointing to a ZIP archive file with market documents.
- property tid: bytes¶
Transaction hash of the transaction this change was committed to the blockchain under.
- property timestamp: numpy.datetime64¶
Database transaction time (epoch time in ns) of insert or last update.
- class Markets(slot=None, compress=None, build=None, cast=None)[source]¶
Bases:
zlmdb.MapUuidFlatBuffersMarkets table, mapping from
market_id|UUIDtocfxdb.xbr.Market
- class Member(from_fbs=None)[source]¶
Bases:
objectXBR Network member database object.
- _account_oid = None¶
- _address = None¶
- _eula = None¶
- _from_fbs = None¶
- _level = None¶
- _profile = None¶
- _registered = None¶
- _signature = None¶
- _tid = None¶
- _timestamp = None¶
- property account_oid: uuid.UUID¶
ID of user account this member has an account on planet.xbr.network.
- property tid: bytes¶
Transaction hash of the transaction this change was committed to the blockchain under.
- property timestamp: numpy.datetime64¶
Database transaction time (epoch time in ns) of insert or last update.
- class MemberLevel[source]¶
Bases:
object- ACTIVE = 1¶
- BLOCKED = 5¶
- NONE = 0¶
- PENALTY = 4¶
- RETIRED = 3¶
- VERIFIED = 2¶
- class Members(slot=None, compress=None, build=None, cast=None)[source]¶
Bases:
zlmdb.MapBytes20FlatBuffersXBR members by
member_adr.Map
zlmdb.MapBytes20FlatBuffersfrommember_adrtocfxdb.xbr.Member
- class Schema(db)[source]¶
Bases:
objectCFC edge database schema for ZLMDB.
- actors: cfxdb.xbr.actor.Actors¶
XBR market actors.
- apis: cfxdb.xbr.api.Apis¶
XBR network apis.
- static attach(db)[source]¶
Factory to create a schema from attaching to a database. The schema tables will be automatically mapped as persistant maps and attached to the database slots.
- Parameters:
db – zlmdb.Database
- Returns:
object of Schema
- blocks: cfxdb.xbr.block.Blocks¶
Ethereum blocks basic information.
- catalogs: cfxdb.xbr.catalog.Catalogs¶
XBR network catalogs.
- consents: cfxdb.xbr.consent.Consents¶
XBR data consents.
- db¶
- idx_apis_by_catalog: cfxdb.xbr.api.IndexApiByCatalog¶
Index
catalog_oid -> api_oid.
- idx_catalogs_by_owner: cfxdb.xbr.catalog.IndexCatalogsByOwner¶
Index
(member_oid, created) -> catalog_oid.
- idx_consent_by_member_adr: cfxdb.xbr.consent.IndexConsentByMemberAddress¶
Consents-by-members-address index with
(member_adr|bytes[20], joined|int) -> member_adr|UUIDmapping.
- idx_markets_by_actor: cfxdb.xbr.market.IndexMarketsByActor¶
Index
(actor_adr, joined) -> market_oid.
- idx_markets_by_maker: cfxdb.xbr.market.IndexMarketsByMaker¶
Index
maker_adr -> market_oid.
- idx_markets_by_owner: cfxdb.xbr.market.IndexMarketsByOwner¶
Index
(owner_adr, created) -> market_oid.
- idx_offer_by_key: cfxdb.xbrmm.offer.IndexOfferByKey¶
Index of key offers by key ID (rather than offer ID, as the object table is indexed by).
- idx_paying_channel_by_delegate: cfxdb.xbrmm.channel.IndexPayingChannelByDelegate¶
Maps from XBR provider delegate address to the currently active paying channel address for the given provider delegate.
- idx_paying_channel_by_recipient: cfxdb.xbrmm.channel.IndexPayingChannelByRecipient¶
Maps from XBR seller actor address to the currently active paying channel address for the given actor.
- idx_payment_channel_by_actor: cfxdb.xbrmm.channel.IndexPaymentChannelByActor¶
Maps from XBR (buyer) actor address to the currently active payment channel address for the given actor.
- idx_payment_channel_by_delegate: cfxdb.xbrmm.channel.IndexPaymentChannelByDelegate¶
Maps from XBR consumer delegate address to the currently active payment channel address for the given consumer delegate.
- markets: cfxdb.xbr.market.Markets¶
XBR markets.
- members: cfxdb.xbr.member.Members¶
XBR network members.
- offers: cfxdb.xbrmm.offer.Offers¶
Data encryption key offers.
- paying_balances: cfxdb.xbrmm.channel.PayingChannelBalances¶
Current off-chain balances within paying channels.
- paying_channels: cfxdb.xbrmm.channel.PayingChannels¶
Paying channels for XBR provider delegates.
- payment_balances: cfxdb.xbrmm.channel.PaymentChannelBalances¶
Current off-chain balances within payment channels.
- payment_channels: cfxdb.xbrmm.channel.PaymentChannels¶
Payment channels for XBR consumer delegates.
- token_approvals: cfxdb.xbr.token.TokenApprovals¶
Token approvals archive.
- token_transfers: cfxdb.xbr.token.TokenTransfers¶
Token transfers archive.
- transactions: cfxdb.xbrmm.transaction.Transactions¶
- class TokenApproval(from_fbs=None)[source]¶
Bases:
objectIERC20.TokenApprovalevent database object.- _block_hash = None¶
- _from_fbs = None¶
- _owner_address = None¶
- _spender_address = None¶
- _tx_hash = None¶
- _value = None¶
- class TokenApprovals(slot=None, compress=None, build=None, cast=None)[source]¶
Bases:
zlmdb.MapBytes32FlatBuffersPersisted token approvals archive.
Map
zlmdb.MapBytes32FlatBuffersfromtransaction_hashtocfxdb.xbr.TokenApproval
- class TokenTransfer(from_fbs=None)[source]¶
Bases:
objectIERC20.TokenTransferevent database object.- _block_hash = None¶
- _from_address = None¶
- _from_fbs = None¶
- _to_address = None¶
- _tx_hash = None¶
- _value = None¶
- class TokenTransfers(slot=None, compress=None, build=None, cast=None)[source]¶
Bases:
zlmdb.MapBytes32FlatBuffersPersisted token transfers archive.
Map
zlmdb.MapBytes32FlatBuffersfromtransaction_hashtocfxdb.xbr.TokenTransfer