Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
artifacts
data_migrations
scripts
src
test
.npmignore
LICENSE
README.md
RELEASE.md
package-lock.json
package.json
webpack.config.js

README.md

origin_github_banner

origin_npm_version origin_license origin_travis_banner

Head to https://www.originprotocol.com/developers to learn more about what we're building and how to get involved.

origin-js

origin-js is a library of javascript code and Ethereum smart contracts which allow anyone to create decentralized marketplaces, including for fractional usage. It is an open source project created by Origin Protocol.

⚠️ This is an alpha version which is not suitable for production environments.

Documentation

origin-js documentation

Demo

Our DApp is currently running on the Ethereum mainnet and showcases what can be achieved with origin-js.

Using origin-js in your project

As a node package

npm install origin --save

or

yarn add origin

Plain javascript

A browser-compatible plain javascript file origin.js is available in the Releases section. A hosted version can be directly included in your html as:

<script src="https://code.originprotocol.com/origin-js/origin-v0.7.1.js"></script>

npm build will generate this file and save it to dist/origin.js.

Tests

Command Line (All Tests)

Our full test suite can be run with:

npm run test

Note: you should not have the server running at this time, as these tests start their own local blockchain instance.

To run tests and automatically re-run when files change:

npm run test:jsw

Troubleshooting

Python 3

If you have Python 3 installed, you may see this error when installing dependencies:

gyp ERR! stack Error: Python executable "/Users/aiham/.pyenv/shims/python" is v3.6.4, which is not supported by gyp.

Resolve this by configuring npm to use Python 2 (where python2.7 is a binary accessible from your $PATH):

npm config set python python2.7

Contributing

Origin is an 100% open-source and community-driven project and we welcome contributions of all sorts. There are many ways to help, from reporting issues, contributing code, and helping us improve our community.

To get involved, please join our Discord channel and review our guide to contributing.