@oceanprotocol/lib 1.0.0-next.35 → 1.0.0-next.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { Metadata, MetadataAlgorithm } from './DDO/Metadata';
2
- export declare type ComputeResultType = 'algorithmLog' | 'output';
2
+ export declare type ComputeResultType = 'algorithmLog' | 'output' | 'configrationLog' | 'publishLog';
3
3
  export interface ComputeEnvironment {
4
4
  id: string;
5
5
  cpuNumber: number;
@@ -1,6 +1,5 @@
1
1
  import Web3 from 'web3';
2
2
  import { FileMetadata, ComputeJob, ComputeOutput, ComputeAlgorithm, ComputeAsset, ComputeEnvironment, ProviderInitialize } from '../@types/';
3
- import { DownloadResponse } from '../@types/DownloadResponse';
4
3
  export interface HttpCallback {
5
4
  (httpMethod: string, url: string, body: string, header: any): Promise<any>;
6
5
  }
@@ -25,7 +24,7 @@ export declare class Provider {
25
24
  * @return {Promise<ServiceEndpoint[]>}
26
25
  */
27
26
  getServiceEndpoints(providerEndpoint: string, endpoints: any): Promise<ServiceEndpoint[]>;
28
- /** Encrypt DDO using the Provider's own symmetric key
27
+ /** Gets current nonce
29
28
  * @param {string} providerUri provider uri address
30
29
  * @param {string} consumerAddress Publisher address
31
30
  * @param {AbortSignal} signal abort signal
@@ -114,16 +113,15 @@ export declare class Provider {
114
113
  * @return {Promise<ComputeJob | ComputeJob[]>}
115
114
  */
116
115
  computeStatus(providerUri: string, consumerAddress: string, jobId?: string, did?: string, signal?: AbortSignal): Promise<ComputeJob | ComputeJob[]>;
117
- /** Get status for a specific jobId/documentId/owner.
118
- * @param {string} jobId
119
- * @param {number} index
120
- * @param {string} providerUri
121
- * @param {string} destination
122
- * @param {Web3} web3
123
- * @param {AbortSignal} signal abort signal
124
- * @return {Promise<ComputeJob | ComputeJob[]>}
116
+ /** Get compute result url
117
+ * @param {string} providerUri The URI of the provider we want to query
118
+ * @param {Web3} web3 Web3 instance
119
+ * @param {string} consumerAddress The consumer ethereum address
120
+ * @param {string} jobId The ID of a compute job.
121
+ * @param {number} index Result index
122
+ * @return {Promise<string>}
125
123
  */
126
- computeResult(jobId: string, index: number, accountId: string, providerUri: string, web3: Web3, signal?: AbortSignal): Promise<DownloadResponse | void>;
124
+ getComputeResultUrl(providerUri: string, web3: Web3, consumerAddress: string, jobId: string, index: number): Promise<string>;
127
125
  /** Deletes a compute job.
128
126
  * @param {string} did
129
127
  * @param {string} consumerAddress
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oceanprotocol/lib",
3
3
  "source": "./src/index.ts",
4
- "version": "1.0.0-next.35",
4
+ "version": "1.0.0-next.36",
5
5
  "description": "JavaScript client library for Ocean Protocol",
6
6
  "main": "./dist/lib.js",
7
7
  "umd:main": "dist/lib.umd.js",
@@ -40,6 +40,7 @@
40
40
  "test:unit:cover": "nyc --report-dir coverage/unit npm run test:unit",
41
41
  "test:integration": "npm run mocha -- 'test/integration/**/*.test.ts'",
42
42
  "test:provider": "npm run mocha -- 'test/integration/Provider.test.ts'",
43
+ "test:compute": "npm run mocha -- 'test/integration/ComputeFlow.test.ts'",
43
44
  "test:integration:cover": "nyc --report-dir coverage/integration --no-clean npm run test:integration"
44
45
  },
45
46
  "repository": {