Skip to main content

The XBR Protocol - blockchain protocol for decentralized open data markets

Project description

# The XBR Protocol

[![Docs (on CDN)](https://img.shields.io/badge/docs-cdn-brightgreen.svg?style=flat)](https://xbr.network/docs/index.html)   [![Docs (on S3)](https://img.shields.io/badge/docs-s3-brightgreen.svg?style=flat)](https://s3.eu-central-1.amazonaws.com/xbr.foundation/docs/index.html)   [![Travis](https://travis-ci.org/xbr/xbr-protocol.svg?branch=master)](https://travis-ci.org/xbr/xbr-protocol)   [![Coverage](https://img.shields.io/codecov/c/github/xbr/xbr-protocol/master.svg)](https://codecov.io/github/xbr/xbr-protocol)

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](https://xbr.network/docs/index.html) 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 client library for Python](<https://pypi-hypernode.com/project/xbr/>)
* [XBR client library for JavaScript/Browser](<https://xbr.network/lib/xbr.min.js>)
* [XBR client library for JavaScript/NodeJS](<https://www.npmjs.org/package/xbr>)

### XBR Lib for Browser

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

```html
<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

```javascript
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](https://www.npmjs.org/package/xbr):

npm install autobahn

### XBR Lib for Python

XBR Lib for Python is [published on PyPI](https://pypi-hypernode.com/project/xbr/) and can be installed:

```console
pip install xbr
```

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

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

import the library and set the Web3 provider:

```python
import xbr
from web3.auto import w3

xbr.setProvider(w3)
```

---

Copyright Crossbar.io Technologies GmbH. Licensed under the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0).


Download files

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

Source Distribution

xbr-18.11.3.post1.tar.gz (271.2 kB view details)

Uploaded Source

Built Distribution

xbr-18.11.3.post1-py2.py3-none-any.whl (299.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file xbr-18.11.3.post1.tar.gz.

File metadata

  • Download URL: xbr-18.11.3.post1.tar.gz
  • Upload date:
  • Size: 271.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for xbr-18.11.3.post1.tar.gz
Algorithm Hash digest
SHA256 f85daa9970e8de3ccdfb43464d8a316590a0d91786766dc86812289e2186828d
MD5 addda79be87ff02936dec8a34ed31a22
BLAKE2b-256 983108ed12181c193339659e28483b4adcae76fde540ca47ee2c1194880b1c45

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xbr-18.11.3.post1-py2.py3-none-any.whl
  • Upload date:
  • Size: 299.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for xbr-18.11.3.post1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 06e1523bc31706e063b046bde7ea0dda1a750307f56cc09bc6fb51f7bf4e724e
MD5 b9208ec2282ae79f5af06a13b991847e
BLAKE2b-256 e7f841045d09aef4e0230e271a00ccacb745cc8569c25836cc7bb7b8c04644ef

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