mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
docs updates
This commit is contained in:
parent
5be5a76153
commit
c08d2ca3dc
@ -71,13 +71,13 @@ async function init() {
|
|||||||
|
|
||||||
This stripped-down flow shows the essence of Ocean. Just downloading, no metadata.
|
This stripped-down flow shows the essence of Ocean. Just downloading, no metadata.
|
||||||
|
|
||||||
[Go to simple flow](docs/README_simple_flow.md)
|
[Go to simple flow](docs/quickstart_simple.md)
|
||||||
|
|
||||||
### Marketplace Flow
|
### Marketplace Flow
|
||||||
|
|
||||||
This batteries-included flow includes metadata, multiple services for one datatoken, and compute-to-data.
|
This batteries-included flow includes metadata, multiple services for one datatoken, and compute-to-data.
|
||||||
|
|
||||||
[Go to marketplace flow](docs/README_marketplace_flow.md)
|
[Go to marketplace flow](docs/quickstart_marketplace.md)
|
||||||
|
|
||||||
## 🦑 Development
|
## 🦑 Development
|
||||||
|
|
||||||
|
@ -16,14 +16,6 @@ Here's the steps.
|
|||||||
|
|
||||||
Let's go through each step.
|
Let's go through each step.
|
||||||
|
|
||||||
## 0. Installation
|
|
||||||
|
|
||||||
If you haven't installed yet:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm i @oceanprotocol/lib
|
|
||||||
```
|
|
||||||
|
|
||||||
## 1. Initialize services
|
## 1. Initialize services
|
||||||
|
|
||||||
This quickstart treats the publisher service, ganache-cli, metadata store, and marketplace as
|
This quickstart treats the publisher service, ganache-cli, metadata store, and marketplace as
|
||||||
@ -33,7 +25,7 @@ externally-run services. For convenience, we run barge locally in default settin
|
|||||||
git clone https://github.com/oceanprotocol/barge.git
|
git clone https://github.com/oceanprotocol/barge.git
|
||||||
cd barge/
|
cd barge/
|
||||||
git checkout v3
|
git checkout v3
|
||||||
export PROVIDER_VERSION=phase2
|
export PROVIDER_VERSION=latest
|
||||||
./start_ocean.sh --no-dashboard
|
./start_ocean.sh --no-dashboard
|
||||||
```
|
```
|
||||||
|
|
@ -1,41 +1,13 @@
|
|||||||
# ocean-lib
|
# Quickstart: Simple Flow
|
||||||
|
|
||||||
`ocean-lib-js` is a Javascript/Typescript library to privately & securely publish, exchange, and consume data. With it, you can:
|
|
||||||
|
|
||||||
- **Publish** data services: static data, streaming data, or compute-to-data. Every data service gets its own [ERC20](https://github.com/ethereum/EIPs/blob/7f4f0377730f5fc266824084188cc17cf246932e/EIPS/eip-20.md) token.
|
|
||||||
- **Mint** data tokens for a given data service
|
|
||||||
- **Transfer** data tokens to another owner
|
|
||||||
- **Consume** data tokens, to access the service
|
|
||||||
|
|
||||||
`ocean-lib-js` is part of the [Ocean Protocol](www.oceanprotocol.com) toolset.
|
|
||||||
|
|
||||||
# Installation
|
|
||||||
|
|
||||||
```
|
|
||||||
npm i --save @oceanprotocol/lib
|
|
||||||
```
|
|
||||||
|
|
||||||
# Usage
|
|
||||||
|
|
||||||
```
|
|
||||||
// ES6
|
|
||||||
import { Ocean, Logger } from '@oceanprotocol/lib'
|
|
||||||
|
|
||||||
// ES2015
|
|
||||||
const { Ocean, Logger } = require('@oceanprotocol/lib')
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
# Quickstart
|
|
||||||
|
|
||||||
This section describes a flow with the simplest transfer of value, for static data.
|
This section describes a flow with the simplest transfer of value, for static data.
|
||||||
|
|
||||||
Here's the steps.
|
Here's the steps.
|
||||||
|
|
||||||
1. Alice publishes a dataset (= publishes a datatoken contract)
|
1. Alice publishes a dataset (= publishes a datatoken contract)
|
||||||
1. Alice mints 100 tokens
|
2. Alice mints 100 tokens
|
||||||
1. Alice transfers 1 token to Bob
|
3. Alice transfers 1 token to Bob
|
||||||
1. Bob consumes dataset
|
4. Bob consumes dataset
|
||||||
|
|
||||||
Let's go through each of these in detail.
|
Let's go through each of these in detail.
|
||||||
|
|
||||||
@ -73,7 +45,7 @@ const tokenAddress = await datatoken.create(blob, alice)
|
|||||||
|
|
||||||
Clone [provider-py](https://github.com/oceanprotocol/provider-py) and update your local environment variables:
|
Clone [provider-py](https://github.com/oceanprotocol/provider-py) and update your local environment variables:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
export FLASK_APP=ocean_provider/run.py
|
export FLASK_APP=ocean_provider/run.py
|
||||||
export PROVIDER_ADDRESS=your_provider_address
|
export PROVIDER_ADDRESS=your_provider_address
|
||||||
export PROVIDER_KEY=your_provider_key
|
export PROVIDER_KEY=your_provider_key
|
Loading…
x
Reference in New Issue
Block a user