@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.
- package/CHANGELOG.md +27 -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/Erc20.d.ts +1 -1
- package/dist/src/pools/fixedRate/FixedRateExchange.d.ts +4 -4
- package/dist/src/provider/Provider.d.ts +6 -7
- package/dist/src/tokens/NFT.d.ts +4 -4
- package/dist/test/config.d.ts +4 -0
- package/package.json +5 -5
- package/dist/test/integration/config.d.ts +0 -3
- package/dist/test/unit/config.d.ts +0 -3
|
@@ -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}
|
|
111
|
-
* @param {string} consumerAddress
|
|
112
|
-
* @param {string}
|
|
113
|
-
* @param {
|
|
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,
|
|
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
|
package/dist/src/tokens/NFT.d.ts
CHANGED
|
@@ -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}
|
|
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,
|
|
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}
|
|
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,
|
|
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
|
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.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.
|
|
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.
|
|
94
|
-
"release-it": "^14.
|
|
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.
|
|
99
|
+
"typescript": "^4.6.3"
|
|
100
100
|
},
|
|
101
101
|
"nyc": {
|
|
102
102
|
"include": [
|