@curvefi/api 2.68.29 → 2.68.30
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.
|
@@ -170,6 +170,7 @@ export declare class PoolTemplate extends CorePool {
|
|
|
170
170
|
}>;
|
|
171
171
|
_swapExpected(i: number, j: number, _amount: bigint): Promise<bigint>;
|
|
172
172
|
swapExpected(inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<string>;
|
|
173
|
+
swapExpectedBigInt(inputCoin: string | number, outputCoin: string | number, amount: bigint): Promise<bigint>;
|
|
173
174
|
_swapRequired(i: number, j: number, _amount: bigint, isUnderlying: boolean): Promise<any>;
|
|
174
175
|
swapRequired(inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<string>;
|
|
175
176
|
swapWrappedRequired(inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<string>;
|
|
@@ -1681,6 +1681,14 @@ export class PoolTemplate extends CorePool {
|
|
|
1681
1681
|
return this.curve.formatUnits(_expected, this.underlyingDecimals[j]);
|
|
1682
1682
|
});
|
|
1683
1683
|
}
|
|
1684
|
+
swapExpectedBigInt(inputCoin, outputCoin, amount) {
|
|
1685
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1686
|
+
const i = this._getCoinIdx(inputCoin);
|
|
1687
|
+
const j = this._getCoinIdx(outputCoin);
|
|
1688
|
+
const _expected = yield this._swapExpected(i, j, amount);
|
|
1689
|
+
return _expected;
|
|
1690
|
+
});
|
|
1691
|
+
}
|
|
1684
1692
|
_swapRequired(i, j, _amount, isUnderlying) {
|
|
1685
1693
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1686
1694
|
if (this.isCrypto) {
|
|
@@ -14,6 +14,7 @@ export declare const swapWrappedMixin: {
|
|
|
14
14
|
};
|
|
15
15
|
export declare const swapWrappedExpectedAndApproveMixin: {
|
|
16
16
|
swapWrappedExpected(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<string>;
|
|
17
|
+
swapWrappedExpectedBigInt(this: PoolTemplate, inputCoin: string | number, outputCoin: string | number, amount: bigint): Promise<bigint>;
|
|
17
18
|
swapWrappedIsApproved(this: PoolTemplate, inputCoin: string | number, amount: number | string): Promise<boolean>;
|
|
18
19
|
swapWrappedApproveEstimateGas(this: PoolTemplate, inputCoin: string | number, amount: number | string): Promise<number | number[]>;
|
|
19
20
|
swapWrappedApprove(this: PoolTemplate, inputCoin: string | number, amount: number | string): Promise<string[]>;
|
|
@@ -123,6 +123,14 @@ export const swapWrappedExpectedAndApproveMixin = {
|
|
|
123
123
|
return this.curve.formatUnits(_expected, this.wrappedDecimals[j]);
|
|
124
124
|
});
|
|
125
125
|
},
|
|
126
|
+
swapWrappedExpectedBigInt(inputCoin, outputCoin, amount) {
|
|
127
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
+
const i = this._getCoinIdx(inputCoin, false);
|
|
129
|
+
const j = this._getCoinIdx(outputCoin, false);
|
|
130
|
+
const _expected = yield this._swapWrappedExpected.call(this, i, j, amount);
|
|
131
|
+
return _expected;
|
|
132
|
+
});
|
|
133
|
+
},
|
|
126
134
|
swapWrappedIsApproved(inputCoin, amount) {
|
|
127
135
|
return __awaiter(this, void 0, void 0, function* () {
|
|
128
136
|
const i = this._getCoinIdx.call(this, inputCoin, false);
|