1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

Merge branch 'main' into issue1260-implement-predictoor-docs

This commit is contained in:
Idiom 2023-10-03 17:36:55 -07:00 committed by GitHub
commit 7a756b3bd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 386 additions and 128 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 887 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

View File

@ -1,136 +1,141 @@
# Table of contents
* [👋 Welcome](README.md)
* [🌊 Discover](discover/README.md)
* [Explore](discover/explore.md)
* [Ocean 101](discover/ocean-101.md)
* [Basic Concepts](discover/basic-concepts.md)
* [Wallets](discover/wallets/README.md)
* [Set Up MetaMask Wallet](discover/wallets/metamask-setup.md)
* [Networks](discover/networks/README.md)
* [Bridges](discover/networks/bridges.md)
* [Manage Your OCEAN Tokens](discover/wallets-and-ocean-tokens.md)
* [Glossary](discover/glossary.md)
* [FAQ](discover/faq.md)
* [📚 User Guides](user-guides/README.md)
* [Guide to the Ocean Market](user-guides/using-ocean-market.md)
* [Publish Data NFTs](user-guides/publish-data-nfts.md)
* [Buy NFT Data](user-guides/buy-data-nfts.md)
* [Sell NFT Computations (Compute-to-Data)](user-guides/compute-to-data/README.md)
* [Make a Boss C2D Algorithm](user-guides/compute-to-data/make-a-boss-c2d-algorithm.md)
* [Publish a C2D Algorithm NFT](user-guides/compute-to-data/publish-a-c2d-algorithm-nft.md)
* [Publish a C2D Data NFT](user-guides/compute-to-data/publish-a-c2d-data-nft.md)
* [Host Assets](user-guides/asset-hosting/README.md)
* [Arweave](user-guides/asset-hosting/arweave.md)
* [AWS](user-guides/asset-hosting/aws.md)
* [Azure Cloud](user-guides/asset-hosting/azure-cloud.md)
* [Google Storage](user-guides/asset-hosting/google-storage.md)
* [Github](user-guides/asset-hosting/github.md)
* [Join a Data Challenge](user-guides/join-a-data-challenge.md)
* [Sponsor a Data Challenge](user-guides/sponsor-a-data-challenge.md)
* [Data Farming](user-guides/data-farming/README.md)
* [Earn Passive Rewards](user-guides/data-farming/how-to-veocean.md)
* [Estimate APYs](user-guides/data-farming/how-to-estimate-apy.md)
* [Claim Rewards](user-guides/data-farming/how-to-claim-rewards.md)
* [Curate with Volume DF](user-guides/data-farming/how-to-volumedf.md)
* [Delegate Curation](user-guides/data-farming/how-to-delegate.md)
* [Predict with Challenge DF](user-guides/data-farming/how-to-challengedf.md)
* [Liquidity Pools \[deprecated\]](user-guides/remove-liquidity-pools.md)
* [💻 Developers](developers/README.md)
* [Architecture Overview](developers/architecture.md)
* [Contracts](developers/contracts/README.md)
* [Data NFTs](developers/contracts/data-nfts.md)
* [Datatokens](developers/contracts/datatokens.md)
* [Data NFTs and Datatokens](developers/contracts/datanft-and-datatoken.md)
* [Datatoken Templates](developers/contracts/datatoken-templates.md)
* [Roles](developers/contracts/roles.md)
* [Pricing Schemas](developers/contracts/pricing-schemas.md)
* [Fees](developers/contracts/fees.md)
* [Revenue](developers/contracts/revenue.md)
* [Fractional Ownership](developers/fractional-ownership.md)
* [Community Monetization](developers/community-monetization.md)
* [Metadata](developers/metadata.md)
* [Identifiers (DIDs)](developers/identifiers.md)
* [DDO Specification](developers/ddo-specification.md)
* [Storage Specifications](developers/storage.md)
* [Fine-Grained Permissions](developers/fg-permissions.md)
* [Retrieve datatoken/data NFT addresses & Chain ID](developers/retrieve-datatoken-address.md)
* [Get API Keys for Blockchain Access](developers/get-api-keys-for-blockchain-access.md)
* [Barge](developers/barge/README.md)
* [Local Setup](developers/barge/local-setup-ganache.md)
* [Build a Marketplace](developers/build-a-marketplace/README.md)
* [Forking Ocean Market](developers/build-a-marketplace/forking-ocean-market.md)
* [Customising a Market](developers/build-a-marketplace/customising-your-market.md)
* [Build and host your Data Marketplace](developers/build-a-marketplace/deploying-market.md)
* [Subgraph](developers/subgraph/README.md)
* [Get data NFTs](developers/subgraph/list-data-nfts.md)
* [Get data NFT information](developers/subgraph/get-data-nft-information.md)
* [Get datatokens](developers/subgraph/list-datatokens.md)
* [Get datatoken information](developers/subgraph/get-datatoken-information.md)
* [Get datatoken buyers](developers/subgraph/get-datatoken-buyers.md)
* [Get fixed-rate exchanges](developers/subgraph/list-fixed-rate-exchanges.md)
* [Get veOCEAN stats](developers/subgraph/get-veocean-stats.md)
* [Ocean.py](developers/ocean.py/README.md)
* [Install](developers/ocean.py/install.md)
* [Local Setup](developers/ocean.py/local-setup.md)
* [Remote Setup](developers/ocean.py/remote-setup.md)
* [Publish Flow](developers/ocean.py/publish-flow.md)
* [Consume Flow](developers/ocean.py/consume-flow.md)
* [Compute Flow](developers/ocean.py/compute-flow.md)
* [Ocean Instance Tech Details](developers/ocean.py/technical-details.md)
* [Ocean Assets Tech Details](developers/ocean.py/ocean-assets-tech-details.md)
* [Ocean Compute Tech Details](developers/ocean.py/ocean-compute-tech-details.md)
* [Datatoken Interface Tech Details](developers/ocean.py/datatoken-interface-tech-details.md)
* [Ocean.js](developers/ocean.js/README.md)
* [Configuration](developers/ocean.js/configuration.md)
* [Creating a data NFT](developers/ocean.js/creating-datanft.md)
* [Publish](developers/ocean.js/publish.md)
* [Mint Datatokens](developers/ocean.js/mint-datatoken.md)
* [Update Metadata](developers/ocean.js/update-metadata.md)
* [Asset Visibility](developers/ocean.js/asset-visibility.md)
* [Consume Asset](developers/ocean.js/consume-asset.md)
* [Run C2D Jobs](developers/ocean.js/cod-asset.md)
* [Compute to data](developers/compute-to-data/README.md)
* [Architecture](developers/compute-to-data/compute-to-data-architecture.md)
* [Datasets & Algorithms](developers/compute-to-data/compute-to-data-datasets-algorithms.md)
* [Writing Algorithms](developers/compute-to-data/compute-to-data-algorithms.md)
* [Compute Options](developers/compute-to-data/compute-options.md)
* [Aquarius](developers/aquarius/README.md)
* [Asset Requests](developers/aquarius/asset-requests.md)
* [Chain Requests](developers/aquarius/chain-requests.md)
* [Other Requests](developers/aquarius/other-requests.md)
* [Provider](developers/provider/README.md)
* [General Endpoints](developers/provider/general-endpoints.md)
* [Encryption / Decryption](developers/provider/encryption-decryption.md)
* [Compute Endpoints](developers/provider/compute-endpoints.md)
* [Authentication Endpoints](developers/provider/authentication-endpoints.md)
* [📊 Data Science](data-science/README.md)
* [Data Value Creation Loop](data-science/the-data-value-creation-loop.md)
* [What data is valuable?](data-science/data-engineers.md)
* [🔨 Infrastructure](infrastructure/README.md)
* [Setup a Server](infrastructure/setup-server.md)
* [Deploying Marketplace](infrastructure/deploying-marketplace.md)
* [Deploying Aquarius](infrastructure/deploying-aquarius.md)
* [Deploying Provider](infrastructure/deploying-provider.md)
* [Deploying Ocean Subgraph](infrastructure/deploying-ocean-subgraph.md)
* [Deploying C2D](infrastructure/compute-to-data-minikube.md)
* [C2D - Private Docker Registry](infrastructure/compute-to-data-docker-registry.md)
- [👋 Welcome](README.md)
- [🌊 Discover](discover/README.md)
- [Explore](discover/explore.md)
- [Ocean 101](discover/ocean-101.md)
- [Basic Concepts](discover/basic-concepts.md)
- [Wallets](discover/wallets/README.md)
- [Set Up MetaMask Wallet](discover/wallets/metamask-setup.md)
- [Networks](discover/networks/README.md)
- [Bridges](discover/networks/bridges.md)
- [Manage Your OCEAN Tokens](discover/wallets-and-ocean-tokens.md)
- [Glossary](discover/glossary.md)
- [FAQ](discover/faq.md)
- [📚 User Guides](user-guides/README.md)
- [Guide to the Ocean Market](user-guides/using-ocean-market.md)
- [Publish Data NFTs](user-guides/publish-data-nfts.md)
- [Buy NFT Data](user-guides/buy-data-nfts.md)
- [Sell NFT Computations (Compute-to-Data)](user-guides/compute-to-data/README.md)
- [Make a Boss C2D Algorithm](user-guides/compute-to-data/make-a-boss-c2d-algorithm.md)
- [Publish a C2D Algorithm NFT](user-guides/compute-to-data/publish-a-c2d-algorithm-nft.md)
- [Publish a C2D Data NFT](user-guides/compute-to-data/publish-a-c2d-data-nft.md)
- [Host Assets](user-guides/asset-hosting/README.md)
- [Arweave](user-guides/asset-hosting/arweave.md)
- [AWS](user-guides/asset-hosting/aws.md)
- [Azure Cloud](user-guides/asset-hosting/azure-cloud.md)
- [Google Storage](user-guides/asset-hosting/google-storage.md)
- [Github](user-guides/asset-hosting/github.md)
- [Join a Data Challenge](user-guides/join-a-data-challenge.md)
- [Sponsor a Data Challenge](user-guides/sponsor-a-data-challenge.md)
- [Data Farming](user-guides/data-farming/README.md)
- [Earn Passive Rewards](user-guides/data-farming/how-to-veocean.md)
- [Estimate APYs](user-guides/data-farming/how-to-estimate-apy.md)
- [Claim Rewards](user-guides/data-farming/how-to-claim-rewards.md)
- [Curate with Volume DF](user-guides/data-farming/how-to-volumedf.md)
- [Delegate Curation](user-guides/data-farming/how-to-delegate.md)
- [Predict with Challenge DF](user-guides/data-farming/how-to-challengedf.md)
- [Liquidity Pools \[deprecated\]](user-guides/remove-liquidity-pools.md)
- [💻 Developers](developers/README.md)
- [Architecture Overview](developers/architecture.md)
- [Contracts](developers/contracts/README.md)
- [Data NFTs](developers/contracts/data-nfts.md)
- [Datatokens](developers/contracts/datatokens.md)
- [Data NFTs and Datatokens](developers/contracts/datanft-and-datatoken.md)
- [Datatoken Templates](developers/contracts/datatoken-templates.md)
- [Roles](developers/contracts/roles.md)
- [Pricing Schemas](developers/contracts/pricing-schemas.md)
- [Fees](developers/contracts/fees.md)
- [Revenue](developers/contracts/revenue.md)
- [Fractional Ownership](developers/fractional-ownership.md)
- [Community Monetization](developers/community-monetization.md)
- [Metadata](developers/metadata.md)
- [Identifiers (DIDs)](developers/identifiers.md)
- [DDO Specification](developers/ddo-specification.md)
- [Storage Specifications](developers/storage.md)
- [Fine-Grained Permissions](developers/fg-permissions.md)
- [Retrieve datatoken/data NFT addresses & Chain ID](developers/retrieve-datatoken-address.md)
- [Get API Keys for Blockchain Access](developers/get-api-keys-for-blockchain-access.md)
- [Barge](developers/barge/README.md)
- [Local Setup](developers/barge/local-setup-ganache.md)
- [Build a Marketplace](developers/build-a-marketplace/README.md)
- [Forking Ocean Market](developers/build-a-marketplace/forking-ocean-market.md)
- [Customising a Market](developers/build-a-marketplace/customising-your-market.md)
- [Build and host your Data Marketplace](developers/build-a-marketplace/deploying-market.md)
- [Subgraph](developers/subgraph/README.md)
- [Get data NFTs](developers/subgraph/list-data-nfts.md)
- [Get data NFT information](developers/subgraph/get-data-nft-information.md)
- [Get datatokens](developers/subgraph/list-datatokens.md)
- [Get datatoken information](developers/subgraph/get-datatoken-information.md)
- [Get datatoken buyers](developers/subgraph/get-datatoken-buyers.md)
- [Get fixed-rate exchanges](developers/subgraph/list-fixed-rate-exchanges.md)
- [Get veOCEAN stats](developers/subgraph/get-veocean-stats.md)
- [Ocean.py](developers/ocean.py/README.md)
- [Install](developers/ocean.py/install.md)
- [Local Setup](developers/ocean.py/local-setup.md)
- [Remote Setup](developers/ocean.py/remote-setup.md)
- [Publish Flow](developers/ocean.py/publish-flow.md)
- [Consume Flow](developers/ocean.py/consume-flow.md)
- [Compute Flow](developers/ocean.py/compute-flow.md)
- [Ocean Instance Tech Details](developers/ocean.py/technical-details.md)
- [Ocean Assets Tech Details](developers/ocean.py/ocean-assets-tech-details.md)
- [Ocean Compute Tech Details](developers/ocean.py/ocean-compute-tech-details.md)
- [Datatoken Interface Tech Details](developers/ocean.py/datatoken-interface-tech-details.md)
- [Ocean.js](developers/ocean.js/README.md)
- [Configuration](developers/ocean.js/configuration.md)
- [Creating a data NFT](developers/ocean.js/creating-datanft.md)
- [Publish](developers/ocean.js/publish.md)
- [Mint Datatokens](developers/ocean.js/mint-datatoken.md)
- [Update Metadata](developers/ocean.js/update-metadata.md)
- [Asset Visibility](developers/ocean.js/asset-visibility.md)
- [Consume Asset](developers/ocean.js/consume-asset.md)
- [Run C2D Jobs](developers/ocean.js/cod-asset.md)
- [Ocean CLI](developers/ocean-cli/README.md)
- [Install](developers/ocean-cli/install.md)
- [Publish](developers/ocean-cli/publish.md)
- [Edit](developers/ocean-cli/edit.md)
- [Consume](developers/ocean-cli/consume.md)
- [Run C2D Jobs](developers/ocean-cli/run-c2d.md)
- [Compute to data](developers/compute-to-data/README.md)
- [Architecture](developers/compute-to-data/compute-to-data-architecture.md)
- [Datasets & Algorithms](developers/compute-to-data/compute-to-data-datasets-algorithms.md)
- [Writing Algorithms](developers/compute-to-data/compute-to-data-algorithms.md)
- [Compute Options](developers/compute-to-data/compute-options.md)
- [Aquarius](developers/aquarius/README.md)
- [Asset Requests](developers/aquarius/asset-requests.md)
- [Chain Requests](developers/aquarius/chain-requests.md)
- [Other Requests](developers/aquarius/other-requests.md)
- [Provider](developers/provider/README.md)
- [General Endpoints](developers/provider/general-endpoints.md)
- [Encryption / Decryption](developers/provider/encryption-decryption.md)
- [Compute Endpoints](developers/provider/compute-endpoints.md)
- [Authentication Endpoints](developers/provider/authentication-endpoints.md)
- [📊 Data Science](data-science/README.md)
- [Data Value Creation Loop](data-science/the-data-value-creation-loop.md)
- [What data is valuable?](data-science/data-engineers.md)
- [🔨 Infrastructure](infrastructure/README.md)
- [Setup a Server](infrastructure/setup-server.md)
- [Deploying Marketplace](infrastructure/deploying-marketplace.md)
- [Deploying Aquarius](infrastructure/deploying-aquarius.md)
- [Deploying Provider](infrastructure/deploying-provider.md)
- [Deploying Ocean Subgraph](infrastructure/deploying-ocean-subgraph.md)
- [Deploying C2D](infrastructure/compute-to-data-minikube.md)
- [C2D - Private Docker Registry](infrastructure/compute-to-data-docker-registry.md)
- [🤑 DeFi](defi/README.md)
* [👀 Predictoor](predictoor/README.md)
* [Learn about Predictoor](predictoor/pdr-intro.md)
* [Architecture](predictoor/pdr-architecture.md)
* [Parameters](predictoor/pdr-parameters.md)
* [How to Earn](predictoor/pdr-earn.md)
* [Predictoor FAQ](predictoor/pdr-faq.md)
* [🤑 DeFi](defi/README.md)
* [💰 veOCEAN & Data Farming](rewards/README.md)
* [Farming 101](rewards/df-intro.md)
* [veOCEAN](rewards/df-veocean.md)
* [Curate with Volume DF](rewards/df-volumedf.md)
* [Predict with Challenge DF](rewards/df-challengedf.md)
* [Complete User Guides](rewards/df-guides.md)
* [Emissions & APYs](rewards/df-emissions-apys.md)
* [veOCEAN & Data Farming FAQ](rewards/df-faq.md)
* [🤝 Contribute](contribute/README.md)
* [Partners & Collaborators](contribute/projects-using-ocean.md)
* [Contributor Code of Conduct](contribute/code-of-conduct.md)
* [Legal Requirements](contribute/legal-reqs.md)
- [💰 Data Farming Rewards](rewards/README.md)
- [Farming 101](rewards/df-intro.md)
- [veOCEAN](rewards/df-veocean.md)
- [Curate with Volume DF](rewards/df-volumedf.md)
- [Predict with Challenge DF](rewards/df-challengedf.md)
- [Complete User Guides](rewards/df-guides.md)
- [Emissions & APYs](rewards/df-emissions-apys.md)
- [🤝 Contribute](contribute/README.md)
- [Partners & Collaborators](contribute/projects-using-ocean.md)
- [Contributor Code of Conduct](contribute/code-of-conduct.md)
- [Legal Requirements](contribute/legal-reqs.md)

View File

@ -0,0 +1,22 @@
---
description: >-
CLI tool to interact with the oceanprotocol's JavaScript library to privately & securely publish, consume and run compute on data.
---
# Ocean CLI 🌊
Welcome to the Ocean CLI, your powerful command-line tool for seamless interaction with Ocean Protocol's data-sharing capabilities. 🚀
The Ocean CLI offers a wide range of functionalities, enabling you to:
- [**Publish**](./publish.md) 📤 data services: downloadable files or compute-to-data.
- [**Edit**](./edit.md) ✏️ existing assets.
- [**Consume**](./consume.md) 📥 data services, ordering datatokens and downloading data.
- [**Compute to Data**](./run-c2d.md) 💻 on public available datasets using a published algorithm.
## Key Information
The Ocean CLI is powered by the [ocean.js](../ocean.js/README.md) JavaScript library, an integral part of the [Ocean Protocol](https://oceanprotocol.com) toolset. 🌐
Let's dive into the CLI's capabilities and unlock the full potential of Ocean Protocol together! If you're ready to explore each functionality in detail, simply go through the next pages.

View File

@ -0,0 +1,13 @@
# Consume a Dataset 📥
The process of consuming an asset is straightforward. To achieve this, you only need to execute a single command:
```bash
npm run cli download 'assetDID' 'download-location-path'
```
In this command, replace `assetDID`` with the specific DID of the asset you want to consume, and `download-location-path`` with the desired path where you wish to store the downloaded asset content
Once executed, this command orchestrates both the **ordering** of a [datatoken](../contracts/datatokens.md) and the subsequent download operation. The asset's content will be automatically retrieved and saved at the specified location, simplifying the consumption process for users.
<figure><img src="../../.gitbook/assets/cli/download.png" alt=""><figcaption>Consume</figcaption></figure>

View File

@ -0,0 +1,22 @@
# Edit a Dataset ✏️
To make changes to a dataset, you'll need to start by retrieving the asset's [Decentralized Data Object](../ddo-specification.md) (DDO).
## Retrieve DDO
Obtaining the DDO of an asset is a straightforward process. You can accomplish this task by executing the following command:
```bash
npm run cli getDDO 'assetDID'
```
<figure><img src="../../.gitbook/assets/cli/getAsset.png" alt=""><figcaption>Retrieve DDO</figcaption></figure>
## Edit the Dataset
After retrieving the asset's DDO and saving it as a JSON file, you can proceed to edit the metadata as needed. Once you've made the necessary changes, you can utilize the following command to apply the updated metadata:
```bash
npm run cli editAsset 'DATASET_DID' 'PATH_TO_UPDATED_FILE`
```

View File

@ -0,0 +1,71 @@
# Installation and Configuration 🛠️
To get started with the Ocean CLI, follow these steps for a seamless setup:
## Clone the Repository
Begin by cloning the repository. You can achieve this by executing the following command in your terminal:
```bash
$ git clone https://github.com/oceanprotocol/ocean.js-cli.git
```
Cloning the repository will create a local copy on your machine, allowing you to access and work with its contents.
## Install NPM Dependencies
After successfully cloning the repository, you should install the necessary npm dependencies to ensure that the project functions correctly. This can be done with the following command:
```bash
npm install
```
## Build the TypeScript code
To compile the TypeScript code and prepare the CLI for use, execute the following command:
```bash
npm run build
```
Now, let's configure the environment variables required for the CLI to function effectively. 🚀
## Setting Environment Variables 🌐
To successfully configure the CLI tool, two essential steps must be undertaken: the setting of the account's private key and the definition of the desired RPC endpoint. These actions are pivotal in enabling the CLI tool to function effectively.
### Private Key Configuration
The CLI tool necessitates the configuration of the account's private key. This private key serves as the means by which the CLI tool establishes a connection to the associated wallet. It plays a crucial role in authenticating and authorizing operations performed by the tool.
```bash
export MNEMONIC="XXXX"
```
### RPC Endpoint Specification
Additionally, it is imperative to specify the RPC endpoint that corresponds to the desired network for executing operations. The CLI tool relies on this user-provided RPC endpoint to connect to the network required for its functions. This connection to the network is vital as it enables the CLI tool to interact with the blockchain and execute operations seamlessly.
```bash
export RPC='XXXX'
```
Furthermore, there are additional environment variables that can be configured to enhance the flexibility and customization of the environment. These variables include options such as the metadataCache URL and Provider URL, which can be specified if you prefer to utilize a custom deployment of Aquarius or Provider in contrast of the default settings. Moreover, you have the option to provide a custom address file path if you wish to use customized smart contracts or deployments for your specific use case. Remeber setting the next envariament variables is optional.
```bash
export AQUARIUS_URL='XXXX'
export PROVIDER_URL='XXXX'
export ADDRESS_FILE='../path/to/your/address-file'
```
## Usage
To explore the commands and option flags available in the Ocean CLI, simply run the following command:
```bash
npm run cli h
```
<figure><img src="../../.gitbook/assets/cli/usage.png" alt=""><figcaption>Available CLI commands & options</figcaption></figure>
With the Ocean CLI successfully installed and configured, you're ready to dive into its capabilities and unlock the full potential of Ocean Protocol. If you encounter any issues during the setup process or have questions, feel free to seek assistance from our [support](https://discord.com/invite/TnXjkR5) team. 🌊

View File

@ -0,0 +1,83 @@
# Publish a Dataset 📤
Once you've configured the RPC environment variable, you're ready to publish a new dataset on the connected network. Our flexible setup allows you to switch to a different network simply by substituting the RPC endpoint with one corresponding to another network. 🌐
To initiate the dataset publishing process, we'll start by updating the helper [DDO](../ddo-specification.md)(Decentralized Data Object) example named "SimpleDownloadDataset.json." This example can be found in the `./metadata` folder, located at the root directory of the cloned Ocean CLI project.
```json
{
"@context": ["https://w3id.org/did/v1"],
"id": "",
"nftAddress": "",
"version": "4.1.0",
"chainId": 80001,
"metadata": {
"created": "2021-12-20T14:35:20Z",
"updated": "2021-12-20T14:35:20Z",
"type": "dataset",
"name": "ocean-cli demo asset",
"description": "asset published using ocean cli tool",
"tags": ["test"],
"author": "oceanprotocol",
"license": "https://market.oceanprotocol.com/terms",
"additionalInformation": {
"termsAndConditions": true
}
},
"services": [
{
"id": "ccb398c50d6abd5b456e8d7242bd856a1767a890b537c2f8c10ba8b8a10e6025",
"type": "access",
"files": {
"datatokenAddress": "0x0",
"nftAddress": "0x0",
"files": [
{
"type": "url",
"url": "https://dumps.wikimedia.org/enwiki/latest/enwiki-latest-abstract10.xml.gz-rss.xml",
"method": "GET"
}
]
},
"datatokenAddress": "",
"serviceEndpoint": "https://v4.provider.oceanprotocol.com",
"timeout": 86400
}
],
"event": {},
"nft": {
"address": "",
"name": "Ocean Data NFT",
"symbol": "OCEAN-NFT",
"state": 5,
"tokenURI": "",
"owner": "",
"created": ""
},
"purgatory": {
"state": false
},
"datatokens": [],
"stats": {
"allocated": 0,
"orders": 0,
"price": {
"value": "2"
}
}
}
```
{% hint style="info" %}
The provided example creates a consumable asset with a predetermined price of 2 OCEAN tokens. If you wish to modify this and create an asset that is freely accessible, you can do so by replacing the value of "stats.price.value" with 0 in the JSON example mentioned above.
{% endhint %}
Now, let's run the command to publish the dataset:
```bash
npm run cli publish metadata/simpleDownloadDataset.json
```
<figure><img src="../../.gitbook/assets/cli/publish.png" alt=""><figcaption>Publish dataset</figcaption></figure>
Executing this command will initiate the dataset publishing process, making your dataset accessible and discoverable on the Ocean Protocol network. 🌊

View File

@ -0,0 +1,42 @@
# Run C2D Jobs 🚀
## Start a Compute Job 🎯
Initiating a compute job can be accomplished through two primary methods.
1. The first approach involves publishing both the dataset and algorithm, as explained in the previous section, [Publish a Dataset](./publish.md) Once that's completed, you can proceed to initiate the compute job.
2. Alternatively, you have the option to explore available datasets and algorithms and kickstart a compute-to-data job by combining your preferred choices.
To illustrate the latter option, you can use the following command:
```bash
npm run cli startCompute 'DATASET_DID' 'ALGO_DID'
```
In this command, replace `DATASET_DID` with the specific DID of the dataset you intend to utilize and `ALGO_DID` with the DID of the algorithm you want to apply. By executing this command, you'll trigger the initiation of a compute-to-data job that harnesses the selected dataset and algorithm for processing.
<figure><img src="../../.gitbook/assets/cli/c2dstart.png" alt=""><figcaption>Start a compute job</figcaption></figure>
## Download Compute Results 🧮
To obtain the compute results, we'll follow a two-step process. First, we'll employ the `getJobStatus`` method, patiently monitoring its status until it signals the job's completion. Afterward, we'll utilize this method to acquire the actual results.
### Monitor Job Status
To track the status of a job, you'll require both the dataset DID and the compute job DID. You can initiate this process by executing the following command:
```bash
npm run cli getJobStatus 'DATASET_DID' 'JOB_ID'
```
Executing this command will allow you to observe the job's status and verify its successful completion.
<figure><img src="../../.gitbook/assets/cli/jobstatus.png" alt=""><figcaption>Get Job Status</figcaption></figure>
### Download C2D Results
For the second method, the dataset DID is no longer required. Instead, you'll need to specify the job ID, the index of the result you wish to download from the available results for that job, and the destination folder where you want to save the downloaded content. The corresponding command is as follows:
```bash
npm run cli downloadJobResults 'JOB_ID' 'RESULT_INDEX' 'DESTINATION_FOLDER'
```
<figure><img src="../../.gitbook/assets/cli/jobResults.png" alt=""><figcaption>Download C2D Job Results</figcaption></figure>