levr-sdk 0.0.1 → 0.1.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/README.md +109 -13
- package/dist/esm/abis/LevrFactory_v1.js +63 -0
- package/dist/esm/abis/LevrGovernor_v1.js +15 -24
- package/dist/esm/abis/LevrStaking_v1.js +7 -1
- package/dist/esm/abis/StateView.js +149 -0
- package/dist/esm/abis/V3QuoterV2.js +26 -0
- package/dist/esm/abis/index.js +4 -0
- package/dist/esm/balance.js +48 -4
- package/dist/esm/balance.js.map +1 -1
- package/dist/esm/client/hook/index.js +14 -3
- package/dist/esm/client/hook/index.js.map +1 -1
- package/dist/esm/client/hook/use-fee-receivers.js +11 -30
- package/dist/esm/client/hook/use-fee-receivers.js.map +1 -1
- package/dist/esm/client/hook/use-governance.js +20 -274
- package/dist/esm/client/hook/use-governance.js.map +1 -1
- package/dist/esm/client/hook/use-pool.js +26 -0
- package/dist/esm/client/hook/use-pool.js.map +1 -0
- package/dist/esm/client/hook/use-prepare.js +6 -3
- package/dist/esm/client/hook/use-prepare.js.map +1 -1
- package/dist/esm/client/hook/use-project.js +28 -16
- package/dist/esm/client/hook/use-project.js.map +1 -1
- package/dist/esm/client/hook/use-proposal.js +48 -0
- package/dist/esm/client/hook/use-proposal.js.map +1 -0
- package/dist/esm/client/hook/use-stake.js +29 -215
- package/dist/esm/client/hook/use-stake.js.map +1 -1
- package/dist/esm/client/hook/use-swap.js +23 -19
- package/dist/esm/client/hook/use-swap.js.map +1 -1
- package/dist/esm/client/hook/use-user.js +25 -0
- package/dist/esm/client/hook/use-user.js.map +1 -0
- package/dist/esm/client/levr-provider.js +73 -108
- package/dist/esm/client/levr-provider.js.map +1 -1
- package/dist/esm/client/query-keys.js +10 -22
- package/dist/esm/client/query-keys.js.map +1 -1
- package/dist/esm/constants.js +42 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/fee-receivers.js +28 -13
- package/dist/esm/fee-receivers.js.map +1 -1
- package/dist/esm/governance.js +35 -399
- package/dist/esm/governance.js.map +1 -1
- package/dist/esm/index.js +7 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/pool-key.js +152 -0
- package/dist/esm/pool-key.js.map +1 -0
- package/dist/esm/pool.js +70 -0
- package/dist/esm/pool.js.map +1 -0
- package/dist/esm/project.js +415 -118
- package/dist/esm/project.js.map +1 -1
- package/dist/esm/proposal.js +156 -0
- package/dist/esm/proposal.js.map +1 -0
- package/dist/esm/quote/index.js +98 -0
- package/dist/esm/quote/index.js.map +1 -0
- package/dist/esm/quote/v3.js +62 -0
- package/dist/esm/quote/v3.js.map +1 -0
- package/dist/esm/quote/v4.js +228 -0
- package/dist/esm/quote/v4.js.map +1 -0
- package/dist/esm/stake.js +34 -237
- package/dist/esm/stake.js.map +1 -1
- package/dist/esm/treasury.js +162 -0
- package/dist/esm/treasury.js.map +1 -0
- package/dist/esm/usd-price.js +149 -0
- package/dist/esm/usd-price.js.map +1 -0
- package/dist/esm/user.js +153 -0
- package/dist/esm/user.js.map +1 -0
- package/dist/esm/util.js +45 -1
- package/dist/esm/util.js.map +1 -1
- package/dist/types/abis/LevrFactory_v1.d.ts +48 -0
- package/dist/types/abis/LevrGovernor_v1.d.ts +12 -18
- package/dist/types/abis/LevrStaking_v1.d.ts +5 -1
- package/dist/types/abis/StateView.d.ts +278 -0
- package/dist/types/abis/V3QuoterV2.d.ts +39 -0
- package/dist/types/abis/index.d.ts +2 -0
- package/dist/types/balance.d.ts +19 -6
- package/dist/types/balance.d.ts.map +1 -1
- package/dist/types/client/hook/index.d.ts +12 -4
- package/dist/types/client/hook/index.d.ts.map +1 -1
- package/dist/types/client/hook/use-fee-receivers.d.ts +6 -16
- package/dist/types/client/hook/use-fee-receivers.d.ts.map +1 -1
- package/dist/types/client/hook/use-governance.d.ts +4 -93
- package/dist/types/client/hook/use-governance.d.ts.map +1 -1
- package/dist/types/client/hook/use-pool.d.ts +12 -0
- package/dist/types/client/hook/use-pool.d.ts.map +1 -0
- package/dist/types/client/hook/use-prepare.d.ts +1 -2
- package/dist/types/client/hook/use-prepare.d.ts.map +1 -1
- package/dist/types/client/hook/use-project.d.ts +8 -1
- package/dist/types/client/hook/use-project.d.ts.map +1 -1
- package/dist/types/client/hook/use-proposal.d.ts +18 -0
- package/dist/types/client/hook/use-proposal.d.ts.map +1 -0
- package/dist/types/client/hook/use-stake.d.ts +14 -168
- package/dist/types/client/hook/use-stake.d.ts.map +1 -1
- package/dist/types/client/hook/use-swap.d.ts +5 -9
- package/dist/types/client/hook/use-swap.d.ts.map +1 -1
- package/dist/types/client/hook/use-user.d.ts +13 -0
- package/dist/types/client/hook/use-user.d.ts.map +1 -0
- package/dist/types/client/levr-provider.d.ts +41 -68
- package/dist/types/client/levr-provider.d.ts.map +1 -1
- package/dist/types/client/query-keys.d.ts +14 -26
- package/dist/types/client/query-keys.d.ts.map +1 -1
- package/dist/types/constants.d.ts +18 -0
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/fee-receivers.d.ts +29 -2
- package/dist/types/fee-receivers.d.ts.map +1 -1
- package/dist/types/governance.d.ts +8 -108
- package/dist/types/governance.d.ts.map +1 -1
- package/dist/types/index.d.ts +7 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/pool-key.d.ts +121 -0
- package/dist/types/pool-key.d.ts.map +1 -0
- package/dist/types/pool.d.ts +590 -0
- package/dist/types/pool.d.ts.map +1 -0
- package/dist/types/project.d.ts +61 -11
- package/dist/types/project.d.ts.map +1 -1
- package/dist/types/proposal.d.ts +1161 -0
- package/dist/types/proposal.d.ts.map +1 -0
- package/dist/types/quote/index.d.ts +97 -0
- package/dist/types/quote/index.d.ts.map +1 -0
- package/dist/types/quote/v3.d.ts +78 -0
- package/dist/types/quote/v3.d.ts.map +1 -0
- package/dist/types/quote/v4.d.ts +95 -0
- package/dist/types/quote/v4.d.ts.map +1 -0
- package/dist/types/stake.d.ts +41 -87
- package/dist/types/stake.d.ts.map +1 -1
- package/dist/types/treasury.d.ts +16 -0
- package/dist/types/treasury.d.ts.map +1 -0
- package/dist/types/types.d.ts +15 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/usd-price.d.ts +141 -0
- package/dist/types/usd-price.d.ts.map +1 -0
- package/dist/types/user.d.ts +188 -0
- package/dist/types/user.d.ts.map +1 -0
- package/dist/types/util.d.ts +17 -0
- package/dist/types/util.d.ts.map +1 -1
- package/package.json +5 -2
- package/dist/esm/client/hook/use-balance.js +0 -56
- package/dist/esm/client/hook/use-balance.js.map +0 -1
- package/dist/esm/client/hook/use-projects.js +0 -22
- package/dist/esm/client/hook/use-projects.js.map +0 -1
- package/dist/esm/client/hook/use-proposals.js +0 -31
- package/dist/esm/client/hook/use-proposals.js.map +0 -1
- package/dist/esm/projects.js +0 -212
- package/dist/esm/projects.js.map +0 -1
- package/dist/esm/proposals.js +0 -98
- package/dist/esm/proposals.js.map +0 -1
- package/dist/esm/quote-v4.js +0 -169
- package/dist/esm/quote-v4.js.map +0 -1
- package/dist/types/client/hook/use-balance.d.ts +0 -18
- package/dist/types/client/hook/use-balance.d.ts.map +0 -1
- package/dist/types/client/hook/use-projects.d.ts +0 -6
- package/dist/types/client/hook/use-projects.d.ts.map +0 -1
- package/dist/types/client/hook/use-proposals.d.ts +0 -16
- package/dist/types/client/hook/use-proposals.d.ts.map +0 -1
- package/dist/types/projects.d.ts +0 -20
- package/dist/types/projects.d.ts.map +0 -1
- package/dist/types/proposals.d.ts +0 -20
- package/dist/types/proposals.d.ts.map +0 -1
- package/dist/types/quote-v4.d.ts +0 -54
- package/dist/types/quote-v4.d.ts.map +0 -1
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
declare const _default: readonly [{
|
|
2
|
+
readonly inputs: readonly [{
|
|
3
|
+
readonly internalType: "contract IPoolManager";
|
|
4
|
+
readonly name: "_poolManager";
|
|
5
|
+
readonly type: "address";
|
|
6
|
+
}];
|
|
7
|
+
readonly stateMutability: "nonpayable";
|
|
8
|
+
readonly type: "constructor";
|
|
9
|
+
}, {
|
|
10
|
+
readonly inputs: readonly [{
|
|
11
|
+
readonly internalType: "PoolId";
|
|
12
|
+
readonly name: "poolId";
|
|
13
|
+
readonly type: "bytes32";
|
|
14
|
+
}];
|
|
15
|
+
readonly name: "getFeeGrowthGlobals";
|
|
16
|
+
readonly outputs: readonly [{
|
|
17
|
+
readonly internalType: "uint256";
|
|
18
|
+
readonly name: "feeGrowthGlobal0";
|
|
19
|
+
readonly type: "uint256";
|
|
20
|
+
}, {
|
|
21
|
+
readonly internalType: "uint256";
|
|
22
|
+
readonly name: "feeGrowthGlobal1";
|
|
23
|
+
readonly type: "uint256";
|
|
24
|
+
}];
|
|
25
|
+
readonly stateMutability: "view";
|
|
26
|
+
readonly type: "function";
|
|
27
|
+
}, {
|
|
28
|
+
readonly inputs: readonly [{
|
|
29
|
+
readonly internalType: "PoolId";
|
|
30
|
+
readonly name: "poolId";
|
|
31
|
+
readonly type: "bytes32";
|
|
32
|
+
}, {
|
|
33
|
+
readonly internalType: "int24";
|
|
34
|
+
readonly name: "tickLower";
|
|
35
|
+
readonly type: "int24";
|
|
36
|
+
}, {
|
|
37
|
+
readonly internalType: "int24";
|
|
38
|
+
readonly name: "tickUpper";
|
|
39
|
+
readonly type: "int24";
|
|
40
|
+
}];
|
|
41
|
+
readonly name: "getFeeGrowthInside";
|
|
42
|
+
readonly outputs: readonly [{
|
|
43
|
+
readonly internalType: "uint256";
|
|
44
|
+
readonly name: "feeGrowthInside0X128";
|
|
45
|
+
readonly type: "uint256";
|
|
46
|
+
}, {
|
|
47
|
+
readonly internalType: "uint256";
|
|
48
|
+
readonly name: "feeGrowthInside1X128";
|
|
49
|
+
readonly type: "uint256";
|
|
50
|
+
}];
|
|
51
|
+
readonly stateMutability: "view";
|
|
52
|
+
readonly type: "function";
|
|
53
|
+
}, {
|
|
54
|
+
readonly inputs: readonly [{
|
|
55
|
+
readonly internalType: "PoolId";
|
|
56
|
+
readonly name: "poolId";
|
|
57
|
+
readonly type: "bytes32";
|
|
58
|
+
}];
|
|
59
|
+
readonly name: "getLiquidity";
|
|
60
|
+
readonly outputs: readonly [{
|
|
61
|
+
readonly internalType: "uint128";
|
|
62
|
+
readonly name: "liquidity";
|
|
63
|
+
readonly type: "uint128";
|
|
64
|
+
}];
|
|
65
|
+
readonly stateMutability: "view";
|
|
66
|
+
readonly type: "function";
|
|
67
|
+
}, {
|
|
68
|
+
readonly inputs: readonly [{
|
|
69
|
+
readonly internalType: "PoolId";
|
|
70
|
+
readonly name: "poolId";
|
|
71
|
+
readonly type: "bytes32";
|
|
72
|
+
}, {
|
|
73
|
+
readonly internalType: "bytes32";
|
|
74
|
+
readonly name: "positionId";
|
|
75
|
+
readonly type: "bytes32";
|
|
76
|
+
}];
|
|
77
|
+
readonly name: "getPositionInfo";
|
|
78
|
+
readonly outputs: readonly [{
|
|
79
|
+
readonly internalType: "uint128";
|
|
80
|
+
readonly name: "liquidity";
|
|
81
|
+
readonly type: "uint128";
|
|
82
|
+
}, {
|
|
83
|
+
readonly internalType: "uint256";
|
|
84
|
+
readonly name: "feeGrowthInside0LastX128";
|
|
85
|
+
readonly type: "uint256";
|
|
86
|
+
}, {
|
|
87
|
+
readonly internalType: "uint256";
|
|
88
|
+
readonly name: "feeGrowthInside1LastX128";
|
|
89
|
+
readonly type: "uint256";
|
|
90
|
+
}];
|
|
91
|
+
readonly stateMutability: "view";
|
|
92
|
+
readonly type: "function";
|
|
93
|
+
}, {
|
|
94
|
+
readonly inputs: readonly [{
|
|
95
|
+
readonly internalType: "PoolId";
|
|
96
|
+
readonly name: "poolId";
|
|
97
|
+
readonly type: "bytes32";
|
|
98
|
+
}, {
|
|
99
|
+
readonly internalType: "address";
|
|
100
|
+
readonly name: "owner";
|
|
101
|
+
readonly type: "address";
|
|
102
|
+
}, {
|
|
103
|
+
readonly internalType: "int24";
|
|
104
|
+
readonly name: "tickLower";
|
|
105
|
+
readonly type: "int24";
|
|
106
|
+
}, {
|
|
107
|
+
readonly internalType: "int24";
|
|
108
|
+
readonly name: "tickUpper";
|
|
109
|
+
readonly type: "int24";
|
|
110
|
+
}, {
|
|
111
|
+
readonly internalType: "bytes32";
|
|
112
|
+
readonly name: "salt";
|
|
113
|
+
readonly type: "bytes32";
|
|
114
|
+
}];
|
|
115
|
+
readonly name: "getPositionInfo";
|
|
116
|
+
readonly outputs: readonly [{
|
|
117
|
+
readonly internalType: "uint128";
|
|
118
|
+
readonly name: "liquidity";
|
|
119
|
+
readonly type: "uint128";
|
|
120
|
+
}, {
|
|
121
|
+
readonly internalType: "uint256";
|
|
122
|
+
readonly name: "feeGrowthInside0LastX128";
|
|
123
|
+
readonly type: "uint256";
|
|
124
|
+
}, {
|
|
125
|
+
readonly internalType: "uint256";
|
|
126
|
+
readonly name: "feeGrowthInside1LastX128";
|
|
127
|
+
readonly type: "uint256";
|
|
128
|
+
}];
|
|
129
|
+
readonly stateMutability: "view";
|
|
130
|
+
readonly type: "function";
|
|
131
|
+
}, {
|
|
132
|
+
readonly inputs: readonly [{
|
|
133
|
+
readonly internalType: "PoolId";
|
|
134
|
+
readonly name: "poolId";
|
|
135
|
+
readonly type: "bytes32";
|
|
136
|
+
}, {
|
|
137
|
+
readonly internalType: "bytes32";
|
|
138
|
+
readonly name: "positionId";
|
|
139
|
+
readonly type: "bytes32";
|
|
140
|
+
}];
|
|
141
|
+
readonly name: "getPositionLiquidity";
|
|
142
|
+
readonly outputs: readonly [{
|
|
143
|
+
readonly internalType: "uint128";
|
|
144
|
+
readonly name: "liquidity";
|
|
145
|
+
readonly type: "uint128";
|
|
146
|
+
}];
|
|
147
|
+
readonly stateMutability: "view";
|
|
148
|
+
readonly type: "function";
|
|
149
|
+
}, {
|
|
150
|
+
readonly inputs: readonly [{
|
|
151
|
+
readonly internalType: "PoolId";
|
|
152
|
+
readonly name: "poolId";
|
|
153
|
+
readonly type: "bytes32";
|
|
154
|
+
}];
|
|
155
|
+
readonly name: "getSlot0";
|
|
156
|
+
readonly outputs: readonly [{
|
|
157
|
+
readonly internalType: "uint160";
|
|
158
|
+
readonly name: "sqrtPriceX96";
|
|
159
|
+
readonly type: "uint160";
|
|
160
|
+
}, {
|
|
161
|
+
readonly internalType: "int24";
|
|
162
|
+
readonly name: "tick";
|
|
163
|
+
readonly type: "int24";
|
|
164
|
+
}, {
|
|
165
|
+
readonly internalType: "uint24";
|
|
166
|
+
readonly name: "protocolFee";
|
|
167
|
+
readonly type: "uint24";
|
|
168
|
+
}, {
|
|
169
|
+
readonly internalType: "uint24";
|
|
170
|
+
readonly name: "lpFee";
|
|
171
|
+
readonly type: "uint24";
|
|
172
|
+
}];
|
|
173
|
+
readonly stateMutability: "view";
|
|
174
|
+
readonly type: "function";
|
|
175
|
+
}, {
|
|
176
|
+
readonly inputs: readonly [{
|
|
177
|
+
readonly internalType: "PoolId";
|
|
178
|
+
readonly name: "poolId";
|
|
179
|
+
readonly type: "bytes32";
|
|
180
|
+
}, {
|
|
181
|
+
readonly internalType: "int16";
|
|
182
|
+
readonly name: "tick";
|
|
183
|
+
readonly type: "int16";
|
|
184
|
+
}];
|
|
185
|
+
readonly name: "getTickBitmap";
|
|
186
|
+
readonly outputs: readonly [{
|
|
187
|
+
readonly internalType: "uint256";
|
|
188
|
+
readonly name: "tickBitmap";
|
|
189
|
+
readonly type: "uint256";
|
|
190
|
+
}];
|
|
191
|
+
readonly stateMutability: "view";
|
|
192
|
+
readonly type: "function";
|
|
193
|
+
}, {
|
|
194
|
+
readonly inputs: readonly [{
|
|
195
|
+
readonly internalType: "PoolId";
|
|
196
|
+
readonly name: "poolId";
|
|
197
|
+
readonly type: "bytes32";
|
|
198
|
+
}, {
|
|
199
|
+
readonly internalType: "int24";
|
|
200
|
+
readonly name: "tick";
|
|
201
|
+
readonly type: "int24";
|
|
202
|
+
}];
|
|
203
|
+
readonly name: "getTickFeeGrowthOutside";
|
|
204
|
+
readonly outputs: readonly [{
|
|
205
|
+
readonly internalType: "uint256";
|
|
206
|
+
readonly name: "feeGrowthOutside0X128";
|
|
207
|
+
readonly type: "uint256";
|
|
208
|
+
}, {
|
|
209
|
+
readonly internalType: "uint256";
|
|
210
|
+
readonly name: "feeGrowthOutside1X128";
|
|
211
|
+
readonly type: "uint256";
|
|
212
|
+
}];
|
|
213
|
+
readonly stateMutability: "view";
|
|
214
|
+
readonly type: "function";
|
|
215
|
+
}, {
|
|
216
|
+
readonly inputs: readonly [{
|
|
217
|
+
readonly internalType: "PoolId";
|
|
218
|
+
readonly name: "poolId";
|
|
219
|
+
readonly type: "bytes32";
|
|
220
|
+
}, {
|
|
221
|
+
readonly internalType: "int24";
|
|
222
|
+
readonly name: "tick";
|
|
223
|
+
readonly type: "int24";
|
|
224
|
+
}];
|
|
225
|
+
readonly name: "getTickInfo";
|
|
226
|
+
readonly outputs: readonly [{
|
|
227
|
+
readonly internalType: "uint128";
|
|
228
|
+
readonly name: "liquidityGross";
|
|
229
|
+
readonly type: "uint128";
|
|
230
|
+
}, {
|
|
231
|
+
readonly internalType: "int128";
|
|
232
|
+
readonly name: "liquidityNet";
|
|
233
|
+
readonly type: "int128";
|
|
234
|
+
}, {
|
|
235
|
+
readonly internalType: "uint256";
|
|
236
|
+
readonly name: "feeGrowthOutside0X128";
|
|
237
|
+
readonly type: "uint256";
|
|
238
|
+
}, {
|
|
239
|
+
readonly internalType: "uint256";
|
|
240
|
+
readonly name: "feeGrowthOutside1X128";
|
|
241
|
+
readonly type: "uint256";
|
|
242
|
+
}];
|
|
243
|
+
readonly stateMutability: "view";
|
|
244
|
+
readonly type: "function";
|
|
245
|
+
}, {
|
|
246
|
+
readonly inputs: readonly [{
|
|
247
|
+
readonly internalType: "PoolId";
|
|
248
|
+
readonly name: "poolId";
|
|
249
|
+
readonly type: "bytes32";
|
|
250
|
+
}, {
|
|
251
|
+
readonly internalType: "int24";
|
|
252
|
+
readonly name: "tick";
|
|
253
|
+
readonly type: "int24";
|
|
254
|
+
}];
|
|
255
|
+
readonly name: "getTickLiquidity";
|
|
256
|
+
readonly outputs: readonly [{
|
|
257
|
+
readonly internalType: "uint128";
|
|
258
|
+
readonly name: "liquidityGross";
|
|
259
|
+
readonly type: "uint128";
|
|
260
|
+
}, {
|
|
261
|
+
readonly internalType: "int128";
|
|
262
|
+
readonly name: "liquidityNet";
|
|
263
|
+
readonly type: "int128";
|
|
264
|
+
}];
|
|
265
|
+
readonly stateMutability: "view";
|
|
266
|
+
readonly type: "function";
|
|
267
|
+
}, {
|
|
268
|
+
readonly inputs: readonly [];
|
|
269
|
+
readonly name: "poolManager";
|
|
270
|
+
readonly outputs: readonly [{
|
|
271
|
+
readonly internalType: "contract IPoolManager";
|
|
272
|
+
readonly name: "";
|
|
273
|
+
readonly type: "address";
|
|
274
|
+
}];
|
|
275
|
+
readonly stateMutability: "view";
|
|
276
|
+
readonly type: "function";
|
|
277
|
+
}];
|
|
278
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
declare const _default: readonly [{
|
|
2
|
+
readonly type: "function";
|
|
3
|
+
readonly name: "quoteExactInputSingle";
|
|
4
|
+
readonly inputs: readonly [{
|
|
5
|
+
readonly name: "params";
|
|
6
|
+
readonly type: "tuple";
|
|
7
|
+
readonly components: readonly [{
|
|
8
|
+
readonly name: "tokenIn";
|
|
9
|
+
readonly type: "address";
|
|
10
|
+
}, {
|
|
11
|
+
readonly name: "tokenOut";
|
|
12
|
+
readonly type: "address";
|
|
13
|
+
}, {
|
|
14
|
+
readonly name: "amountIn";
|
|
15
|
+
readonly type: "uint256";
|
|
16
|
+
}, {
|
|
17
|
+
readonly name: "fee";
|
|
18
|
+
readonly type: "uint24";
|
|
19
|
+
}, {
|
|
20
|
+
readonly name: "sqrtPriceLimitX96";
|
|
21
|
+
readonly type: "uint160";
|
|
22
|
+
}];
|
|
23
|
+
}];
|
|
24
|
+
readonly outputs: readonly [{
|
|
25
|
+
readonly name: "amountOut";
|
|
26
|
+
readonly type: "uint256";
|
|
27
|
+
}, {
|
|
28
|
+
readonly name: "sqrtPriceX96After";
|
|
29
|
+
readonly type: "uint160";
|
|
30
|
+
}, {
|
|
31
|
+
readonly name: "initializedTicksCrossed";
|
|
32
|
+
readonly type: "uint32";
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "gasEstimate";
|
|
35
|
+
readonly type: "uint256";
|
|
36
|
+
}];
|
|
37
|
+
readonly stateMutability: "nonpayable";
|
|
38
|
+
}];
|
|
39
|
+
export default _default;
|
|
@@ -4,7 +4,9 @@ export { default as LevrGovernor_v1 } from './LevrGovernor_v1';
|
|
|
4
4
|
export { default as LevrStakedToken_v1 } from './LevrStakedToken_v1';
|
|
5
5
|
export { default as LevrStaking_v1 } from './LevrStaking_v1';
|
|
6
6
|
export { default as LevrTreasury_v1 } from './LevrTreasury_v1';
|
|
7
|
+
export { default as V3QuoterV2 } from './V3QuoterV2';
|
|
7
8
|
export { default as Permit2 } from './Permit2';
|
|
9
|
+
export { default as StateView } from './StateView';
|
|
8
10
|
export { default as V4Quoter } from './V4Quoter';
|
|
9
11
|
export { default as IClankerAirdrop } from './IClankerAirdrop';
|
|
10
12
|
export { default as IClankerHookDynamicFee } from './IClankerHookDynamicFee';
|
package/dist/types/balance.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PopPublicClient } from './types';
|
|
1
|
+
import type { BalanceResult, PopPublicClient, PricingResult } from './types';
|
|
2
2
|
export type TokenConfig = {
|
|
3
3
|
address: `0x${string}`;
|
|
4
4
|
decimals: number;
|
|
@@ -8,17 +8,30 @@ export type BalanceParams = {
|
|
|
8
8
|
publicClient: PopPublicClient;
|
|
9
9
|
address: `0x${string}`;
|
|
10
10
|
tokens: TokenConfig[];
|
|
11
|
+
pricing?: PricingResult;
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Calculate USD value for a balance
|
|
15
|
+
* @param formatted - Formatted token amount as string
|
|
16
|
+
* @param usdPrice - USD price as string
|
|
17
|
+
* @returns USD value as string
|
|
18
|
+
*/
|
|
19
|
+
export declare const calculateUsd: (formatted: string, usdPrice: string) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Format a balance with optional USD value
|
|
22
|
+
* @param amount - Raw balance amount
|
|
23
|
+
* @param decimals - Token decimals
|
|
24
|
+
* @param usdPrice - Optional USD price (null if not available)
|
|
25
|
+
* @returns BalanceResult with raw, formatted, and optional USD value
|
|
26
|
+
*/
|
|
27
|
+
export declare const formatBalanceWithUsd: (amount: bigint, decimals: number, usdPrice: number | null) => BalanceResult;
|
|
16
28
|
/**
|
|
17
29
|
* Get balances for multiple tokens including native currency
|
|
18
30
|
* @param publicClient - The public client to use for queries
|
|
19
31
|
* @param address - The address to check balances for
|
|
20
32
|
* @param tokens - Array of token configurations (use zeroAddress for native currency)
|
|
33
|
+
* @param pricing - Optional pricing data for USD values
|
|
21
34
|
* @returns Object with balances keyed by token address or custom key
|
|
22
35
|
*/
|
|
23
|
-
export declare function balance({ publicClient, address, tokens, }: BalanceParams): Promise<Record<string, BalanceResult>>;
|
|
36
|
+
export declare function balance({ publicClient, address, tokens, pricing, }: BalanceParams): Promise<Record<string, BalanceResult>>;
|
|
24
37
|
//# sourceMappingURL=balance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balance.d.ts","sourceRoot":"","sources":["../../src/balance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"balance.d.ts","sourceRoot":"","sources":["../../src/balance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5E,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,YAAY,EAAE,eAAe,CAAA;IAC7B,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;IACtB,MAAM,EAAE,WAAW,EAAE,CAAA;IACrB,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,WAAW,MAAM,EAAE,UAAU,MAAM,KAAG,MAIlE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,MAAM,EACd,UAAU,MAAM,EAChB,UAAU,MAAM,GAAG,IAAI,KACtB,aAOF,CAAA;AAED;;;;;;;GAOG;AACH,wBAAsB,OAAO,CAAC,EAC5B,YAAY,EACZ,OAAO,EACP,MAAM,EACN,OAAO,GACR,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAoFxD"}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to access user data from LevrProvider (hierarchical)
|
|
3
|
+
*/
|
|
4
|
+
export declare const useUser: () => import("@tanstack/react-query").UseQueryResult<import("../..").User | null>;
|
|
1
5
|
/**
|
|
2
6
|
* Hook to access project data from LevrProvider
|
|
3
7
|
*/
|
|
4
8
|
export declare const useProject: () => import("@tanstack/react-query").UseQueryResult<import("../..").Project | null>;
|
|
5
9
|
/**
|
|
6
|
-
* Hook to access
|
|
10
|
+
* Hook to access pool data from LevrProvider
|
|
7
11
|
*/
|
|
8
|
-
export declare const
|
|
12
|
+
export declare const usePool: () => import("@tanstack/react-query").UseQueryResult<import("../..").PoolData | null>;
|
|
9
13
|
/**
|
|
10
14
|
* Hook to access proposals from LevrProvider
|
|
11
15
|
*/
|
|
12
|
-
export declare const useProposals: () => import("@tanstack/react-query").UseQueryResult<
|
|
16
|
+
export declare const useProposals: () => import("@tanstack/react-query").UseQueryResult<import("../..").ProposalsResult | null>;
|
|
13
17
|
/**
|
|
14
18
|
* Hook to access clanker token metadata from LevrProvider
|
|
15
19
|
*/
|
|
@@ -25,8 +29,12 @@ export * from './use-fee-receivers';
|
|
|
25
29
|
export * from './use-governance';
|
|
26
30
|
export * from './use-stake';
|
|
27
31
|
export * from './use-swap';
|
|
32
|
+
export { usePoolQuery } from './use-pool';
|
|
33
|
+
export { useProposalsQuery } from './use-proposal';
|
|
34
|
+
export { useUserQuery } from './use-user';
|
|
28
35
|
export * from './use-deploy';
|
|
29
36
|
export * from './use-prepare';
|
|
30
|
-
export * from './use-
|
|
37
|
+
export * from './use-project';
|
|
38
|
+
export { useProposal } from './use-proposal';
|
|
31
39
|
export * from './use-register';
|
|
32
40
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/index.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,eAAO,MAAM,UAAU,sFAAiC,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/index.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,eAAO,MAAM,OAAO,mFAA8B,CAAA;AAElD;;GAEG;AACH,eAAO,MAAM,UAAU,sFAAiC,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,OAAO,uFAA8B,CAAA;AAElD;;GAEG;AACH,eAAO,MAAM,YAAY,8FAAmC,CAAA;AAE5D;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;SAAmC,CAAA;AAM/D,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAM1B,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAMzC,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,cAAc,gBAAgB,CAAA"}
|
|
@@ -1,26 +1,16 @@
|
|
|
1
|
-
import type { Address } from 'viem';
|
|
2
1
|
import type { UpdateFeeReceiverParams } from '../../fee-receivers';
|
|
3
|
-
export type UseFeeReceiversQueryParams = {
|
|
4
|
-
clankerToken: Address | null;
|
|
5
|
-
enabled?: boolean;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Internal: Creates fee receivers query with all logic
|
|
9
|
-
* Used by LevrProvider
|
|
10
|
-
*/
|
|
11
|
-
export declare function useFeeReceiversQuery({ clankerToken, enabled: e, }: UseFeeReceiversQueryParams): import("@tanstack/react-query").UseQueryResult<import("../..").FeeReceiverAdmin[] | undefined, Error>;
|
|
12
2
|
export type UseFeeReceiversParams = {
|
|
13
|
-
clankerToken?: `0x${string}` | undefined;
|
|
14
|
-
enabled?: boolean;
|
|
15
3
|
onSuccess?: (hash: `0x${string}`) => void;
|
|
16
4
|
onError?: (error: unknown) => void;
|
|
17
5
|
};
|
|
18
6
|
/**
|
|
19
|
-
* Hook to access fee receivers
|
|
20
|
-
*
|
|
7
|
+
* Hook to access fee receivers and update mutations
|
|
8
|
+
* Fee receivers come from project.feeReceivers (with areYouAnAdmin already calculated)
|
|
21
9
|
*/
|
|
22
|
-
export declare function useFeeReceivers({
|
|
23
|
-
|
|
10
|
+
export declare function useFeeReceivers({ onSuccess, onError }?: UseFeeReceiversParams): {
|
|
11
|
+
data: import("../..").FeeReceiverAdmin[] | undefined;
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
error: Error | null;
|
|
24
14
|
mutate: import("@tanstack/react-query").UseMutationResult<`0x${string}`, unknown, Omit<UpdateFeeReceiverParams, "chainId" | "walletClient">, unknown>;
|
|
25
15
|
};
|
|
26
16
|
//# sourceMappingURL=use-fee-receivers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-fee-receivers.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-fee-receivers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-fee-receivers.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-fee-receivers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAWlE,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,MAAM,EAAE,KAAK,IAAI,CAAA;IACzC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CACnC,CAAA;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAE,qBAA0B;;;;;EA4BjF"}
|
|
@@ -1,39 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ExecuteProposalConfig,
|
|
3
|
-
export type UseGovernanceQueriesParams = {
|
|
4
|
-
clankerToken: Address | null;
|
|
5
|
-
projectData: any;
|
|
6
|
-
enabled?: boolean;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Internal: Creates global governance queries with all logic
|
|
10
|
-
* Used by LevrProvider
|
|
11
|
-
*/
|
|
12
|
-
export declare function useGovernanceQueries({ clankerToken, projectData, enabled: e, }: UseGovernanceQueriesParams): {
|
|
13
|
-
currentCycleId: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
|
|
14
|
-
addresses: import("@tanstack/react-query").UseQueryResult<{
|
|
15
|
-
treasury: `0x${string}`;
|
|
16
|
-
factory: `0x${string}`;
|
|
17
|
-
stakedToken: `0x${string}`;
|
|
18
|
-
}, Error>;
|
|
19
|
-
airdropStatus: import("@tanstack/react-query").UseQueryResult<{
|
|
20
|
-
availableAmount: {
|
|
21
|
-
raw: bigint;
|
|
22
|
-
formatted: string;
|
|
23
|
-
};
|
|
24
|
-
allocatedAmount: {
|
|
25
|
-
raw: bigint;
|
|
26
|
-
formatted: string;
|
|
27
|
-
};
|
|
28
|
-
isAvailable: boolean;
|
|
29
|
-
error?: string;
|
|
30
|
-
}, Error>;
|
|
31
|
-
};
|
|
1
|
+
import type { TransactionReceipt } from 'viem';
|
|
2
|
+
import type { ExecuteProposalConfig, ProposeBoostConfig, ProposeTransferConfig } from '../../governance';
|
|
32
3
|
export type UseGovernanceParams = {
|
|
33
|
-
governorAddress: `0x${string}`;
|
|
34
|
-
clankerToken: `0x${string}`;
|
|
35
|
-
tokenDecimals?: number;
|
|
36
|
-
enabled?: boolean;
|
|
37
4
|
proposalId?: number | bigint;
|
|
38
5
|
cycleId?: number | bigint;
|
|
39
6
|
userAddress?: `0x${string}`;
|
|
@@ -50,9 +17,9 @@ export type UseGovernanceParams = {
|
|
|
50
17
|
};
|
|
51
18
|
/**
|
|
52
19
|
* Hook for managing governance operations
|
|
53
|
-
*
|
|
20
|
+
* All data comes from context (user, project)
|
|
54
21
|
*/
|
|
55
|
-
export declare function useGovernance({
|
|
22
|
+
export declare function useGovernance({ proposalId, cycleId, userAddress, onProposeTransferSuccess, onProposeTransferError, onProposeBoostSuccess, onProposeBoostError, onVoteSuccess, onVoteError, onExecuteProposalSuccess, onExecuteProposalError, onClaimAirdropSuccess, onClaimAirdropError, }?: UseGovernanceParams): {
|
|
56
23
|
proposeTransfer: import("@tanstack/react-query").UseMutationResult<{
|
|
57
24
|
receipt: TransactionReceipt;
|
|
58
25
|
proposalId: bigint;
|
|
@@ -67,61 +34,6 @@ export declare function useGovernance({ governorAddress, clankerToken: _clankerT
|
|
|
67
34
|
}, unknown>;
|
|
68
35
|
executeProposal: import("@tanstack/react-query").UseMutationResult<TransactionReceipt, unknown, ExecuteProposalConfig, unknown>;
|
|
69
36
|
claimAirdrop: import("@tanstack/react-query").UseMutationResult<TransactionReceipt, unknown, void, unknown>;
|
|
70
|
-
proposeAndExecuteTransfer: import("@tanstack/react-query").UseMutationResult<{
|
|
71
|
-
proposeReceipt: TransactionReceipt;
|
|
72
|
-
executeReceipt: TransactionReceipt;
|
|
73
|
-
proposalId: bigint;
|
|
74
|
-
}, Error, ProposeTransferConfig, unknown>;
|
|
75
|
-
proposeAndExecuteBoost: import("@tanstack/react-query").UseMutationResult<{
|
|
76
|
-
proposeReceipt: TransactionReceipt;
|
|
77
|
-
executeReceipt: TransactionReceipt;
|
|
78
|
-
proposalId: bigint;
|
|
79
|
-
}, Error, ProposeBoostConfig, unknown>;
|
|
80
|
-
proposal: import("@tanstack/react-query").UseQueryResult<FormattedProposalDetails, Error>;
|
|
81
|
-
currentCycleId: import("@tanstack/react-query").UseQueryResult<bigint>;
|
|
82
|
-
addresses: import("@tanstack/react-query").UseQueryResult<{
|
|
83
|
-
treasury: Address;
|
|
84
|
-
factory: Address;
|
|
85
|
-
stakedToken: Address;
|
|
86
|
-
}>;
|
|
87
|
-
airdropStatus: import("@tanstack/react-query").UseQueryResult<any>;
|
|
88
|
-
proposalsForCycle: import("@tanstack/react-query").UseQueryResult<readonly bigint[], Error>;
|
|
89
|
-
winner: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
|
|
90
|
-
voteReceipt: import("@tanstack/react-query").UseQueryResult<{
|
|
91
|
-
hasVoted: boolean;
|
|
92
|
-
support: boolean;
|
|
93
|
-
votes: bigint;
|
|
94
|
-
}, Error>;
|
|
95
|
-
votingPowerSnapshot: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
|
|
96
|
-
meetsQuorum: import("@tanstack/react-query").UseQueryResult<boolean, Error>;
|
|
97
|
-
meetsApproval: import("@tanstack/react-query").UseQueryResult<boolean, Error>;
|
|
98
|
-
proposalState: import("@tanstack/react-query").UseQueryResult<number, Error>;
|
|
99
|
-
activeProposalCount: import("@tanstack/react-query").UseQueryResult<{
|
|
100
|
-
boost: bigint;
|
|
101
|
-
transfer: bigint;
|
|
102
|
-
}, Error>;
|
|
103
|
-
proposalData: FormattedProposalDetails | undefined;
|
|
104
|
-
proposalDescription: string | undefined;
|
|
105
|
-
currentCycleIdValue: bigint | undefined;
|
|
106
|
-
cycleProposals: readonly bigint[] | undefined;
|
|
107
|
-
winnerProposalId: bigint | undefined;
|
|
108
|
-
hasVoted: boolean;
|
|
109
|
-
voteSupport: boolean | undefined;
|
|
110
|
-
votesUsed: bigint | undefined;
|
|
111
|
-
userVotingPower: bigint | undefined;
|
|
112
|
-
proposalMeetsQuorum: boolean;
|
|
113
|
-
proposalMeetsApproval: boolean;
|
|
114
|
-
proposalStateValue: number | undefined;
|
|
115
|
-
activeBoostProposals: bigint | undefined;
|
|
116
|
-
activeTransferProposals: bigint | undefined;
|
|
117
|
-
treasuryAddress: `0x${string}` | undefined;
|
|
118
|
-
factoryAddress: `0x${string}` | undefined;
|
|
119
|
-
stakedTokenAddress: `0x${string}` | undefined;
|
|
120
|
-
airdropStatusData: any;
|
|
121
|
-
availableAirdropAmount: any;
|
|
122
|
-
airdropAllocatedAmount: any;
|
|
123
|
-
isAirdropAvailable: any;
|
|
124
|
-
airdropError: any;
|
|
125
37
|
buildProposeTransferConfig: ({ recipient, amount, amountDecimals, description, }: {
|
|
126
38
|
recipient: `0x${string}`;
|
|
127
39
|
amount: number | string;
|
|
@@ -136,7 +48,6 @@ export declare function useGovernance({ governorAddress, clankerToken: _clankerT
|
|
|
136
48
|
proposalId: number | bigint;
|
|
137
49
|
}) => ExecuteProposalConfig;
|
|
138
50
|
isReady: boolean;
|
|
139
|
-
isLoading: boolean;
|
|
140
51
|
isProposing: boolean;
|
|
141
52
|
isVoting: boolean;
|
|
142
53
|
isExecuting: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-governance.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-governance.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"use-governance.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-governance.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAA;AAI9C,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,kBAAkB,CAAA;AAQzB,MAAM,MAAM,mBAAmB,GAAG;IAEhC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,WAAW,CAAC,EAAE,KAAK,MAAM,EAAE,CAAA;IAG3B,wBAAwB,CAAC,EAAE,CAAC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IACpF,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAEjD,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IACjF,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAE9C,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAA;IACrD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAEtC,wBAAwB,CAAC,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAChE,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAEjD,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAC7D,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CAC/C,CAAA;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,OAAO,EACP,WAAW,EACX,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,GACpB,GAAE,mBAAwB;;;;;;;;;;oBAuBT,MAAM,GAAG,MAAM;iBAClB,OAAO;;;;sFAyFjB;QACD,SAAS,EAAE,KAAK,MAAM,EAAE,CAAA;QACxB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;QACvB,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,WAAW,EAAE,MAAM,CAAA;KACpB,KAAG,qBAAqB;2DAUtB;QACD,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;QACvB,cAAc,CAAC,EAAE,MAAM,CAAA;KACxB,KAAG,kBAAkB;kDAOnB;QACD,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;KAC5B,KAAG,qBAAqB;;;;;;EAwB1B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PoolData } from '../../pool';
|
|
2
|
+
import type { Project } from '../../project';
|
|
3
|
+
export type UsePoolQueryParams = {
|
|
4
|
+
project: Project | null | undefined;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Internal: Creates pool query with pool-specific data
|
|
9
|
+
* Used by LevrProvider
|
|
10
|
+
*/
|
|
11
|
+
export declare function usePoolQuery({ project: projectData, enabled: e }: UsePoolQueryParams): import("@tanstack/react-query").UseQueryResult<PoolData | null, Error>;
|
|
12
|
+
//# sourceMappingURL=use-pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-pool.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-pool.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAE1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAG5C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;IACnC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAQ,EAAE,EAAE,kBAAkB,0EAiB3F"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export type UsePrepareParams = {
|
|
2
|
-
factoryAddress?: `0x${string}`;
|
|
3
2
|
onSuccess?: (params: {
|
|
4
3
|
hash: `0x${string}`;
|
|
5
4
|
treasury: `0x${string}` | undefined;
|
|
@@ -13,7 +12,7 @@ export type UsePrepareParams = {
|
|
|
13
12
|
* @param options - The options for the prepare mutation.
|
|
14
13
|
* @returns The hash of the transaction.
|
|
15
14
|
*/
|
|
16
|
-
export declare function usePrepare({
|
|
15
|
+
export declare function usePrepare({ onSuccess, onError }: UsePrepareParams): import("@tanstack/react-query").UseMutationResult<{
|
|
17
16
|
hash: `0x${string}`;
|
|
18
17
|
treasury: `0x${string}` | undefined;
|
|
19
18
|
staking: `0x${string}` | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-prepare.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-prepare.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-prepare.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-prepare.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,KAAK,MAAM,EAAE,CAAA;QACnB,QAAQ,EAAE,KAAK,MAAM,EAAE,GAAG,SAAS,CAAA;QACnC,OAAO,EAAE,KAAK,MAAM,EAAE,GAAG,SAAS,CAAA;KACnC,KAAK,IAAI,CAAA;IACV,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CACnC,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,gBAAgB;;;;2BAwClE"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import type { Address } from 'viem';
|
|
2
|
+
import type { ProjectsParams, ProjectsResult } from '../..';
|
|
3
|
+
import type { PopPublicClient } from '../../types';
|
|
2
4
|
export type UseProjectQueryParams = {
|
|
3
5
|
clankerToken: Address | null;
|
|
6
|
+
oraclePublicClient: PopPublicClient;
|
|
4
7
|
enabled?: boolean;
|
|
5
8
|
};
|
|
6
9
|
/**
|
|
7
10
|
* Internal: Creates project query with all logic
|
|
8
11
|
* Used by LevrProvider
|
|
9
12
|
*/
|
|
10
|
-
export declare function useProjectQuery({ clankerToken, enabled: e }: UseProjectQueryParams): import("@tanstack/react-query").UseQueryResult<import("../..").Project | null, Error>;
|
|
13
|
+
export declare function useProjectQuery({ clankerToken, oraclePublicClient, enabled: e, }: UseProjectQueryParams): import("@tanstack/react-query").UseQueryResult<import("../..").Project | null, Error>;
|
|
14
|
+
export type UseProjectsParams = {
|
|
15
|
+
enabled?: boolean;
|
|
16
|
+
} & Omit<ProjectsParams, 'publicClient'>;
|
|
17
|
+
export declare function useProjects({ enabled: e, offset, limit }?: UseProjectsParams): import("@tanstack/react-query").UseQueryResult<ProjectsResult, Error>;
|
|
11
18
|
//# sourceMappingURL=use-project.d.ts.map
|