@curvefi/api 2.68.42 → 2.68.43

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.
@@ -10,27 +10,27 @@ export declare class PoolTemplate extends CorePool {
10
10
  gaugeStatus: () => Promise<any>;
11
11
  estimateGas: {
12
12
  depositApprove: (amounts: (number | string)[]) => Promise<number | number[]>;
13
- deposit: (amounts: (number | string)[]) => Promise<number | number[]>;
13
+ deposit: (amounts: (number | string)[], slippage?: number) => Promise<number | number[]>;
14
14
  depositWrappedApprove: (amounts: (number | string)[]) => Promise<number | number[]>;
15
- depositWrapped: (amounts: (number | string)[]) => Promise<number | number[]>;
15
+ depositWrapped: (amounts: (number | string)[], slippage?: number) => Promise<number | number[]>;
16
16
  stakeApprove: (lpTokenAmount: number | string) => Promise<number | number[]>;
17
17
  stake: (lpTokenAmount: number | string) => Promise<number | number[]>;
18
18
  unstake: (lpTokenAmount: number | string) => Promise<number | number[]>;
19
19
  claimCrv: () => Promise<number | number[]>;
20
20
  claimRewards: () => Promise<number | number[]>;
21
21
  depositAndStakeApprove: (amounts: (number | string)[]) => Promise<number | number[]>;
22
- depositAndStake: (amounts: (number | string)[]) => Promise<number>;
22
+ depositAndStake: (amounts: (number | string)[], slippage?: number) => Promise<number>;
23
23
  depositAndStakeWrappedApprove: (amounts: (number | string)[]) => Promise<number | number[]>;
24
- depositAndStakeWrapped: (amounts: (number | string)[]) => Promise<number | number[]>;
24
+ depositAndStakeWrapped: (amounts: (number | string)[], slippage?: number) => Promise<number | number[]>;
25
25
  withdrawApprove: (lpTokenAmount: number | string) => Promise<number | number[]>;
26
- withdraw: (lpTokenAmount: number | string) => Promise<number | number[]>;
27
- withdrawWrapped: (lpTokenAmount: number | string) => Promise<number | number[]>;
26
+ withdraw: (lpTokenAmount: number | string, slippage?: number) => Promise<number | number[]>;
27
+ withdrawWrapped: (lpTokenAmount: number | string, slippage?: number) => Promise<number | number[]>;
28
28
  withdrawImbalanceApprove: (amounts: (number | string)[]) => Promise<number | number[]>;
29
- withdrawImbalance: (amounts: (number | string)[]) => Promise<number | number[]>;
30
- withdrawImbalanceWrapped: (amounts: (number | string)[]) => Promise<number | number[]>;
29
+ withdrawImbalance: (amounts: (number | string)[], slippage?: number) => Promise<number | number[]>;
30
+ withdrawImbalanceWrapped: (amounts: (number | string)[], slippage?: number) => Promise<number | number[]>;
31
31
  withdrawOneCoinApprove: (lpTokenAmount: number | string) => Promise<number | number[]>;
32
- withdrawOneCoin: (lpTokenAmount: number | string, coin: string | number) => Promise<number | number[]>;
33
- withdrawOneCoinWrapped: (lpTokenAmount: number | string, coin: string | number) => Promise<number | number[]>;
32
+ withdrawOneCoin: (lpTokenAmount: number | string, coin: string | number, slippage?: number) => Promise<number | number[]>;
33
+ withdrawOneCoinWrapped: (lpTokenAmount: number | string, coin: string | number, slippage?: number) => Promise<number | number[]>;
34
34
  swapApprove: (inputCoin: string | number, amount: number | string) => Promise<number | number[]>;
35
35
  swap: (inputCoin: string | number, outputCoin: string | number, amount: number | string, slippage: number) => Promise<number | number[]>;
36
36
  swapWrappedApprove: (inputCoin: string | number, amount: number | string) => Promise<number | number[]>;
@@ -2,25 +2,25 @@ import { PoolTemplate } from "../PoolTemplate.js";
2
2
  import { IMethodInfo } from "../../interfaces.js";
3
3
  export declare const swapTricrypto2Mixin: {
4
4
  _swap(this: PoolTemplate, i: number, j: number, _amount: bigint, slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
5
- swapEstimateGas(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<number>;
5
+ swapEstimateGas(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string, slippage?: number): Promise<number>;
6
6
  swap(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string, slippage?: number): Promise<string>;
7
7
  getSwapInfo(this: PoolTemplate): Promise<IMethodInfo>;
8
8
  };
9
9
  export declare const swapMetaFactoryMixin: {
10
10
  _swap(this: PoolTemplate, i: number, j: number, _amount: bigint, slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
11
- swapEstimateGas(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<number>;
11
+ swapEstimateGas(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string, slippage?: number): Promise<number>;
12
12
  swap(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string, slippage?: number): Promise<string>;
13
13
  getSwapInfo(this: PoolTemplate): Promise<IMethodInfo>;
14
14
  };
15
15
  export declare const swapCryptoMetaFactoryMixin: {
16
16
  _swap(this: PoolTemplate, i: number, j: number, _amount: bigint, slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
17
- swapEstimateGas(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<number>;
17
+ swapEstimateGas(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string, slippage?: number): Promise<number>;
18
18
  swap(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string, slippage?: number): Promise<string>;
19
19
  getSwapInfo(this: PoolTemplate): Promise<IMethodInfo>;
20
20
  };
21
21
  export declare const swapMixin: {
22
22
  _swap(this: PoolTemplate, i: number, j: number, _amount: bigint, slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
23
- swapEstimateGas(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<number>;
23
+ swapEstimateGas(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string, slippage?: number): Promise<number>;
24
24
  swap(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string, slippage?: number): Promise<string>;
25
25
  getSwapInfo(this: PoolTemplate): Promise<IMethodInfo>;
26
26
  };
@@ -54,10 +54,10 @@ export const swapTricrypto2Mixin = {
54
54
  return (yield contract[exchangeMethod](i, j, _amount, _minRecvAmount, true, Object.assign(Object.assign({}, this.curve.options), { value, gasLimit }))).hash;
55
55
  });
56
56
  },
57
- swapEstimateGas(inputCoin, outputCoin, amount) {
58
- return __awaiter(this, void 0, void 0, function* () {
57
+ swapEstimateGas(inputCoin_1, outputCoin_1, amount_1) {
58
+ return __awaiter(this, arguments, void 0, function* (inputCoin, outputCoin, amount, slippage = 0.1) {
59
59
  const [i, j, _amount] = yield _swapCheck.call(this, inputCoin, outputCoin, amount, true);
60
- return yield swapTricrypto2Mixin._swap.call(this, i, j, _amount, 0.1, true);
60
+ return yield swapTricrypto2Mixin._swap.call(this, i, j, _amount, slippage, true);
61
61
  });
62
62
  },
63
63
  swap(inputCoin, outputCoin, amount, slippage) {
@@ -92,10 +92,10 @@ export const swapMetaFactoryMixin = {
92
92
  return (yield contract[exchangeMethod](this.address, i, j, _amount, _minRecvAmount, Object.assign(Object.assign({}, this.curve.options), { value, gasLimit }))).hash;
93
93
  });
94
94
  },
95
- swapEstimateGas(inputCoin, outputCoin, amount) {
96
- return __awaiter(this, void 0, void 0, function* () {
95
+ swapEstimateGas(inputCoin_1, outputCoin_1, amount_1) {
96
+ return __awaiter(this, arguments, void 0, function* (inputCoin, outputCoin, amount, slippage = 0.1) {
97
97
  const [i, j, _amount] = yield _swapCheck.call(this, inputCoin, outputCoin, amount, true);
98
- return yield swapMetaFactoryMixin._swap.call(this, i, j, _amount, 0.1, true);
98
+ return yield swapMetaFactoryMixin._swap.call(this, i, j, _amount, slippage, true);
99
99
  });
100
100
  },
101
101
  swap(inputCoin, outputCoin, amount, slippage) {
@@ -130,10 +130,10 @@ export const swapCryptoMetaFactoryMixin = {
130
130
  return (yield contract[exchangeMethod](this.address, i, j, _amount, _minRecvAmount, true, Object.assign(Object.assign({}, this.curve.options), { value, gasLimit }))).hash;
131
131
  });
132
132
  },
133
- swapEstimateGas(inputCoin, outputCoin, amount) {
134
- return __awaiter(this, void 0, void 0, function* () {
133
+ swapEstimateGas(inputCoin_1, outputCoin_1, amount_1) {
134
+ return __awaiter(this, arguments, void 0, function* (inputCoin, outputCoin, amount, slippage = 0.1) {
135
135
  const [i, j, _amount] = yield _swapCheck.call(this, inputCoin, outputCoin, amount, true);
136
- return yield swapCryptoMetaFactoryMixin._swap.call(this, i, j, _amount, 0.1, true);
136
+ return yield swapCryptoMetaFactoryMixin._swap.call(this, i, j, _amount, slippage, true);
137
137
  });
138
138
  },
139
139
  swap(inputCoin, outputCoin, amount, slippage) {
@@ -169,10 +169,10 @@ export const swapMixin = {
169
169
  return (yield contract[exchangeMethod](i, j, _amount, _minRecvAmount, Object.assign(Object.assign({}, this.curve.options), { value, gasLimit }))).hash;
170
170
  });
171
171
  },
172
- swapEstimateGas(inputCoin, outputCoin, amount) {
173
- return __awaiter(this, void 0, void 0, function* () {
172
+ swapEstimateGas(inputCoin_1, outputCoin_1, amount_1) {
173
+ return __awaiter(this, arguments, void 0, function* (inputCoin, outputCoin, amount, slippage = 0.1) {
174
174
  const [i, j, _amount] = yield _swapCheck.call(this, inputCoin, outputCoin, amount, true);
175
- return yield swapMixin._swap.call(this, i, j, _amount, 0.1, true);
175
+ return yield swapMixin._swap.call(this, i, j, _amount, slippage, true);
176
176
  });
177
177
  },
178
178
  swap(inputCoin, outputCoin, amount, slippage) {
@@ -2,13 +2,13 @@ import { PoolTemplate } from "../PoolTemplate.js";
2
2
  import { IMethodInfo } from "../../interfaces.js";
3
3
  export declare const swapWrappedTricrypto2Mixin: {
4
4
  _swapWrapped(this: PoolTemplate, i: number, j: number, _amount: bigint, slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
5
- swapWrappedEstimateGas(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<number>;
5
+ swapWrappedEstimateGas(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string, slippage?: number): Promise<number>;
6
6
  swapWrapped(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string, slippage?: number): Promise<string>;
7
7
  getSwapWrappedInfo(this: PoolTemplate): Promise<IMethodInfo>;
8
8
  };
9
9
  export declare const swapWrappedMixin: {
10
10
  _swapWrapped(this: PoolTemplate, i: number, j: number, _amount: bigint, slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
11
- swapWrappedEstimateGas(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<number>;
11
+ swapWrappedEstimateGas(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string, slippage?: number): Promise<number>;
12
12
  swapWrapped(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string, slippage?: number): Promise<string>;
13
13
  getSwapWrappedInfo(this: PoolTemplate): Promise<IMethodInfo>;
14
14
  };
@@ -51,10 +51,10 @@ export const swapWrappedTricrypto2Mixin = {
51
51
  return (yield contract.exchange(i, j, _amount, _minRecvAmount, false, Object.assign(Object.assign({}, this.curve.options), { value, gasLimit }))).hash;
52
52
  });
53
53
  },
54
- swapWrappedEstimateGas(inputCoin, outputCoin, amount) {
55
- return __awaiter(this, void 0, void 0, function* () {
54
+ swapWrappedEstimateGas(inputCoin_1, outputCoin_1, amount_1) {
55
+ return __awaiter(this, arguments, void 0, function* (inputCoin, outputCoin, amount, slippage = 0.1) {
56
56
  const [i, j, _amount] = yield _swapWrappedCheck.call(this, inputCoin, outputCoin, amount, true);
57
- return yield swapWrappedTricrypto2Mixin._swapWrapped.call(this, i, j, _amount, 0.1, true);
57
+ return yield swapWrappedTricrypto2Mixin._swapWrapped.call(this, i, j, _amount, slippage, true);
58
58
  });
59
59
  },
60
60
  swapWrapped(inputCoin, outputCoin, amount, slippage) {
@@ -87,10 +87,10 @@ export const swapWrappedMixin = {
87
87
  return (yield contract.exchange(i, j, _amount, _minRecvAmount, Object.assign(Object.assign({}, this.curve.options), { value, gasLimit }))).hash;
88
88
  });
89
89
  },
90
- swapWrappedEstimateGas(inputCoin, outputCoin, amount) {
91
- return __awaiter(this, void 0, void 0, function* () {
90
+ swapWrappedEstimateGas(inputCoin_1, outputCoin_1, amount_1) {
91
+ return __awaiter(this, arguments, void 0, function* (inputCoin, outputCoin, amount, slippage = 0.1) {
92
92
  const [i, j, _amount] = yield _swapWrappedCheck.call(this, inputCoin, outputCoin, amount, true);
93
- return yield swapWrappedMixin._swapWrapped.call(this, i, j, _amount, 0.1, true);
93
+ return yield swapWrappedMixin._swapWrapped.call(this, i, j, _amount, slippage, true);
94
94
  });
95
95
  },
96
96
  swapWrapped(inputCoin, outputCoin, amount, slippage) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.68.42",
3
+ "version": "2.68.43",
4
4
  "description": "JavaScript library for curve.finance",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",