levr-sdk 0.0.1
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/LICENSE.md +201 -0
- package/README.md +711 -0
- package/dist/esm/abis/IClankerAirdrop.js +443 -0
- package/dist/esm/abis/IClankerHookDynamicFee.js +198 -0
- package/dist/esm/abis/IClankerHookStaticFee.js +75 -0
- package/dist/esm/abis/IClankerLPLocker.js +402 -0
- package/dist/esm/abis/IClankerLpLockerMultiple.js +609 -0
- package/dist/esm/abis/IClankerToken.js +421 -0
- package/dist/esm/abis/LevrFactory_v1.js +608 -0
- package/dist/esm/abis/LevrForwarder_v1.js +622 -0
- package/dist/esm/abis/LevrGovernor_v1.js +726 -0
- package/dist/esm/abis/LevrStakedToken_v1.js +441 -0
- package/dist/esm/abis/LevrStaking_v1.js +607 -0
- package/dist/esm/abis/LevrTreasury_v1.js +219 -0
- package/dist/esm/abis/Permit2.js +29 -0
- package/dist/esm/abis/V4Quoter.js +466 -0
- package/dist/esm/abis/WETH9.js +153 -0
- package/dist/esm/abis/index.js +23 -0
- package/dist/esm/balance.js +72 -0
- package/dist/esm/balance.js.map +1 -0
- package/dist/esm/build-calldatas-v4.js +98 -0
- package/dist/esm/build-calldatas-v4.js.map +1 -0
- package/dist/esm/build-clanker-v4.js +128 -0
- package/dist/esm/build-clanker-v4.js.map +1 -0
- package/dist/esm/client/hook/index.js +36 -0
- package/dist/esm/client/hook/index.js.map +1 -0
- package/dist/esm/client/hook/use-balance.js +56 -0
- package/dist/esm/client/hook/use-balance.js.map +1 -0
- package/dist/esm/client/hook/use-clanker.js +57 -0
- package/dist/esm/client/hook/use-clanker.js.map +1 -0
- package/dist/esm/client/hook/use-deploy.js +16 -0
- package/dist/esm/client/hook/use-deploy.js.map +1 -0
- package/dist/esm/client/hook/use-fee-receivers.js +54 -0
- package/dist/esm/client/hook/use-fee-receivers.js.map +1 -0
- package/dist/esm/client/hook/use-governance.js +389 -0
- package/dist/esm/client/hook/use-governance.js.map +1 -0
- package/dist/esm/client/hook/use-prepare.js +47 -0
- package/dist/esm/client/hook/use-prepare.js.map +1 -0
- package/dist/esm/client/hook/use-project.js +29 -0
- package/dist/esm/client/hook/use-project.js.map +1 -0
- package/dist/esm/client/hook/use-projects.js +22 -0
- package/dist/esm/client/hook/use-projects.js.map +1 -0
- package/dist/esm/client/hook/use-proposals.js +31 -0
- package/dist/esm/client/hook/use-proposals.js.map +1 -0
- package/dist/esm/client/hook/use-register.js +101 -0
- package/dist/esm/client/hook/use-register.js.map +1 -0
- package/dist/esm/client/hook/use-stake.js +327 -0
- package/dist/esm/client/hook/use-stake.js.map +1 -0
- package/dist/esm/client/hook/use-swap.js +110 -0
- package/dist/esm/client/hook/use-swap.js.map +1 -0
- package/dist/esm/client/index.js +4 -0
- package/dist/esm/client/index.js.map +1 -0
- package/dist/esm/client/levr-provider.js +201 -0
- package/dist/esm/client/levr-provider.js.map +1 -0
- package/dist/esm/client/query-keys.js +61 -0
- package/dist/esm/client/query-keys.js.map +1 -0
- package/dist/esm/constants.js +182 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/deploy-v4.js +46 -0
- package/dist/esm/deploy-v4.js.map +1 -0
- package/dist/esm/fee-receivers.js +52 -0
- package/dist/esm/fee-receivers.js.map +1 -0
- package/dist/esm/governance.js +555 -0
- package/dist/esm/governance.js.map +1 -0
- package/dist/esm/index.js +18 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/project.js +146 -0
- package/dist/esm/project.js.map +1 -0
- package/dist/esm/projects.js +212 -0
- package/dist/esm/projects.js.map +1 -0
- package/dist/esm/proposals.js +98 -0
- package/dist/esm/proposals.js.map +1 -0
- package/dist/esm/quote-v4.js +169 -0
- package/dist/esm/quote-v4.js.map +1 -0
- package/dist/esm/schema/base.schema.js +11 -0
- package/dist/esm/schema/base.schema.js.map +1 -0
- package/dist/esm/schema/clanker.schema.js +191 -0
- package/dist/esm/schema/clanker.schema.js.map +1 -0
- package/dist/esm/schema/index.js +4 -0
- package/dist/esm/schema/index.js.map +1 -0
- package/dist/esm/schema/levr.schema.js +114 -0
- package/dist/esm/schema/levr.schema.js.map +1 -0
- package/dist/esm/stake.js +384 -0
- package/dist/esm/stake.js.map +1 -0
- package/dist/esm/swap-v4.js +281 -0
- package/dist/esm/swap-v4.js.map +1 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/util.js +19 -0
- package/dist/esm/util.js.map +1 -0
- package/dist/types/abis/IClankerAirdrop.d.ts +348 -0
- package/dist/types/abis/IClankerHookDynamicFee.d.ts +156 -0
- package/dist/types/abis/IClankerHookStaticFee.d.ts +58 -0
- package/dist/types/abis/IClankerLPLocker.d.ts +316 -0
- package/dist/types/abis/IClankerLpLockerMultiple.d.ts +481 -0
- package/dist/types/abis/IClankerToken.d.ts +326 -0
- package/dist/types/abis/LevrFactory_v1.d.ts +471 -0
- package/dist/types/abis/LevrForwarder_v1.d.ts +478 -0
- package/dist/types/abis/LevrGovernor_v1.d.ts +562 -0
- package/dist/types/abis/LevrStakedToken_v1.d.ts +338 -0
- package/dist/types/abis/LevrStaking_v1.d.ts +468 -0
- package/dist/types/abis/LevrTreasury_v1.d.ts +169 -0
- package/dist/types/abis/Permit2.d.ts +54 -0
- package/dist/types/abis/V4Quoter.d.ts +496 -0
- package/dist/types/abis/WETH9.d.ts +244 -0
- package/dist/types/abis/index.d.ts +15 -0
- package/dist/types/balance.d.ts +24 -0
- package/dist/types/balance.d.ts.map +1 -0
- package/dist/types/build-calldatas-v4.d.ts +20 -0
- package/dist/types/build-calldatas-v4.d.ts.map +1 -0
- package/dist/types/build-clanker-v4.d.ts +12 -0
- package/dist/types/build-clanker-v4.d.ts.map +1 -0
- package/dist/types/client/hook/index.d.ts +32 -0
- package/dist/types/client/hook/index.d.ts.map +1 -0
- package/dist/types/client/hook/use-balance.d.ts +18 -0
- package/dist/types/client/hook/use-balance.d.ts.map +1 -0
- package/dist/types/client/hook/use-clanker.d.ts +23 -0
- package/dist/types/client/hook/use-clanker.d.ts.map +1 -0
- package/dist/types/client/hook/use-deploy.d.ts +45 -0
- package/dist/types/client/hook/use-deploy.d.ts.map +1 -0
- package/dist/types/client/hook/use-fee-receivers.d.ts +26 -0
- package/dist/types/client/hook/use-fee-receivers.d.ts.map +1 -0
- package/dist/types/client/hook/use-governance.d.ts +145 -0
- package/dist/types/client/hook/use-governance.d.ts.map +1 -0
- package/dist/types/client/hook/use-prepare.d.ts +21 -0
- package/dist/types/client/hook/use-prepare.d.ts.map +1 -0
- package/dist/types/client/hook/use-project.d.ts +11 -0
- package/dist/types/client/hook/use-project.d.ts.map +1 -0
- package/dist/types/client/hook/use-projects.d.ts +6 -0
- package/dist/types/client/hook/use-projects.d.ts.map +1 -0
- package/dist/types/client/hook/use-proposals.d.ts +16 -0
- package/dist/types/client/hook/use-proposals.d.ts.map +1 -0
- package/dist/types/client/hook/use-register.d.ts +31 -0
- package/dist/types/client/hook/use-register.d.ts.map +1 -0
- package/dist/types/client/hook/use-stake.d.ts +195 -0
- package/dist/types/client/hook/use-stake.d.ts.map +1 -0
- package/dist/types/client/hook/use-swap.d.ts +59 -0
- package/dist/types/client/hook/use-swap.d.ts.map +1 -0
- package/dist/types/client/index.d.ts +4 -0
- package/dist/types/client/index.d.ts.map +1 -0
- package/dist/types/client/levr-provider.d.ts +127 -0
- package/dist/types/client/levr-provider.d.ts.map +1 -0
- package/dist/types/client/query-keys.d.ts +61 -0
- package/dist/types/client/query-keys.d.ts.map +1 -0
- package/dist/types/constants.d.ts +101 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/deploy-v4.d.ts +13 -0
- package/dist/types/deploy-v4.d.ts.map +1 -0
- package/dist/types/fee-receivers.d.ts +29 -0
- package/dist/types/fee-receivers.d.ts.map +1 -0
- package/dist/types/governance.d.ts +205 -0
- package/dist/types/governance.d.ts.map +1 -0
- package/dist/types/index.d.ts +18 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/project.d.ts +51 -0
- package/dist/types/project.d.ts.map +1 -0
- package/dist/types/projects.d.ts +20 -0
- package/dist/types/projects.d.ts.map +1 -0
- package/dist/types/proposals.d.ts +20 -0
- package/dist/types/proposals.d.ts.map +1 -0
- package/dist/types/quote-v4.d.ts +54 -0
- package/dist/types/quote-v4.d.ts.map +1 -0
- package/dist/types/schema/base.schema.d.ts +5 -0
- package/dist/types/schema/base.schema.d.ts.map +1 -0
- package/dist/types/schema/clanker.schema.d.ts +104 -0
- package/dist/types/schema/clanker.schema.d.ts.map +1 -0
- package/dist/types/schema/index.d.ts +4 -0
- package/dist/types/schema/index.d.ts.map +1 -0
- package/dist/types/schema/levr.schema.d.ts +34 -0
- package/dist/types/schema/levr.schema.d.ts.map +1 -0
- package/dist/types/stake.d.ts +137 -0
- package/dist/types/stake.d.ts.map +1 -0
- package/dist/types/swap-v4.d.ts +97 -0
- package/dist/types/swap-v4.d.ts.map +1 -0
- package/dist/types/types.d.ts +20 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/util.d.ts +5 -0
- package/dist/types/util.d.ts.map +1 -0
- package/package.json +100 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
declare const _default: readonly [{
|
|
2
|
+
readonly anonymous: false;
|
|
3
|
+
readonly inputs: readonly [{
|
|
4
|
+
readonly indexed: true;
|
|
5
|
+
readonly internalType: "address";
|
|
6
|
+
readonly name: "src";
|
|
7
|
+
readonly type: "address";
|
|
8
|
+
}, {
|
|
9
|
+
readonly indexed: true;
|
|
10
|
+
readonly internalType: "address";
|
|
11
|
+
readonly name: "guy";
|
|
12
|
+
readonly type: "address";
|
|
13
|
+
}, {
|
|
14
|
+
readonly indexed: false;
|
|
15
|
+
readonly internalType: "uint256";
|
|
16
|
+
readonly name: "wad";
|
|
17
|
+
readonly type: "uint256";
|
|
18
|
+
}];
|
|
19
|
+
readonly name: "Approval";
|
|
20
|
+
readonly type: "event";
|
|
21
|
+
}, {
|
|
22
|
+
readonly anonymous: false;
|
|
23
|
+
readonly inputs: readonly [{
|
|
24
|
+
readonly indexed: true;
|
|
25
|
+
readonly internalType: "address";
|
|
26
|
+
readonly name: "dst";
|
|
27
|
+
readonly type: "address";
|
|
28
|
+
}, {
|
|
29
|
+
readonly indexed: false;
|
|
30
|
+
readonly internalType: "uint256";
|
|
31
|
+
readonly name: "wad";
|
|
32
|
+
readonly type: "uint256";
|
|
33
|
+
}];
|
|
34
|
+
readonly name: "Deposit";
|
|
35
|
+
readonly type: "event";
|
|
36
|
+
}, {
|
|
37
|
+
readonly anonymous: false;
|
|
38
|
+
readonly inputs: readonly [{
|
|
39
|
+
readonly indexed: true;
|
|
40
|
+
readonly internalType: "address";
|
|
41
|
+
readonly name: "src";
|
|
42
|
+
readonly type: "address";
|
|
43
|
+
}, {
|
|
44
|
+
readonly indexed: true;
|
|
45
|
+
readonly internalType: "address";
|
|
46
|
+
readonly name: "dst";
|
|
47
|
+
readonly type: "address";
|
|
48
|
+
}, {
|
|
49
|
+
readonly indexed: false;
|
|
50
|
+
readonly internalType: "uint256";
|
|
51
|
+
readonly name: "wad";
|
|
52
|
+
readonly type: "uint256";
|
|
53
|
+
}];
|
|
54
|
+
readonly name: "Transfer";
|
|
55
|
+
readonly type: "event";
|
|
56
|
+
}, {
|
|
57
|
+
readonly anonymous: false;
|
|
58
|
+
readonly inputs: readonly [{
|
|
59
|
+
readonly indexed: true;
|
|
60
|
+
readonly internalType: "address";
|
|
61
|
+
readonly name: "src";
|
|
62
|
+
readonly type: "address";
|
|
63
|
+
}, {
|
|
64
|
+
readonly indexed: false;
|
|
65
|
+
readonly internalType: "uint256";
|
|
66
|
+
readonly name: "wad";
|
|
67
|
+
readonly type: "uint256";
|
|
68
|
+
}];
|
|
69
|
+
readonly name: "Withdrawal";
|
|
70
|
+
readonly type: "event";
|
|
71
|
+
}, {
|
|
72
|
+
readonly payable: true;
|
|
73
|
+
readonly stateMutability: "payable";
|
|
74
|
+
readonly type: "fallback";
|
|
75
|
+
}, {
|
|
76
|
+
readonly constant: true;
|
|
77
|
+
readonly inputs: readonly [{
|
|
78
|
+
readonly internalType: "address";
|
|
79
|
+
readonly name: "";
|
|
80
|
+
readonly type: "address";
|
|
81
|
+
}, {
|
|
82
|
+
readonly internalType: "address";
|
|
83
|
+
readonly name: "";
|
|
84
|
+
readonly type: "address";
|
|
85
|
+
}];
|
|
86
|
+
readonly name: "allowance";
|
|
87
|
+
readonly outputs: readonly [{
|
|
88
|
+
readonly internalType: "uint256";
|
|
89
|
+
readonly name: "";
|
|
90
|
+
readonly type: "uint256";
|
|
91
|
+
}];
|
|
92
|
+
readonly payable: false;
|
|
93
|
+
readonly stateMutability: "view";
|
|
94
|
+
readonly type: "function";
|
|
95
|
+
}, {
|
|
96
|
+
readonly constant: false;
|
|
97
|
+
readonly inputs: readonly [{
|
|
98
|
+
readonly internalType: "address";
|
|
99
|
+
readonly name: "guy";
|
|
100
|
+
readonly type: "address";
|
|
101
|
+
}, {
|
|
102
|
+
readonly internalType: "uint256";
|
|
103
|
+
readonly name: "wad";
|
|
104
|
+
readonly type: "uint256";
|
|
105
|
+
}];
|
|
106
|
+
readonly name: "approve";
|
|
107
|
+
readonly outputs: readonly [{
|
|
108
|
+
readonly internalType: "bool";
|
|
109
|
+
readonly name: "";
|
|
110
|
+
readonly type: "bool";
|
|
111
|
+
}];
|
|
112
|
+
readonly payable: false;
|
|
113
|
+
readonly stateMutability: "nonpayable";
|
|
114
|
+
readonly type: "function";
|
|
115
|
+
}, {
|
|
116
|
+
readonly constant: true;
|
|
117
|
+
readonly inputs: readonly [{
|
|
118
|
+
readonly internalType: "address";
|
|
119
|
+
readonly name: "";
|
|
120
|
+
readonly type: "address";
|
|
121
|
+
}];
|
|
122
|
+
readonly name: "balanceOf";
|
|
123
|
+
readonly outputs: readonly [{
|
|
124
|
+
readonly internalType: "uint256";
|
|
125
|
+
readonly name: "";
|
|
126
|
+
readonly type: "uint256";
|
|
127
|
+
}];
|
|
128
|
+
readonly payable: false;
|
|
129
|
+
readonly stateMutability: "view";
|
|
130
|
+
readonly type: "function";
|
|
131
|
+
}, {
|
|
132
|
+
readonly constant: true;
|
|
133
|
+
readonly inputs: readonly [];
|
|
134
|
+
readonly name: "decimals";
|
|
135
|
+
readonly outputs: readonly [{
|
|
136
|
+
readonly internalType: "uint8";
|
|
137
|
+
readonly name: "";
|
|
138
|
+
readonly type: "uint8";
|
|
139
|
+
}];
|
|
140
|
+
readonly payable: false;
|
|
141
|
+
readonly stateMutability: "view";
|
|
142
|
+
readonly type: "function";
|
|
143
|
+
}, {
|
|
144
|
+
readonly constant: false;
|
|
145
|
+
readonly inputs: readonly [];
|
|
146
|
+
readonly name: "deposit";
|
|
147
|
+
readonly outputs: readonly [];
|
|
148
|
+
readonly payable: true;
|
|
149
|
+
readonly stateMutability: "payable";
|
|
150
|
+
readonly type: "function";
|
|
151
|
+
}, {
|
|
152
|
+
readonly constant: true;
|
|
153
|
+
readonly inputs: readonly [];
|
|
154
|
+
readonly name: "name";
|
|
155
|
+
readonly outputs: readonly [{
|
|
156
|
+
readonly internalType: "string";
|
|
157
|
+
readonly name: "";
|
|
158
|
+
readonly type: "string";
|
|
159
|
+
}];
|
|
160
|
+
readonly payable: false;
|
|
161
|
+
readonly stateMutability: "view";
|
|
162
|
+
readonly type: "function";
|
|
163
|
+
}, {
|
|
164
|
+
readonly constant: true;
|
|
165
|
+
readonly inputs: readonly [];
|
|
166
|
+
readonly name: "symbol";
|
|
167
|
+
readonly outputs: readonly [{
|
|
168
|
+
readonly internalType: "string";
|
|
169
|
+
readonly name: "";
|
|
170
|
+
readonly type: "string";
|
|
171
|
+
}];
|
|
172
|
+
readonly payable: false;
|
|
173
|
+
readonly stateMutability: "view";
|
|
174
|
+
readonly type: "function";
|
|
175
|
+
}, {
|
|
176
|
+
readonly constant: true;
|
|
177
|
+
readonly inputs: readonly [];
|
|
178
|
+
readonly name: "totalSupply";
|
|
179
|
+
readonly outputs: readonly [{
|
|
180
|
+
readonly internalType: "uint256";
|
|
181
|
+
readonly name: "";
|
|
182
|
+
readonly type: "uint256";
|
|
183
|
+
}];
|
|
184
|
+
readonly payable: false;
|
|
185
|
+
readonly stateMutability: "view";
|
|
186
|
+
readonly type: "function";
|
|
187
|
+
}, {
|
|
188
|
+
readonly constant: false;
|
|
189
|
+
readonly inputs: readonly [{
|
|
190
|
+
readonly internalType: "address";
|
|
191
|
+
readonly name: "dst";
|
|
192
|
+
readonly type: "address";
|
|
193
|
+
}, {
|
|
194
|
+
readonly internalType: "uint256";
|
|
195
|
+
readonly name: "wad";
|
|
196
|
+
readonly type: "uint256";
|
|
197
|
+
}];
|
|
198
|
+
readonly name: "transfer";
|
|
199
|
+
readonly outputs: readonly [{
|
|
200
|
+
readonly internalType: "bool";
|
|
201
|
+
readonly name: "";
|
|
202
|
+
readonly type: "bool";
|
|
203
|
+
}];
|
|
204
|
+
readonly payable: false;
|
|
205
|
+
readonly stateMutability: "nonpayable";
|
|
206
|
+
readonly type: "function";
|
|
207
|
+
}, {
|
|
208
|
+
readonly constant: false;
|
|
209
|
+
readonly inputs: readonly [{
|
|
210
|
+
readonly internalType: "address";
|
|
211
|
+
readonly name: "src";
|
|
212
|
+
readonly type: "address";
|
|
213
|
+
}, {
|
|
214
|
+
readonly internalType: "address";
|
|
215
|
+
readonly name: "dst";
|
|
216
|
+
readonly type: "address";
|
|
217
|
+
}, {
|
|
218
|
+
readonly internalType: "uint256";
|
|
219
|
+
readonly name: "wad";
|
|
220
|
+
readonly type: "uint256";
|
|
221
|
+
}];
|
|
222
|
+
readonly name: "transferFrom";
|
|
223
|
+
readonly outputs: readonly [{
|
|
224
|
+
readonly internalType: "bool";
|
|
225
|
+
readonly name: "";
|
|
226
|
+
readonly type: "bool";
|
|
227
|
+
}];
|
|
228
|
+
readonly payable: false;
|
|
229
|
+
readonly stateMutability: "nonpayable";
|
|
230
|
+
readonly type: "function";
|
|
231
|
+
}, {
|
|
232
|
+
readonly constant: false;
|
|
233
|
+
readonly inputs: readonly [{
|
|
234
|
+
readonly internalType: "uint256";
|
|
235
|
+
readonly name: "wad";
|
|
236
|
+
readonly type: "uint256";
|
|
237
|
+
}];
|
|
238
|
+
readonly name: "withdraw";
|
|
239
|
+
readonly outputs: readonly [];
|
|
240
|
+
readonly payable: false;
|
|
241
|
+
readonly stateMutability: "nonpayable";
|
|
242
|
+
readonly type: "function";
|
|
243
|
+
}];
|
|
244
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { default as LevrFactory_v1 } from './LevrFactory_v1';
|
|
2
|
+
export { default as LevrForwarder_v1 } from './LevrForwarder_v1';
|
|
3
|
+
export { default as LevrGovernor_v1 } from './LevrGovernor_v1';
|
|
4
|
+
export { default as LevrStakedToken_v1 } from './LevrStakedToken_v1';
|
|
5
|
+
export { default as LevrStaking_v1 } from './LevrStaking_v1';
|
|
6
|
+
export { default as LevrTreasury_v1 } from './LevrTreasury_v1';
|
|
7
|
+
export { default as Permit2 } from './Permit2';
|
|
8
|
+
export { default as V4Quoter } from './V4Quoter';
|
|
9
|
+
export { default as IClankerAirdrop } from './IClankerAirdrop';
|
|
10
|
+
export { default as IClankerHookDynamicFee } from './IClankerHookDynamicFee';
|
|
11
|
+
export { default as IClankerHookStaticFee } from './IClankerHookStaticFee';
|
|
12
|
+
export { default as IClankerLPLocker } from './IClankerLPLocker';
|
|
13
|
+
export { default as IClankerLpLockerMultiple } from './IClankerLpLockerMultiple';
|
|
14
|
+
export { default as IClankerToken } from './IClankerToken';
|
|
15
|
+
export { default as WETH9 } from './WETH9';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PopPublicClient } from './types';
|
|
2
|
+
export type TokenConfig = {
|
|
3
|
+
address: `0x${string}`;
|
|
4
|
+
decimals: number;
|
|
5
|
+
key?: string;
|
|
6
|
+
};
|
|
7
|
+
export type BalanceParams = {
|
|
8
|
+
publicClient: PopPublicClient;
|
|
9
|
+
address: `0x${string}`;
|
|
10
|
+
tokens: TokenConfig[];
|
|
11
|
+
};
|
|
12
|
+
export type BalanceResult = {
|
|
13
|
+
raw: bigint;
|
|
14
|
+
formatted: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Get balances for multiple tokens including native currency
|
|
18
|
+
* @param publicClient - The public client to use for queries
|
|
19
|
+
* @param address - The address to check balances for
|
|
20
|
+
* @param tokens - Array of token configurations (use zeroAddress for native currency)
|
|
21
|
+
* @returns Object with balances keyed by token address or custom key
|
|
22
|
+
*/
|
|
23
|
+
export declare function balance({ publicClient, address, tokens, }: BalanceParams): Promise<Record<string, BalanceResult>>;
|
|
24
|
+
//# sourceMappingURL=balance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"balance.d.ts","sourceRoot":"","sources":["../../src/balance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,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;CACtB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED;;;;;;GAMG;AACH,wBAAsB,OAAO,CAAC,EAC5B,YAAY,EACZ,OAAO,EACP,MAAM,GACP,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAkExD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Clanker } from 'clanker-sdk/v4';
|
|
2
|
+
import type { PublicClient, WalletClient } from 'viem';
|
|
3
|
+
import type { LevrClankerDeploymentSchemaType } from './schema';
|
|
4
|
+
import type { CallData } from './types';
|
|
5
|
+
export type BuildCalldatasV4Params = {
|
|
6
|
+
c: LevrClankerDeploymentSchemaType;
|
|
7
|
+
clanker: Clanker;
|
|
8
|
+
publicClient: PublicClient;
|
|
9
|
+
wallet: WalletClient;
|
|
10
|
+
factoryAddress: `0x${string}`;
|
|
11
|
+
forwarderAddress: `0x${string}`;
|
|
12
|
+
};
|
|
13
|
+
export type BuildCalldatasV4ReturnType = {
|
|
14
|
+
callDatas: CallData[];
|
|
15
|
+
clankerTokenAddress: `0x${string}`;
|
|
16
|
+
totalValue: bigint;
|
|
17
|
+
};
|
|
18
|
+
export declare const clankerV4Factory: Record<number, `0x${string}`>;
|
|
19
|
+
export declare const buildCalldatasV4: ({ c, clanker, publicClient, wallet, factoryAddress, forwarderAddress, }: BuildCalldatasV4Params) => Promise<BuildCalldatasV4ReturnType>;
|
|
20
|
+
//# sourceMappingURL=build-calldatas-v4.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-calldatas-v4.d.ts","sourceRoot":"","sources":["../../src/build-calldatas-v4.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAMtD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAA;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,MAAM,MAAM,sBAAsB,GAAG;IACnC,CAAC,EAAE,+BAA+B,CAAA;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;IAC1B,MAAM,EAAE,YAAY,CAAA;IACpB,cAAc,EAAE,KAAK,MAAM,EAAE,CAAA;IAC7B,gBAAgB,EAAE,KAAK,MAAM,EAAE,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,EAAE,QAAQ,EAAE,CAAA;IACrB,mBAAmB,EAAE,KAAK,MAAM,EAAE,CAAA;IAClC,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,MAAM,EAAE,CAK1D,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAU,yEAOpC,sBAAsB,KAAG,OAAO,CAAC,0BAA0B,CA+F7D,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ClankerTokenV4 } from 'clanker-sdk';
|
|
2
|
+
import type { LevrClankerDeploymentSchemaType } from './schema';
|
|
3
|
+
type BuildClankerV4Params = {
|
|
4
|
+
c: LevrClankerDeploymentSchemaType;
|
|
5
|
+
treasuryAddress: `0x${string}`;
|
|
6
|
+
deployer: `0x${string}`;
|
|
7
|
+
staking: `0x${string}`;
|
|
8
|
+
chainId: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const buildClankerV4: ({ c, treasuryAddress, deployer, staking, chainId, }: BuildClankerV4Params) => ClankerTokenV4;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=build-clanker-v4.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-clanker-v4.d.ts","sourceRoot":"","sources":["../../src/build-clanker-v4.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAKjD,OAAO,KAAK,EAA+B,+BAA+B,EAAE,MAAM,UAAU,CAAA;AAE5F,KAAK,oBAAoB,GAAG;IAC1B,CAAC,EAAE,+BAA+B,CAAA;IAClC,eAAe,EAAE,KAAK,MAAM,EAAE,CAAA;IAC9B,QAAQ,EAAE,KAAK,MAAM,EAAE,CAAA;IACvB,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,qDAM5B,oBAAoB,KAAG,cAoBzB,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to access project data from LevrProvider
|
|
3
|
+
*/
|
|
4
|
+
export declare const useProject: () => import("@tanstack/react-query").UseQueryResult<import("../..").Project | null>;
|
|
5
|
+
/**
|
|
6
|
+
* Hook to access balance data from LevrProvider
|
|
7
|
+
*/
|
|
8
|
+
export declare const useBalance: () => import("@tanstack/react-query").UseQueryResult<Record<string, import("../..").BalanceResult>>;
|
|
9
|
+
/**
|
|
10
|
+
* Hook to access proposals from LevrProvider
|
|
11
|
+
*/
|
|
12
|
+
export declare const useProposals: () => import("@tanstack/react-query").UseQueryResult<any>;
|
|
13
|
+
/**
|
|
14
|
+
* Hook to access clanker token metadata from LevrProvider
|
|
15
|
+
*/
|
|
16
|
+
export declare const useClankerToken: () => import("@tanstack/react-query").UseQueryResult<{
|
|
17
|
+
originalAdmin: import("viem").Address;
|
|
18
|
+
admin: import("viem").Address;
|
|
19
|
+
image: string;
|
|
20
|
+
metadata: string;
|
|
21
|
+
context: string;
|
|
22
|
+
} | null>;
|
|
23
|
+
export * from './use-clanker';
|
|
24
|
+
export * from './use-fee-receivers';
|
|
25
|
+
export * from './use-governance';
|
|
26
|
+
export * from './use-stake';
|
|
27
|
+
export * from './use-swap';
|
|
28
|
+
export * from './use-deploy';
|
|
29
|
+
export * from './use-prepare';
|
|
30
|
+
export * from './use-projects';
|
|
31
|
+
export * from './use-register';
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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,UAAU,qGAAkC,CAAA;AAEzD;;GAEG;AACH,eAAO,MAAM,YAAY,2DAAmC,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,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Address } from 'viem';
|
|
2
|
+
import type { TokenConfig } from '../../balance';
|
|
3
|
+
export type UseBalanceParams = {
|
|
4
|
+
tokens?: TokenConfig[];
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
refetchInterval?: number | false;
|
|
7
|
+
};
|
|
8
|
+
export type UseBalanceQueryParams = {
|
|
9
|
+
clankerToken: Address | null;
|
|
10
|
+
projectTokenDecimals?: number;
|
|
11
|
+
enabled?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Internal: Creates balance query with all logic
|
|
15
|
+
* Used by LevrProvider
|
|
16
|
+
*/
|
|
17
|
+
export declare function useBalanceQuery({ clankerToken, projectTokenDecimals, enabled: e, }: UseBalanceQueryParams): import("@tanstack/react-query").UseQueryResult<Record<string, import("../..").BalanceResult>, Error>;
|
|
18
|
+
//# sourceMappingURL=use-balance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-balance.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-balance.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAInC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAKhD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,CAAC,EAAE,WAAW,EAAE,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,eAAe,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,EAAE,OAAO,GAAG,IAAI,CAAA;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,YAAY,EACZ,oBAAyB,EACzB,OAAO,EAAE,CAAQ,GAClB,EAAE,qBAAqB,wGAgDvB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Clanker } from 'clanker-sdk/v4';
|
|
2
|
+
import type { Address } from 'viem';
|
|
3
|
+
export type UseClankerTokenQueryParams = {
|
|
4
|
+
clankerToken: Address | null;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Internal: Creates clanker token metadata query
|
|
9
|
+
* Used by LevrProvider
|
|
10
|
+
*/
|
|
11
|
+
export declare function useClankerTokenQuery({ clankerToken, enabled: e, }: UseClankerTokenQueryParams): import("@tanstack/react-query").UseQueryResult<{
|
|
12
|
+
originalAdmin: `0x${string}`;
|
|
13
|
+
admin: `0x${string}`;
|
|
14
|
+
image: string;
|
|
15
|
+
metadata: string;
|
|
16
|
+
context: string;
|
|
17
|
+
} | null, Error>;
|
|
18
|
+
/**
|
|
19
|
+
* Hook to get Clanker SDK instance
|
|
20
|
+
* For token metadata, use useClankerToken() from index.ts
|
|
21
|
+
*/
|
|
22
|
+
export declare function useClanker(_clankerToken?: `0x${string}`): import("@tanstack/react-query").UseQueryResult<Clanker | null, Error>;
|
|
23
|
+
//# sourceMappingURL=use-clanker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-clanker.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-clanker.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAMnC,MAAM,MAAM,0BAA0B,GAAG;IACvC,YAAY,EAAE,OAAO,GAAG,IAAI,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,YAAY,EACZ,OAAO,EAAE,CAAQ,GAClB,EAAE,0BAA0B;;;;;;iBA0B5B;AAMD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,aAAa,CAAC,EAAE,KAAK,MAAM,EAAE,yEAevD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { TransactionReceipt } from 'viem';
|
|
2
|
+
export type UseDeployParams = {
|
|
3
|
+
treasuryAirdropAmount?: number;
|
|
4
|
+
onSuccess?: (params: {
|
|
5
|
+
receipt: TransactionReceipt;
|
|
6
|
+
address: `0x${string}`;
|
|
7
|
+
}) => void;
|
|
8
|
+
onError?: (error: unknown) => void;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Deploys a Clanker token and registers it with the Levr factory.
|
|
12
|
+
* Returns tx hash and deployed address.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useDeploy({ onSuccess, onError }: UseDeployParams): import("@tanstack/react-query").UseMutationResult<import("../..").DeployV4ReturnType, unknown, {
|
|
15
|
+
readonly symbol: string;
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly fees: {
|
|
18
|
+
readonly type: "static";
|
|
19
|
+
readonly feeTier: "1%" | "2%" | "3%";
|
|
20
|
+
} | {
|
|
21
|
+
readonly type: "dynamic 3%";
|
|
22
|
+
};
|
|
23
|
+
readonly metadata?: {
|
|
24
|
+
readonly description?: string | undefined;
|
|
25
|
+
readonly telegramLink?: string | undefined;
|
|
26
|
+
readonly websiteLink?: string | undefined;
|
|
27
|
+
readonly xLink?: string | undefined;
|
|
28
|
+
readonly farcasterLink?: string | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
readonly image?: string | undefined;
|
|
31
|
+
readonly airdrop?: readonly {
|
|
32
|
+
readonly account: `0x${string}`;
|
|
33
|
+
readonly amount: number;
|
|
34
|
+
}[] | undefined;
|
|
35
|
+
readonly devBuy?: "0.1 ETH" | "0.5 ETH" | "1 ETH" | undefined;
|
|
36
|
+
readonly rewards?: readonly {
|
|
37
|
+
readonly recipient: `0x${string}`;
|
|
38
|
+
readonly token: "Both" | "Paired" | "Clanker";
|
|
39
|
+
readonly admin: `0x${string}`;
|
|
40
|
+
readonly percentage: number;
|
|
41
|
+
}[] | undefined;
|
|
42
|
+
readonly treasuryFunding: "30%" | "40%" | "50%" | "60%" | "70%" | "80%" | "90%";
|
|
43
|
+
readonly stakingReward?: "70%" | "80%" | "90%" | "100%" | undefined;
|
|
44
|
+
}, unknown>;
|
|
45
|
+
//# sourceMappingURL=use-deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-deploy.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-deploy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAA;AAM9C,MAAM,MAAM,eAAe,GAAG;IAC5B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,kBAAkB,CAAC;QAAC,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;KAAE,KAAK,IAAI,CAAA;IACrF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CACnC,CAAA;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAQhE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Address } from 'viem';
|
|
2
|
+
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
|
+
export type UseFeeReceiversParams = {
|
|
13
|
+
clankerToken?: `0x${string}` | undefined;
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
onSuccess?: (hash: `0x${string}`) => void;
|
|
16
|
+
onError?: (error: unknown) => void;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Hook to access fee receivers query and mutations
|
|
20
|
+
* Returns both query data and mutation function
|
|
21
|
+
*/
|
|
22
|
+
export declare function useFeeReceivers({ clankerToken: _clankerToken, enabled: _e, onSuccess, onError, }?: UseFeeReceiversParams): {
|
|
23
|
+
query: import("@tanstack/react-query").UseQueryResult<any>;
|
|
24
|
+
mutate: import("@tanstack/react-query").UseMutationResult<`0x${string}`, unknown, Omit<UpdateFeeReceiverParams, "chainId" | "walletClient">, unknown>;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=use-fee-receivers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-fee-receivers.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-fee-receivers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAGnC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAKlE,MAAM,MAAM,0BAA0B,GAAG;IACvC,YAAY,EAAE,OAAO,GAAG,IAAI,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,YAAY,EACZ,OAAO,EAAE,CAAQ,GAClB,EAAE,0BAA0B,yGAiB5B;AAMD,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,CAAC,EAAE,KAAK,MAAM,EAAE,GAAG,SAAS,CAAA;IACxC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,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,EAC9B,YAAY,EAAE,aAAa,EAC3B,OAAO,EAAE,EAAS,EAClB,SAAS,EACT,OAAO,GACR,GAAE,qBAA0B;;;EA0B5B"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { Address, TransactionReceipt } from 'viem';
|
|
2
|
+
import type { ExecuteProposalConfig, FormattedProposalDetails, ProposeBoostConfig, ProposeTransferConfig } from '../../governance';
|
|
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
|
+
};
|
|
32
|
+
export type UseGovernanceParams = {
|
|
33
|
+
governorAddress: `0x${string}`;
|
|
34
|
+
clankerToken: `0x${string}`;
|
|
35
|
+
tokenDecimals?: number;
|
|
36
|
+
enabled?: boolean;
|
|
37
|
+
proposalId?: number | bigint;
|
|
38
|
+
cycleId?: number | bigint;
|
|
39
|
+
userAddress?: `0x${string}`;
|
|
40
|
+
onProposeTransferSuccess?: (receipt: TransactionReceipt, proposalId: bigint) => void;
|
|
41
|
+
onProposeTransferError?: (error: unknown) => void;
|
|
42
|
+
onProposeBoostSuccess?: (receipt: TransactionReceipt, proposalId: bigint) => void;
|
|
43
|
+
onProposeBoostError?: (error: unknown) => void;
|
|
44
|
+
onVoteSuccess?: (receipt: TransactionReceipt) => void;
|
|
45
|
+
onVoteError?: (error: unknown) => void;
|
|
46
|
+
onExecuteProposalSuccess?: (receipt: TransactionReceipt) => void;
|
|
47
|
+
onExecuteProposalError?: (error: unknown) => void;
|
|
48
|
+
onClaimAirdropSuccess?: (receipt: TransactionReceipt) => void;
|
|
49
|
+
onClaimAirdropError?: (error: unknown) => void;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Hook for managing governance operations
|
|
53
|
+
* Global queries from LevrProvider, dynamic queries created per-component
|
|
54
|
+
*/
|
|
55
|
+
export declare function useGovernance({ governorAddress, clankerToken: _clankerToken, tokenDecimals, enabled, proposalId, cycleId, userAddress, onProposeTransferSuccess, onProposeTransferError, onProposeBoostSuccess, onProposeBoostError, onVoteSuccess, onVoteError, onExecuteProposalSuccess, onExecuteProposalError, onClaimAirdropSuccess, onClaimAirdropError, }: UseGovernanceParams): {
|
|
56
|
+
proposeTransfer: import("@tanstack/react-query").UseMutationResult<{
|
|
57
|
+
receipt: TransactionReceipt;
|
|
58
|
+
proposalId: bigint;
|
|
59
|
+
}, unknown, ProposeTransferConfig, unknown>;
|
|
60
|
+
proposeBoost: import("@tanstack/react-query").UseMutationResult<{
|
|
61
|
+
receipt: TransactionReceipt;
|
|
62
|
+
proposalId: bigint;
|
|
63
|
+
}, unknown, ProposeBoostConfig, unknown>;
|
|
64
|
+
vote: import("@tanstack/react-query").UseMutationResult<TransactionReceipt, unknown, {
|
|
65
|
+
proposalId: number | bigint;
|
|
66
|
+
support: boolean;
|
|
67
|
+
}, unknown>;
|
|
68
|
+
executeProposal: import("@tanstack/react-query").UseMutationResult<TransactionReceipt, unknown, ExecuteProposalConfig, unknown>;
|
|
69
|
+
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
|
+
buildProposeTransferConfig: ({ recipient, amount, amountDecimals, description, }: {
|
|
126
|
+
recipient: `0x${string}`;
|
|
127
|
+
amount: number | string;
|
|
128
|
+
amountDecimals?: number;
|
|
129
|
+
description: string;
|
|
130
|
+
}) => ProposeTransferConfig;
|
|
131
|
+
buildProposeBoostConfig: ({ amount, amountDecimals, }: {
|
|
132
|
+
amount: number | string;
|
|
133
|
+
amountDecimals?: number;
|
|
134
|
+
}) => ProposeBoostConfig;
|
|
135
|
+
buildExecuteProposalConfig: ({ proposalId, }: {
|
|
136
|
+
proposalId: number | bigint;
|
|
137
|
+
}) => ExecuteProposalConfig;
|
|
138
|
+
isReady: boolean;
|
|
139
|
+
isLoading: boolean;
|
|
140
|
+
isProposing: boolean;
|
|
141
|
+
isVoting: boolean;
|
|
142
|
+
isExecuting: boolean;
|
|
143
|
+
isClaiming: boolean;
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=use-governance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-governance.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-governance.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAA;AAIvD,OAAO,KAAK,EACV,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,kBAAkB,CAAA;AAKzB,MAAM,MAAM,0BAA0B,GAAG;IACvC,YAAY,EAAE,OAAO,GAAG,IAAI,CAAA;IAC5B,WAAW,EAAE,GAAG,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,YAAY,EACZ,WAAW,EACX,OAAO,EAAE,CAAQ,GAClB,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;EA6D5B;AAMD,MAAM,MAAM,mBAAmB,GAAG;IAChC,eAAe,EAAE,KAAK,MAAM,EAAE,CAAA;IAC9B,YAAY,EAAE,KAAK,MAAM,EAAE,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;IAGjB,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,eAAe,EACf,YAAY,EAAE,aAAa,EAC3B,aAAkB,EAClB,OAAc,EACd,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,EAAE,mBAAmB;;;;;;;;;;oBA+IJ,MAAM,GAAG,MAAM;iBAClB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sFA2HjB;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;;;;;;;EA2F1B"}
|