Skip to main content

The XBR Protocol - blockchain protocol for decentralized open data markets

Project description

Docs (on CDN) Docs (on S3) Travis Coverage

This repository contains the XBR smart contracts, with Ethereum as target blockchain, and Solidity as implementation language for the XBR Protocol.

Please see the documentation for more information.

XBR Client Library

The XBR Protocol - at its core - is made of the XBR smart contracts, and the primary artifacts built are the contract ABI files (in ./build/contracts/*.json).

Technically, these files are all you need to interact and talk to the XBR smart contracts.

However, doing it that way (using the raw ABI files and presumably some generic Ethereum library) is cumbersome and error prone to maintain.

Therefore, we create wrapper libraries for XBR, currently for Python and JavaScript, that make interaction with XBR contract super easy.

The libraries are available here:

XBR Lib for Browser

To use XBR Lib for JavaScript (in a browser Dapp), add a reference to the latest development version we host:

<script>
    XBR_DEBUG_TOKEN_ADDR = '0x67b5656d60a809915323bf2c40a8bef15a152e3e';
    XBR_DEBUG_NETWORK_ADDR = '0x2612af3a521c2df9eaf28422ca335b04adf3ac66';
</script>
<script src="https://xbr.network/lib/xbr.min.js"></script>

Then to use

xbr.setProvider(window.web3.currentProvider);

As long as we haven't deployed the XBR smart contracts to any public
network (testnets or mainnet), a user must set the addresses of our
deployed token and network smart contracts on the (private) network
the user is connecting to and where the XBR contracts need to be
deployed.

XBR Lib for NodeJS

XBR Lib for NodeJS:

npm install autobahn

XBR Lib for Python

XBR Lib for Python is published on PyPI and can be installed:

pip install xbr

To use XBR Lib for Python, export the following environment variables

export XBR_DEBUG_TOKEN_ADDR="0x67b5656d60a809915323bf2c40a8bef15a152e3e"
export XBR_DEBUG_NETWORK_ADDR="0x2612af3a521c2df9eaf28422ca335b04adf3ac66"

import the library and set the Web3 provider:

import xbr
from web3.auto import w3

xbr.setProvider(w3)

Copyright Crossbar.io Technologies GmbH. Licensed under the Apache 2.0 license.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xbr-19.2.1.tar.gz (276.8 kB view details)

Uploaded Source

Built Distribution

xbr-19.2.1-py2.py3-none-any.whl (309.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file xbr-19.2.1.tar.gz.

File metadata

  • Download URL: xbr-19.2.1.tar.gz
  • Upload date:
  • Size: 276.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for xbr-19.2.1.tar.gz
Algorithm Hash digest
SHA256 aa44d0b897f217376be44e586d7816e298ebf7063106347e1659e4fb6ef49cdf
MD5 26c45102a348fa0a24d33a0aa3c39ecd
BLAKE2b-256 085e1106e5a2486131fc6d4e67a0e5f99c3c663037401fe1a33a744f6158de21

See more details on using hashes here.

File details

Details for the file xbr-19.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: xbr-19.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 309.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for xbr-19.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9ef89e6dd57cb0c707196f4a267269853fc30002138ec902f4c8b5758e39ded9
MD5 b20f250d2f957de877c6d05e3a706f09
BLAKE2b-256 055aad75d4b387f2b2f8ccfe9e79f4068591068d0102634b9121f7e0374de9db

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page