@luxexchange/config 1.0.0
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/.depcheckrc +9 -0
- package/.eslintrc.js +20 -0
- package/README.md +31 -0
- package/dist/chains.d.ts +405 -0
- package/dist/chains.d.ts.map +1 -0
- package/dist/chains.js +105 -0
- package/dist/contracts.d.ts +85 -0
- package/dist/contracts.d.ts.map +1 -0
- package/dist/contracts.js +68 -0
- package/dist/env.d.ts +17 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +20 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/wagmi.d.ts +297 -0
- package/dist/wagmi.d.ts.map +1 -0
- package/dist/wagmi.js +19 -0
- package/env.d.ts +64 -0
- package/env.native.d.ts +40 -0
- package/package.json +33 -0
- package/project.json +18 -0
- package/src/chains.ts +224 -0
- package/src/config-types.ts +50 -0
- package/src/contracts.ts +193 -0
- package/src/env.ts +27 -0
- package/src/getConfig.native.ts +130 -0
- package/src/getConfig.ts +6 -0
- package/src/getConfig.web.ts +77 -0
- package/src/index.ts +37 -0
- package/src/wagmi.ts +27 -0
- package/tsconfig.json +18 -0
- package/tsconfig.lint.json +8 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contract addresses for Lux Mainnet (96369)
|
|
3
|
+
*/
|
|
4
|
+
export const LUX_MAINNET_CONTRACTS = {
|
|
5
|
+
// Core
|
|
6
|
+
WLUX: '0x55750d6CA62a041c06a8E28626b10Be6c688f471',
|
|
7
|
+
MULTICALL: '0xd25F88CBdAe3c2CCA3Bb75FC4E723b44C0Ea362F',
|
|
8
|
+
// Bridge tokens
|
|
9
|
+
LETH: '0xAA3AE95816a4A6FbC6b8Ed5a6C06f22A96A80C8C',
|
|
10
|
+
LBTC: '0x526903E35E7106D62ED3B5d77E14e51d024Aa1D3',
|
|
11
|
+
LUSD: '0x4B1BfA76eD63F1A0aD2E4f40b3F46C45E8F7A4E2',
|
|
12
|
+
// AMM V2 (QuantumSwap)
|
|
13
|
+
V2_FACTORY: '0xd9a95609DbB228A13568Bd9f9A285105E7596970',
|
|
14
|
+
V2_ROUTER: '0x1F6cbC7d3bc7D803ee76D80F0eEE25767431e674',
|
|
15
|
+
// AMM V3 (Concentrated Liquidity)
|
|
16
|
+
V3_FACTORY: '0xb732BD88F25EdD9C3456638671fB37685D4B4e3f',
|
|
17
|
+
V3_SWAP_ROUTER: '0xE8fb25086C8652c92f5AF90D730Bac7C63Fc9A58',
|
|
18
|
+
V3_SWAP_ROUTER_02: '0x939bC0Bca6F9B9c52E6e3AD8A3C590b5d9B9D10E',
|
|
19
|
+
V3_QUOTER: '0x12e2B76FaF4dDA5a173a4532916bb6Bfa3645275',
|
|
20
|
+
V3_QUOTER_V2: '0x15C729fdd833Ba675edd466Dfc63E1B737925A4c',
|
|
21
|
+
V3_TICK_LENS: '0x57A22965AdA0e52D785A9Aa155beF423D573b879',
|
|
22
|
+
V3_NFT_POSITION_MANAGER: '0x7a4C48B9dae0b7c396569b34042fcA604150Ee28',
|
|
23
|
+
V3_NFT_DESCRIPTOR: '0x53B1aAA5b6DDFD4eD00D0A7b5Ef333dc74B605b5',
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Contract addresses for Lux Testnet (96368)
|
|
27
|
+
*/
|
|
28
|
+
export const LUX_TESTNET_CONTRACTS = {
|
|
29
|
+
// Core
|
|
30
|
+
WLUX: '0x732740c5c895C9FCF619930ed4293fc858eb44c7',
|
|
31
|
+
WETH: '0xd9956542B51032d940ef076d70B69410667277A3',
|
|
32
|
+
MULTICALL: '0xd25F88CBdAe3c2CCA3Bb75FC4E723b44C0Ea362F',
|
|
33
|
+
// AMM V2
|
|
34
|
+
V2_FACTORY: '0x81C3669B139D92909AA67DbF74a241b10540d919',
|
|
35
|
+
V2_ROUTER: '0xDB6c703c80BFaE5F9a56482d3c8535f27E1136EB',
|
|
36
|
+
// AMM V3
|
|
37
|
+
V3_FACTORY: '0x80bBc7C4C7a59C899D1B37BC14539A22D5830a84',
|
|
38
|
+
V3_SWAP_ROUTER: '0xE8fb25086C8652c92f5AF90D730Bac7C63Fc9A58',
|
|
39
|
+
V3_SWAP_ROUTER_02: '0x939bC0Bca6F9B9c52E6e3AD8A3C590b5d9B9D10E',
|
|
40
|
+
V3_QUOTER: '0x12e2B76FaF4dDA5a173a4532916bb6Bfa3645275',
|
|
41
|
+
V3_QUOTER_V2: '0x15C729fdd833Ba675edd466Dfc63E1B737925A4c',
|
|
42
|
+
V3_TICK_LENS: '0x57A22965AdA0e52D785A9Aa155beF423D573b879',
|
|
43
|
+
V3_NFT_POSITION_MANAGER: '0x7a4C48B9dae0b7c396569b34042fcA604150Ee28',
|
|
44
|
+
V3_NFT_DESCRIPTOR: '0x53B1aAA5b6DDFD4eD00D0A7b5Ef333dc74B605b5',
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* DEX Precompile addresses (native AMM)
|
|
48
|
+
* These provide sub-microsecond execution
|
|
49
|
+
*/
|
|
50
|
+
export const DEX_PRECOMPILES = {
|
|
51
|
+
POOL_MANAGER: '0x0000000000000000000000000000000000000400',
|
|
52
|
+
SWAP_ROUTER: '0x0000000000000000000000000000000000000401',
|
|
53
|
+
HOOKS_REGISTRY: '0x0000000000000000000000000000000000000402',
|
|
54
|
+
FLASH_LOAN: '0x0000000000000000000000000000000000000403',
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Get contracts for a specific chain
|
|
58
|
+
*/
|
|
59
|
+
export function getContracts(chainId) {
|
|
60
|
+
switch (chainId) {
|
|
61
|
+
case 96369:
|
|
62
|
+
return LUX_MAINNET_CONTRACTS;
|
|
63
|
+
case 96368:
|
|
64
|
+
return LUX_TESTNET_CONTRACTS;
|
|
65
|
+
default:
|
|
66
|
+
return LUX_TESTNET_CONTRACTS;
|
|
67
|
+
}
|
|
68
|
+
}
|
package/dist/env.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment configuration
|
|
3
|
+
*/
|
|
4
|
+
export declare const ENV: {
|
|
5
|
+
readonly DEFAULT_CHAIN_ID: number;
|
|
6
|
+
readonly API_URL: string;
|
|
7
|
+
readonly LUX_MAINNET_RPC: string;
|
|
8
|
+
readonly LUX_TESTNET_RPC: string;
|
|
9
|
+
readonly ZOO_MAINNET_RPC: string;
|
|
10
|
+
readonly ZOO_TESTNET_RPC: string;
|
|
11
|
+
readonly ENABLE_TESTNET: boolean;
|
|
12
|
+
readonly ENABLE_DEX_PRECOMPILES: boolean;
|
|
13
|
+
readonly ENABLE_CROSS_CHAIN: boolean;
|
|
14
|
+
readonly WALLETCONNECT_PROJECT_ID: string;
|
|
15
|
+
};
|
|
16
|
+
export type Env = typeof ENV;
|
|
17
|
+
//# sourceMappingURL=env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,GAAG;;;;;;;;;;;CAoBN,CAAA;AAEV,MAAM,MAAM,GAAG,GAAG,OAAO,GAAG,CAAA"}
|
package/dist/env.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment configuration
|
|
3
|
+
*/
|
|
4
|
+
export const ENV = {
|
|
5
|
+
// Chain IDs
|
|
6
|
+
DEFAULT_CHAIN_ID: parseInt(process.env.NEXT_PUBLIC_DEFAULT_CHAIN_ID || '96369'),
|
|
7
|
+
// API URLs
|
|
8
|
+
API_URL: process.env.NEXT_PUBLIC_API_URL || 'https://api.lux.exchange',
|
|
9
|
+
// RPC URLs
|
|
10
|
+
LUX_MAINNET_RPC: process.env.NEXT_PUBLIC_LUX_MAINNET_RPC || 'https://api.lux.network/rpc',
|
|
11
|
+
LUX_TESTNET_RPC: process.env.NEXT_PUBLIC_LUX_TESTNET_RPC || 'https://api.lux-test.network/rpc',
|
|
12
|
+
ZOO_MAINNET_RPC: process.env.NEXT_PUBLIC_ZOO_MAINNET_RPC || 'https://api.zoo.network/rpc',
|
|
13
|
+
ZOO_TESTNET_RPC: process.env.NEXT_PUBLIC_ZOO_TESTNET_RPC || 'https://api.zoo-test.network/rpc',
|
|
14
|
+
// Feature flags
|
|
15
|
+
ENABLE_TESTNET: process.env.NEXT_PUBLIC_ENABLE_TESTNET === 'true',
|
|
16
|
+
ENABLE_DEX_PRECOMPILES: process.env.NEXT_PUBLIC_ENABLE_DEX_PRECOMPILES === 'true',
|
|
17
|
+
ENABLE_CROSS_CHAIN: process.env.NEXT_PUBLIC_ENABLE_CROSS_CHAIN === 'true',
|
|
18
|
+
// WalletConnect
|
|
19
|
+
WALLETCONNECT_PROJECT_ID: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID || '',
|
|
20
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,OAAO,CAAA"}
|
package/dist/index.js
ADDED
package/dist/wagmi.d.ts
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wagmi configuration for Lux Exchange
|
|
3
|
+
*/
|
|
4
|
+
export declare const wagmiConfig: import("wagmi").Config<readonly [{
|
|
5
|
+
blockExplorers: {
|
|
6
|
+
readonly default: {
|
|
7
|
+
readonly name: "Lux Explorer";
|
|
8
|
+
readonly url: "https://explore.lux.network";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
blockTime?: number | undefined | undefined;
|
|
12
|
+
contracts: {
|
|
13
|
+
readonly multicall3: {
|
|
14
|
+
readonly address: "0xd25F88CBdAe3c2CCA3Bb75FC4E723b44C0Ea362F";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
ensTlds?: readonly string[] | undefined;
|
|
18
|
+
id: 96369;
|
|
19
|
+
name: "Lux Mainnet";
|
|
20
|
+
nativeCurrency: {
|
|
21
|
+
readonly name: "LUX";
|
|
22
|
+
readonly symbol: "LUX";
|
|
23
|
+
readonly decimals: 18;
|
|
24
|
+
};
|
|
25
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
26
|
+
rpcUrls: {
|
|
27
|
+
readonly default: {
|
|
28
|
+
readonly http: readonly ["https://api.lux.network/rpc"];
|
|
29
|
+
};
|
|
30
|
+
readonly public: {
|
|
31
|
+
readonly http: readonly ["https://api.lux.network/rpc"];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
sourceId?: number | undefined | undefined;
|
|
35
|
+
testnet?: boolean | undefined | undefined;
|
|
36
|
+
custom?: Record<string, unknown> | undefined;
|
|
37
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
38
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
39
|
+
formatters?: undefined;
|
|
40
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
41
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
42
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
43
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
44
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
45
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
46
|
+
}] | undefined;
|
|
47
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
48
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
blockExplorers: {
|
|
51
|
+
readonly default: {
|
|
52
|
+
readonly name: "Lux Testnet Explorer";
|
|
53
|
+
readonly url: "https://explore.lux-test.network";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
blockTime?: number | undefined | undefined;
|
|
57
|
+
contracts: {
|
|
58
|
+
readonly multicall3: {
|
|
59
|
+
readonly address: "0xd25F88CBdAe3c2CCA3Bb75FC4E723b44C0Ea362F";
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
ensTlds?: readonly string[] | undefined;
|
|
63
|
+
id: 96368;
|
|
64
|
+
name: "Lux Testnet";
|
|
65
|
+
nativeCurrency: {
|
|
66
|
+
readonly name: "LUX";
|
|
67
|
+
readonly symbol: "LUX";
|
|
68
|
+
readonly decimals: 18;
|
|
69
|
+
};
|
|
70
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
71
|
+
rpcUrls: {
|
|
72
|
+
readonly default: {
|
|
73
|
+
readonly http: readonly ["https://api.lux-test.network/rpc"];
|
|
74
|
+
};
|
|
75
|
+
readonly public: {
|
|
76
|
+
readonly http: readonly ["https://api.lux-test.network/rpc"];
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
sourceId?: number | undefined | undefined;
|
|
80
|
+
testnet: true;
|
|
81
|
+
custom?: Record<string, unknown> | undefined;
|
|
82
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
83
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
84
|
+
formatters?: undefined;
|
|
85
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
86
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
87
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
88
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
89
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
90
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
91
|
+
}] | undefined;
|
|
92
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
93
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
94
|
+
}, {
|
|
95
|
+
blockExplorers: {
|
|
96
|
+
readonly default: {
|
|
97
|
+
readonly name: "Zoo Explorer";
|
|
98
|
+
readonly url: "https://explore.zoo.network";
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
blockTime?: number | undefined | undefined;
|
|
102
|
+
contracts?: {
|
|
103
|
+
[x: string]: import("viem").ChainContract | {
|
|
104
|
+
[sourceId: number]: import("viem").ChainContract | undefined;
|
|
105
|
+
} | undefined;
|
|
106
|
+
ensRegistry?: import("viem").ChainContract | undefined;
|
|
107
|
+
ensUniversalResolver?: import("viem").ChainContract | undefined;
|
|
108
|
+
multicall3?: import("viem").ChainContract | undefined;
|
|
109
|
+
erc6492Verifier?: import("viem").ChainContract | undefined;
|
|
110
|
+
} | undefined;
|
|
111
|
+
ensTlds?: readonly string[] | undefined;
|
|
112
|
+
id: 200200;
|
|
113
|
+
name: "Zoo Network";
|
|
114
|
+
nativeCurrency: {
|
|
115
|
+
readonly name: "ZOO";
|
|
116
|
+
readonly symbol: "ZOO";
|
|
117
|
+
readonly decimals: 18;
|
|
118
|
+
};
|
|
119
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
120
|
+
rpcUrls: {
|
|
121
|
+
readonly default: {
|
|
122
|
+
readonly http: readonly ["https://api.zoo.network/rpc"];
|
|
123
|
+
};
|
|
124
|
+
readonly public: {
|
|
125
|
+
readonly http: readonly ["https://api.zoo.network/rpc"];
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
sourceId?: number | undefined | undefined;
|
|
129
|
+
testnet?: boolean | undefined | undefined;
|
|
130
|
+
custom?: Record<string, unknown> | undefined;
|
|
131
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
132
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
133
|
+
formatters?: undefined;
|
|
134
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
135
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
136
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
137
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
138
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
139
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
140
|
+
}] | undefined;
|
|
141
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
142
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
143
|
+
}, {
|
|
144
|
+
blockExplorers: {
|
|
145
|
+
readonly default: {
|
|
146
|
+
readonly name: "Zoo Testnet Explorer";
|
|
147
|
+
readonly url: "https://explore.zoo-test.network";
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
blockTime?: number | undefined | undefined;
|
|
151
|
+
contracts?: {
|
|
152
|
+
[x: string]: import("viem").ChainContract | {
|
|
153
|
+
[sourceId: number]: import("viem").ChainContract | undefined;
|
|
154
|
+
} | undefined;
|
|
155
|
+
ensRegistry?: import("viem").ChainContract | undefined;
|
|
156
|
+
ensUniversalResolver?: import("viem").ChainContract | undefined;
|
|
157
|
+
multicall3?: import("viem").ChainContract | undefined;
|
|
158
|
+
erc6492Verifier?: import("viem").ChainContract | undefined;
|
|
159
|
+
} | undefined;
|
|
160
|
+
ensTlds?: readonly string[] | undefined;
|
|
161
|
+
id: 200201;
|
|
162
|
+
name: "Zoo Testnet";
|
|
163
|
+
nativeCurrency: {
|
|
164
|
+
readonly name: "ZOO";
|
|
165
|
+
readonly symbol: "ZOO";
|
|
166
|
+
readonly decimals: 18;
|
|
167
|
+
};
|
|
168
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
169
|
+
rpcUrls: {
|
|
170
|
+
readonly default: {
|
|
171
|
+
readonly http: readonly ["https://api.zoo-test.network/rpc"];
|
|
172
|
+
};
|
|
173
|
+
readonly public: {
|
|
174
|
+
readonly http: readonly ["https://api.zoo-test.network/rpc"];
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
sourceId?: number | undefined | undefined;
|
|
178
|
+
testnet: true;
|
|
179
|
+
custom?: Record<string, unknown> | undefined;
|
|
180
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
181
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
182
|
+
formatters?: undefined;
|
|
183
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
184
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
185
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
186
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
187
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
188
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
189
|
+
}] | undefined;
|
|
190
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
191
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
192
|
+
}, {
|
|
193
|
+
blockExplorers: {
|
|
194
|
+
readonly default: {
|
|
195
|
+
readonly name: "Etherscan";
|
|
196
|
+
readonly url: "https://etherscan.io";
|
|
197
|
+
readonly apiUrl: "https://api.etherscan.io/api";
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
blockTime: 12000;
|
|
201
|
+
contracts: {
|
|
202
|
+
readonly ensUniversalResolver: {
|
|
203
|
+
readonly address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee";
|
|
204
|
+
readonly blockCreated: 23085558;
|
|
205
|
+
};
|
|
206
|
+
readonly multicall3: {
|
|
207
|
+
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
208
|
+
readonly blockCreated: 14353601;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
ensTlds?: readonly string[] | undefined;
|
|
212
|
+
id: 1;
|
|
213
|
+
name: "Ethereum";
|
|
214
|
+
nativeCurrency: {
|
|
215
|
+
readonly name: "Ether";
|
|
216
|
+
readonly symbol: "ETH";
|
|
217
|
+
readonly decimals: 18;
|
|
218
|
+
};
|
|
219
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
220
|
+
rpcUrls: {
|
|
221
|
+
readonly default: {
|
|
222
|
+
readonly http: readonly ["https://eth.merkle.io"];
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
sourceId?: number | undefined | undefined;
|
|
226
|
+
testnet?: boolean | undefined | undefined;
|
|
227
|
+
custom?: Record<string, unknown> | undefined;
|
|
228
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
229
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
230
|
+
formatters?: undefined;
|
|
231
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
232
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
233
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
234
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
235
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
236
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
237
|
+
}] | undefined;
|
|
238
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
239
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
240
|
+
}, {
|
|
241
|
+
blockExplorers: {
|
|
242
|
+
readonly default: {
|
|
243
|
+
readonly name: "Etherscan";
|
|
244
|
+
readonly url: "https://sepolia.etherscan.io";
|
|
245
|
+
readonly apiUrl: "https://api-sepolia.etherscan.io/api";
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
blockTime?: number | undefined | undefined;
|
|
249
|
+
contracts: {
|
|
250
|
+
readonly multicall3: {
|
|
251
|
+
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
252
|
+
readonly blockCreated: 751532;
|
|
253
|
+
};
|
|
254
|
+
readonly ensUniversalResolver: {
|
|
255
|
+
readonly address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee";
|
|
256
|
+
readonly blockCreated: 8928790;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
ensTlds?: readonly string[] | undefined;
|
|
260
|
+
id: 11155111;
|
|
261
|
+
name: "Sepolia";
|
|
262
|
+
nativeCurrency: {
|
|
263
|
+
readonly name: "Sepolia Ether";
|
|
264
|
+
readonly symbol: "ETH";
|
|
265
|
+
readonly decimals: 18;
|
|
266
|
+
};
|
|
267
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
268
|
+
rpcUrls: {
|
|
269
|
+
readonly default: {
|
|
270
|
+
readonly http: readonly ["https://11155111.rpc.thirdweb.com"];
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
sourceId?: number | undefined | undefined;
|
|
274
|
+
testnet: true;
|
|
275
|
+
custom?: Record<string, unknown> | undefined;
|
|
276
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
277
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
278
|
+
formatters?: undefined;
|
|
279
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
280
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
281
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
282
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
283
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
284
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
285
|
+
}] | undefined;
|
|
286
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
287
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
288
|
+
}], {
|
|
289
|
+
96369: import("viem").HttpTransport<undefined, false>;
|
|
290
|
+
96368: import("viem").HttpTransport<undefined, false>;
|
|
291
|
+
200200: import("viem").HttpTransport<undefined, false>;
|
|
292
|
+
200201: import("viem").HttpTransport<undefined, false>;
|
|
293
|
+
1: import("viem").HttpTransport<undefined, false>;
|
|
294
|
+
11155111: import("viem").HttpTransport<undefined, false>;
|
|
295
|
+
}, readonly import("wagmi").CreateConnectorFn[]>;
|
|
296
|
+
export type WagmiConfig = typeof wagmiConfig;
|
|
297
|
+
//# sourceMappingURL=wagmi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wagmi.d.ts","sourceRoot":"","sources":["../src/wagmi.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAYtB,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAA"}
|
package/dist/wagmi.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { http, createConfig } from 'wagmi';
|
|
2
|
+
import { mainnet, sepolia } from 'wagmi/chains';
|
|
3
|
+
import { luxMainnet, luxTestnet, zooMainnet, zooTestnet } from './chains';
|
|
4
|
+
/**
|
|
5
|
+
* Wagmi configuration for Lux Exchange
|
|
6
|
+
*/
|
|
7
|
+
export const wagmiConfig = createConfig({
|
|
8
|
+
chains: [luxMainnet, luxTestnet, zooMainnet, zooTestnet, mainnet, sepolia],
|
|
9
|
+
transports: {
|
|
10
|
+
// Lux chains
|
|
11
|
+
[luxMainnet.id]: http('https://api.lux.network/rpc'),
|
|
12
|
+
[luxTestnet.id]: http('https://api.lux-test.network/rpc'),
|
|
13
|
+
[zooMainnet.id]: http('https://api.zoo.network/rpc'),
|
|
14
|
+
[zooTestnet.id]: http('https://api.zoo-test.network/rpc'),
|
|
15
|
+
// Ethereum (for bridging)
|
|
16
|
+
[mainnet.id]: http(),
|
|
17
|
+
[sepolia.id]: http(),
|
|
18
|
+
},
|
|
19
|
+
});
|
package/env.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/** biome-ignore-all lint/style/noNamespace: required to define process.env type */
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
namespace NodeJS {
|
|
5
|
+
// All process.env values used by this package should be listed here
|
|
6
|
+
interface ProcessEnv {
|
|
7
|
+
NODE_ENV?: 'development' | 'production' | 'test'
|
|
8
|
+
ALCHEMY_API_KEY?: string
|
|
9
|
+
AMPLITUDE_PROXY_URL_OVERRIDE?: string
|
|
10
|
+
API_BASE_URL_OVERRIDE?: string
|
|
11
|
+
API_BASE_URL_V2_OVERRIDE?: string
|
|
12
|
+
APPSFLYER_API_KEY?: string
|
|
13
|
+
APPSFLYER_APP_ID?: string
|
|
14
|
+
BLOCKAID_PROXY_URL?: string
|
|
15
|
+
CI?: string
|
|
16
|
+
DATADOG_CLIENT_TOKEN?: string
|
|
17
|
+
DATADOG_PROJECT_ID?: string
|
|
18
|
+
ENABLE_ENTRY_GATEWAY_PROXY?: string
|
|
19
|
+
ENABLE_SESSION_SERVICE?: string
|
|
20
|
+
ENABLE_SESSION_UPGRADE_AUTO?: string
|
|
21
|
+
ENTRY_GATEWAY_API_URL_OVERRIDE?: string
|
|
22
|
+
FOR_API_URL_OVERRIDE?: string
|
|
23
|
+
GRAPHQL_URL_OVERRIDE?: string
|
|
24
|
+
INCLUDE_PROTOTYPE_FEATURES?: string
|
|
25
|
+
IS_E2E_TEST?: string
|
|
26
|
+
JUPITER_PROXY_URL?: string
|
|
27
|
+
LIQUIDITY_SERVICE_URL_OVERRIDE?: string
|
|
28
|
+
ONESIGNAL_APP_ID?: string
|
|
29
|
+
QUICKNODE_ENDPOINT_NAME?: string
|
|
30
|
+
QUICKNODE_ENDPOINT_TOKEN?: string
|
|
31
|
+
REACT_APP_ALCHEMY_API_KEY?: string
|
|
32
|
+
REACT_APP_BLOCKAID_PROXY_URL?: string
|
|
33
|
+
REACT_APP_DATADOG_CLIENT_TOKEN?: string
|
|
34
|
+
REACT_APP_DATADOG_PROJECT_ID?: string
|
|
35
|
+
REACT_APP_ENABLE_SESSION_UPGRADE_AUTO?: string
|
|
36
|
+
REACT_APP_INFURA_KEY?: string
|
|
37
|
+
REACT_APP_JUPITER_PROXY_URL?: string
|
|
38
|
+
REACT_APP_LIQUIDITY_SERVICE_URL_OVERRIDE?: string
|
|
39
|
+
REACT_APP_QUICKNODE_ENDPOINT_NAME?: string
|
|
40
|
+
REACT_APP_QUICKNODE_ENDPOINT_TOKEN?: string
|
|
41
|
+
REACT_APP_STATSIG_API_KEY?: string
|
|
42
|
+
REACT_APP_TRADING_API_KEY?: string
|
|
43
|
+
REACT_APP_TRADING_API_TEST_ENV?: string
|
|
44
|
+
REACT_APP_TRADING_API_URL_OVERRIDE?: string
|
|
45
|
+
REACT_APP_WALLET_CONNECT_PROJECT_ID?: string
|
|
46
|
+
SCANTASTIC_API_URL_OVERRIDE?: string
|
|
47
|
+
STATSIG_API_KEY?: string
|
|
48
|
+
STATSIG_PROXY_URL_OVERRIDE?: string
|
|
49
|
+
TRADING_API_KEY?: string
|
|
50
|
+
TRADING_API_URL_OVERRIDE?: string
|
|
51
|
+
LUX_API_KEY?: string
|
|
52
|
+
LUX_NOTIF_API_BASE_URL_OVERRIDE?: string
|
|
53
|
+
UNITAGS_API_URL_OVERRIDE?: string
|
|
54
|
+
VERSION?: string
|
|
55
|
+
VERCEL?: string
|
|
56
|
+
VITE_ENABLE_ENTRY_GATEWAY_PROXY?: string
|
|
57
|
+
WALLETCONNECT_PROJECT_ID?: string
|
|
58
|
+
WALLETCONNECT_PROJECT_ID_BETA?: string
|
|
59
|
+
WALLETCONNECT_PROJECT_ID_DEV?: string
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export {}
|
package/env.native.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Adds typing for react-native-dotenv
|
|
2
|
+
// Must be kept separately from env.d.ts as due to issue with global
|
|
3
|
+
// namespace vs module declarations
|
|
4
|
+
declare module 'react-native-dotenv' {
|
|
5
|
+
export const ALCHEMY_API_KEY: string
|
|
6
|
+
export const AMPLITUDE_PROXY_URL_OVERRIDE: string
|
|
7
|
+
export const API_BASE_URL_OVERRIDE: string
|
|
8
|
+
export const API_BASE_URL_V2_OVERRIDE: string
|
|
9
|
+
export const APPSFLYER_API_KEY: string
|
|
10
|
+
export const APPSFLYER_APP_ID: string
|
|
11
|
+
export const BLOCKAID_PROXY_URL: string
|
|
12
|
+
export const DATADOG_CLIENT_TOKEN: string
|
|
13
|
+
export const DATADOG_PROJECT_ID: string
|
|
14
|
+
export const ENABLE_ENTRY_GATEWAY_PROXY: string
|
|
15
|
+
export const ENABLE_SESSION_SERVICE: string
|
|
16
|
+
export const ENABLE_SESSION_UPGRADE_AUTO: string
|
|
17
|
+
export const ENTRY_GATEWAY_API_URL_OVERRIDE: string
|
|
18
|
+
export const FOR_API_URL_OVERRIDE: string
|
|
19
|
+
export const GRAPHQL_URL_OVERRIDE: string
|
|
20
|
+
export const INCLUDE_PROTOTYPE_FEATURES: string
|
|
21
|
+
export const INFURA_KEY: string
|
|
22
|
+
export const IS_E2E_TEST: string
|
|
23
|
+
export const JUPITER_PROXY_URL: string
|
|
24
|
+
export const LIQUIDITY_SERVICE_URL_OVERRIDE: string
|
|
25
|
+
export const LUX_GATEWAY_URL: string
|
|
26
|
+
export const ONESIGNAL_APP_ID: string
|
|
27
|
+
export const QUICKNODE_ENDPOINT_NAME: string
|
|
28
|
+
export const QUICKNODE_ENDPOINT_TOKEN: string
|
|
29
|
+
export const SCANTASTIC_API_URL_OVERRIDE: string
|
|
30
|
+
export const STATSIG_API_KEY: string
|
|
31
|
+
export const STATSIG_PROXY_URL_OVERRIDE: string
|
|
32
|
+
export const TRADING_API_KEY: string
|
|
33
|
+
export const TRADING_API_URL_OVERRIDE: string
|
|
34
|
+
export const LUX_API_KEY: string
|
|
35
|
+
export const LUX_NOTIF_API_BASE_URL_OVERRIDE: string
|
|
36
|
+
export const UNITAGS_API_URL_OVERRIDE: string
|
|
37
|
+
export const WALLETCONNECT_PROJECT_ID: string
|
|
38
|
+
export const WALLETCONNECT_PROJECT_ID_BETA: string
|
|
39
|
+
export const WALLETCONNECT_PROJECT_ID_DEV: string
|
|
40
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@luxexchange/config",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"react-native-dotenv": "3.2.0",
|
|
6
|
+
"@luxfi/utilities": "^1.0.0"
|
|
7
|
+
},
|
|
8
|
+
"devDependencies": {
|
|
9
|
+
"@types/node": "22.13.1",
|
|
10
|
+
"@typescript/native-preview": "7.0.0-dev.20260108.1",
|
|
11
|
+
"@luxfi/eslint-config": "^1.0.0",
|
|
12
|
+
"depcheck": "1.4.7",
|
|
13
|
+
"eslint": "8.57.1",
|
|
14
|
+
"typescript": "5.8.3"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"typecheck": "nx typecheck config",
|
|
18
|
+
"typecheck:tsgo": "nx typecheck:tsgo config",
|
|
19
|
+
"lint": "nx lint config",
|
|
20
|
+
"lint:fix": "nx lint:fix config",
|
|
21
|
+
"lint:biome": "nx lint:biome config",
|
|
22
|
+
"lint:biome:fix": "nx lint:biome:fix config",
|
|
23
|
+
"lint:eslint": "nx lint:eslint config",
|
|
24
|
+
"lint:eslint:fix": "nx lint:eslint:fix config",
|
|
25
|
+
"check:deps:usage": "nx check:deps:usage config"
|
|
26
|
+
},
|
|
27
|
+
"nx": {
|
|
28
|
+
"includedScripts": []
|
|
29
|
+
},
|
|
30
|
+
"main": "src/index.ts",
|
|
31
|
+
"private": false,
|
|
32
|
+
"sideEffects": false
|
|
33
|
+
}
|
package/project.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@luxfi/config",
|
|
3
|
+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
+
"sourceRoot": "pkgs/config/src",
|
|
5
|
+
"projectType": "library",
|
|
6
|
+
"tags": ["scope:config", "type:lib"],
|
|
7
|
+
"targets": {
|
|
8
|
+
"typecheck": {},
|
|
9
|
+
"typecheck:tsgo": {},
|
|
10
|
+
"lint:biome": {},
|
|
11
|
+
"lint:biome:fix": {},
|
|
12
|
+
"lint:eslint": {},
|
|
13
|
+
"lint:eslint:fix": {},
|
|
14
|
+
"lint": {},
|
|
15
|
+
"lint:fix": {},
|
|
16
|
+
"check:deps:usage": {}
|
|
17
|
+
}
|
|
18
|
+
}
|