Skip to content

setAuthor

Set the author name of the asset. This should be the name of the company responsible for publishing and maintaining this 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.setAuthor('deltaDAO AG') 
const asset = assetBuilder.build() 
 
await nautilus.publish(asset) 
ddo.metadata:
{
author: 'deltaDAO AG'
}

Returns

The asset builder instance to chain building calls with.

Parameter

author

  • Type: string

The author you want to set to the asset's metadata to be built.

assetBuilder.setAuthor(
    'Company Name'
)