Skip to content

compute

Triggers a new Compute Job on a given dataset using a specified algorithm.

Usage

import { Nautilus } from '@deltadao/nautilus'
import { Wallet } from 'ethers'
 
const nautilus = await Nautilus.create(new Wallet('0x1234'))
 
await nautilus.compute({ 
    dataset: { 
        did: 'did:op:dataset...'
    }, 
    algorithm: { 
        did: 'did:op:algorithm...'
    } 
}) 

Returns

ComputeJob | ComputeJob[]

The compute job object that was created when starting the new job.

Parameters

config

  • Type: ComputeConfig

The configuration object for the compute job to start.

Properties

dataset

The dataset to compute on.

await nautilus.compute({ 
    dataset: { 
        did: 'did:op:dataset...'
    }, 
    algorithm: { 
        did: 'did:op:algorithm...' 
    } 
})
algorithm

The algorithm to compute with.

await nautilus.compute({ 
    dataset: { 
        did: 'did:op:dataset...' 
    }, 
    algorithm: { 
        did: 'did:op:algorithm...'
    } 
})
additionalDatasets (optional)

A list of additional datasets to use for computation.

await nautilus.compute({ 
    dataset: {
        did: 'did:op:dataset...'
    },
    algorithm: { 
        did: 'did:op:algorithm...' 
    },
    additionalDatasets: [ 
        { 
            did: 'did:op:dataset...'
        } 
    ] 
})