mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
fix passing algo metadata to OceanCompute.start()
This commit is contained in:
parent
13c5498c84
commit
418e2fadb2
@ -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<ComputeJob | ComputeJob[]> {
|
||||
@ -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}`) || ''
|
||||
|
||||
|
@ -64,6 +64,8 @@ export interface File {
|
||||
}
|
||||
|
||||
export interface MetaDataAlgorithm {
|
||||
url?: string
|
||||
rawcode?: string
|
||||
language?: string
|
||||
format?: string
|
||||
version?: string
|
||||
|
@ -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<ComputeJob> {
|
||||
output = this.checkOutput(consumerAccount, output)
|
||||
|
Loading…
Reference in New Issue
Block a user