@oceanprotocol/lib 1.0.0-next.29 → 1.0.0-next.31

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,7 +1,7 @@
1
1
  export interface Erc20CreateParams {
2
2
  templateIndex: number;
3
3
  minter: string;
4
- feeManager: string;
4
+ paymentCollector: string;
5
5
  mpFeeAddress: string;
6
6
  feeToken: string;
7
7
  feeAmount: string;
@@ -82,7 +82,7 @@ export declare class FixedRateExchange {
82
82
  * @param {String} maxBaseTokenAmount max amount of baseToken we want to pay for datatokenAmount
83
83
  * @param {String} address User address
84
84
  * @param {String} consumeMarketAddress consumeMarketAddress
85
- * @param {String} consumeMarketFee consumeMarketFee
85
+ * @param {String} consumeMarketFee consumeMarketFee in fraction
86
86
  * @return {Promise<TransactionReceipt>} transaction receipt
87
87
  */
88
88
  buyDT(address: string, exchangeId: string, datatokenAmount: string, maxBaseTokenAmount: string, consumeMarketAddress?: string, consumeMarketFee?: string): Promise<TransactionReceipt>;
@@ -104,7 +104,7 @@ export declare class FixedRateExchange {
104
104
  * @param {String} minBaseTokenAmount min amount of baseToken we want to receive back
105
105
  * @param {String} address User address
106
106
  * @param {String} consumeMarketAddress consumeMarketAddress
107
- * @param {String} consumeMarketFee consumeMarketFee
107
+ * @param {String} consumeMarketFee consumeMarketFee in fraction
108
108
  * @return {Promise<TransactionReceipt>} transaction receipt
109
109
  */
110
110
  sellDT(address: string, exchangeId: string, datatokenAmount: string, minBaseTokenAmount: string, consumeMarketAddress?: string, consumeMarketFee?: string): Promise<TransactionReceipt>;
@@ -207,7 +207,7 @@ export declare class FixedRateExchange {
207
207
  * calcBaseInGivenOutDT - Calculates how many base tokens are needed to get specified amount of datatokens
208
208
  * @param {String} exchangeId ExchangeId
209
209
  * @param {string} datatokenAmount Amount of datatokens user wants to buy
210
- * @param {String} consumeMarketFee consumeMarketFee
210
+ * @param {String} consumeMarketFee consumeMarketFee in fraction
211
211
  * @return {Promise<PriceAndFees>} how many base tokens are needed and fees
212
212
  */
213
213
  calcBaseInGivenOutDT(exchangeId: string, datatokenAmount: string, consumeMarketFee?: string): Promise<PriceAndFees>;
@@ -215,7 +215,7 @@ export declare class FixedRateExchange {
215
215
  * getBTOut - returns amount in baseToken that user will receive for datatokenAmount sold
216
216
  * @param {String} exchangeId ExchangeId
217
217
  * @param {Number} datatokenAmount Amount of datatokens
218
- * @param {String} consumeMarketFee consumeMarketFee
218
+ * @param {String} consumeMarketFee consumeMarketFee in fraction
219
219
  * @return {Promise<string>} Amount of baseTokens user will receive
220
220
  */
221
221
  getAmountBTOut(exchangeId: string, datatokenAmount: string, consumeMarketFee?: string): Promise<string>;
@@ -106,16 +106,15 @@ export declare class Provider {
106
106
  * @return {Promise<ComputeJob | ComputeJob[]>}
107
107
  */
108
108
  computeStop(did: string, consumerAddress: string, jobId: string, providerUri: string, web3: Web3, signal?: AbortSignal): Promise<ComputeJob | ComputeJob[]>;
109
- /** Get status for a specific jobId/documentId/owner.
110
- * @param {string} did
111
- * @param {string} consumerAddress
112
- * @param {string} providerUri
113
- * @param {Web3} web3
109
+ /** Get compute status for a specific jobId/documentId/owner.
110
+ * @param {string} providerUri The URI of the provider we want to query
111
+ * @param {string} consumerAddress The consumer ethereum address
112
+ * @param {string} jobId The ID of a compute job.
113
+ * @param {string} did The ID of the asset
114
114
  * @param {AbortSignal} signal abort signal
115
- * @param {string} jobId
116
115
  * @return {Promise<ComputeJob | ComputeJob[]>}
117
116
  */
118
- computeStatus(providerUri: string, signal?: AbortSignal, jobId?: string, did?: string, consumerAddress?: string): Promise<ComputeJob | ComputeJob[]>;
117
+ computeStatus(providerUri: string, consumerAddress: string, jobId?: string, did?: string, signal?: AbortSignal): Promise<ComputeJob | ComputeJob[]>;
119
118
  /** Get status for a specific jobId/documentId/owner.
120
119
  * @param {string} jobId
121
120
  * @param {number} index
@@ -28,7 +28,7 @@ export declare class Nft {
28
28
  * @param {String} nftAddress ERC721 addreess
29
29
  * @param {String} address User address
30
30
  * @param {String} minter User set as initial minter for the ERC20
31
- * @param {String} feeManager initial feeManager for this DT
31
+ * @param {String} paymentCollector initial paymentCollector for this DT
32
32
  * @param {String} mpFeeAddress Consume marketplace fee address
33
33
  * @param {String} feeToken address of the token marketplace wants to add fee on top
34
34
  * @param {String} feeAmount amount of feeToken to be transferred to mpFeeAddress on top, will be converted to WEI
@@ -39,13 +39,13 @@ export declare class Nft {
39
39
  * @param {Contract} nftContract optional contract instance
40
40
  * @return {Promise<any>}
41
41
  */
42
- estGasCreateErc20(nftAddress: string, address: string, minter: string, feeManager: string, mpFeeAddress: string, feeToken: string, feeAmount: string, cap: string, name?: string, symbol?: string, templateIndex?: number, contractInstance?: Contract): Promise<any>;
42
+ estGasCreateErc20(nftAddress: string, address: string, minter: string, paymentCollector: string, mpFeeAddress: string, feeToken: string, feeAmount: string, cap: string, name?: string, symbol?: string, templateIndex?: number, contractInstance?: Contract): Promise<any>;
43
43
  /**
44
44
  * Create new ERC20 datatoken - only user with ERC20Deployer permission can succeed
45
45
  * @param {String} nftAddress ERC721 addreess
46
46
  * @param {String} address User address
47
47
  * @param {String} minter User set as initial minter for the ERC20
48
- * @param {String} feeManager initial feeManager for this DT
48
+ * @param {String} paymentCollector initial paymentCollector for this DT
49
49
  * @param {String} mpFeeAddress Consume marketplace fee address
50
50
  * @param {String} feeToken address of the token marketplace wants to add fee on top
51
51
  * @param {String} feeAmount amount of feeToken to be transferred to mpFeeAddress on top, will be converted to WEI
@@ -55,7 +55,7 @@ export declare class Nft {
55
55
  * @param {Number} templateIndex NFT template index
56
56
  * @return {Promise<string>} ERC20 datatoken address
57
57
  */
58
- createErc20(nftAddress: string, address: string, minter: string, feeManager: string, mpFeeAddress: string, feeToken: string, feeAmount: string, cap: string, name?: string, symbol?: string, templateIndex?: number): Promise<string>;
58
+ createErc20(nftAddress: string, address: string, minter: string, paymentCollector: string, mpFeeAddress: string, feeToken: string, feeAmount: string, cap: string, name?: string, symbol?: string, templateIndex?: number): Promise<string>;
59
59
  /**
60
60
  * Estimate gas cost for add manager call
61
61
  * @param {String} nftAddress erc721 contract adress
@@ -0,0 +1,4 @@
1
+ import Web3 from 'web3';
2
+ export declare const web3: Web3;
3
+ export declare const getTestConfig: (web3: Web3) => Promise<import("../src").Config>;
4
+ export declare const getAddresses: () => any;
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.29",
4
+ "version": "1.0.0-next.31",
5
5
  "description": "JavaScript client library for Ocean Protocol",
6
6
  "main": "./dist/lib.js",
7
7
  "umd:main": "dist/lib.umd.js",
@@ -72,7 +72,7 @@
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.21",
75
+ "@types/node": "^17.0.23",
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",
@@ -90,13 +90,13 @@
90
90
  "mock-local-storage": "^1.1.20",
91
91
  "nyc": "^15.1.0",
92
92
  "ora": "5.4.1",
93
- "prettier": "^2.3.1",
94
- "release-it": "^14.12.5",
93
+ "prettier": "^2.6.1",
94
+ "release-it": "^14.13.1",
95
95
  "source-map-support": "^0.5.19",
96
96
  "ts-node": "^10.7.0",
97
97
  "ts-node-register": "^1.0.0",
98
98
  "typedoc": "0.22.13",
99
- "typescript": "^4.6.2"
99
+ "typescript": "^4.6.3"
100
100
  },
101
101
  "nyc": {
102
102
  "include": [
@@ -1,3 +0,0 @@
1
- import { Config } from '../../src/models/Config';
2
- declare const _default: Config;
3
- export default _default;
@@ -1,3 +0,0 @@
1
- import { Config } from '../../src/models/Config';
2
- declare const _default: Config;
3
- export default _default;