datona-lib
v0.1.4
Published
Core library for access to the Datona IO Platform. Datona Protocol v0.0.2. Adds HTTP and WebSocket support.
Maintainers
Readme
Datona IO Platform Library (datona-lib)
Core Javascript library for accessing the Datona IO Platform.
For more information about the platform see What Is Smart Data Access or download the white paper.
Features
- Fully encapsulates the Datona Application Layer Protocol;
- Allows Smart Data Access Contracts on the blockchain to be deployed, managed and queried;
- Allows Data Vaults controlled by Smart Data Access Contracts to be created, updated, accessed and deleted on any compliant local or remote Data Vault Server;
- Provides all cryptographic functions needed to use the platform.
Documentation
Full documentation is available on ReadTheDocs.
Installation
Within a Web Page
Copy dist/datona-lib.js into your directory structure along with dist/web3.min.js. Include these scripts in your web page:
<head>
<script src="./lib/web3.min.js"></script>
<script src="./lib/datona-lib.js"></script>
</head>Within a Local Node.js Project
$ npm install datona-libThis will install datona-lib and all its dependencies to your local node project.
Usage
You need to be running a local Ethereum node or have access to a remote node - e.g. Infura to use this library.
const datona = require('datona-lib');See the project documentation for usage information.
Projects utilising datona-lib
If you have a project that you feel could be listed here, please ask for it!
Tests
By default, the tests are configured to use a local Ganache instance on port 8545. Ganache needs to be running before executing any of these test commands. You will need to set the mnemonic to foil message analyst universe oval sport super eye spot easily veteran oblige.
If you want to run these tests using your own blockchain node or a third party service, edit the url in config.json and ensure the three addresses in test/system-scenarios.rst have funds.
$ npm testRuns all tests except those few that depend on realtime delays in Ganache.
$ npm run test-allRuns all tests.
$ npm run test-covRuns all tests and generates a coverage report.
Community
Copyright
Copyright (c) 2020 Datona Labs
Released under the GNU Lesser General Public License
