1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00
docs/developers/ocean.js
2023-10-11 22:40:46 +03:00
..
asset-visibility.md Restructured summary and fixed all links to docs so they are redirected to internal pages. 2023-10-06 13:12:48 -07:00
cod-asset.md Final cleanup 2023-07-16 10:19:03 +03:00
configuration.md update consume and configuration code example 2023-08-17 16:16:01 +03:00
consume-asset.md update consume and configuration code example 2023-08-17 16:16:01 +03:00
creating-datanft.md More changes requested in the review 2023-10-11 22:40:46 +03:00
mint-datatoken.md Fix broken links 2023-06-29 18:52:01 +03:00
publish.md Final cleanup 2023-07-16 10:19:03 +03:00
README.md Addressed comments in the PR 2023-10-11 22:22:40 +03:00
update-metadata.md Addressed comments in the PR 2023-10-11 22:22:40 +03: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 toolset.

{% embed url="https://www.youtube.com/watch?v=lqGXPkPUCqI" %} Introducing Ocean.JS {% endembed %}

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.

The module structure follows this format:

  • 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.