@oceanprotocol/lib 1.0.0-next.33 → 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.
- package/CHANGELOG.md +35 -0
- package/dist/lib.js +1 -1
- package/dist/lib.js.map +1 -1
- package/dist/lib.modern.js +1 -1
- package/dist/lib.modern.js.map +1 -1
- package/dist/lib.module.js +1 -1
- package/dist/lib.module.js.map +1 -1
- package/dist/lib.umd.js +1 -1
- package/dist/lib.umd.js.map +1 -1
- package/dist/src/@types/Compute.d.ts +1 -1
- package/dist/src/pools/index.d.ts +2 -0
- package/dist/src/provider/Provider.d.ts +10 -13
- package/dist/src/utils/SignatureUtils.d.ts +0 -2
- package/package.json +9 -8
|
@@ -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
|
-
/**
|
|
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
|
|
@@ -34,8 +33,7 @@ export declare class Provider {
|
|
|
34
33
|
* @return {Promise<string>} urlDetails
|
|
35
34
|
*/
|
|
36
35
|
getNonce(providerUri: string, consumerAddress: string, signal?: AbortSignal, providerEndpoints?: any, serviceEndpoints?: ServiceEndpoint[]): Promise<string>;
|
|
37
|
-
|
|
38
|
-
createHashSignature(web3: Web3, accountId: string, message: string): Promise<string>;
|
|
36
|
+
signProviderRequest(web3: Web3, accountId: string, message: string, password?: string): Promise<string>;
|
|
39
37
|
/** Encrypt data using the Provider's own symmetric key
|
|
40
38
|
* @param {string} data data in json format that needs to be sent , it can either be a DDO or a File array
|
|
41
39
|
* @param {string} providerUri provider uri address
|
|
@@ -115,16 +113,15 @@ export declare class Provider {
|
|
|
115
113
|
* @return {Promise<ComputeJob | ComputeJob[]>}
|
|
116
114
|
*/
|
|
117
115
|
computeStatus(providerUri: string, consumerAddress: string, jobId?: string, did?: string, signal?: AbortSignal): Promise<ComputeJob | ComputeJob[]>;
|
|
118
|
-
/** Get
|
|
119
|
-
* @param {string}
|
|
120
|
-
* @param {
|
|
121
|
-
* @param {string}
|
|
122
|
-
* @param {string}
|
|
123
|
-
* @param {
|
|
124
|
-
* @
|
|
125
|
-
* @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>}
|
|
126
123
|
*/
|
|
127
|
-
|
|
124
|
+
getComputeResultUrl(providerUri: string, web3: Web3, consumerAddress: string, jobId: string, index: number): Promise<string>;
|
|
128
125
|
/** Deletes a compute job.
|
|
129
126
|
* @param {string} did
|
|
130
127
|
* @param {string} consumerAddress
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import Web3 from 'web3';
|
|
2
|
-
export declare function signText(web3: Web3, text: string, publicKey: string, password?: string): Promise<string>;
|
|
3
2
|
export declare function signHash(web3: Web3, message: string, address: string): Promise<{
|
|
4
3
|
v: string;
|
|
5
4
|
r: string;
|
|
6
5
|
s: string;
|
|
7
6
|
}>;
|
|
8
|
-
export declare function signWithHash(web3: Web3, text: string, publicKey: string, password?: string): Promise<string>;
|
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.
|
|
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": {
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
},
|
|
55
56
|
"homepage": "https://github.com/oceanprotocol/ocean.js#readme",
|
|
56
57
|
"peerDependencies": {
|
|
57
|
-
"web3": "^1.7.
|
|
58
|
+
"web3": "^1.7.3"
|
|
58
59
|
},
|
|
59
60
|
"dependencies": {
|
|
60
61
|
"@oceanprotocol/contracts": "1.0.0-alpha.28",
|
|
@@ -62,13 +63,13 @@
|
|
|
62
63
|
"cross-fetch": "^3.1.5",
|
|
63
64
|
"crypto-js": "^4.1.1",
|
|
64
65
|
"decimal.js": "^10.3.1",
|
|
65
|
-
"web3": "^1.7.
|
|
66
|
+
"web3": "^1.7.3",
|
|
66
67
|
"web3-core": "^1.7.1",
|
|
67
68
|
"web3-eth-contract": "^1.7.1"
|
|
68
69
|
},
|
|
69
70
|
"devDependencies": {
|
|
70
|
-
"@truffle/hdwallet-provider": "^2.0.
|
|
71
|
-
"@types/chai": "^4.
|
|
71
|
+
"@truffle/hdwallet-provider": "^2.0.6",
|
|
72
|
+
"@types/chai": "^4.3.1",
|
|
72
73
|
"@types/chai-spies": "^1.0.3",
|
|
73
74
|
"@types/crypto-js": "^4.1.1",
|
|
74
75
|
"@types/mocha": "^9.1.0",
|
|
@@ -90,12 +91,12 @@
|
|
|
90
91
|
"mock-local-storage": "^1.1.21",
|
|
91
92
|
"nyc": "^15.1.0",
|
|
92
93
|
"ora": "5.4.1",
|
|
93
|
-
"prettier": "^2.6.
|
|
94
|
-
"release-it": "^14.14.
|
|
94
|
+
"prettier": "^2.6.2",
|
|
95
|
+
"release-it": "^14.14.2",
|
|
95
96
|
"source-map-support": "^0.5.19",
|
|
96
97
|
"ts-node": "^10.7.0",
|
|
97
98
|
"ts-node-register": "^1.0.0",
|
|
98
|
-
"typedoc": "0.22.
|
|
99
|
+
"typedoc": "0.22.15",
|
|
99
100
|
"typescript": "^4.6.3"
|
|
100
101
|
},
|
|
101
102
|
"nyc": {
|