@luxfi/exchange 1.0.0 → 1.0.3

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 (63) hide show
  1. package/dist/chains/lux.d.ts +6 -116
  2. package/dist/chains/lux.d.ts.map +1 -1
  3. package/dist/contracts/abis/amm-v2-factory.d.ts +2 -2
  4. package/dist/contracts/abis/amm-v2-factory.d.ts.map +1 -1
  5. package/dist/contracts/abis/amm-v2-factory.js +2 -2
  6. package/dist/contracts/abis/amm-v2-pair.d.ts +2 -2
  7. package/dist/contracts/abis/amm-v2-pair.d.ts.map +1 -1
  8. package/dist/contracts/abis/amm-v2-pair.js +2 -2
  9. package/dist/contracts/abis/amm-v2-router.d.ts +2 -2
  10. package/dist/contracts/abis/amm-v2-router.d.ts.map +1 -1
  11. package/dist/contracts/abis/amm-v2-router.js +2 -2
  12. package/dist/contracts/abis/amm-v3-factory.d.ts +2 -2
  13. package/dist/contracts/abis/amm-v3-factory.d.ts.map +1 -1
  14. package/dist/contracts/abis/amm-v3-factory.js +2 -2
  15. package/dist/contracts/abis/amm-v3-pool.d.ts +2 -2
  16. package/dist/contracts/abis/amm-v3-pool.d.ts.map +1 -1
  17. package/dist/contracts/abis/amm-v3-pool.js +2 -2
  18. package/dist/contracts/abis/index.d.ts +7 -7
  19. package/dist/contracts/abis/index.d.ts.map +1 -1
  20. package/dist/contracts/abis/index.js +7 -7
  21. package/dist/contracts/abis/pool-manager.d.ts +1 -1
  22. package/dist/contracts/abis/pool-manager.js +1 -1
  23. package/dist/contracts/addresses.d.ts +31 -13
  24. package/dist/contracts/addresses.d.ts.map +1 -1
  25. package/dist/contracts/addresses.js +25 -34
  26. package/dist/hooks/use-pools.d.ts.map +1 -1
  27. package/dist/hooks/use-pools.js +8 -6
  28. package/dist/hooks/use-swap.js +1 -1
  29. package/dist/hooks/use-token-allowance.d.ts +1 -1
  30. package/dist/tokens/index.d.ts +6 -3
  31. package/dist/tokens/index.d.ts.map +1 -1
  32. package/dist/tokens/index.js +57 -38
  33. package/package.json +2 -1
  34. package/dist/contracts/abis/lux-amm-v2-factory.d.ts +0 -148
  35. package/dist/contracts/abis/lux-amm-v2-factory.d.ts.map +0 -1
  36. package/dist/contracts/abis/lux-amm-v2-factory.js +0 -52
  37. package/dist/contracts/abis/lux-amm-v2-pair.d.ts +0 -236
  38. package/dist/contracts/abis/lux-amm-v2-pair.d.ts.map +0 -1
  39. package/dist/contracts/abis/lux-amm-v2-pair.js +0 -88
  40. package/dist/contracts/abis/lux-amm-v2-router.d.ts +0 -496
  41. package/dist/contracts/abis/lux-amm-v2-router.d.ts.map +0 -1
  42. package/dist/contracts/abis/lux-amm-v2-router.js +0 -149
  43. package/dist/contracts/abis/lux-amm-v3-factory.d.ts +0 -152
  44. package/dist/contracts/abis/lux-amm-v3-factory.d.ts.map +0 -1
  45. package/dist/contracts/abis/lux-amm-v3-factory.js +0 -48
  46. package/dist/contracts/abis/lux-amm-v3-pool.d.ts +0 -254
  47. package/dist/contracts/abis/lux-amm-v3-pool.d.ts.map +0 -1
  48. package/dist/contracts/abis/lux-amm-v3-pool.js +0 -84
  49. package/dist/contracts/abis/uniswap-v2-factory.d.ts +0 -75
  50. package/dist/contracts/abis/uniswap-v2-factory.d.ts.map +0 -1
  51. package/dist/contracts/abis/uniswap-v2-factory.js +0 -49
  52. package/dist/contracts/abis/uniswap-v2-pair.d.ts +0 -119
  53. package/dist/contracts/abis/uniswap-v2-pair.d.ts.map +0 -1
  54. package/dist/contracts/abis/uniswap-v2-pair.js +0 -85
  55. package/dist/contracts/abis/uniswap-v2-router.d.ts +0 -249
  56. package/dist/contracts/abis/uniswap-v2-router.d.ts.map +0 -1
  57. package/dist/contracts/abis/uniswap-v2-router.js +0 -146
  58. package/dist/contracts/abis/uniswap-v3-factory.d.ts +0 -77
  59. package/dist/contracts/abis/uniswap-v3-factory.d.ts.map +0 -1
  60. package/dist/contracts/abis/uniswap-v3-factory.js +0 -45
  61. package/dist/contracts/abis/uniswap-v3-pool.d.ts +0 -128
  62. package/dist/contracts/abis/uniswap-v3-pool.d.ts.map +0 -1
  63. package/dist/contracts/abis/uniswap-v3-pool.js +0 -81
@@ -1,45 +0,0 @@
1
- /**
2
- * UniswapV3Factory ABI
3
- */
4
- export const UNISWAP_V3_FACTORY_ABI = [
5
- {
6
- type: 'function',
7
- name: 'getPool',
8
- inputs: [
9
- { name: 'tokenA', type: 'address' },
10
- { name: 'tokenB', type: 'address' },
11
- { name: 'fee', type: 'uint24' },
12
- ],
13
- outputs: [{ name: 'pool', type: 'address' }],
14
- stateMutability: 'view',
15
- },
16
- {
17
- type: 'function',
18
- name: 'createPool',
19
- inputs: [
20
- { name: 'tokenA', type: 'address' },
21
- { name: 'tokenB', type: 'address' },
22
- { name: 'fee', type: 'uint24' },
23
- ],
24
- outputs: [{ name: 'pool', type: 'address' }],
25
- stateMutability: 'nonpayable',
26
- },
27
- {
28
- type: 'function',
29
- name: 'feeAmountTickSpacing',
30
- inputs: [{ name: 'fee', type: 'uint24' }],
31
- outputs: [{ name: 'tickSpacing', type: 'int24' }],
32
- stateMutability: 'view',
33
- },
34
- {
35
- type: 'event',
36
- name: 'PoolCreated',
37
- inputs: [
38
- { name: 'token0', type: 'address', indexed: true },
39
- { name: 'token1', type: 'address', indexed: true },
40
- { name: 'fee', type: 'uint24', indexed: true },
41
- { name: 'tickSpacing', type: 'int24', indexed: false },
42
- { name: 'pool', type: 'address', indexed: false },
43
- ],
44
- },
45
- ];
@@ -1,128 +0,0 @@
1
- /**
2
- * UniswapV3Pool ABI (essential functions)
3
- */
4
- export declare const UNISWAP_V3_POOL_ABI: readonly [{
5
- readonly type: "function";
6
- readonly name: "token0";
7
- readonly inputs: readonly [];
8
- readonly outputs: readonly [{
9
- readonly type: "address";
10
- }];
11
- readonly stateMutability: "view";
12
- }, {
13
- readonly type: "function";
14
- readonly name: "token1";
15
- readonly inputs: readonly [];
16
- readonly outputs: readonly [{
17
- readonly type: "address";
18
- }];
19
- readonly stateMutability: "view";
20
- }, {
21
- readonly type: "function";
22
- readonly name: "fee";
23
- readonly inputs: readonly [];
24
- readonly outputs: readonly [{
25
- readonly type: "uint24";
26
- }];
27
- readonly stateMutability: "view";
28
- }, {
29
- readonly type: "function";
30
- readonly name: "tickSpacing";
31
- readonly inputs: readonly [];
32
- readonly outputs: readonly [{
33
- readonly type: "int24";
34
- }];
35
- readonly stateMutability: "view";
36
- }, {
37
- readonly type: "function";
38
- readonly name: "liquidity";
39
- readonly inputs: readonly [];
40
- readonly outputs: readonly [{
41
- readonly type: "uint128";
42
- }];
43
- readonly stateMutability: "view";
44
- }, {
45
- readonly type: "function";
46
- readonly name: "slot0";
47
- readonly inputs: readonly [];
48
- readonly outputs: readonly [{
49
- readonly name: "sqrtPriceX96";
50
- readonly type: "uint160";
51
- }, {
52
- readonly name: "tick";
53
- readonly type: "int24";
54
- }, {
55
- readonly name: "observationIndex";
56
- readonly type: "uint16";
57
- }, {
58
- readonly name: "observationCardinality";
59
- readonly type: "uint16";
60
- }, {
61
- readonly name: "observationCardinalityNext";
62
- readonly type: "uint16";
63
- }, {
64
- readonly name: "feeProtocol";
65
- readonly type: "uint8";
66
- }, {
67
- readonly name: "unlocked";
68
- readonly type: "bool";
69
- }];
70
- readonly stateMutability: "view";
71
- }, {
72
- readonly type: "function";
73
- readonly name: "positions";
74
- readonly inputs: readonly [{
75
- readonly name: "key";
76
- readonly type: "bytes32";
77
- }];
78
- readonly outputs: readonly [{
79
- readonly name: "liquidity";
80
- readonly type: "uint128";
81
- }, {
82
- readonly name: "feeGrowthInside0LastX128";
83
- readonly type: "uint256";
84
- }, {
85
- readonly name: "feeGrowthInside1LastX128";
86
- readonly type: "uint256";
87
- }, {
88
- readonly name: "tokensOwed0";
89
- readonly type: "uint128";
90
- }, {
91
- readonly name: "tokensOwed1";
92
- readonly type: "uint128";
93
- }];
94
- readonly stateMutability: "view";
95
- }, {
96
- readonly type: "event";
97
- readonly name: "Swap";
98
- readonly inputs: readonly [{
99
- readonly name: "sender";
100
- readonly type: "address";
101
- readonly indexed: true;
102
- }, {
103
- readonly name: "recipient";
104
- readonly type: "address";
105
- readonly indexed: true;
106
- }, {
107
- readonly name: "amount0";
108
- readonly type: "int256";
109
- readonly indexed: false;
110
- }, {
111
- readonly name: "amount1";
112
- readonly type: "int256";
113
- readonly indexed: false;
114
- }, {
115
- readonly name: "sqrtPriceX96";
116
- readonly type: "uint160";
117
- readonly indexed: false;
118
- }, {
119
- readonly name: "liquidity";
120
- readonly type: "uint128";
121
- readonly indexed: false;
122
- }, {
123
- readonly name: "tick";
124
- readonly type: "int24";
125
- readonly indexed: false;
126
- }];
127
- }];
128
- //# sourceMappingURL=uniswap-v3-pool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uniswap-v3-pool.d.ts","sourceRoot":"","sources":["../../../src/contracts/abis/uniswap-v3-pool.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6EtB,CAAA"}
@@ -1,81 +0,0 @@
1
- /**
2
- * UniswapV3Pool ABI (essential functions)
3
- */
4
- export const UNISWAP_V3_POOL_ABI = [
5
- {
6
- type: 'function',
7
- name: 'token0',
8
- inputs: [],
9
- outputs: [{ type: 'address' }],
10
- stateMutability: 'view',
11
- },
12
- {
13
- type: 'function',
14
- name: 'token1',
15
- inputs: [],
16
- outputs: [{ type: 'address' }],
17
- stateMutability: 'view',
18
- },
19
- {
20
- type: 'function',
21
- name: 'fee',
22
- inputs: [],
23
- outputs: [{ type: 'uint24' }],
24
- stateMutability: 'view',
25
- },
26
- {
27
- type: 'function',
28
- name: 'tickSpacing',
29
- inputs: [],
30
- outputs: [{ type: 'int24' }],
31
- stateMutability: 'view',
32
- },
33
- {
34
- type: 'function',
35
- name: 'liquidity',
36
- inputs: [],
37
- outputs: [{ type: 'uint128' }],
38
- stateMutability: 'view',
39
- },
40
- {
41
- type: 'function',
42
- name: 'slot0',
43
- inputs: [],
44
- outputs: [
45
- { name: 'sqrtPriceX96', type: 'uint160' },
46
- { name: 'tick', type: 'int24' },
47
- { name: 'observationIndex', type: 'uint16' },
48
- { name: 'observationCardinality', type: 'uint16' },
49
- { name: 'observationCardinalityNext', type: 'uint16' },
50
- { name: 'feeProtocol', type: 'uint8' },
51
- { name: 'unlocked', type: 'bool' },
52
- ],
53
- stateMutability: 'view',
54
- },
55
- {
56
- type: 'function',
57
- name: 'positions',
58
- inputs: [{ name: 'key', type: 'bytes32' }],
59
- outputs: [
60
- { name: 'liquidity', type: 'uint128' },
61
- { name: 'feeGrowthInside0LastX128', type: 'uint256' },
62
- { name: 'feeGrowthInside1LastX128', type: 'uint256' },
63
- { name: 'tokensOwed0', type: 'uint128' },
64
- { name: 'tokensOwed1', type: 'uint128' },
65
- ],
66
- stateMutability: 'view',
67
- },
68
- {
69
- type: 'event',
70
- name: 'Swap',
71
- inputs: [
72
- { name: 'sender', type: 'address', indexed: true },
73
- { name: 'recipient', type: 'address', indexed: true },
74
- { name: 'amount0', type: 'int256', indexed: false },
75
- { name: 'amount1', type: 'int256', indexed: false },
76
- { name: 'sqrtPriceX96', type: 'uint160', indexed: false },
77
- { name: 'liquidity', type: 'uint128', indexed: false },
78
- { name: 'tick', type: 'int24', indexed: false },
79
- ],
80
- },
81
- ];