@proton/wrap-constants 0.2.185 → 0.2.188
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/dist/index.d.ts +5 -6
- package/dist/index.js +34 -1489
- package/dist/index.mjs +34 -1489
- package/package.json +10 -13
- package/src/coins.ts +1 -1
- package/src/constants.ts +9 -10
- package/src/math.ts +95 -60
- package/src/parsers/auth.ts +32 -18
- package/src/parsers/pool.ts +34 -33
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Asset, ExtendedAsset as ExtendedAsset$1 } from '@bloks/numbers';
|
|
2
2
|
import * as z from 'zod';
|
|
3
|
-
import
|
|
3
|
+
import BN from 'bignumber.js';
|
|
4
4
|
|
|
5
5
|
declare enum Chains {
|
|
6
6
|
BitcoinMainnet = "Bitcoin",
|
|
@@ -4958,7 +4958,7 @@ interface RawPool {
|
|
|
4958
4958
|
active: boolean;
|
|
4959
4959
|
amplifier: number;
|
|
4960
4960
|
}
|
|
4961
|
-
interface Pool extends Omit<RawPool,
|
|
4961
|
+
interface Pool extends Omit<RawPool, "pool1" | "pool2"> {
|
|
4962
4962
|
lt_symbol: string;
|
|
4963
4963
|
creator: string;
|
|
4964
4964
|
memo: string;
|
|
@@ -13182,7 +13182,6 @@ declare const initializeConstants: (chain: string) => {
|
|
|
13182
13182
|
VEST_CONTRACT: string;
|
|
13183
13183
|
DEX_CONTRACT: string;
|
|
13184
13184
|
FEE_FACTOR: number;
|
|
13185
|
-
GOOGLE_MAPS_KEY: string;
|
|
13186
13185
|
SWAP_URL: string;
|
|
13187
13186
|
WRAP_SERVER_URL: string;
|
|
13188
13187
|
WRAP_CONTRACT: string;
|
|
@@ -13260,9 +13259,9 @@ declare const median: (numbers: number[]) => number;
|
|
|
13260
13259
|
*
|
|
13261
13260
|
* result = term - (term * fee)
|
|
13262
13261
|
*/
|
|
13263
|
-
declare const compute_transfer: (pool1:
|
|
13264
|
-
declare const compute_transfer_curve: (reserve_in: number, reserve_out: number, amount_in: number, exchange_fee: number, precision: number, amplifier: number) =>
|
|
13265
|
-
declare const compute_liquidity: (amount_lt:
|
|
13262
|
+
declare const compute_transfer: (pool1: BN.Instance, pool2: BN.Instance, swap: BN.Instance, exchange_fee: number, precision: number) => BN;
|
|
13263
|
+
declare const compute_transfer_curve: (reserve_in: number, reserve_out: number, amount_in: number, exchange_fee: number, precision: number, amplifier: number) => BN;
|
|
13264
|
+
declare const compute_liquidity: (amount_lt: BN.Instance, pool: BN.Instance, lt_supply: BN.Instance, precision: number) => number;
|
|
13266
13265
|
declare const isInputInvalid: (data: string, value: string | number, pool: {
|
|
13267
13266
|
xtokenPrecision: number;
|
|
13268
13267
|
}) => boolean;
|