@oceanprotocol/lib 1.0.0-next.24 → 1.0.0-next.27

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.
@@ -16,41 +16,6 @@ export interface PublisherTrustedAlgorithm {
16
16
  containerSectionChecksum: string;
17
17
  }
18
18
  export interface ServiceComputeOptions {
19
- /**
20
- * Namespaced used for the compute job.
21
- * @type {string}
22
- */
23
- namespace: string;
24
- /**
25
- * Maximum number of CPUs allocated for a job
26
- * @type {number}
27
- */
28
- cpu?: number;
29
- /**
30
- * Maximum number of GPUs allocated for a job
31
- * @type {number}
32
- */
33
- gpu?: number;
34
- /**
35
- * Type of GPU (if any)
36
- * @type {string}
37
- */
38
- gpuType?: string;
39
- /**
40
- * Maximum amount of memory allocated for a job.
41
- * You can express memory as a plain integer or as a fixed-point number using one of these suffixes: E, P, T, G, M, k.
42
- * You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
43
- * For example, the following represent roughly the same value: 128974848, 129e6, 129M, 123Mi
44
- * @type {string}
45
- */
46
- memory?: string;
47
- /**
48
- * Amount of disk space allocated.
49
- * You can express it as a plain integer or as a fixed-point number using one of these suffixes: E, P, T, G, M, k.
50
- * You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
51
- * @type {string}
52
- */
53
- volumeSize?: string;
54
19
  /**
55
20
  * If true, any passed raw text will be allowed to run.
56
21
  * Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input.
@@ -117,8 +82,13 @@ export interface Service {
117
82
  */
118
83
  description?: string;
119
84
  /**
120
- * If service is of typecompute, holds information about the compute-related privacy settings & resources.
85
+ * If service is of type compute, holds information about the compute-related privacy settings & resources.
121
86
  * @type {ServiceComputeOptions}
122
87
  */
123
88
  compute?: ServiceComputeOptions;
89
+ /**
90
+ * Stores service specific additional information, this is customizable by publisher
91
+ * @type {any}
92
+ */
93
+ additionalInformation?: any;
124
94
  }
@@ -35,10 +35,10 @@ export declare class Router {
35
35
  * @return {Promise<TransactionReceipt>} Transaction receipt
36
36
  */
37
37
  buyDTBatch(address: string, operations: Operation[]): Promise<TransactionReceipt>;
38
- /** Check if a token is on ocean tokens list, if true opfFee is ZERO in pools with that token/DT
38
+ /** Check if a token is on approved tokens list, if true opfFee is lower in pools with that token/DT
39
39
  * @return {Promise<boolean>} true if is on the list.
40
40
  */
41
- isOceanTokens(address: string): Promise<boolean>;
41
+ isApprovedToken(address: string): Promise<boolean>;
42
42
  /** Check if an address is a side staking contract.
43
43
  * @return {Promise<boolean>} true if is a SS contract
44
44
  */
@@ -60,35 +60,35 @@ export declare class Router {
60
60
  */
61
61
  isPoolTemplate(address: string): Promise<boolean>;
62
62
  /**
63
- * Estimate gas cost for addOceanToken
63
+ * Estimate gas cost for addApprovedToken
64
64
  * @param {String} address
65
65
  * @param {String} tokenAddress token address we want to add
66
66
  * @param {Contract} routerContract optional contract instance
67
67
  * @return {Promise<any>}
68
68
  */
69
- estGasAddOceanToken(address: string, tokenAddress: string, contractInstance?: Contract): Promise<any>;
69
+ estGasAddApprovedToken(address: string, tokenAddress: string, contractInstance?: Contract): Promise<any>;
70
70
  /**
71
71
  * Add a new token to oceanTokens list, pools with baseToken in this list have NO opf Fee
72
72
  * @param {String} address caller address
73
73
  * @param {String} tokenAddress token address to add
74
74
  * @return {Promise<TransactionReceipt>}
75
75
  */
76
- addOceanToken(address: string, tokenAddress: string): Promise<TransactionReceipt>;
76
+ addApprovedToken(address: string, tokenAddress: string): Promise<TransactionReceipt>;
77
77
  /**
78
- * Estimate gas cost for removeOceanToken
78
+ * Estimate gas cost for removeApprovedToken
79
79
  * @param {String} address caller address
80
80
  * @param {String} tokenAddress token address we want to add
81
81
  * @param {Contract} routerContract optional contract instance
82
82
  * @return {Promise<any>}
83
83
  */
84
- estGasRemoveOceanToken(address: string, tokenAddress: string, contractInstance?: Contract): Promise<any>;
84
+ estGasRemoveApprovedToken(address: string, tokenAddress: string, contractInstance?: Contract): Promise<any>;
85
85
  /**
86
86
  * Remove a token from oceanTokens list, pools without baseToken in this list have a opf Fee
87
87
  * @param {String} address
88
88
  * @param {String} tokenAddress address to remove
89
89
  * @return {Promise<TransactionReceipt>}
90
90
  */
91
- removeOceanToken(address: string, tokenAddress: string): Promise<TransactionReceipt>;
91
+ removeApprovedToken(address: string, tokenAddress: string): Promise<TransactionReceipt>;
92
92
  /**
93
93
  * Estimate gas cost for addSSContract method
94
94
  * @param {String} address
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.24",
4
+ "version": "1.0.0-next.27",
5
5
  "description": "JavaScript client library for Ocean Protocol",
6
6
  "main": "./dist/lib.js",
7
7
  "umd:main": "dist/lib.umd.js",
@@ -54,25 +54,25 @@
54
54
  },
55
55
  "homepage": "https://github.com/oceanprotocol/ocean.js#readme",
56
56
  "peerDependencies": {
57
- "web3": "^1.7.0"
57
+ "web3": "^1.7.1"
58
58
  },
59
59
  "dependencies": {
60
- "@oceanprotocol/contracts": "1.0.0-alpha.21",
60
+ "@oceanprotocol/contracts": "1.0.0-alpha.22",
61
61
  "bignumber.js": "^9.0.2",
62
62
  "cross-fetch": "^3.1.5",
63
63
  "crypto-js": "^4.1.1",
64
64
  "decimal.js": "^10.3.1",
65
- "web3": "^1.7.0",
66
- "web3-core": "^1.7.0",
67
- "web3-eth-contract": "^1.7.0"
65
+ "web3": "^1.7.1",
66
+ "web3-core": "^1.7.1",
67
+ "web3-eth-contract": "^1.7.1"
68
68
  },
69
69
  "devDependencies": {
70
- "@truffle/hdwallet-provider": "^2.0.3",
70
+ "@truffle/hdwallet-provider": "^2.0.4",
71
71
  "@types/chai": "^4.2.19",
72
72
  "@types/chai-spies": "^1.0.3",
73
73
  "@types/crypto-js": "^4.1.1",
74
74
  "@types/mocha": "^9.1.0",
75
- "@types/node": "^17.0.19",
75
+ "@types/node": "^17.0.21",
76
76
  "@types/node-fetch": "^3.0.3",
77
77
  "@typescript-eslint/eslint-plugin": "^4.33.0",
78
78
  "@typescript-eslint/parser": "^4.33.0",
@@ -82,21 +82,21 @@
82
82
  "cross-env": "^7.0.3",
83
83
  "eslint": "^7.17.0",
84
84
  "eslint-config-oceanprotocol": "^1.5.0",
85
- "eslint-config-prettier": "^8.4.0",
85
+ "eslint-config-prettier": "^8.5.0",
86
86
  "eslint-plugin-prettier": "^4.0.0",
87
87
  "fs": "0.0.1-security",
88
88
  "microbundle": "^0.14.2",
89
- "mocha": "^9.2.1",
89
+ "mocha": "^9.2.2",
90
90
  "mock-local-storage": "^1.1.20",
91
91
  "nyc": "^15.1.0",
92
92
  "ora": "5.4.1",
93
93
  "prettier": "^2.3.1",
94
- "release-it": "^14.12.4",
94
+ "release-it": "^14.12.5",
95
95
  "source-map-support": "^0.5.19",
96
- "ts-node": "^10.5.0",
96
+ "ts-node": "^10.7.0",
97
97
  "ts-node-register": "^1.0.0",
98
- "typedoc": "0.22.12",
99
- "typescript": "^4.5.5"
98
+ "typedoc": "0.22.13",
99
+ "typescript": "^4.6.2"
100
100
  },
101
101
  "nyc": {
102
102
  "include": [