Skip to content
LogoLogo

setType

Set the type of the asset. This might affect what kind of other metadata is expected for the asset to be valid. See a usage example below for both supported cases: 'dataset' and 'algorithm'.

Usage

When defining algorithm type assets, additional metadata is necessary to be set. Feel free to toggle between the examples below or refer to the setAlgorithm() documentation for further information.

import { ,  } from '@deltadao/nautilus'
import {  } from 'ethers'
 
const  = await .(new ('0x1234'))
 
const  = new ()
.('dataset') 
const  = .() 
 
await .() 
ddo.metadata:
{
type: 'dataset'
}

Returns

The asset builder instance, to chain further calls with.

Parameters

name

  • Type: 'dataset' | 'algorithm'

The type to use for the asset's metadata.

Refer to the setAlgorithm() documentation to learn more about required metadata when publishing algorithm assets.

.(
    'dataset'
)