@spicenet-io/spiceflow-ui 2.5.12 → 3.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/dist/{auth-dynamic-CVMjONcV.js → auth-dynamic-C-_mXQTw.js} +1 -1
- package/dist/{auth-dynamic-BcyZRUD-.js → auth-dynamic-te0UmMBN.js} +1 -1
- package/dist/auth-dynamic.cjs.js +1 -1
- package/dist/auth-dynamic.js +1 -1
- package/dist/auth-privy.js +1 -1
- package/dist/auth-starknet.cjs.js +1 -1
- package/dist/auth-starknet.js +1 -1
- package/dist/components/AccountDisplay/AccountActions.d.ts +1 -1
- package/dist/components/SpiceDeposit/DepositRecoveryPrompt.d.ts +1 -0
- package/dist/components/SpiceWithdraw/SpiceWithdraw.d.ts +7 -0
- package/dist/components/ui/SpiceModalShell.d.ts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useGaslessExecution/index.d.ts +1 -6
- package/dist/hooks/useSmartWallet.d.ts +1 -0
- package/dist/index-CmpsCAqC.js +2 -0
- package/dist/index-Uh1tWOql.js +2 -0
- package/dist/index.cjs.js +11 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -11
- package/dist/providers/SpiceFlowProvider.d.ts +2 -0
- package/dist/types/account.d.ts +3 -0
- package/dist/types/assets.d.ts +11 -0
- package/dist/types/authorization.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/rollup.d.ts +50 -0
- package/dist/types/supply.d.ts +7 -1
- package/dist/useSpiceBrand-CIwsc5dY.js +2 -0
- package/dist/useSpiceBrand-DAo6xoE2.js +2 -0
- package/dist/utils/abis/spicenet.d.ts +49 -0
- package/dist/utils/abis/spicenetWalletManager.d.ts +566 -0
- package/dist/utils/assetDisplay.d.ts +4 -0
- package/dist/utils/chains/index.d.ts +2 -0
- package/dist/utils/logos.d.ts +2 -0
- package/dist/utils/relayer/index.d.ts +8 -14
- package/dist/utils/rollupBalances.d.ts +14 -0
- package/package.json +2 -2
- package/dist/index-BMp4DXc2.js +0 -2
- package/dist/index-CUsptR1f.js +0 -2
- package/dist/useSpiceBrand-BIKnRNEV.js +0 -2
- package/dist/useSpiceBrand-CdoJxMvK.js +0 -2
- /package/dist/{Button-DjsYc4v4.js → Button-CaguAr48.js} +0 -0
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
export declare const spicenetWalletManagerAbi: readonly [{
|
|
2
|
+
readonly type: "constructor";
|
|
3
|
+
readonly inputs: readonly [];
|
|
4
|
+
readonly stateMutability: "nonpayable";
|
|
5
|
+
}, {
|
|
6
|
+
readonly type: "function";
|
|
7
|
+
readonly name: "DEFAULT_ADMIN_ROLE";
|
|
8
|
+
readonly inputs: readonly [];
|
|
9
|
+
readonly outputs: readonly [{
|
|
10
|
+
readonly name: "";
|
|
11
|
+
readonly type: "bytes32";
|
|
12
|
+
readonly internalType: "bytes32";
|
|
13
|
+
}];
|
|
14
|
+
readonly stateMutability: "view";
|
|
15
|
+
}, {
|
|
16
|
+
readonly type: "function";
|
|
17
|
+
readonly name: "UPGRADER_ROLE";
|
|
18
|
+
readonly inputs: readonly [];
|
|
19
|
+
readonly outputs: readonly [{
|
|
20
|
+
readonly name: "";
|
|
21
|
+
readonly type: "bytes32";
|
|
22
|
+
readonly internalType: "bytes32";
|
|
23
|
+
}];
|
|
24
|
+
readonly stateMutability: "view";
|
|
25
|
+
}, {
|
|
26
|
+
readonly type: "function";
|
|
27
|
+
readonly name: "UPGRADE_INTERFACE_VERSION";
|
|
28
|
+
readonly inputs: readonly [];
|
|
29
|
+
readonly outputs: readonly [{
|
|
30
|
+
readonly name: "";
|
|
31
|
+
readonly type: "string";
|
|
32
|
+
readonly internalType: "string";
|
|
33
|
+
}];
|
|
34
|
+
readonly stateMutability: "view";
|
|
35
|
+
}, {
|
|
36
|
+
readonly type: "function";
|
|
37
|
+
readonly name: "getRoleAdmin";
|
|
38
|
+
readonly inputs: readonly [{
|
|
39
|
+
readonly name: "role";
|
|
40
|
+
readonly type: "bytes32";
|
|
41
|
+
readonly internalType: "bytes32";
|
|
42
|
+
}];
|
|
43
|
+
readonly outputs: readonly [{
|
|
44
|
+
readonly name: "";
|
|
45
|
+
readonly type: "bytes32";
|
|
46
|
+
readonly internalType: "bytes32";
|
|
47
|
+
}];
|
|
48
|
+
readonly stateMutability: "view";
|
|
49
|
+
}, {
|
|
50
|
+
readonly type: "function";
|
|
51
|
+
readonly name: "getRoleMember";
|
|
52
|
+
readonly inputs: readonly [{
|
|
53
|
+
readonly name: "role";
|
|
54
|
+
readonly type: "bytes32";
|
|
55
|
+
readonly internalType: "bytes32";
|
|
56
|
+
}, {
|
|
57
|
+
readonly name: "index";
|
|
58
|
+
readonly type: "uint256";
|
|
59
|
+
readonly internalType: "uint256";
|
|
60
|
+
}];
|
|
61
|
+
readonly outputs: readonly [{
|
|
62
|
+
readonly name: "";
|
|
63
|
+
readonly type: "address";
|
|
64
|
+
readonly internalType: "address";
|
|
65
|
+
}];
|
|
66
|
+
readonly stateMutability: "view";
|
|
67
|
+
}, {
|
|
68
|
+
readonly type: "function";
|
|
69
|
+
readonly name: "getRoleMemberCount";
|
|
70
|
+
readonly inputs: readonly [{
|
|
71
|
+
readonly name: "role";
|
|
72
|
+
readonly type: "bytes32";
|
|
73
|
+
readonly internalType: "bytes32";
|
|
74
|
+
}];
|
|
75
|
+
readonly outputs: readonly [{
|
|
76
|
+
readonly name: "";
|
|
77
|
+
readonly type: "uint256";
|
|
78
|
+
readonly internalType: "uint256";
|
|
79
|
+
}];
|
|
80
|
+
readonly stateMutability: "view";
|
|
81
|
+
}, {
|
|
82
|
+
readonly type: "function";
|
|
83
|
+
readonly name: "getRoleMembers";
|
|
84
|
+
readonly inputs: readonly [{
|
|
85
|
+
readonly name: "role";
|
|
86
|
+
readonly type: "bytes32";
|
|
87
|
+
readonly internalType: "bytes32";
|
|
88
|
+
}];
|
|
89
|
+
readonly outputs: readonly [{
|
|
90
|
+
readonly name: "";
|
|
91
|
+
readonly type: "address[]";
|
|
92
|
+
readonly internalType: "address[]";
|
|
93
|
+
}];
|
|
94
|
+
readonly stateMutability: "view";
|
|
95
|
+
}, {
|
|
96
|
+
readonly type: "function";
|
|
97
|
+
readonly name: "getWithdrawalInfo";
|
|
98
|
+
readonly inputs: readonly [{
|
|
99
|
+
readonly name: "idempotenceKey";
|
|
100
|
+
readonly type: "bytes32";
|
|
101
|
+
readonly internalType: "bytes32";
|
|
102
|
+
}];
|
|
103
|
+
readonly outputs: readonly [{
|
|
104
|
+
readonly name: "";
|
|
105
|
+
readonly type: "tuple";
|
|
106
|
+
readonly internalType: "struct SpicenetWithdrawalManagerV1.WithdrawalInfo";
|
|
107
|
+
readonly components: readonly [{
|
|
108
|
+
readonly name: "processed";
|
|
109
|
+
readonly type: "bool";
|
|
110
|
+
readonly internalType: "bool";
|
|
111
|
+
}, {
|
|
112
|
+
readonly name: "blockNumber";
|
|
113
|
+
readonly type: "uint256";
|
|
114
|
+
readonly internalType: "uint256";
|
|
115
|
+
}, {
|
|
116
|
+
readonly name: "nbf";
|
|
117
|
+
readonly type: "uint256";
|
|
118
|
+
readonly internalType: "uint256";
|
|
119
|
+
}, {
|
|
120
|
+
readonly name: "exp";
|
|
121
|
+
readonly type: "uint256";
|
|
122
|
+
readonly internalType: "uint256";
|
|
123
|
+
}, {
|
|
124
|
+
readonly name: "metadata";
|
|
125
|
+
readonly type: "string";
|
|
126
|
+
readonly internalType: "string";
|
|
127
|
+
}];
|
|
128
|
+
}];
|
|
129
|
+
readonly stateMutability: "view";
|
|
130
|
+
}, {
|
|
131
|
+
readonly type: "function";
|
|
132
|
+
readonly name: "grantRole";
|
|
133
|
+
readonly inputs: readonly [{
|
|
134
|
+
readonly name: "role";
|
|
135
|
+
readonly type: "bytes32";
|
|
136
|
+
readonly internalType: "bytes32";
|
|
137
|
+
}, {
|
|
138
|
+
readonly name: "account";
|
|
139
|
+
readonly type: "address";
|
|
140
|
+
readonly internalType: "address";
|
|
141
|
+
}];
|
|
142
|
+
readonly outputs: readonly [];
|
|
143
|
+
readonly stateMutability: "nonpayable";
|
|
144
|
+
}, {
|
|
145
|
+
readonly type: "function";
|
|
146
|
+
readonly name: "hasRole";
|
|
147
|
+
readonly inputs: readonly [{
|
|
148
|
+
readonly name: "role";
|
|
149
|
+
readonly type: "bytes32";
|
|
150
|
+
readonly internalType: "bytes32";
|
|
151
|
+
}, {
|
|
152
|
+
readonly name: "account";
|
|
153
|
+
readonly type: "address";
|
|
154
|
+
readonly internalType: "address";
|
|
155
|
+
}];
|
|
156
|
+
readonly outputs: readonly [{
|
|
157
|
+
readonly name: "";
|
|
158
|
+
readonly type: "bool";
|
|
159
|
+
readonly internalType: "bool";
|
|
160
|
+
}];
|
|
161
|
+
readonly stateMutability: "view";
|
|
162
|
+
}, {
|
|
163
|
+
readonly type: "function";
|
|
164
|
+
readonly name: "initialize";
|
|
165
|
+
readonly inputs: readonly [{
|
|
166
|
+
readonly name: "defaultAdmin";
|
|
167
|
+
readonly type: "address";
|
|
168
|
+
readonly internalType: "address";
|
|
169
|
+
}];
|
|
170
|
+
readonly outputs: readonly [];
|
|
171
|
+
readonly stateMutability: "nonpayable";
|
|
172
|
+
}, {
|
|
173
|
+
readonly type: "function";
|
|
174
|
+
readonly name: "processWithdrawal";
|
|
175
|
+
readonly inputs: readonly [{
|
|
176
|
+
readonly name: "request";
|
|
177
|
+
readonly type: "tuple";
|
|
178
|
+
readonly internalType: "struct SpicenetWithdrawalManagerV1.WithdrawalRequest";
|
|
179
|
+
readonly components: readonly [{
|
|
180
|
+
readonly name: "idempotenceKey";
|
|
181
|
+
readonly type: "bytes32";
|
|
182
|
+
readonly internalType: "bytes32";
|
|
183
|
+
}, {
|
|
184
|
+
readonly name: "nbf";
|
|
185
|
+
readonly type: "uint256";
|
|
186
|
+
readonly internalType: "uint256";
|
|
187
|
+
}, {
|
|
188
|
+
readonly name: "exp";
|
|
189
|
+
readonly type: "uint256";
|
|
190
|
+
readonly internalType: "uint256";
|
|
191
|
+
}, {
|
|
192
|
+
readonly name: "metadata";
|
|
193
|
+
readonly type: "string";
|
|
194
|
+
readonly internalType: "string";
|
|
195
|
+
}, {
|
|
196
|
+
readonly name: "transfers";
|
|
197
|
+
readonly type: "tuple[]";
|
|
198
|
+
readonly internalType: "struct SpicenetWithdrawalManagerV1.TokenTransfer[]";
|
|
199
|
+
readonly components: readonly [{
|
|
200
|
+
readonly name: "token";
|
|
201
|
+
readonly type: "address";
|
|
202
|
+
readonly internalType: "address";
|
|
203
|
+
}, {
|
|
204
|
+
readonly name: "to";
|
|
205
|
+
readonly type: "address";
|
|
206
|
+
readonly internalType: "address";
|
|
207
|
+
}, {
|
|
208
|
+
readonly name: "amount";
|
|
209
|
+
readonly type: "uint256";
|
|
210
|
+
readonly internalType: "uint256";
|
|
211
|
+
}];
|
|
212
|
+
}];
|
|
213
|
+
}];
|
|
214
|
+
readonly outputs: readonly [];
|
|
215
|
+
readonly stateMutability: "nonpayable";
|
|
216
|
+
}, {
|
|
217
|
+
readonly type: "function";
|
|
218
|
+
readonly name: "proxiableUUID";
|
|
219
|
+
readonly inputs: readonly [];
|
|
220
|
+
readonly outputs: readonly [{
|
|
221
|
+
readonly name: "";
|
|
222
|
+
readonly type: "bytes32";
|
|
223
|
+
readonly internalType: "bytes32";
|
|
224
|
+
}];
|
|
225
|
+
readonly stateMutability: "view";
|
|
226
|
+
}, {
|
|
227
|
+
readonly type: "function";
|
|
228
|
+
readonly name: "renounceRole";
|
|
229
|
+
readonly inputs: readonly [{
|
|
230
|
+
readonly name: "role";
|
|
231
|
+
readonly type: "bytes32";
|
|
232
|
+
readonly internalType: "bytes32";
|
|
233
|
+
}, {
|
|
234
|
+
readonly name: "callerConfirmation";
|
|
235
|
+
readonly type: "address";
|
|
236
|
+
readonly internalType: "address";
|
|
237
|
+
}];
|
|
238
|
+
readonly outputs: readonly [];
|
|
239
|
+
readonly stateMutability: "nonpayable";
|
|
240
|
+
}, {
|
|
241
|
+
readonly type: "function";
|
|
242
|
+
readonly name: "revokeRole";
|
|
243
|
+
readonly inputs: readonly [{
|
|
244
|
+
readonly name: "role";
|
|
245
|
+
readonly type: "bytes32";
|
|
246
|
+
readonly internalType: "bytes32";
|
|
247
|
+
}, {
|
|
248
|
+
readonly name: "account";
|
|
249
|
+
readonly type: "address";
|
|
250
|
+
readonly internalType: "address";
|
|
251
|
+
}];
|
|
252
|
+
readonly outputs: readonly [];
|
|
253
|
+
readonly stateMutability: "nonpayable";
|
|
254
|
+
}, {
|
|
255
|
+
readonly type: "function";
|
|
256
|
+
readonly name: "setWithdrawalInfo";
|
|
257
|
+
readonly inputs: readonly [{
|
|
258
|
+
readonly name: "idempotenceKey";
|
|
259
|
+
readonly type: "bytes32";
|
|
260
|
+
readonly internalType: "bytes32";
|
|
261
|
+
}, {
|
|
262
|
+
readonly name: "withdrawalInfo";
|
|
263
|
+
readonly type: "tuple";
|
|
264
|
+
readonly internalType: "struct SpicenetWithdrawalManagerV1.WithdrawalInfo";
|
|
265
|
+
readonly components: readonly [{
|
|
266
|
+
readonly name: "processed";
|
|
267
|
+
readonly type: "bool";
|
|
268
|
+
readonly internalType: "bool";
|
|
269
|
+
}, {
|
|
270
|
+
readonly name: "blockNumber";
|
|
271
|
+
readonly type: "uint256";
|
|
272
|
+
readonly internalType: "uint256";
|
|
273
|
+
}, {
|
|
274
|
+
readonly name: "nbf";
|
|
275
|
+
readonly type: "uint256";
|
|
276
|
+
readonly internalType: "uint256";
|
|
277
|
+
}, {
|
|
278
|
+
readonly name: "exp";
|
|
279
|
+
readonly type: "uint256";
|
|
280
|
+
readonly internalType: "uint256";
|
|
281
|
+
}, {
|
|
282
|
+
readonly name: "metadata";
|
|
283
|
+
readonly type: "string";
|
|
284
|
+
readonly internalType: "string";
|
|
285
|
+
}];
|
|
286
|
+
}];
|
|
287
|
+
readonly outputs: readonly [];
|
|
288
|
+
readonly stateMutability: "nonpayable";
|
|
289
|
+
}, {
|
|
290
|
+
readonly type: "function";
|
|
291
|
+
readonly name: "supportsInterface";
|
|
292
|
+
readonly inputs: readonly [{
|
|
293
|
+
readonly name: "interfaceId";
|
|
294
|
+
readonly type: "bytes4";
|
|
295
|
+
readonly internalType: "bytes4";
|
|
296
|
+
}];
|
|
297
|
+
readonly outputs: readonly [{
|
|
298
|
+
readonly name: "";
|
|
299
|
+
readonly type: "bool";
|
|
300
|
+
readonly internalType: "bool";
|
|
301
|
+
}];
|
|
302
|
+
readonly stateMutability: "view";
|
|
303
|
+
}, {
|
|
304
|
+
readonly type: "function";
|
|
305
|
+
readonly name: "upgradeToAndCall";
|
|
306
|
+
readonly inputs: readonly [{
|
|
307
|
+
readonly name: "newImplementation";
|
|
308
|
+
readonly type: "address";
|
|
309
|
+
readonly internalType: "address";
|
|
310
|
+
}, {
|
|
311
|
+
readonly name: "data";
|
|
312
|
+
readonly type: "bytes";
|
|
313
|
+
readonly internalType: "bytes";
|
|
314
|
+
}];
|
|
315
|
+
readonly outputs: readonly [];
|
|
316
|
+
readonly stateMutability: "payable";
|
|
317
|
+
}, {
|
|
318
|
+
readonly type: "event";
|
|
319
|
+
readonly name: "Initialized";
|
|
320
|
+
readonly inputs: readonly [{
|
|
321
|
+
readonly name: "version";
|
|
322
|
+
readonly type: "uint64";
|
|
323
|
+
readonly indexed: false;
|
|
324
|
+
readonly internalType: "uint64";
|
|
325
|
+
}];
|
|
326
|
+
readonly anonymous: false;
|
|
327
|
+
}, {
|
|
328
|
+
readonly type: "event";
|
|
329
|
+
readonly name: "RoleAdminChanged";
|
|
330
|
+
readonly inputs: readonly [{
|
|
331
|
+
readonly name: "role";
|
|
332
|
+
readonly type: "bytes32";
|
|
333
|
+
readonly indexed: true;
|
|
334
|
+
readonly internalType: "bytes32";
|
|
335
|
+
}, {
|
|
336
|
+
readonly name: "previousAdminRole";
|
|
337
|
+
readonly type: "bytes32";
|
|
338
|
+
readonly indexed: true;
|
|
339
|
+
readonly internalType: "bytes32";
|
|
340
|
+
}, {
|
|
341
|
+
readonly name: "newAdminRole";
|
|
342
|
+
readonly type: "bytes32";
|
|
343
|
+
readonly indexed: true;
|
|
344
|
+
readonly internalType: "bytes32";
|
|
345
|
+
}];
|
|
346
|
+
readonly anonymous: false;
|
|
347
|
+
}, {
|
|
348
|
+
readonly type: "event";
|
|
349
|
+
readonly name: "RoleGranted";
|
|
350
|
+
readonly inputs: readonly [{
|
|
351
|
+
readonly name: "role";
|
|
352
|
+
readonly type: "bytes32";
|
|
353
|
+
readonly indexed: true;
|
|
354
|
+
readonly internalType: "bytes32";
|
|
355
|
+
}, {
|
|
356
|
+
readonly name: "account";
|
|
357
|
+
readonly type: "address";
|
|
358
|
+
readonly indexed: true;
|
|
359
|
+
readonly internalType: "address";
|
|
360
|
+
}, {
|
|
361
|
+
readonly name: "sender";
|
|
362
|
+
readonly type: "address";
|
|
363
|
+
readonly indexed: true;
|
|
364
|
+
readonly internalType: "address";
|
|
365
|
+
}];
|
|
366
|
+
readonly anonymous: false;
|
|
367
|
+
}, {
|
|
368
|
+
readonly type: "event";
|
|
369
|
+
readonly name: "RoleRevoked";
|
|
370
|
+
readonly inputs: readonly [{
|
|
371
|
+
readonly name: "role";
|
|
372
|
+
readonly type: "bytes32";
|
|
373
|
+
readonly indexed: true;
|
|
374
|
+
readonly internalType: "bytes32";
|
|
375
|
+
}, {
|
|
376
|
+
readonly name: "account";
|
|
377
|
+
readonly type: "address";
|
|
378
|
+
readonly indexed: true;
|
|
379
|
+
readonly internalType: "address";
|
|
380
|
+
}, {
|
|
381
|
+
readonly name: "sender";
|
|
382
|
+
readonly type: "address";
|
|
383
|
+
readonly indexed: true;
|
|
384
|
+
readonly internalType: "address";
|
|
385
|
+
}];
|
|
386
|
+
readonly anonymous: false;
|
|
387
|
+
}, {
|
|
388
|
+
readonly type: "event";
|
|
389
|
+
readonly name: "Upgraded";
|
|
390
|
+
readonly inputs: readonly [{
|
|
391
|
+
readonly name: "implementation";
|
|
392
|
+
readonly type: "address";
|
|
393
|
+
readonly indexed: true;
|
|
394
|
+
readonly internalType: "address";
|
|
395
|
+
}];
|
|
396
|
+
readonly anonymous: false;
|
|
397
|
+
}, {
|
|
398
|
+
readonly type: "event";
|
|
399
|
+
readonly name: "WithdrawalProcessed";
|
|
400
|
+
readonly inputs: readonly [{
|
|
401
|
+
readonly name: "request";
|
|
402
|
+
readonly type: "tuple";
|
|
403
|
+
readonly indexed: false;
|
|
404
|
+
readonly internalType: "struct SpicenetWithdrawalManagerV1.WithdrawalRequest";
|
|
405
|
+
readonly components: readonly [{
|
|
406
|
+
readonly name: "idempotenceKey";
|
|
407
|
+
readonly type: "bytes32";
|
|
408
|
+
readonly internalType: "bytes32";
|
|
409
|
+
}, {
|
|
410
|
+
readonly name: "nbf";
|
|
411
|
+
readonly type: "uint256";
|
|
412
|
+
readonly internalType: "uint256";
|
|
413
|
+
}, {
|
|
414
|
+
readonly name: "exp";
|
|
415
|
+
readonly type: "uint256";
|
|
416
|
+
readonly internalType: "uint256";
|
|
417
|
+
}, {
|
|
418
|
+
readonly name: "metadata";
|
|
419
|
+
readonly type: "string";
|
|
420
|
+
readonly internalType: "string";
|
|
421
|
+
}, {
|
|
422
|
+
readonly name: "transfers";
|
|
423
|
+
readonly type: "tuple[]";
|
|
424
|
+
readonly internalType: "struct SpicenetWithdrawalManagerV1.TokenTransfer[]";
|
|
425
|
+
readonly components: readonly [{
|
|
426
|
+
readonly name: "token";
|
|
427
|
+
readonly type: "address";
|
|
428
|
+
readonly internalType: "address";
|
|
429
|
+
}, {
|
|
430
|
+
readonly name: "to";
|
|
431
|
+
readonly type: "address";
|
|
432
|
+
readonly internalType: "address";
|
|
433
|
+
}, {
|
|
434
|
+
readonly name: "amount";
|
|
435
|
+
readonly type: "uint256";
|
|
436
|
+
readonly internalType: "uint256";
|
|
437
|
+
}];
|
|
438
|
+
}];
|
|
439
|
+
}];
|
|
440
|
+
readonly anonymous: false;
|
|
441
|
+
}, {
|
|
442
|
+
readonly type: "error";
|
|
443
|
+
readonly name: "AccessControlBadConfirmation";
|
|
444
|
+
readonly inputs: readonly [];
|
|
445
|
+
}, {
|
|
446
|
+
readonly type: "error";
|
|
447
|
+
readonly name: "AccessControlUnauthorizedAccount";
|
|
448
|
+
readonly inputs: readonly [{
|
|
449
|
+
readonly name: "account";
|
|
450
|
+
readonly type: "address";
|
|
451
|
+
readonly internalType: "address";
|
|
452
|
+
}, {
|
|
453
|
+
readonly name: "neededRole";
|
|
454
|
+
readonly type: "bytes32";
|
|
455
|
+
readonly internalType: "bytes32";
|
|
456
|
+
}];
|
|
457
|
+
}, {
|
|
458
|
+
readonly type: "error";
|
|
459
|
+
readonly name: "AddressEmptyCode";
|
|
460
|
+
readonly inputs: readonly [{
|
|
461
|
+
readonly name: "target";
|
|
462
|
+
readonly type: "address";
|
|
463
|
+
readonly internalType: "address";
|
|
464
|
+
}];
|
|
465
|
+
}, {
|
|
466
|
+
readonly type: "error";
|
|
467
|
+
readonly name: "ERC1967InvalidImplementation";
|
|
468
|
+
readonly inputs: readonly [{
|
|
469
|
+
readonly name: "implementation";
|
|
470
|
+
readonly type: "address";
|
|
471
|
+
readonly internalType: "address";
|
|
472
|
+
}];
|
|
473
|
+
}, {
|
|
474
|
+
readonly type: "error";
|
|
475
|
+
readonly name: "ERC1967NonPayable";
|
|
476
|
+
readonly inputs: readonly [];
|
|
477
|
+
}, {
|
|
478
|
+
readonly type: "error";
|
|
479
|
+
readonly name: "FailedCall";
|
|
480
|
+
readonly inputs: readonly [];
|
|
481
|
+
}, {
|
|
482
|
+
readonly type: "error";
|
|
483
|
+
readonly name: "InvalidInitialization";
|
|
484
|
+
readonly inputs: readonly [];
|
|
485
|
+
}, {
|
|
486
|
+
readonly type: "error";
|
|
487
|
+
readonly name: "NotInitializing";
|
|
488
|
+
readonly inputs: readonly [];
|
|
489
|
+
}, {
|
|
490
|
+
readonly type: "error";
|
|
491
|
+
readonly name: "SafeERC20FailedOperation";
|
|
492
|
+
readonly inputs: readonly [{
|
|
493
|
+
readonly name: "token";
|
|
494
|
+
readonly type: "address";
|
|
495
|
+
readonly internalType: "address";
|
|
496
|
+
}];
|
|
497
|
+
}, {
|
|
498
|
+
readonly type: "error";
|
|
499
|
+
readonly name: "UUPSUnauthorizedCallContext";
|
|
500
|
+
readonly inputs: readonly [];
|
|
501
|
+
}, {
|
|
502
|
+
readonly type: "error";
|
|
503
|
+
readonly name: "UUPSUnsupportedProxiableUUID";
|
|
504
|
+
readonly inputs: readonly [{
|
|
505
|
+
readonly name: "slot";
|
|
506
|
+
readonly type: "bytes32";
|
|
507
|
+
readonly internalType: "bytes32";
|
|
508
|
+
}];
|
|
509
|
+
}, {
|
|
510
|
+
readonly type: "error";
|
|
511
|
+
readonly name: "WithdrawalAlreadyProcessed";
|
|
512
|
+
readonly inputs: readonly [{
|
|
513
|
+
readonly name: "idempotenceKey";
|
|
514
|
+
readonly type: "bytes32";
|
|
515
|
+
readonly internalType: "bytes32";
|
|
516
|
+
}, {
|
|
517
|
+
readonly name: "withdrawalInfo";
|
|
518
|
+
readonly type: "tuple";
|
|
519
|
+
readonly internalType: "struct SpicenetWithdrawalManagerV1.WithdrawalInfo";
|
|
520
|
+
readonly components: readonly [{
|
|
521
|
+
readonly name: "processed";
|
|
522
|
+
readonly type: "bool";
|
|
523
|
+
readonly internalType: "bool";
|
|
524
|
+
}, {
|
|
525
|
+
readonly name: "blockNumber";
|
|
526
|
+
readonly type: "uint256";
|
|
527
|
+
readonly internalType: "uint256";
|
|
528
|
+
}, {
|
|
529
|
+
readonly name: "nbf";
|
|
530
|
+
readonly type: "uint256";
|
|
531
|
+
readonly internalType: "uint256";
|
|
532
|
+
}, {
|
|
533
|
+
readonly name: "exp";
|
|
534
|
+
readonly type: "uint256";
|
|
535
|
+
readonly internalType: "uint256";
|
|
536
|
+
}, {
|
|
537
|
+
readonly name: "metadata";
|
|
538
|
+
readonly type: "string";
|
|
539
|
+
readonly internalType: "string";
|
|
540
|
+
}];
|
|
541
|
+
}];
|
|
542
|
+
}, {
|
|
543
|
+
readonly type: "error";
|
|
544
|
+
readonly name: "WithdrawalRequestExpired";
|
|
545
|
+
readonly inputs: readonly [{
|
|
546
|
+
readonly name: "currentTime";
|
|
547
|
+
readonly type: "uint256";
|
|
548
|
+
readonly internalType: "uint256";
|
|
549
|
+
}, {
|
|
550
|
+
readonly name: "exp";
|
|
551
|
+
readonly type: "uint256";
|
|
552
|
+
readonly internalType: "uint256";
|
|
553
|
+
}];
|
|
554
|
+
}, {
|
|
555
|
+
readonly type: "error";
|
|
556
|
+
readonly name: "WithdrawalRequestTooEarly";
|
|
557
|
+
readonly inputs: readonly [{
|
|
558
|
+
readonly name: "currentTime";
|
|
559
|
+
readonly type: "uint256";
|
|
560
|
+
readonly internalType: "uint256";
|
|
561
|
+
}, {
|
|
562
|
+
readonly name: "nbf";
|
|
563
|
+
readonly type: "uint256";
|
|
564
|
+
readonly internalType: "uint256";
|
|
565
|
+
}];
|
|
566
|
+
}];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Asset } from "../types/assets";
|
|
2
|
+
export declare function getAssetDisplaySymbol(asset: Pick<Asset, "displaySymbol" | "symbol">): string;
|
|
3
|
+
export declare function getAssetDisplayName(asset: Pick<Asset, "displayName" | "name" | "displaySymbol" | "symbol">): string;
|
|
4
|
+
export declare function getAssetDisplayChainName(asset: Pick<Asset, "displayChainName" | "chainId">): string;
|
|
@@ -5,6 +5,8 @@ export type { UIChainConfig as ChainConfig } from "./chainData";
|
|
|
5
5
|
export declare const CHAIN_CONFIGS: {
|
|
6
6
|
[chainId: number]: UIChainConfig;
|
|
7
7
|
};
|
|
8
|
+
export declare const setRpcOverrides: (overrides?: Record<number, string>) => void;
|
|
9
|
+
export declare const getRpcUrlForChain: (chainId: number) => string | undefined;
|
|
8
10
|
export declare const getChainConfig: (chainId: number) => UIChainConfig | undefined;
|
|
9
11
|
export declare const getChainName: (chainId: number) => string;
|
|
10
12
|
export declare const getDelegateContractAddress: (chainId: number) => string;
|
package/dist/utils/logos.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import metamaskLogo from "../assets/icons/metamask.png";
|
|
2
2
|
import rabbyLogo from "../assets/icons/rabby.png";
|
|
3
3
|
import phantomLogo from "../assets/icons/phantom.png";
|
|
4
|
+
import spicenetLogo from "../assets/icons/spicenet-mark.svg";
|
|
4
5
|
export { metamaskLogo, rabbyLogo, phantomLogo };
|
|
5
6
|
export declare const ethLogo: string;
|
|
6
7
|
export declare const arbLogo: string;
|
|
7
8
|
export declare const usdcLogo: string;
|
|
8
9
|
export declare const wbtcLogo: string;
|
|
10
|
+
export { spicenetLogo };
|
|
9
11
|
export declare const chainLogoMap: {
|
|
10
12
|
[key: number]: string;
|
|
11
13
|
};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { CreateActionRequest, CreateActionResponse, ExecuteStepRequest } from "../../types/unified";
|
|
2
2
|
import { SwapStep } from "../../types/status";
|
|
3
3
|
import { ChainBatch } from "../../types/authorization";
|
|
4
|
+
import { CreateWalletRequest, WalletInfo, CreateWithdrawalRequest, CreateWithdrawalResponse, WithdrawalStatus, RollupTimestamp } from "../../types/rollup";
|
|
4
5
|
export declare const RELAYER_API_URL: string;
|
|
5
6
|
export declare class RelayerService {
|
|
6
7
|
private baseUrl;
|
|
7
8
|
constructor();
|
|
8
9
|
setBaseUrl(url: string): void;
|
|
10
|
+
getBaseUrl(): string;
|
|
11
|
+
private getEffectiveBaseUrl;
|
|
9
12
|
createAction(request: CreateActionRequest): Promise<CreateActionResponse>;
|
|
10
13
|
executeStep(actionId: string, intentIndex: number, stepIndex: number, request: ExecuteStepRequest): Promise<{
|
|
11
14
|
success: true;
|
|
@@ -18,20 +21,6 @@ export declare class RelayerService {
|
|
|
18
21
|
transactionHash?: string;
|
|
19
22
|
};
|
|
20
23
|
}>;
|
|
21
|
-
submitSpiceDeposit(request: {
|
|
22
|
-
user: string;
|
|
23
|
-
txHash: string;
|
|
24
|
-
sender: string;
|
|
25
|
-
tokenAddress: string;
|
|
26
|
-
chainId: number;
|
|
27
|
-
amount: string;
|
|
28
|
-
isDeposit?: boolean;
|
|
29
|
-
}): Promise<{
|
|
30
|
-
success: boolean;
|
|
31
|
-
error?: {
|
|
32
|
-
message: string;
|
|
33
|
-
};
|
|
34
|
-
}>;
|
|
35
24
|
requestAirdrop(params: {
|
|
36
25
|
chainId: number;
|
|
37
26
|
tokenId: string;
|
|
@@ -43,6 +32,11 @@ export declare class RelayerService {
|
|
|
43
32
|
txHash?: string;
|
|
44
33
|
errorMessage?: string;
|
|
45
34
|
}>;
|
|
35
|
+
createWallet(address: string, request: CreateWalletRequest): Promise<WalletInfo>;
|
|
36
|
+
getWallet(address: string): Promise<WalletInfo>;
|
|
37
|
+
createWithdrawal(request: CreateWithdrawalRequest): Promise<CreateWithdrawalResponse>;
|
|
38
|
+
getWithdrawal(idempotenceKey: string): Promise<WithdrawalStatus>;
|
|
39
|
+
getRollupTimestamp(): Promise<RollupTimestamp>;
|
|
46
40
|
}
|
|
47
41
|
export declare const relayerService: RelayerService;
|
|
48
42
|
export declare const createInitialSteps: (chainBatches: ChainBatch[], customGetChainName?: (chainId: number) => string) => SwapStep[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Asset } from "../types/assets";
|
|
2
|
+
export interface RollupBalanceEntry {
|
|
3
|
+
receiptToken?: string;
|
|
4
|
+
tokenName: string;
|
|
5
|
+
balanceAvailable: string;
|
|
6
|
+
chainTokens?: string[] | Record<string, {
|
|
7
|
+
name?: string;
|
|
8
|
+
decimals?: number;
|
|
9
|
+
}>;
|
|
10
|
+
decimals?: number;
|
|
11
|
+
balanceUsd?: number | string | null;
|
|
12
|
+
}
|
|
13
|
+
export declare function parseRollupBalanceEntry(token: RollupBalanceEntry, supportedChains?: number[]): Asset | null;
|
|
14
|
+
export declare function fallbackRollupChainName(chainId: number): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spicenet-io/spiceflow-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Spiceflow UI SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"author": "",
|
|
66
66
|
"license": "MIT",
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@spicenet-io/spiceflow-core": "^0.3.
|
|
68
|
+
"@spicenet-io/spiceflow-core": "^0.3.5",
|
|
69
69
|
"lucide-react": "^0.562.0",
|
|
70
70
|
"tslib": "^2.8.1"
|
|
71
71
|
},
|
package/dist/index-BMp4DXc2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{defineChain as y,createPublicClient as f,http as b,isAddress as h,getAddress as C}from"viem";import{readContract as v}from"viem/actions";import{getChainMeta as p,getTokensForChain as w,getDelegateContract as g,ZERO_ADDRESS as E,isNativeToken as d}from"@spicenet-io/spiceflow-core";const c=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}],I="0xcA11bde05977b3631167028862bE2a173976CA11";function k(e){return y({id:e.id,name:e.name,nativeCurrency:e.nativeCurrency,rpcUrls:{default:{http:[e.rpcUrl]}},blockExplorers:{default:{name:e.displayName,url:e.blockExplorer}},testnet:e.network==="testnet",contracts:{multicall3:{address:I}}})}const N=[1,8453,42161,4114,11155111,421614,84532,5115,123420001114,688688,688689],l=Object.fromEntries(N.map(e=>p(e)).filter(e=>e!=null).map(e=>[e.id,{...e,viemChain:k(e),supportedTokens:w(e.id)}])),x=l,i=e=>l[e],U=e=>{const t=p(e);return t?.displayName||t?.name||`Chain ${e}`},_=e=>{const t=g(e);if(!t)throw new Error(`Unsupported chain ID: ${e}`);return t},A=(e,t,n)=>{const s=i(e);return s?.blockExplorer?`${s.blockExplorer}/tx/${t}`:"#"},m=e=>{const t=i(e);if(!t)throw new Error(`Unsupported chain ID: ${e}`);return f({chain:t.viemChain,transport:b(t.rpcUrl)})},M=()=>{const e={};return Object.values(l).forEach(t=>{e[t.id]={name:t.name,moralisName:t.moralisId||"",chain:t.viemChain,rpcUrl:t.rpcUrl}}),e},$=(e,t=[])=>{const n=i(e);if(!n)return[];const s=[];if(![11155111,421614,84532,688689].includes(e)){const a=t.find(r=>r.chainId===e&&r.isNative);a?s.push(a):s.push({address:E,name:n.nativeCurrency.name,symbol:n.nativeCurrency.symbol,decimals:n.nativeCurrency.decimals,balance:BigInt(0),balanceFormatted:0,balanceUsd:0,logoURI:void 0,isNative:!0,chainId:e})}if(!n.supportedTokens)return s;const o=s.some(a=>a.isNative);return n.supportedTokens.forEach(a=>{if(o&&d(a.address))return;const r=t.find(u=>u.chainId===e&&u.address.toLowerCase()===a.address.toLowerCase());r?s.push(r):s.push({address:a.address,name:a.name,symbol:a.symbol,decimals:a.decimals,balance:BigInt(0),balanceFormatted:0,balanceUsd:0,logoURI:a.logo,isNative:!1,chainId:e})}),s},T=async(e,t)=>{const n=i(e);if(!n)throw new Error(`Unsupported chain ID: ${e}`);const s=t.toLowerCase();if(d(s)){if(!n.nativeCurrency?.decimals)throw new Error(`Native currency decimals not configured for chain ${e}`);return n.nativeCurrency.decimals}if(n.supportedTokens){const o=n.supportedTokens.find(a=>a.address.toLowerCase()===s);if(o)return o.decimals}try{if(!h(t,{strict:!1}))throw new Error(`Invalid token address: ${t}`);const o=C(t),a=m(e),r=await v(a,{address:o,abi:c,functionName:"decimals"});return Number(r)}catch{throw new Error(`Could not determine decimals for token ${t} on chain ${e}`)}};export{x as C,c as T,m as a,i as b,A as c,_ as d,M as e,$ as f,U as g,T as h};
|