1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00
ocean.js/src/@types/Compute.ts
Bogdan Fazakas ec601a66d2
Fix get compute results (#1386)
* wip special chars

* clean ups

* update sha256 import from cryptojs lib

* update compute result and use alpha-26 contracts

* re-build with package-lock v1 and with dist

* ignore build files from dist

* delete build files

* removed console logs and updated ComputeResultType typing

* update compute integration test

* added more tests

* added some logs

* update file download method

* use fetch data

* remove download part

* delete console logs

* review fixes

* more fixes

Co-authored-by: Soon Huat <soon_huat.phan@daimler.com>
2022-04-14 23:58:25 +01:00

77 lines
1.5 KiB
TypeScript

import { Metadata, MetadataAlgorithm } from './DDO/Metadata'
export type ComputeResultType =
| 'algorithmLog'
| 'output'
| 'configrationLog'
| 'publishLog'
export interface ComputeEnvironment {
id: string
cpuNumber: number
cpuType: string
gpuNumber: number
gpuType: string
ramGB: number
diskGB: number
priceMin: number
desc: string
currentJobs: number
maxJobs: number
consumerAddress: string
storageExpiry: number
maxJobDuration: number
lastSeen: number
}
export interface ComputeResult {
filename: string
filesize: number
type: ComputeResultType
index?: number
}
export interface ComputeJob {
owner: string
did?: string
jobId: string
dateCreated: string
dateFinished: string
status: number
statusText: string
results: ComputeResult[]
inputDID?: string[]
algoDID?: string
agreementId?: string
expireTimestamp: number
}
export interface ComputeOutput {
publishAlgorithmLog?: boolean
publishOutput?: boolean
providerAddress?: string
providerUri?: string
metadata?: Metadata
metadataUri?: string
nodeUri?: string
owner?: string
secretStoreUri?: string
whitelist?: string[]
}
export interface ComputeAsset {
documentId: string
serviceId: string
transferTxId?: string
userdata?: { [key: string]: any }
}
export interface ComputeAlgorithm {
documentId?: string
serviceId?: string
meta?: MetadataAlgorithm
transferTxId?: string
algocustomdata?: { [key: string]: any }
userdata?: { [key: string]: any }
}