Skip to content

setName

Set the name of the 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.setName('Randomly Generated Weather Data') 
const asset = assetBuilder.build() 
 
await nautilus.publish(asset) 
ddo.metadata:
{
name: 'Randomly Generated Weather Data'
}

Returns

The asset builder instance to chain building calls with.

Parameter

name

  • Type: string

A short descriptive name to use for the asset's metadata.

assetBuilder.setName(
    'Asset Name'
)