See the documentation.
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 |
Client SDK for interacting with services on Oasis |
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 |
Oasis Gateway implementation used as the client backend | |
@oasislabs/service |
Connects to and deploys IDL defined services | |
@oasislabs/confidential |
Primitives for confidentiality | |
@oasislabs/common |
Common utilities for Oasis packages | |
@oasislabs/test |
Tools used in Oasis tests | |
@oasislabs/web3 |
Web3 JSON RPC version of an Oasis Gateway |
To get started first install the required build tools:
npm install -g lerna
npm install -g yarn
Then bootstrap the workspace:
yarn
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.
To run all tests:
yarn test
To lint:
yarn lint
To apply lint fixes:
yarn lint:fix
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