diff --git a/src/brizo/Brizo.ts b/src/brizo/Brizo.ts index 461200a..3114aef 100644 --- a/src/brizo/Brizo.ts +++ b/src/brizo/Brizo.ts @@ -1,4 +1,4 @@ -import { File, MetaData } from '../ddo/MetaData' +import { File, MetaDataAlgorithm } from '../ddo/MetaData' import Account from '../ocean/Account' import { noZeroX } from '../utils' import { Instantiable, InstantiableConfig } from '../Instantiable.abstract' @@ -115,7 +115,7 @@ export class Brizo extends Instantiable { serviceAgreementId: string, consumerAccount: Account, algorithmDid?: string, - algorithmMeta?: MetaData, + algorithmMeta?: MetaDataAlgorithm, jobId?: string, output?: Output ): Promise { @@ -138,7 +138,7 @@ export class Brizo extends Instantiable { url += `&consumerAddress=${address}` url += `&serviceAgreementId=${noZeroX(serviceAgreementId)}` url += (algorithmDid && `&algorithmDid=${algorithmDid}`) || '' - url += (algorithmMeta && `&algorithmMeta=${algorithmMeta}`) || '' + url += (algorithmMeta && `&algorithmMeta=${JSON.stringify(algorithmMeta)}`) || '' url += (output && `&output=${JSON.stringify(output)}`) || '' url += (jobId && `&jobId=${jobId}`) || '' diff --git a/src/ddo/MetaData.ts b/src/ddo/MetaData.ts index 11ff7ab..34aceb7 100644 --- a/src/ddo/MetaData.ts +++ b/src/ddo/MetaData.ts @@ -64,6 +64,8 @@ export interface File { } export interface MetaDataAlgorithm { + url?: string + rawcode?: string language?: string format?: string version?: string diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index 7a0f171..cc6fe8f 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -1,5 +1,5 @@ import { Instantiable, InstantiableConfig } from '../Instantiable.abstract' -import { MetaData } from '../ddo/MetaData' +import { MetaData, MetaDataAlgorithm } from '../ddo/MetaData' import Account from './Account' import { DDO } from '../ddo/DDO' import { SubscribablePromise } from '../utils' @@ -132,7 +132,7 @@ export class OceanCompute extends Instantiable { consumerAccount: Account, agreementId: string, algorithmDid?: string, - algorithmMeta?: MetaData, + algorithmMeta?: MetaDataAlgorithm, output?: Output ): Promise { output = this.checkOutput(consumerAccount, output)