Skip to content

addAdditionalInformation

Add any additional information you might need to describe 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.addAdditionalInformation({ 
    display: 'test', 
    ecosystemMetadata: { 
        termsAndConditions: { 
            hash: 'sha256:abc123', 
            signature: '0x12345'
        } 
    } 
}) 
const asset = assetBuilder.build() 
 
await nautilus.publish(asset) 
ddo.metadata:
{
additionalInformation: {
display: 'test',
ecosystemMetadata: {
termsAndConditions: {
hash: 'sha256:abc123',
signature: '0x12345'
}
}
}
}

Returns

The asset builder instance to chain building calls with.

Parameter

additionalInformation

  • Type: { [key: string]: any }

The additional information object you want to add. This is an object with custom unique keys and any data format to enable your use-case.

assetBuilder.addAdditionalInformation(
    { 
        display: 'test', 
        ecosystemMetadata: { 
            termsAndConditions: { 
                hash: 'sha256:abc123', 
                signature: '0x12345'
            } 
        } 
    } 
)