1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-01 15:55:34 +01:00
docs/developers/ocean.js/README.md

32 lines
1.3 KiB
Markdown
Raw Normal View History

2023-05-26 13:50:44 +02:00
---
description: >-
JavaScript library to privately & securely publish, exchange, and consume
data.
---
# Ocean.js
With ocean.js, you can:
* **Publish** data services: downloadable files or compute-to-data. Create an ERC721 **data NFT** for each service, and ERC20 **datatoken** for access (1.0 datatokens to access).
* **Sell** datatokens for a fixed price. Sell data NFTs.
* **Transfer** data NFTs & datatokens.
Ocean.js is part of the [Ocean Protocol](https://oceanprotocol.com) toolset.
{% embed url="https://www.youtube.com/watch?v=lqGXPkPUCqI" %}
Introducing Ocean.JS
{% endembed %}
2023-06-09 15:10:40 +02:00
The Ocean.js library adopts the module architectural pattern, ensuring clear separation and organization of code units. Utilizing ES6 modules simplifies the process by allowing you to import only the necessary module for your specific task.
2023-10-11 21:22:40 +02:00
The module structure follows this format:
2023-06-09 15:10:40 +02:00
* Types
* Config
* Contracts
* Services
* Utils
When working with a particular module, you will need to provide different parameters. To instantiate classes from the contracts module, you must pass objects such as Signer, which represents the wallet instance, or the contract address you wish to utilize, depending on the scenario. As for the services modules, you will need to provide the provider URI or metadata cache URI.