XYO CORE SDK (sdk-core-nodejs)
Table of Contents
- Project Overview
- Scope of Features
- Yellow Paper
- Architecture and Design
- Getting Started
- Developer Guide
Scope of features
Core functionality for the XYO NodeJS projects. This repository implements the core objects and services used in the XYO protocol. Additionally it provides core XYO features like performing bound-witnesses, hashing, signing, serialization, origin-chain management and TCP Network services. Alas, it exposes a number of CLI applications for running archivists and diviners.
The XYO protocol for creating origin-blocks is specified in the XYO Yellow Paper. In it, it describes the behavior of how a node on the XYO network should create bound-witnesses. Note, the behavior is not coupled with any particular technology constraints around transport layers, cryptographic algorithms, or hashing algorithms.
Architecture and Design
As such, the design of the system is aimed at abstracting these concepts so that the concrete implementations of these components can be swapped out so long as they conform to the correct interfaces.
Here is a link to the core object model that contains an index of major/minor values and their respective objects.
git clone https://github.com/XYOracleNetwork/sdk-core-nodejs
After cloning the repository, change directory to the folder that houses the repository.
You will have to run Lerna to setup the links
Once you've switched to the repository directory, install the dependencies. We prefer
npm works just as well.
Once the dependencies are installed run
Run all tests
Developers should conform to git flow workflow. Additionally, we should try to make sure every commit builds. Commit messages should be meaningful serve as a meta history for the repository. Please squash meaningless commits before submitting a pull-request.
There is git hook on commits to validate the project builds. If you'd like to commit your changes
while developing locally and want to skip this step you can use the
--no-verify commit option.
git commit --no-verify -m "COMMIT MSG"
NVM (Node Version Manager)
A number of the libraries that this project depends on may fail at install-time because they need to be built from C++ source where the output is specific to the host system. The underlying issue is that it is trying to modify files in protected areas of the file-system.
The project structure was designed to support and encourage a modular architecture. This project uses a typical Lerna layout. That is, all modules are located in the packages folder. This allows for a couple of things that are conducive to an efficient development and release process:
- Local linking of modules during development
- Ability to release patches, minor, and major version upgrades to npm with ease
- TypeScript linking using project references
yarn build must be run from the project root for the changes to reflect.
So a typical workflow might look like this:
- Developer pulls down repository and changes directory in project root
- Developer runs
yarn installto install all dependencies of all the packages in accordance with yarn workspace feature
- Developer runs
- Developer makes changes in one or more packages
- Developer runs
yarn buildto see those changes reflected and linked accordingly
- On occasion, running
yarn cleanmay prove useful for resetting the project to clean state
- When a change-set is complete and has gone through the proper code-review etc, a release can be made running
yarn release. Release versions should follow SemVer standards.
Set the first account in ganache as environment variable for config
eval `./scripts/manage-ganache.js set-account`
- Carter Harrison
- Arie Trouw
- Kevin Weiler
- Phillip Lorenzo
See the LICENSE.md file for license details.