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

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.
@@ -330,7 +330,6 @@ export declare class Pool {
330
330
  * Pay tokenAmountIn of baseToken to join the pool, getting poolAmountOut of the pool shares.
331
331
  * @param {String} account
332
332
  * @param {String} poolAddress
333
- * @param {String} tokenIn
334
333
  * @param {String} tokenAmountIn exact number of base tokens to spend
335
334
  * @param {String} minPoolAmountOut minimum of pool shares expectex
336
335
  * @return {TransactionReceipt}
@@ -352,7 +351,6 @@ export declare class Pool {
352
351
  * Pay poolAmountIn pool shares into the pool, getting minTokenAmountOut of the baseToken
353
352
  * @param {String} account
354
353
  * @param {String} poolAddress
355
- * @param {String} tokenOut
356
354
  * @param {String} poolAmountIn exact number of pool shares to spend
357
355
  * @param {String} minTokenAmountOut minimum amount of basetokens expected
358
356
  * @return {TransactionReceipt}
@@ -0,0 +1,8 @@
1
+ import Decimal from 'decimal.js';
2
+ import { Pool } from '..';
3
+ export declare function calcMaxExactOut(balance: string): Decimal;
4
+ export declare function calcMaxExactIn(balance: string): Decimal;
5
+ export declare function getMaxSwapExactOut(poolInstance: Pool, poolAddress: string, tokenAddress: string): Promise<Decimal>;
6
+ export declare function getMaxSwapExactIn(poolInstance: Pool, poolAddress: string, tokenAddress: string): Promise<Decimal>;
7
+ export declare function getMaxAddLiquidity(poolInstance: Pool, poolAddress: string, tokenAddress: string): Promise<Decimal>;
8
+ export declare function getMaxRemoveLiquidity(poolInstance: Pool, poolAddress: string, tokenAddress: string): Promise<Decimal>;
@@ -8,3 +8,4 @@ export * from './Constants';
8
8
  export * from './SignatureUtils';
9
9
  export * from './TokenUtils';
10
10
  export * from './General';
11
+ export * from './PoolHelpers';
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.21",
4
+ "version": "1.0.0-next.24",
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.18",
75
+ "@types/node": "^17.0.19",
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,11 +82,11 @@
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.3.0",
85
+ "eslint-config-prettier": "^8.4.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.0",
89
+ "mocha": "^9.2.1",
90
90
  "mock-local-storage": "^1.1.20",
91
91
  "nyc": "^15.1.0",
92
92
  "ora": "5.4.1",
@@ -95,7 +95,7 @@
95
95
  "source-map-support": "^0.5.19",
96
96
  "ts-node": "^10.5.0",
97
97
  "ts-node-register": "^1.0.0",
98
- "typedoc": "0.22.11",
98
+ "typedoc": "0.22.12",
99
99
  "typescript": "^4.5.5"
100
100
  },
101
101
  "nyc": {