Skip to content

Commit

Permalink
Merge pull request #1143 from oceanprotocol/feature/provider-c2d-support
Browse files Browse the repository at this point in the history
add c2d methods in provider class
  • Loading branch information
bogdanfazakas authored Dec 10, 2021
2 parents 2e64f8a + cdd080a commit a566be0
Show file tree
Hide file tree
Showing 4 changed files with 455 additions and 7 deletions.
53 changes: 53 additions & 0 deletions src/@types/Compute.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { Metadata, MetadataAlgorithm } from './Metadata'

export type ComputeResultType = 'algorithmLog' | 'output'

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 ComputeInput {
documentId: string
serviceId: number
transferTxId?: string
}

export interface ComputeAlgorithm {
did?: string
serviceIndex?: number
meta?: MetadataAlgorithm
transferTxId?: string
dataToken?: string
algoCustomParameters?: { [key: string]: any }
}
1 change: 1 addition & 0 deletions src/@types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export * from './Service'
export * from './Credentials'
export * from './Metadata'
export * from './FileMetadata'
export * from './Compute'
Loading

0 comments on commit a566be0

Please sign in to comment.