addLinks
Add links to useful resources to the description of your asset.
Official OceanProtocol documentation: DDO Specification
Usage
import { AssetBuilder, Nautilus } from '@deltadao/nautilus'
import { Wallet } from 'ethers'
const nautilus = await Nautilus.create(new Wallet('0x1234'))
const assetBuilder = new AssetBuilder()
assetBuilder.addLinks(['https://some.example.of/my/data', 'https://link.to/the/schema/of/my-data'])
const asset = assetBuilder.build()
await nautilus.publish(asset)
ddo.metadata: { links: [ 'https://some.example.of/my/data', 'https://link.to/the/schema/of/my-data' ] }
NOTE: In marketplace or portal frontends, the first entry is used as a link to an example of your published file (e.g. sample data or an algorithm snippet).
Returns
- Type:
AssetBuilder
The asset builder instance to chain building calls with.
Parameter
links
- Type:
string[]
The links you want to add to the asset to be built.
assetBuilder.addLinks(
['https://some.example.of/my/data', 'https://link.to/the/schema/of/my-data']
)