@proton/wrap-constants 0.1.1 → 0.2.2

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.
Files changed (49) hide show
  1. package/dist/coins.d.ts +42 -9
  2. package/dist/constants.d.ts +10 -0
  3. package/dist/graph.d.ts +30 -0
  4. package/dist/index.d.ts +2 -0
  5. package/dist/math.d.ts +17 -0
  6. package/dist/parsers/actions.d.ts +1323 -0
  7. package/dist/parsers/address.d.ts +932 -0
  8. package/dist/parsers/auth.d.ts +1816 -0
  9. package/dist/parsers/base.d.ts +35 -0
  10. package/dist/parsers/currency.d.ts +236 -0
  11. package/dist/parsers/deposit.d.ts +63 -0
  12. package/dist/parsers/dex.d.ts +291 -0
  13. package/dist/parsers/index.d.ts +12 -0
  14. package/dist/parsers/otc.d.ts +46 -0
  15. package/dist/parsers/pool.d.ts +51 -0
  16. package/dist/parsers/withdraw.d.ts +1053 -0
  17. package/dist/parsers/withdrawalHistory.d.ts +98 -0
  18. package/dist/parsers/wrap.d.ts +109 -0
  19. package/dist/utils.d.ts +1 -0
  20. package/dist/wrap-constants.cjs.development.js +1236 -289
  21. package/dist/wrap-constants.cjs.development.js.map +1 -1
  22. package/dist/wrap-constants.cjs.production.min.js +1 -1
  23. package/dist/wrap-constants.cjs.production.min.js.map +1 -1
  24. package/dist/wrap-constants.esm.js +1216 -293
  25. package/dist/wrap-constants.esm.js.map +1 -1
  26. package/package.json +14 -8
  27. package/src/coins.ts +578 -150
  28. package/src/constants.ts +41 -14
  29. package/src/graph.ts +126 -0
  30. package/src/index.ts +3 -1
  31. package/src/math.ts +112 -0
  32. package/src/parsers/actions.ts +82 -0
  33. package/src/parsers/address.ts +27 -0
  34. package/src/parsers/auth.ts +22 -0
  35. package/src/parsers/base.ts +18 -0
  36. package/src/parsers/currency.ts +89 -0
  37. package/src/parsers/deposit.ts +30 -0
  38. package/src/parsers/dex.ts +156 -0
  39. package/src/parsers/index.ts +12 -0
  40. package/src/parsers/otc.ts +23 -0
  41. package/src/parsers/pool.ts +51 -0
  42. package/src/parsers/withdraw.ts +39 -0
  43. package/src/parsers/withdrawalHistory.ts +23 -0
  44. package/src/parsers/wrap.ts +41 -0
  45. package/src/utils.ts +12 -1
  46. package/dist/parsers.d.ts +0 -849
  47. package/dist/pools.d.ts +0 -31
  48. package/src/parsers.ts +0 -258
  49. package/src/pools.ts +0 -26
@@ -0,0 +1,51 @@
1
+ import { Coin } from "../coins";
2
+ import { ExtendedAsset } from '@bloks/numbers';
3
+ import { INode } from "../graph";
4
+ export interface RawPool {
5
+ lt_symbol: string;
6
+ creator: string;
7
+ memo: string;
8
+ pool1: {
9
+ quantity: string;
10
+ contract: string;
11
+ };
12
+ pool2: {
13
+ quantity: string;
14
+ contract: string;
15
+ };
16
+ hash: string;
17
+ fee: {
18
+ exchange_fee: number;
19
+ add_liquidity_fee: number;
20
+ remove_liquidity_fee: number;
21
+ };
22
+ active: boolean;
23
+ amplifier: number;
24
+ }
25
+ export interface Pool extends Omit<RawPool, 'pool1' | 'pool2'> {
26
+ lt_symbol: string;
27
+ creator: string;
28
+ memo: string;
29
+ pool1: ExtendedTokenWithRate;
30
+ pool2: ExtendedTokenWithRate;
31
+ hash: string;
32
+ fee: {
33
+ exchange_fee: number;
34
+ add_liquidity_fee: number;
35
+ remove_liquidity_fee: number;
36
+ };
37
+ liquidityUsd: number;
38
+ liquidityApr: number;
39
+ }
40
+ export declare type ExtendedToken = Coin & ExtendedAsset & {
41
+ key: string;
42
+ };
43
+ export declare type ExtendedTokenWithRate = ExtendedToken & {
44
+ rate: number;
45
+ };
46
+ export declare type PoolTable = {
47
+ pool1: ExtendedTokenWithRate;
48
+ pool2: ExtendedTokenWithRate;
49
+ path: INode<Pool>[];
50
+ getPathString: () => string;
51
+ } | undefined;