Skip to content

UserGuide

kitblake edited this page Oct 5, 2022 · 18 revisions

Streaming Data Asset User Guide

Note: In order to test please visit our fork at https://oceanmarket-datastreams.netlify.app/

Table of Contents

Publishing a Streaming Asset
Procuring a Streaming Asset

To make use of the marketplace the first step is to connect your wallet. Then you can access various Ethereum networks.

We're using MetaMask for these docs. Click the ”Connect Wallet” button and follow the MetaMask instructions.

MarketplaceMenuBar

Once connected you can choose a network in MetaMask. You can filter for the same network in the marketplace by clicking the globe icon. Select the checkboxes for the networks you'd like to use. We're using the Polygon Mumbai testnet.

MarketplaceNetworks

If you need to add the Mumbai testnet to your MetaMask, go to https://mumbai.polygonscan.com/ and click the "Add Mumbai Network" link in the footer.

Publishing a Streaming Asset

MarketplaceMenuBar

On any marketplace page click the ”Publish” link in the menu bar. This will bring you to the publishing form. The form has five parts. Following are the steps required for each subform, with a description for each field.

Metadata subform

Publishing Form Metadata

Data NFT: The first field contains an auto-generated image for the Ocean Data NFT that will be created. You can use it as is or click the little reload icon in the lower left of the image to generate another variant.

Asset Type: Click “Datastream” to select the streaming data type.

Publishing Form Metadata Inputs

Title: Fill in a concise title.

Description: Add a description of the datastream. At least a few words are required.

Author: Fill in the name you'd like to be known as.

Tags: Create meaningful tags for the datastream. These will help it get found when users search.

Terms & Conditions: Click the checkbox to agree.

If all the required fields are filled in the “CONTINUE” button will activate and you can proceed.

Access subform

Publishing Form Access

Datatoken: This is a suggested naming for the datatoken of your new asset. If for some reason you don't like it click the little reload icon at the right to generate a new name.

Provider URL: This field is automatically filled in with the Ocean Protocol provider. Unless you're doing advanced publishing you shouldn't change it.

Publishing Form Access Inputs

File: Paste the URL of your datastream into the File field. The “Validate” button will activate. Click it and the app will verify the content at your URL.

Sample File: Because a datastream is only useful if the developer understands its format, we suggest using this field to link to the API Docs. Or it can be used to link to another related resource.

Timeout: Choose how long you would like to make the stream available. When done click the “CONTINUE” button.

Pricing subform

Publishing Form Pricing

FIXED or FREE: Decide if you would like to charge for this Datastream or make it freely available by clicking the corresponding button.

Price: If you're charging, fill in the price you'd like to receive for this Datastream. The price can have a decimal but it must be more than 1. Click the “CONTINUE” button to proceed.

Price (free): If the asset will be free click the checkbox to confirm. Then click the “CONTINUE” button to proceed.

Community Swap Fee and Marketplace Fee: For paid assets there are minor fees deducted from each payment. These fields are not editable.

Preview subform

Publishing Form Preview

The app displays a preview of how the new asset will look when published. Do a check of all the details. If anything is incorrect you can use the “BACK” button to re-edit. If everything checks out click the “CONTINUE” button.

Submit subform

PublishingFormSubmit

Now it's time to publish the new Datastream. As described in the page, the app will go through three steps. These will require two transactions, one to create the tokens and a second to publish the DDO.

Click the “Submit” button. MetaMask will pop up. Review the transaction and click “Confirm”. Wait a few moments for the transaction to complete.

MetaMask Notification

When the transaction goes through MetaMask will pop up again. Review the transaction and click “Confirm” again.

After a few moments the transaction will confirm and the new Streaming Data Asset will be created. You'll see a “Successfully published!” message.

Before clicking the “VIEW ASSET” button wait a few moments for the transaction to finalize. If you click too soon you'll get a Not Found page.

Once it's finalized you can view your new asset and share it. You can also try procuring it.

Procuring a Streaming Asset

There's a wide variety of assets available on the Marketplace. When you find a Steaming Data Asset that you'd like to procure the page will contain a “USE” sidebar. Here is the example we created to make these docs:

Asset Example Page

On the left all the metadata about the asset is displayed. It includes a title, description, tags, and technical details. Since this is a Streaming Data Asset there is also a “STREAM DOCUMENTATION URL” element.

In the sidebar on the right the data type, price, and “SUBSCRIBE” button are present. There's also an indication of the Datastream Endpoint address. To get the full URL you must subscribe.

Procurement Steps

Click the “SUBSCRIBE FOR 1 DAY” button. MetaMask will pop up. You'll need to give permission for the Ocean Market to access your OCEAN (even if you don't have any and are procuring a free asset).

MetaMask Permission Request

Click the “Confirm” button and wait a few moments. You only have to do this once. If you purchase more assets only one transaction will be required because you've already given access permission.

When the transaction goes through MetaMask will pop up again.

MetaMaskProcurement

Review the transaction and click “Confirm” again. Wait a few moments for the transaction to complete. When it does you'll see an active “COPY FEED URL” button in the sidebar appear.

AssetExampleCopyURL

Click the “COPY FEED URL” button. A message will appear confirming that the feed URL is on your clipboard. Now you can use it in whatever app or function you wish.

Accessing the Datastream

If the Streaming Data Asset is a free asset you can immediately access the stream.

For paid assets the publisher will require that you connect your Web3 wallet (MetaMask) in order to ascertain that you've paid. Once your wallet is connected the check will be automated. The publisher will inspect the transaction you just completed. If all is well you'll start receiving the streaming data shortly.