/oasis.js

🕸A web client for the Oasis platform

Primary LanguageTypeScriptApache License 2.0Apache-2.0

CircleCI Gitter chat docs

See the documentation.

Packages

The Client

For most use cases, it's recommended to use the main @oasislabs/client package for all your Oasis client needs, for which there is extensive documentation.

Package Version Description
@oasislabs/client npm Client SDK for interacting with services on Oasis

Internal Packages

However, if you only need a subset of the client's features, you can take what you need directly from the underlying packages. Together these packages compose the client. Standalone documentation is not provided so it's recommended to use these only if you know what you're doing.

Package Version Description
@oasislabs/gateway npm Oasis Gateway implementation used as the client backend
@oasislabs/service npm Connects to and deploys IDL defined services
@oasislabs/confidential npm Primitives for confidentiality
@oasislabs/common npm Common utilities for Oasis packages
@oasislabs/test npm Tools used in Oasis tests
@oasislabs/web3 npm Web3 JSON RPC version of an Oasis Gateway

Contributing

Installing

To get started first install the required build tools:

npm install -g lerna
npm install -g yarn

Then bootstrap the workspace:

yarn

Building

To build the workspace:

yarn build

In each package, the built javascript and typescript definitions will be in dist/. For direct browser testing of a client, simply include the rollup artifact directly in your script tag, e.g., <script src=/dist/index.umd.js></script>. For example here.

Testing

To run all tests:

yarn test

Linting

To lint:

yarn lint

To apply lint fixes:

yarn lint:fix

Publishing new npm package versions

This is a multi-package repo; packages are managed by lerna.

First, bump the version number in all package.json:

git checkout -b mybranch
lerna version  # bumps package numbers and creates a commit

Get the PR approved and merge it. Then pull the newly-updated master and push packages from it to npm:

git checkout master && git pull
lerna publish from-package