mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
Merge branch 'master' into feature/get-consume-flow
This commit is contained in:
commit
429cdb1304
@ -3,20 +3,18 @@ title: Tools & Examples
|
|||||||
description: Tools and examples for developing with Ocean Protocol.
|
description: Tools and examples for developing with Ocean Protocol.
|
||||||
---
|
---
|
||||||
|
|
||||||
The Setup & Tutorials sections have some examples to get you started.
|
|
||||||
|
|
||||||
- [Setup: Quick Start](/setup/quickstart/)
|
|
||||||
- [Tutorials: Introduction](/tutorials/introduction/)
|
|
||||||
|
|
||||||
## Tools
|
## Tools
|
||||||
|
|
||||||
Coming soon!
|
Coming soon!
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
The [Tutorials](/tutorials/introduction/) include many examples.
|
||||||
|
|
||||||
Examples of using the [🦑 squid-py](https://github.com/oceanprotocol/squid-js) Python library:
|
Examples of using the [🦑 squid-py](https://github.com/oceanprotocol/squid-js) Python library:
|
||||||
|
|
||||||
<repo name="mantaray"></repo>
|
<repo name="mantaray"></repo>
|
||||||
|
<repo name="tuna"></repo>
|
||||||
|
|
||||||
Examples of using the [🦑 squid-js](https://github.com/oceanprotocol/squid-js) JavaScript library:
|
Examples of using the [🦑 squid-js](https://github.com/oceanprotocol/squid-js) JavaScript library:
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@ description: Do a quick test drive.
|
|||||||
You can run and try every [Ocean software component](/concepts/components/) in your local machine, all at once, using Docker Compose:
|
You can run and try every [Ocean software component](/concepts/components/) in your local machine, all at once, using Docker Compose:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/oceanprotocol/docker-images.git
|
git clone https://github.com/oceanprotocol/barge.git
|
||||||
cd docker-images/
|
cd barge/
|
||||||
|
|
||||||
./start_ocean.sh --latest
|
./start_ocean.sh --latest
|
||||||
```
|
```
|
||||||
@ -22,6 +22,6 @@ Once everything is up and running, you can interact with the components. For exa
|
|||||||
|
|
||||||
Note that everything is running on your local machine, including a local Ethereum node, and it's not connected to any external Ethereum network.
|
Note that everything is running on your local machine, including a local Ethereum node, and it's not connected to any external Ethereum network.
|
||||||
|
|
||||||
For the details of what components are running, see the [Ocean Protocol docker-images repository](https://github.com/oceanprotocol/docker-images).
|
For the details of what components are running, see the [Ocean Protocol barge repository](https://github.com/oceanprotocol/barge).
|
||||||
|
|
||||||
<repo name="docker-images"></repo>
|
<repo name="barge"></repo>
|
||||||
|
@ -130,8 +130,8 @@ Inline `code` has `back-ticks around` it.
|
|||||||
Blocks of code are either fenced by lines with three back-ticks, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting.
|
Blocks of code are either fenced by lines with three back-ticks, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/oceanprotocol/docker-images.git
|
git clone https://github.com/oceanprotocol/barge.git
|
||||||
cd docker-images/
|
cd barge/
|
||||||
|
|
||||||
./start_ocean.sh --latest
|
./start_ocean.sh --latest
|
||||||
```
|
```
|
||||||
|
@ -9,7 +9,7 @@ At the time of writing, there were some public testnets you could use to test an
|
|||||||
|
|
||||||
## Get a Compatible Wallet
|
## Get a Compatible Wallet
|
||||||
|
|
||||||
You will need a wallet that can hold Ether (for any Ethereum network) and Ocean Tokens (for any Ethereum network). For now, we recommend using [MetaMask](https://metamask.io/).
|
You will need a [wallet that can hold Ether (for any Ethereum network) and Ocean Tokens (for any Ethereum network)](/tutorials/wallets/). For the purpose of this tutorial, you can use [MetaMask](https://metamask.io/).
|
||||||
|
|
||||||
- Follow the MetaMask instructions to install it on your machine.
|
- Follow the MetaMask instructions to install it on your machine.
|
||||||
- In MetaMask, switch from the **Main Ethereum Network** to the **Kovan Test Network** or the test network you're using.
|
- In MetaMask, switch from the **Main Ethereum Network** to the **Kovan Test Network** or the test network you're using.
|
||||||
@ -34,7 +34,7 @@ If you're running a local Ganache-based testnet, then it creates several account
|
|||||||
|
|
||||||
### Get Ether for a Local Parity-Ethereum-Based Testnet
|
### Get Ether for a Local Parity-Ethereum-Based Testnet
|
||||||
|
|
||||||
If you're running a local Parity-Ethereum-based testnet based on [docker-images](https://github.com/oceanprotocol/docker-images), then you can send some Ether to `<YOUR ADDRESS>` using the command:
|
If you're running a local Parity-Ethereum-based testnet based on [barge](https://github.com/oceanprotocol/barge), then you can send some Ether to `<YOUR ADDRESS>` using the command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl --data '{"jsonrpc":"2.0","method":"personal_sendTransaction","params":[{"from":"0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e","to":"<YOUR ADDRESS>","value":"0x7FFFFFFFFFFFFFFFFFF"}, "node0"],"id":0}' -H "Content-Type: application/json" -X POST localhost:8545
|
curl --data '{"jsonrpc":"2.0","method":"personal_sendTransaction","params":[{"from":"0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e","to":"<YOUR ADDRESS>","value":"0x7FFFFFFFFFFFFFFFFFF"}, "node0"],"id":0}' -H "Content-Type: application/json" -X POST localhost:8545
|
||||||
@ -46,6 +46,6 @@ That command uses [Ethereum's JSON RPC API](https://wiki.parity.io/JSONRPC.html)
|
|||||||
|
|
||||||
One way to get some Ocean Tokens, for the network you're connected to, is by running Pleuston (a demo Ocean marketplace web app) and then clicking in the top right corner of the Pleuston user interface. If you see "Make it rain" then click that.
|
One way to get some Ocean Tokens, for the network you're connected to, is by running Pleuston (a demo Ocean marketplace web app) and then clicking in the top right corner of the Pleuston user interface. If you see "Make it rain" then click that.
|
||||||
|
|
||||||
Running Pleuston, along with all the software it needs to work, is beyond the scope of this tutorial. If you want to do _that_, then the current best option is to use the scripts and Docker Compose files in the [🐳 docker-images repository](https://github.com/oceanprotocol/docker-images).
|
Running Pleuston, along with all the software it needs to work, is beyond the scope of this tutorial. If you want to do _that_, then the current best option is to use the scripts and Docker Compose files in the [🐳 barge repository](https://github.com/oceanprotocol/barge).
|
||||||
|
|
||||||
<repo name="docker-images"></repo>
|
<repo name="barge"></repo>
|
||||||
|
@ -3,14 +3,9 @@ title: Overview of the Tutorials
|
|||||||
description: What you can expect to find in these Ocean Protocol tutorials.
|
description: What you can expect to find in these Ocean Protocol tutorials.
|
||||||
---
|
---
|
||||||
|
|
||||||
These tutorials give examples of how to use squid-js (JavaScript) and squid-py (Python) to:
|
The idea of these tutorials is to show you how to use squid-js (JavaScript) and squid-py (Python) to:
|
||||||
|
|
||||||
- publish a data set
|
- publish a data set
|
||||||
- publish a compute service
|
|
||||||
- get and use a data set
|
- get and use a data set
|
||||||
|
- publish a compute service
|
||||||
- get and use a compute service
|
- get and use a compute service
|
||||||
|
|
||||||
The Python tutorials use [Jupyter notebooks](http://jupyter.org/).
|
|
||||||
For now, check out [the Mantaray repository](https://github.com/oceanprotocol/mantaray). In the future, we hope to have live online Jupyter notebooks.
|
|
||||||
|
|
||||||
<repo name="mantaray"></repo>
|
|
||||||
|
19
content/tutorials/jupyter-notebooks.md
Normal file
19
content/tutorials/jupyter-notebooks.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
title: Jupyter Notebooks
|
||||||
|
description: Try some online interactive squid-py tutorials.
|
||||||
|
---
|
||||||
|
|
||||||
|
You can go through interactive squid-py tutorials at [datascience.oceanprotocol.com](https://datascience.oceanprotocol.com/).
|
||||||
|
They're [Jupyter Notebooks](http://jupyter.org/) running on your own [JupyterLab](https://github.com/jupyterlab/jupyterlab) instance.
|
||||||
|
It's quite easy to figure out, but if you get stuck, here are some initial steps:
|
||||||
|
|
||||||
|
- Visit [datascience.oceanprotocol.com](https://datascience.oceanprotocol.com/).
|
||||||
|
- Click the **JupyterLab Instance** button.
|
||||||
|
- Login with your GitHub account.
|
||||||
|
- Once you're in the JupyterLab console, double-click on **mantaray_jupyter**.
|
||||||
|
- Double-click on **introdution.txt** and read it.
|
||||||
|
- Double-click on one of the **.ipynb** files. They're labelled to appear in a logical order.
|
||||||
|
- When asked to select a kernel, select Python 3.
|
||||||
|
- To make stuff happen (e.g. to run code cells), use the menus at the top of the JupyterLab console, or at the top of your current Jupyter notebook.
|
||||||
|
|
||||||
|
For more info, see the blog post titled, "[Project Manta Ray — Data Science powered by Ocean Protocol](https://blog.oceanprotocol.com/project-manta-ray-data-science-powered-by-ocean-protocol-535c54089b0f)."
|
@ -9,7 +9,7 @@ description: This tutorial shows how you can build a basic [React](https://react
|
|||||||
- `npm` >= 5.2 is installed. You can check using `npm -v`
|
- `npm` >= 5.2 is installed. You can check using `npm -v`
|
||||||
- Do the tutorial to [Set Up Azure Storage](/tutorials/azure-for-brizo/).
|
- Do the tutorial to [Set Up Azure Storage](/tutorials/azure-for-brizo/).
|
||||||
- Use a browser with [MetaMask](https://metamask.io/) and some Ether in your account. See the tutorial about [getting Ether and Ocean Tokens for testnets](/tutorials/get-ether-and-ocean-tokens/).
|
- Use a browser with [MetaMask](https://metamask.io/) and some Ether in your account. See the tutorial about [getting Ether and Ocean Tokens for testnets](/tutorials/get-ether-and-ocean-tokens/).
|
||||||
- Git clone the [oceanprotocol/docker-images](https://github.com/oceanprotocol/docker-images) repository, then in that directory:
|
- Git clone the [oceanprotocol/barge](https://github.com/oceanprotocol/barge) repository, then in that directory:
|
||||||
- Edit the `brizo.env` file and set all `AZURE_`... values.
|
- Edit the `brizo.env` file and set all `AZURE_`... values.
|
||||||
- Run `./start_ocean.sh --no-pleuston --local-kovan-node`. This runs several Ocean services locally, including a local Parity Ethereum node connected to the Kovan Testnet.
|
- Run `./start_ocean.sh --no-pleuston --local-kovan-node`. This runs several Ocean services locally, including a local Parity Ethereum node connected to the Kovan Testnet.
|
||||||
|
|
||||||
|
31
content/tutorials/wallets.md
Normal file
31
content/tutorials/wallets.md
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
title: Wallets for Ocean Tokens
|
||||||
|
description: If you want to use the Ocean Network, you need Ocean Tokens (typical ERC-20 tokens), and to get Ocean Tokens, you need to get a wallet that can hold Ocean Tokens.
|
||||||
|
---
|
||||||
|
|
||||||
|
## Some Terminology
|
||||||
|
|
||||||
|
There's a lot of terminology around wallets, so we'll start by going over some of it.
|
||||||
|
|
||||||
|
A wallet might contain only one **account** (Ethereum account) or it might contain many accounts.
|
||||||
|
|
||||||
|
Each account has a **balance** (e.g. 1.832 Ocean Tokens), an **address** (e.g. 0xa0A9d7e78bF29351997cA5589A0Af689eEC99211), a **public key** and a **private key**.
|
||||||
|
|
||||||
|
An account is identified by its address, so if you want someone to send some Ocean Tokens to a specific account, you give them the account's address.
|
||||||
|
|
||||||
|
The private key is used to spend the Ocean Tokens in the account. You must keep it secret, because anyone with that private key can spend those tokens. If you lose the secret key, and nobody else has it, then _nobody_ can spend those tokens, so don't lose it!
|
||||||
|
|
||||||
|
> Note: The same account might have an Ocean Token balance, an [Ether](https://www.ethereum.org/ether) balance, and other balances.
|
||||||
|
|
||||||
|
## Wallet Options
|
||||||
|
|
||||||
|
Ocean Tokens are [ERC-20 tokens](https://en.wikipedia.org/wiki/ERC-20), so any wallet that supports arbitrary ERC-20 tokens should work to hold Ocean Tokens.
|
||||||
|
|
||||||
|
There are many kinds of wallets (e.g. paper wallets, hardware wallets, software wallets, custodial wallets), each with its own advantages and disadvantages. There is a tradeoff between security and convenience. We encourage you to search around and read about wallets to understand the options.
|
||||||
|
|
||||||
|
**We don't recommend or endorse any particular wallets at this time.** Some wallets which _might_ work with Ocean Tokens are:
|
||||||
|
|
||||||
|
- Gnosis Safe
|
||||||
|
- MetaMask
|
||||||
|
- Trust Wallet
|
||||||
|
- Tokenary
|
@ -2,12 +2,14 @@
|
|||||||
items:
|
items:
|
||||||
- title: Introduction
|
- title: Introduction
|
||||||
link: /tutorials/introduction/
|
link: /tutorials/introduction/
|
||||||
|
- title: Wallets for Ocean Tokens
|
||||||
|
link: /tutorials/wallets/
|
||||||
- title: Get Ether and Ocean Tokens for Testnets
|
- title: Get Ether and Ocean Tokens for Testnets
|
||||||
link: /tutorials/get-ether-and-ocean-tokens/
|
link: /tutorials/get-ether-and-ocean-tokens/
|
||||||
- title: Set Up Azure Storage
|
- title: Set Up Azure Storage
|
||||||
link: /tutorials/azure-for-brizo/
|
link: /tutorials/azure-for-brizo/
|
||||||
|
|
||||||
- group: React App Tutorial
|
- group: React App Tutorial (squid-js)
|
||||||
items:
|
items:
|
||||||
- title: Setup
|
- title: Setup
|
||||||
link: /tutorials/react-setup/
|
link: /tutorials/react-setup/
|
||||||
@ -15,3 +17,8 @@
|
|||||||
link: /tutorials/react-publish-data-set/
|
link: /tutorials/react-publish-data-set/
|
||||||
- title: Get & Use a Data Set
|
- title: Get & Use a Data Set
|
||||||
link: /tutorials/react-get-use-data-set/
|
link: /tutorials/react-get-use-data-set/
|
||||||
|
|
||||||
|
- group: squid-py Tutorials
|
||||||
|
items:
|
||||||
|
- title: Jupyter Notebooks
|
||||||
|
link: /tutorials/jupyter-notebooks/
|
||||||
|
@ -19,9 +19,9 @@ const QuickRun = ({ name }) => (
|
|||||||
<pre className="language-bash">
|
<pre className="language-bash">
|
||||||
<code className="language-bash">
|
<code className="language-bash">
|
||||||
<span className="token function">git</span> clone
|
<span className="token function">git</span> clone
|
||||||
https://github.com/oceanprotocol/docker-images.git
|
https://github.com/oceanprotocol/barge.git
|
||||||
<br />
|
<br />
|
||||||
<span className="token function">cd</span> docker-images/
|
<span className="token function">cd</span> barge/
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
./start_ocean.sh --latest
|
./start_ocean.sh --latest
|
||||||
|
@ -32,7 +32,7 @@ const Repositories = () => (
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.repositories}>
|
<div className={styles.repositories}>
|
||||||
<QuickRun name="docker-images" />
|
<QuickRun name="barge" />
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<h1 className={styles.repositoriesTitle}>
|
<h1 className={styles.repositoriesTitle}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user