1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00
This commit is contained in:
Matthias Kretschmann 2020-09-07 15:37:05 +02:00
parent 694314cae6
commit 2f3f5b11e2
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -2,6 +2,11 @@ import { Metadata } from './Metadata'
export type ServiceType = 'authorization' | 'metadata' | 'access' | 'compute'
export interface ServiceCommonAttributes {
main: { [key: string]: any }
additionalInformation?: { [key: string]: any }
}
export interface ServiceCommon {
type: ServiceType
index: number
@ -9,11 +14,6 @@ export interface ServiceCommon {
attributes: ServiceCommonAttributes
}
export interface ServiceCommonAttributes {
main: { [key: string]: any }
additionalInformation?: { [key: string]: any }
}
export interface ServiceAccessAttributes extends ServiceCommonAttributes {
main: {
creator: string
@ -29,18 +29,6 @@ export interface ServiceComputePrivacy {
trustedAlgorithms: string[]
}
export interface ServiceComputeAttributes extends ServiceCommonAttributes {
main: {
creator: string
datePublished: string
cost: string
timeout: number
provider?: ServiceComputeProvider
name: string
privacy?: ServiceComputePrivacy
}
}
export interface ServiceComputeProvider {
type: string
description: string
@ -67,6 +55,18 @@ export interface ServiceComputeProvider {
}
}
export interface ServiceComputeAttributes extends ServiceCommonAttributes {
main: {
creator: string
datePublished: string
cost: string
timeout: number
provider?: ServiceComputeProvider
name: string
privacy?: ServiceComputePrivacy
}
}
export interface ServiceMetadata extends ServiceCommon {
type: 'metadata'
attributes: Metadata