@oceanprotocol/lib 1.0.0-next.25 → 1.0.0-next.28

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,7 +82,7 @@ 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;
@@ -8,5 +8,5 @@ export interface MetadataAndTokenURI {
8
8
  metaDataHash: string;
9
9
  tokenId: number;
10
10
  tokenURI: string;
11
- metadataProofs: MetadataProof[];
11
+ metadataProofs?: MetadataProof[];
12
12
  }
@@ -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
@@ -119,7 +119,7 @@ export declare class FixedRateExchange {
119
119
  * Estimate gas cost for setRate
120
120
  * @param {String} account
121
121
  * @param {String} exchangeId ExchangeId
122
- * @param {Number} newRate New rate
122
+ * @param {String} newRate New rate
123
123
  * @param {Contract} contractInstance optional contract instance
124
124
  * @return {Promise<number>}
125
125
  */
@@ -127,7 +127,7 @@ export declare class FixedRateExchange {
127
127
  /**
128
128
  * Set new rate
129
129
  * @param {String} exchangeId ExchangeId
130
- * @param {Number} newRate New rate
130
+ * @param {String} newRate New rate
131
131
  * @param {String} address User account
132
132
  * @return {Promise<TransactionReceipt>} transaction receipt
133
133
  */
@@ -7,6 +7,6 @@ export declare function getFairGasPrice(web3: Web3, config: Config): Promise<str
7
7
  export declare function getErcCreationParams(ercParams: Erc20CreateParams): any;
8
8
  export declare function getFreOrderParams(freParams: FreOrderParams): any;
9
9
  export declare function getFreCreationParams(freParams: FreCreationParams): any;
10
- export declare function getPoolCreationParams(poolParams: PoolCreationParams): any;
10
+ export declare function getPoolCreationParams(web3: Web3, poolParams: PoolCreationParams): Promise<any>;
11
11
  export declare function unitsToAmount(web3: Web3, token: string, amount: string): Promise<string>;
12
12
  export declare function amountToUnits(web3: Web3, token: string, amount: 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.25",
4
+ "version": "1.0.0-next.28",
5
5
  "description": "JavaScript client library for Ocean Protocol",
6
6
  "main": "./dist/lib.js",
7
7
  "umd:main": "dist/lib.umd.js",
@@ -57,7 +57,7 @@
57
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",
@@ -67,7 +67,7 @@
67
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",
@@ -86,7 +86,7 @@
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",