The XBR Protocol - blockchain protocol for decentralized open data markets
Project description
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
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file xbr-18.11.3.post5.tar.gz
.
File metadata
- Download URL: xbr-18.11.3.post5.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.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c395aefcea8758be0f56e8f53e2ecce1e9fff4e7441e19273f763a42148acc83 |
|
MD5 | 66930cebd9362c660b38c72ff5e36d6a |
|
BLAKE2b-256 | f4faba63c824b82a34b7b1af5ebce7147e1ccc1fd0251518053127865c83379d |
File details
Details for the file xbr-18.11.3.post5-py2.py3-none-any.whl
.
File metadata
- Download URL: xbr-18.11.3.post5-py2.py3-none-any.whl
- Upload date:
- Size: 299.6 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.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b62134d3aaf98b5ca418f97454845f0c87b423a5fa1d4565396417d2c9829e7e |
|
MD5 | cb8917324b15256a2c456e5ff4c4facc |
|
BLAKE2b-256 | 2bf43e7e20555669cf0eced6a59e6867b287cb82112dffc15d264d5e83b8913e |