From fa09f6f2c76ee3f193b10eeb6e3280c58501d6a9 Mon Sep 17 00:00:00 2001 From: Alex Coseru Date: Sat, 1 Feb 2020 13:12:39 +0200 Subject: [PATCH 01/14] add Output interface --- src/ocean/OceanCompute.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index 06e0dc0..46958cb 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -16,6 +16,18 @@ export enum ComputeJobStatus { Stopped, Deleted } +export interface Output { + publishAlgorithmLog?: boolean + publishOutput?: boolean + brizoAddress?: string + brizoUrl?: string + metadata?: Object + metadataUrl?: string + nodeUri?: string + owner?: string + secretStoreUrl?: string + whitelist?: Array +} export interface ComputeJob { owner: string From a60e4159255aadeba00bec2e72cf0fbb4b71489c Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Sat, 1 Feb 2020 15:25:24 +0200 Subject: [PATCH 02/14] add Output Object passed to brizo --- src/brizo/Brizo.ts | 4 ++- src/ocean/OceanCompute.ts | 62 ++++++++++++++++++++++++++++++--------- 2 files changed, 51 insertions(+), 15 deletions(-) diff --git a/src/brizo/Brizo.ts b/src/brizo/Brizo.ts index a6a3000..4bfd8a6 100644 --- a/src/brizo/Brizo.ts +++ b/src/brizo/Brizo.ts @@ -116,7 +116,8 @@ export class Brizo extends Instantiable { consumerAccount: Account, algorithmDid?: string, algorithmMeta?: MetaData, - jobId?: string + jobId?: string, + output?: Object ): Promise { const signature = await this.createSignature(consumerAccount, serviceAgreementId) const address = consumerAccount.getId() @@ -138,6 +139,7 @@ export class Brizo extends Instantiable { url += `&serviceAgreementId=${noZeroX(serviceAgreementId)}` url += algorithmDid && `&algorithmDid=${algorithmDid}` url += algorithmMeta && `&algorithmMeta=${algorithmMeta}` + url += output && `&output=${output}` url += jobId && `&jobId=${jobId}` // switch fetch method diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index 46958cb..e0853df 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -16,18 +16,6 @@ export enum ComputeJobStatus { Stopped, Deleted } -export interface Output { - publishAlgorithmLog?: boolean - publishOutput?: boolean - brizoAddress?: string - brizoUrl?: string - metadata?: Object - metadataUrl?: string - nodeUri?: string - owner?: string - secretStoreUrl?: string - whitelist?: Array -} export interface ComputeJob { owner: string @@ -86,26 +74,72 @@ export class OceanCompute extends Instantiable { }) } + /** + * return minimal output object + * @return {Promise} Returns output object + */ + public async minimal_output_object():Promise { + var minimal_output=Object() + minimal_output["publishAlgorithmLog"]=false + minimal_output["publishOutput"]=false + return(minimal_output) + } + /** + * Check the output object and add default properties if needed + * @param {Account} consumerAccount The account of the consumer ordering the service. + * @param {Object} output Output section used for publishing the result. + * @return {Promise} Returns output object + */ + public async check_output_dict( + consumerAccount:Account, + output?:Object + ): Promise { + if (!output){ + //build a minimal object and return it + return (await this.minimal_output_object()) + } + if((!output["publishAlgorithmLog"] || output["publishAlgorithmLog"]==false) && (!output["publishOutput"] || output["publishOutput"]==false)){ + return (await this.minimal_output_object()) + } + if(!output["brizoAddress"]) + output["brizoAddress"]=this.config.brizoAddress + if(!output["brizoUrl"]) + output["brizoUrl"]=this.config.brizoUri + if(!output["metadataUrl"]) + output["metadataUrl"]=this.config.aquariusUri + if(!output["nodeUri"]) + output["nodeUri"]=this.config.nodeUri + if(!output["owner"]) + output["owner"]=consumerAccount.getId() + if(!output["secretStoreUrl"]) + output["secretStoreUrl"]=this.config.secretStoreUri + return output + } /** * Start the execution of a compute job. * @param {Account} consumerAccount The account of the consumer ordering the service. * @param {string} agreementId The service agreement ID. * @param {string} algorithmDid The DID of the algorithm asset (of type `algorithm`) to run on the asset. * @param {MetaData} algorithmMeta Metadata about the algorithm being run if `algorithm` is being used. This is ignored when `algorithmDid` is specified. + * @param {Object} output Output section used for publishing the result. * @return {Promise} Returns compute job ID under status.jobId */ public async start( consumerAccount: Account, agreementId: string, algorithmDid?: string, - algorithmMeta?: MetaData + algorithmMeta?: MetaData, + output?:Object ): Promise { + output=await this.check_output_dict(consumerAccount,output) const status = await this.ocean.brizo.compute( 'post', agreementId, consumerAccount, algorithmDid, - algorithmMeta + algorithmMeta, + null, + output ) return status as ComputeJob From eb73d6604cf561b0bfb008a1cf3200ef113925ac Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Sat, 1 Feb 2020 15:30:15 +0200 Subject: [PATCH 03/14] small cleanup --- src/ocean/OceanCompute.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index e0853df..96eb1dd 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -82,7 +82,7 @@ export class OceanCompute extends Instantiable { var minimal_output=Object() minimal_output["publishAlgorithmLog"]=false minimal_output["publishOutput"]=false - return(minimal_output) + return minimal_output } /** * Check the output object and add default properties if needed From 6e2289b27ddc8643076385ee3fe8cfb743d4ecfb Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Sat, 1 Feb 2020 15:42:02 +0200 Subject: [PATCH 04/14] lint fix --- src/brizo/Brizo.ts | 2 +- src/ocean/OceanCompute.ts | 55 +++++++++++++++++++-------------------- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/src/brizo/Brizo.ts b/src/brizo/Brizo.ts index 4bfd8a6..3a85b32 100644 --- a/src/brizo/Brizo.ts +++ b/src/brizo/Brizo.ts @@ -117,7 +117,7 @@ export class Brizo extends Instantiable { algorithmDid?: string, algorithmMeta?: MetaData, jobId?: string, - output?: Object + output?: Record ): Promise { const signature = await this.createSignature(consumerAccount, serviceAgreementId) const address = consumerAccount.getId() diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index 96eb1dd..86aece8 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -78,43 +78,42 @@ export class OceanCompute extends Instantiable { * return minimal output object * @return {Promise} Returns output object */ - public async minimal_output_object():Promise { - var minimal_output=Object() - minimal_output["publishAlgorithmLog"]=false - minimal_output["publishOutput"]=false - return minimal_output + public async getminimaloutput(): Promise> { + const minimaloutput = Object() + minimaloutput.publishAlgorithmLog = false + minimaloutput.publishOutput = false + return minimaloutput } + /** * Check the output object and add default properties if needed * @param {Account} consumerAccount The account of the consumer ordering the service. * @param {Object} output Output section used for publishing the result. * @return {Promise} Returns output object */ - public async check_output_dict( - consumerAccount:Account, - output?:Object - ): Promise { - if (!output){ - //build a minimal object and return it - return (await this.minimal_output_object()) + public async checkoutput( + consumerAccount: Account, + output?: Record + ): Promise> { + if (!output) { + // build a minimal object and return it + return this.getminimaloutput() } - if((!output["publishAlgorithmLog"] || output["publishAlgorithmLog"]==false) && (!output["publishOutput"] || output["publishOutput"]==false)){ - return (await this.minimal_output_object()) + if ( + (!output.publishAlgorithmLog || output.publishAlgorithmLog === false) && + (!output.publishOutput || output.publishOutput === false) + ) { + return this.getminimaloutput() } - if(!output["brizoAddress"]) - output["brizoAddress"]=this.config.brizoAddress - if(!output["brizoUrl"]) - output["brizoUrl"]=this.config.brizoUri - if(!output["metadataUrl"]) - output["metadataUrl"]=this.config.aquariusUri - if(!output["nodeUri"]) - output["nodeUri"]=this.config.nodeUri - if(!output["owner"]) - output["owner"]=consumerAccount.getId() - if(!output["secretStoreUrl"]) - output["secretStoreUrl"]=this.config.secretStoreUri + if (!output.brizoAddress) output.brizoAddress = this.config.brizoAddress + if (!output.brizoUrl) output.brizoUrl = this.config.brizoUri + if (!output.metadataUrl) output.metadataUrl = this.config.aquariusUri + if (!output.nodeUri) output.nodeUri = this.config.nodeUri + if (!output.owner) output.owner = consumerAccount.getId() + if (!output.secretStoreUrl) output.secretStoreUrl = this.config.secretStoreUri return output } + /** * Start the execution of a compute job. * @param {Account} consumerAccount The account of the consumer ordering the service. @@ -129,9 +128,9 @@ export class OceanCompute extends Instantiable { agreementId: string, algorithmDid?: string, algorithmMeta?: MetaData, - output?:Object + output?: Record ): Promise { - output=await this.check_output_dict(consumerAccount,output) + output = await this.checkoutput(consumerAccount, output) const status = await this.ocean.brizo.compute( 'post', agreementId, From 9cf716ebe472ec24603c1bcf052848ad4464d9dd Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Sat, 1 Feb 2020 16:11:06 +0200 Subject: [PATCH 05/14] add Output interface --- src/brizo/Brizo.ts | 4 ++-- src/ocean/OceanCompute.ts | 38 +++++++++++++++++++++++--------------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/src/brizo/Brizo.ts b/src/brizo/Brizo.ts index 3a85b32..77aa4cb 100644 --- a/src/brizo/Brizo.ts +++ b/src/brizo/Brizo.ts @@ -4,7 +4,7 @@ import { noZeroX } from '../utils' import { Instantiable, InstantiableConfig } from '../Instantiable.abstract' import { DDO } from '../ddo/DDO' import { ServiceType } from '../ddo/Service' -import { ComputeJob } from '../ocean/OceanCompute' +import { ComputeJob, Output } from '../ocean/OceanCompute' const apiPath = '/api/v1/brizo/services' @@ -117,7 +117,7 @@ export class Brizo extends Instantiable { algorithmDid?: string, algorithmMeta?: MetaData, jobId?: string, - output?: Record + output?: Output ): Promise { const signature = await this.createSignature(consumerAccount, serviceAgreementId) const address = consumerAccount.getId() diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index 86aece8..5ba2042 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -17,6 +17,19 @@ export enum ComputeJobStatus { Deleted } +export interface Output { + publishAlgorithmLog?: boolean + publishOutput?: boolean + brizoAddress?: string + brizoUrl?: string + metadata?: Record + metadataUrl?: string + nodeUri?: string + owner?: string + secretStoreUrl?: string + whitelist?: Array +} + export interface ComputeJob { owner: string agreementId: string @@ -78,31 +91,26 @@ export class OceanCompute extends Instantiable { * return minimal output object * @return {Promise} Returns output object */ - public async getminimaloutput(): Promise> { - const minimaloutput = Object() - minimaloutput.publishAlgorithmLog = false - minimaloutput.publishOutput = false - return minimaloutput + public async getminimaloutput(): Promise { + const minimaloutput: Output = { + publishAlgorithmLog: false, + publishOutput: false + } + return minimaloutput as Output } /** * Check the output object and add default properties if needed * @param {Account} consumerAccount The account of the consumer ordering the service. * @param {Object} output Output section used for publishing the result. - * @return {Promise} Returns output object + * @return {Promise} Returns output object */ - public async checkoutput( - consumerAccount: Account, - output?: Record - ): Promise> { + public async checkoutput(consumerAccount: Account, output?: Output): Promise { if (!output) { // build a minimal object and return it return this.getminimaloutput() } - if ( - (!output.publishAlgorithmLog || output.publishAlgorithmLog === false) && - (!output.publishOutput || output.publishOutput === false) - ) { + if (!output.publishAlgorithmLog && !output.publishOutput) { return this.getminimaloutput() } if (!output.brizoAddress) output.brizoAddress = this.config.brizoAddress @@ -128,7 +136,7 @@ export class OceanCompute extends Instantiable { agreementId: string, algorithmDid?: string, algorithmMeta?: MetaData, - output?: Record + output?: Output ): Promise { output = await this.checkoutput(consumerAccount, output) const status = await this.ocean.brizo.compute( From 4a76dfd604520936f4332511da8ce2fa3f2d6af9 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Sat, 1 Feb 2020 16:21:59 +0200 Subject: [PATCH 06/14] fixed Url to Uri --- src/ocean/OceanCompute.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index 5ba2042..ce02319 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -21,12 +21,12 @@ export interface Output { publishAlgorithmLog?: boolean publishOutput?: boolean brizoAddress?: string - brizoUrl?: string + brizoUri?: string metadata?: Record - metadataUrl?: string + metadataUri?: string nodeUri?: string owner?: string - secretStoreUrl?: string + secretStoreUri?: string whitelist?: Array } @@ -114,11 +114,11 @@ export class OceanCompute extends Instantiable { return this.getminimaloutput() } if (!output.brizoAddress) output.brizoAddress = this.config.brizoAddress - if (!output.brizoUrl) output.brizoUrl = this.config.brizoUri - if (!output.metadataUrl) output.metadataUrl = this.config.aquariusUri + if (!output.brizoUri) output.brizoUri = this.config.brizoUri + if (!output.metadataUri) output.metadataUri = this.config.aquariusUri if (!output.nodeUri) output.nodeUri = this.config.nodeUri if (!output.owner) output.owner = consumerAccount.getId() - if (!output.secretStoreUrl) output.secretStoreUrl = this.config.secretStoreUri + if (!output.secretStoreUri) output.secretStoreUri = this.config.secretStoreUri return output } From 998e25ab13df766e37722b0477869fb33a923a9d Mon Sep 17 00:00:00 2001 From: Alex Coseru Date: Sat, 1 Feb 2020 20:57:20 +0200 Subject: [PATCH 07/14] Update src/ocean/OceanCompute.ts Co-Authored-By: Matthias Kretschmann --- src/ocean/OceanCompute.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index ce02319..1c479b6 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -22,7 +22,7 @@ export interface Output { publishOutput?: boolean brizoAddress?: string brizoUri?: string - metadata?: Record + metadata?: MetaData metadataUri?: string nodeUri?: string owner?: string From 56b0e7b97e076102cdf60e25e33c7ac255e57948 Mon Sep 17 00:00:00 2001 From: Alex Coseru Date: Sat, 1 Feb 2020 20:57:34 +0200 Subject: [PATCH 08/14] Update src/ocean/OceanCompute.ts Co-Authored-By: Matthias Kretschmann --- src/ocean/OceanCompute.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index 1c479b6..6c91ebc 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -27,7 +27,7 @@ export interface Output { nodeUri?: string owner?: string secretStoreUri?: string - whitelist?: Array + whitelist?: string[] } export interface ComputeJob { From dec6c35319f52c8b542375f0a2ed5930c1509dc3 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Sat, 1 Feb 2020 20:59:50 +0200 Subject: [PATCH 09/14] updated checkoutput --- src/ocean/OceanCompute.ts | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index 6c91ebc..7b7aabc 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -105,23 +105,29 @@ export class OceanCompute extends Instantiable { * @param {Object} output Output section used for publishing the result. * @return {Promise} Returns output object */ - public async checkoutput(consumerAccount: Account, output?: Output): Promise { - if (!output) { - // build a minimal object and return it - return this.getminimaloutput() + private checkOutput(consumerAccount: Account, output?: Output): Output { + const isDefault = + !output || (!output.publishAlgorithmLog && !output.publishOutput) + + if (isDefault) { + return { + publishAlgorithmLog: false, + publishOutput: false + } } - if (!output.publishAlgorithmLog && !output.publishOutput) { - return this.getminimaloutput() + + return { + publishAlgorithmLog: output.publishAlgorithmLog, + publishOutput: output.publishOutput, + brizoAddress: output.brizoAddress || this.config.brizoAddress, + brizoUri: output.brizoUri || this.config.brizoUri, + metadataUri: output.metadataUri || this.config.aquariusUri, + nodeUri: output.nodeUri || this.config.nodeUri, + owner: output.owner || consumerAccount.getId(), + secretStoreUri: output.secretStoreUri || this.config.secretStoreUri } - if (!output.brizoAddress) output.brizoAddress = this.config.brizoAddress - if (!output.brizoUri) output.brizoUri = this.config.brizoUri - if (!output.metadataUri) output.metadataUri = this.config.aquariusUri - if (!output.nodeUri) output.nodeUri = this.config.nodeUri - if (!output.owner) output.owner = consumerAccount.getId() - if (!output.secretStoreUri) output.secretStoreUri = this.config.secretStoreUri - return output } - + /** * Start the execution of a compute job. * @param {Account} consumerAccount The account of the consumer ordering the service. @@ -138,7 +144,7 @@ export class OceanCompute extends Instantiable { algorithmMeta?: MetaData, output?: Output ): Promise { - output = await this.checkoutput(consumerAccount, output) + output = this.checkoutput(consumerAccount, output) const status = await this.ocean.brizo.compute( 'post', agreementId, From d46773b197c2aff752d02091fe829a935a691224 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Sat, 1 Feb 2020 23:34:14 +0200 Subject: [PATCH 10/14] typo --- src/ocean/OceanCompute.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index 7b7aabc..d407e45 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -144,7 +144,7 @@ export class OceanCompute extends Instantiable { algorithmMeta?: MetaData, output?: Output ): Promise { - output = this.checkoutput(consumerAccount, output) + output = this.checkOutput(consumerAccount, output) const status = await this.ocean.brizo.compute( 'post', agreementId, From 0b8c7c950c4d392c3cb7bf8c3cc1d38f05659b01 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Sun, 2 Feb 2020 08:32:53 +0200 Subject: [PATCH 11/14] fix lint --- src/ocean/OceanCompute.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index d407e45..b398a22 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -108,14 +108,14 @@ export class OceanCompute extends Instantiable { private checkOutput(consumerAccount: Account, output?: Output): Output { const isDefault = !output || (!output.publishAlgorithmLog && !output.publishOutput) - + if (isDefault) { return { publishAlgorithmLog: false, publishOutput: false } } - + return { publishAlgorithmLog: output.publishAlgorithmLog, publishOutput: output.publishOutput, @@ -127,7 +127,7 @@ export class OceanCompute extends Instantiable { secretStoreUri: output.secretStoreUri || this.config.secretStoreUri } } - + /** * Start the execution of a compute job. * @param {Account} consumerAccount The account of the consumer ordering the service. From 11a146b0acb9bdd48fc40158690b4022e8b1a468 Mon Sep 17 00:00:00 2001 From: Alex Coseru Date: Mon, 3 Feb 2020 11:32:27 +0200 Subject: [PATCH 12/14] Update src/ocean/OceanCompute.ts Co-Authored-By: Matthias Kretschmann --- src/ocean/OceanCompute.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index b398a22..4727e79 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -102,7 +102,7 @@ export class OceanCompute extends Instantiable { /** * Check the output object and add default properties if needed * @param {Account} consumerAccount The account of the consumer ordering the service. - * @param {Object} output Output section used for publishing the result. + * @param {Output} output Output section used for publishing the result. * @return {Promise} Returns output object */ private checkOutput(consumerAccount: Account, output?: Output): Output { From 091a75e05e4aaf7d2a6545015af853740b814665 Mon Sep 17 00:00:00 2001 From: Alex Coseru Date: Mon, 3 Feb 2020 11:32:41 +0200 Subject: [PATCH 13/14] Update src/ocean/OceanCompute.ts Co-Authored-By: Matthias Kretschmann --- src/ocean/OceanCompute.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index 4727e79..44aad76 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -134,7 +134,7 @@ export class OceanCompute extends Instantiable { * @param {string} agreementId The service agreement ID. * @param {string} algorithmDid The DID of the algorithm asset (of type `algorithm`) to run on the asset. * @param {MetaData} algorithmMeta Metadata about the algorithm being run if `algorithm` is being used. This is ignored when `algorithmDid` is specified. - * @param {Object} output Output section used for publishing the result. + * @param {Output} output Define algorithm output publishing. Publishing the result of a compute job is turned off by default. * @return {Promise} Returns compute job ID under status.jobId */ public async start( From de69472e04e8f56557df9135d3465c02b7ee82c4 Mon Sep 17 00:00:00 2001 From: Alex Coseru Date: Mon, 3 Feb 2020 11:35:14 +0200 Subject: [PATCH 14/14] remove getminimaloutput --- src/ocean/OceanCompute.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index 44aad76..ea8fc33 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -87,18 +87,6 @@ export class OceanCompute extends Instantiable { }) } - /** - * return minimal output object - * @return {Promise} Returns output object - */ - public async getminimaloutput(): Promise { - const minimaloutput: Output = { - publishAlgorithmLog: false, - publishOutput: false - } - return minimaloutput as Output - } - /** * Check the output object and add default properties if needed * @param {Account} consumerAccount The account of the consumer ordering the service.