@hyperbridge/sdk 2.2.3 → 2.3.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.
@@ -0,0 +1,1469 @@
1
+ export { bh as IntentGatewayV2, b2 as decodeERC7821ExecuteBatch, b3 as decodeUserOpScale, b4 as encodeERC7821ExecuteBatch, b6 as encodeUserOpScale } from './IntentGatewayV2-SB851bZs.cjs';
2
+ import '@polkadot/api';
3
+ import '@polkadot/keyring/types';
4
+ import 'consola';
5
+ import 'decimal.js';
6
+ import 'graphql-request';
7
+ import 'viem';
8
+ import 'viem/chains';
9
+
10
+ type HexString = `0x${string}`;
11
+ /** Minimal fetch shape used by the JSON-RPC POSTs below. */
12
+ type FetchLike = (url: string, init: any) => Promise<{
13
+ json(): Promise<any>;
14
+ }>;
15
+ declare function setAggregationFetch(fetchImpl: FetchLike): void;
16
+ declare const FILL_ORDER_ABI: readonly [{
17
+ readonly type: "constructor";
18
+ readonly inputs: readonly [{
19
+ readonly name: "admin";
20
+ readonly type: "address";
21
+ readonly internalType: "address";
22
+ }];
23
+ readonly stateMutability: "nonpayable";
24
+ }, {
25
+ readonly type: "receive";
26
+ readonly stateMutability: "payable";
27
+ }, {
28
+ readonly type: "function";
29
+ readonly name: "DOMAIN_SEPARATOR";
30
+ readonly inputs: readonly [];
31
+ readonly outputs: readonly [{
32
+ readonly name: "";
33
+ readonly type: "bytes32";
34
+ readonly internalType: "bytes32";
35
+ }];
36
+ readonly stateMutability: "view";
37
+ }, {
38
+ readonly type: "function";
39
+ readonly name: "SELECT_SOLVER_TYPEHASH";
40
+ readonly inputs: readonly [];
41
+ readonly outputs: readonly [{
42
+ readonly name: "";
43
+ readonly type: "bytes32";
44
+ readonly internalType: "bytes32";
45
+ }];
46
+ readonly stateMutability: "view";
47
+ }, {
48
+ readonly type: "function";
49
+ readonly name: "_destinationProtocolFees";
50
+ readonly inputs: readonly [{
51
+ readonly name: "";
52
+ readonly type: "bytes32";
53
+ readonly internalType: "bytes32";
54
+ }];
55
+ readonly outputs: readonly [{
56
+ readonly name: "";
57
+ readonly type: "uint256";
58
+ readonly internalType: "uint256";
59
+ }];
60
+ readonly stateMutability: "view";
61
+ }, {
62
+ readonly type: "function";
63
+ readonly name: "_filled";
64
+ readonly inputs: readonly [{
65
+ readonly name: "";
66
+ readonly type: "bytes32";
67
+ readonly internalType: "bytes32";
68
+ }];
69
+ readonly outputs: readonly [{
70
+ readonly name: "";
71
+ readonly type: "address";
72
+ readonly internalType: "address";
73
+ }];
74
+ readonly stateMutability: "view";
75
+ }, {
76
+ readonly type: "function";
77
+ readonly name: "_instances";
78
+ readonly inputs: readonly [{
79
+ readonly name: "";
80
+ readonly type: "bytes32";
81
+ readonly internalType: "bytes32";
82
+ }];
83
+ readonly outputs: readonly [{
84
+ readonly name: "";
85
+ readonly type: "address";
86
+ readonly internalType: "address";
87
+ }];
88
+ readonly stateMutability: "view";
89
+ }, {
90
+ readonly type: "function";
91
+ readonly name: "_nonce";
92
+ readonly inputs: readonly [];
93
+ readonly outputs: readonly [{
94
+ readonly name: "";
95
+ readonly type: "uint256";
96
+ readonly internalType: "uint256";
97
+ }];
98
+ readonly stateMutability: "view";
99
+ }, {
100
+ readonly type: "function";
101
+ readonly name: "_orders";
102
+ readonly inputs: readonly [{
103
+ readonly name: "";
104
+ readonly type: "bytes32";
105
+ readonly internalType: "bytes32";
106
+ }, {
107
+ readonly name: "";
108
+ readonly type: "address";
109
+ readonly internalType: "address";
110
+ }];
111
+ readonly outputs: readonly [{
112
+ readonly name: "";
113
+ readonly type: "uint256";
114
+ readonly internalType: "uint256";
115
+ }];
116
+ readonly stateMutability: "view";
117
+ }, {
118
+ readonly type: "function";
119
+ readonly name: "_partialFills";
120
+ readonly inputs: readonly [{
121
+ readonly name: "";
122
+ readonly type: "bytes32";
123
+ readonly internalType: "bytes32";
124
+ }, {
125
+ readonly name: "";
126
+ readonly type: "bytes32";
127
+ readonly internalType: "bytes32";
128
+ }];
129
+ readonly outputs: readonly [{
130
+ readonly name: "";
131
+ readonly type: "uint256";
132
+ readonly internalType: "uint256";
133
+ }];
134
+ readonly stateMutability: "view";
135
+ }, {
136
+ readonly type: "function";
137
+ readonly name: "calculateCommitmentSlotHash";
138
+ readonly inputs: readonly [{
139
+ readonly name: "commitment";
140
+ readonly type: "bytes32";
141
+ readonly internalType: "bytes32";
142
+ }];
143
+ readonly outputs: readonly [{
144
+ readonly name: "";
145
+ readonly type: "bytes";
146
+ readonly internalType: "bytes";
147
+ }];
148
+ readonly stateMutability: "pure";
149
+ }, {
150
+ readonly type: "function";
151
+ readonly name: "cancelOrder";
152
+ readonly inputs: readonly [{
153
+ readonly name: "order";
154
+ readonly type: "tuple";
155
+ readonly internalType: "struct Order";
156
+ readonly components: readonly [{
157
+ readonly name: "user";
158
+ readonly type: "bytes32";
159
+ readonly internalType: "bytes32";
160
+ }, {
161
+ readonly name: "source";
162
+ readonly type: "bytes";
163
+ readonly internalType: "bytes";
164
+ }, {
165
+ readonly name: "destination";
166
+ readonly type: "bytes";
167
+ readonly internalType: "bytes";
168
+ }, {
169
+ readonly name: "deadline";
170
+ readonly type: "uint256";
171
+ readonly internalType: "uint256";
172
+ }, {
173
+ readonly name: "nonce";
174
+ readonly type: "uint256";
175
+ readonly internalType: "uint256";
176
+ }, {
177
+ readonly name: "fees";
178
+ readonly type: "uint256";
179
+ readonly internalType: "uint256";
180
+ }, {
181
+ readonly name: "session";
182
+ readonly type: "address";
183
+ readonly internalType: "address";
184
+ }, {
185
+ readonly name: "predispatch";
186
+ readonly type: "tuple";
187
+ readonly internalType: "struct DispatchInfo";
188
+ readonly components: readonly [{
189
+ readonly name: "assets";
190
+ readonly type: "tuple[]";
191
+ readonly internalType: "struct TokenInfo[]";
192
+ readonly components: readonly [{
193
+ readonly name: "token";
194
+ readonly type: "bytes32";
195
+ readonly internalType: "bytes32";
196
+ }, {
197
+ readonly name: "amount";
198
+ readonly type: "uint256";
199
+ readonly internalType: "uint256";
200
+ }];
201
+ }, {
202
+ readonly name: "call";
203
+ readonly type: "bytes";
204
+ readonly internalType: "bytes";
205
+ }];
206
+ }, {
207
+ readonly name: "inputs";
208
+ readonly type: "tuple[]";
209
+ readonly internalType: "struct TokenInfo[]";
210
+ readonly components: readonly [{
211
+ readonly name: "token";
212
+ readonly type: "bytes32";
213
+ readonly internalType: "bytes32";
214
+ }, {
215
+ readonly name: "amount";
216
+ readonly type: "uint256";
217
+ readonly internalType: "uint256";
218
+ }];
219
+ }, {
220
+ readonly name: "output";
221
+ readonly type: "tuple";
222
+ readonly internalType: "struct PaymentInfo";
223
+ readonly components: readonly [{
224
+ readonly name: "beneficiary";
225
+ readonly type: "bytes32";
226
+ readonly internalType: "bytes32";
227
+ }, {
228
+ readonly name: "assets";
229
+ readonly type: "tuple[]";
230
+ readonly internalType: "struct TokenInfo[]";
231
+ readonly components: readonly [{
232
+ readonly name: "token";
233
+ readonly type: "bytes32";
234
+ readonly internalType: "bytes32";
235
+ }, {
236
+ readonly name: "amount";
237
+ readonly type: "uint256";
238
+ readonly internalType: "uint256";
239
+ }];
240
+ }, {
241
+ readonly name: "call";
242
+ readonly type: "bytes";
243
+ readonly internalType: "bytes";
244
+ }];
245
+ }];
246
+ }, {
247
+ readonly name: "options";
248
+ readonly type: "tuple";
249
+ readonly internalType: "struct CancelOptions";
250
+ readonly components: readonly [{
251
+ readonly name: "relayerFee";
252
+ readonly type: "uint256";
253
+ readonly internalType: "uint256";
254
+ }, {
255
+ readonly name: "height";
256
+ readonly type: "uint64";
257
+ readonly internalType: "uint64";
258
+ }];
259
+ }];
260
+ readonly outputs: readonly [];
261
+ readonly stateMutability: "payable";
262
+ }, {
263
+ readonly type: "function";
264
+ readonly name: "eip712Domain";
265
+ readonly inputs: readonly [];
266
+ readonly outputs: readonly [{
267
+ readonly name: "fields";
268
+ readonly type: "bytes1";
269
+ readonly internalType: "bytes1";
270
+ }, {
271
+ readonly name: "name";
272
+ readonly type: "string";
273
+ readonly internalType: "string";
274
+ }, {
275
+ readonly name: "version";
276
+ readonly type: "string";
277
+ readonly internalType: "string";
278
+ }, {
279
+ readonly name: "chainId";
280
+ readonly type: "uint256";
281
+ readonly internalType: "uint256";
282
+ }, {
283
+ readonly name: "verifyingContract";
284
+ readonly type: "address";
285
+ readonly internalType: "address";
286
+ }, {
287
+ readonly name: "salt";
288
+ readonly type: "bytes32";
289
+ readonly internalType: "bytes32";
290
+ }, {
291
+ readonly name: "extensions";
292
+ readonly type: "uint256[]";
293
+ readonly internalType: "uint256[]";
294
+ }];
295
+ readonly stateMutability: "view";
296
+ }, {
297
+ readonly type: "function";
298
+ readonly name: "fillOrder";
299
+ readonly inputs: readonly [{
300
+ readonly name: "order";
301
+ readonly type: "tuple";
302
+ readonly internalType: "struct Order";
303
+ readonly components: readonly [{
304
+ readonly name: "user";
305
+ readonly type: "bytes32";
306
+ readonly internalType: "bytes32";
307
+ }, {
308
+ readonly name: "source";
309
+ readonly type: "bytes";
310
+ readonly internalType: "bytes";
311
+ }, {
312
+ readonly name: "destination";
313
+ readonly type: "bytes";
314
+ readonly internalType: "bytes";
315
+ }, {
316
+ readonly name: "deadline";
317
+ readonly type: "uint256";
318
+ readonly internalType: "uint256";
319
+ }, {
320
+ readonly name: "nonce";
321
+ readonly type: "uint256";
322
+ readonly internalType: "uint256";
323
+ }, {
324
+ readonly name: "fees";
325
+ readonly type: "uint256";
326
+ readonly internalType: "uint256";
327
+ }, {
328
+ readonly name: "session";
329
+ readonly type: "address";
330
+ readonly internalType: "address";
331
+ }, {
332
+ readonly name: "predispatch";
333
+ readonly type: "tuple";
334
+ readonly internalType: "struct DispatchInfo";
335
+ readonly components: readonly [{
336
+ readonly name: "assets";
337
+ readonly type: "tuple[]";
338
+ readonly internalType: "struct TokenInfo[]";
339
+ readonly components: readonly [{
340
+ readonly name: "token";
341
+ readonly type: "bytes32";
342
+ readonly internalType: "bytes32";
343
+ }, {
344
+ readonly name: "amount";
345
+ readonly type: "uint256";
346
+ readonly internalType: "uint256";
347
+ }];
348
+ }, {
349
+ readonly name: "call";
350
+ readonly type: "bytes";
351
+ readonly internalType: "bytes";
352
+ }];
353
+ }, {
354
+ readonly name: "inputs";
355
+ readonly type: "tuple[]";
356
+ readonly internalType: "struct TokenInfo[]";
357
+ readonly components: readonly [{
358
+ readonly name: "token";
359
+ readonly type: "bytes32";
360
+ readonly internalType: "bytes32";
361
+ }, {
362
+ readonly name: "amount";
363
+ readonly type: "uint256";
364
+ readonly internalType: "uint256";
365
+ }];
366
+ }, {
367
+ readonly name: "output";
368
+ readonly type: "tuple";
369
+ readonly internalType: "struct PaymentInfo";
370
+ readonly components: readonly [{
371
+ readonly name: "beneficiary";
372
+ readonly type: "bytes32";
373
+ readonly internalType: "bytes32";
374
+ }, {
375
+ readonly name: "assets";
376
+ readonly type: "tuple[]";
377
+ readonly internalType: "struct TokenInfo[]";
378
+ readonly components: readonly [{
379
+ readonly name: "token";
380
+ readonly type: "bytes32";
381
+ readonly internalType: "bytes32";
382
+ }, {
383
+ readonly name: "amount";
384
+ readonly type: "uint256";
385
+ readonly internalType: "uint256";
386
+ }];
387
+ }, {
388
+ readonly name: "call";
389
+ readonly type: "bytes";
390
+ readonly internalType: "bytes";
391
+ }];
392
+ }];
393
+ }, {
394
+ readonly name: "options";
395
+ readonly type: "tuple";
396
+ readonly internalType: "struct FillOptions";
397
+ readonly components: readonly [{
398
+ readonly name: "relayerFee";
399
+ readonly type: "uint256";
400
+ readonly internalType: "uint256";
401
+ }, {
402
+ readonly name: "nativeDispatchFee";
403
+ readonly type: "uint256";
404
+ readonly internalType: "uint256";
405
+ }, {
406
+ readonly name: "outputs";
407
+ readonly type: "tuple[]";
408
+ readonly internalType: "struct TokenInfo[]";
409
+ readonly components: readonly [{
410
+ readonly name: "token";
411
+ readonly type: "bytes32";
412
+ readonly internalType: "bytes32";
413
+ }, {
414
+ readonly name: "amount";
415
+ readonly type: "uint256";
416
+ readonly internalType: "uint256";
417
+ }];
418
+ }];
419
+ }];
420
+ readonly outputs: readonly [];
421
+ readonly stateMutability: "payable";
422
+ }, {
423
+ readonly type: "function";
424
+ readonly name: "host";
425
+ readonly inputs: readonly [];
426
+ readonly outputs: readonly [{
427
+ readonly name: "";
428
+ readonly type: "address";
429
+ readonly internalType: "address";
430
+ }];
431
+ readonly stateMutability: "view";
432
+ }, {
433
+ readonly type: "function";
434
+ readonly name: "instance";
435
+ readonly inputs: readonly [{
436
+ readonly name: "stateMachineId";
437
+ readonly type: "bytes";
438
+ readonly internalType: "bytes";
439
+ }];
440
+ readonly outputs: readonly [{
441
+ readonly name: "";
442
+ readonly type: "address";
443
+ readonly internalType: "address";
444
+ }];
445
+ readonly stateMutability: "view";
446
+ }, {
447
+ readonly type: "function";
448
+ readonly name: "onAccept";
449
+ readonly inputs: readonly [{
450
+ readonly name: "incoming";
451
+ readonly type: "tuple";
452
+ readonly internalType: "struct IncomingPostRequest";
453
+ readonly components: readonly [{
454
+ readonly name: "request";
455
+ readonly type: "tuple";
456
+ readonly internalType: "struct PostRequest";
457
+ readonly components: readonly [{
458
+ readonly name: "source";
459
+ readonly type: "bytes";
460
+ readonly internalType: "bytes";
461
+ }, {
462
+ readonly name: "dest";
463
+ readonly type: "bytes";
464
+ readonly internalType: "bytes";
465
+ }, {
466
+ readonly name: "nonce";
467
+ readonly type: "uint64";
468
+ readonly internalType: "uint64";
469
+ }, {
470
+ readonly name: "from";
471
+ readonly type: "bytes";
472
+ readonly internalType: "bytes";
473
+ }, {
474
+ readonly name: "to";
475
+ readonly type: "bytes";
476
+ readonly internalType: "bytes";
477
+ }, {
478
+ readonly name: "timeoutTimestamp";
479
+ readonly type: "uint64";
480
+ readonly internalType: "uint64";
481
+ }, {
482
+ readonly name: "body";
483
+ readonly type: "bytes";
484
+ readonly internalType: "bytes";
485
+ }];
486
+ }, {
487
+ readonly name: "relayer";
488
+ readonly type: "address";
489
+ readonly internalType: "address";
490
+ }];
491
+ }];
492
+ readonly outputs: readonly [];
493
+ readonly stateMutability: "nonpayable";
494
+ }, {
495
+ readonly type: "function";
496
+ readonly name: "onGetResponse";
497
+ readonly inputs: readonly [{
498
+ readonly name: "incoming";
499
+ readonly type: "tuple";
500
+ readonly internalType: "struct IncomingGetResponse";
501
+ readonly components: readonly [{
502
+ readonly name: "response";
503
+ readonly type: "tuple";
504
+ readonly internalType: "struct GetResponse";
505
+ readonly components: readonly [{
506
+ readonly name: "request";
507
+ readonly type: "tuple";
508
+ readonly internalType: "struct GetRequest";
509
+ readonly components: readonly [{
510
+ readonly name: "source";
511
+ readonly type: "bytes";
512
+ readonly internalType: "bytes";
513
+ }, {
514
+ readonly name: "dest";
515
+ readonly type: "bytes";
516
+ readonly internalType: "bytes";
517
+ }, {
518
+ readonly name: "nonce";
519
+ readonly type: "uint64";
520
+ readonly internalType: "uint64";
521
+ }, {
522
+ readonly name: "from";
523
+ readonly type: "bytes";
524
+ readonly internalType: "bytes";
525
+ }, {
526
+ readonly name: "timeoutTimestamp";
527
+ readonly type: "uint64";
528
+ readonly internalType: "uint64";
529
+ }, {
530
+ readonly name: "keys";
531
+ readonly type: "bytes[]";
532
+ readonly internalType: "bytes[]";
533
+ }, {
534
+ readonly name: "height";
535
+ readonly type: "uint64";
536
+ readonly internalType: "uint64";
537
+ }, {
538
+ readonly name: "context";
539
+ readonly type: "bytes";
540
+ readonly internalType: "bytes";
541
+ }];
542
+ }, {
543
+ readonly name: "values";
544
+ readonly type: "tuple[]";
545
+ readonly internalType: "struct StorageValue[]";
546
+ readonly components: readonly [{
547
+ readonly name: "key";
548
+ readonly type: "bytes";
549
+ readonly internalType: "bytes";
550
+ }, {
551
+ readonly name: "value";
552
+ readonly type: "bytes";
553
+ readonly internalType: "bytes";
554
+ }];
555
+ }];
556
+ }, {
557
+ readonly name: "relayer";
558
+ readonly type: "address";
559
+ readonly internalType: "address";
560
+ }];
561
+ }];
562
+ readonly outputs: readonly [];
563
+ readonly stateMutability: "nonpayable";
564
+ }, {
565
+ readonly type: "function";
566
+ readonly name: "onGetTimeout";
567
+ readonly inputs: readonly [{
568
+ readonly name: "";
569
+ readonly type: "tuple";
570
+ readonly internalType: "struct GetRequestTimeout";
571
+ readonly components: readonly [{
572
+ readonly name: "request";
573
+ readonly type: "tuple";
574
+ readonly internalType: "struct GetRequest";
575
+ readonly components: readonly [{
576
+ readonly name: "source";
577
+ readonly type: "bytes";
578
+ readonly internalType: "bytes";
579
+ }, {
580
+ readonly name: "dest";
581
+ readonly type: "bytes";
582
+ readonly internalType: "bytes";
583
+ }, {
584
+ readonly name: "nonce";
585
+ readonly type: "uint64";
586
+ readonly internalType: "uint64";
587
+ }, {
588
+ readonly name: "from";
589
+ readonly type: "bytes";
590
+ readonly internalType: "bytes";
591
+ }, {
592
+ readonly name: "timeoutTimestamp";
593
+ readonly type: "uint64";
594
+ readonly internalType: "uint64";
595
+ }, {
596
+ readonly name: "keys";
597
+ readonly type: "bytes[]";
598
+ readonly internalType: "bytes[]";
599
+ }, {
600
+ readonly name: "height";
601
+ readonly type: "uint64";
602
+ readonly internalType: "uint64";
603
+ }, {
604
+ readonly name: "context";
605
+ readonly type: "bytes";
606
+ readonly internalType: "bytes";
607
+ }];
608
+ }, {
609
+ readonly name: "relayer";
610
+ readonly type: "address";
611
+ readonly internalType: "address";
612
+ }];
613
+ }];
614
+ readonly outputs: readonly [];
615
+ readonly stateMutability: "nonpayable";
616
+ }, {
617
+ readonly type: "function";
618
+ readonly name: "onPostRequestTimeout";
619
+ readonly inputs: readonly [{
620
+ readonly name: "";
621
+ readonly type: "tuple";
622
+ readonly internalType: "struct PostRequestTimeout";
623
+ readonly components: readonly [{
624
+ readonly name: "request";
625
+ readonly type: "tuple";
626
+ readonly internalType: "struct PostRequest";
627
+ readonly components: readonly [{
628
+ readonly name: "source";
629
+ readonly type: "bytes";
630
+ readonly internalType: "bytes";
631
+ }, {
632
+ readonly name: "dest";
633
+ readonly type: "bytes";
634
+ readonly internalType: "bytes";
635
+ }, {
636
+ readonly name: "nonce";
637
+ readonly type: "uint64";
638
+ readonly internalType: "uint64";
639
+ }, {
640
+ readonly name: "from";
641
+ readonly type: "bytes";
642
+ readonly internalType: "bytes";
643
+ }, {
644
+ readonly name: "to";
645
+ readonly type: "bytes";
646
+ readonly internalType: "bytes";
647
+ }, {
648
+ readonly name: "timeoutTimestamp";
649
+ readonly type: "uint64";
650
+ readonly internalType: "uint64";
651
+ }, {
652
+ readonly name: "body";
653
+ readonly type: "bytes";
654
+ readonly internalType: "bytes";
655
+ }];
656
+ }, {
657
+ readonly name: "relayer";
658
+ readonly type: "address";
659
+ readonly internalType: "address";
660
+ }];
661
+ }];
662
+ readonly outputs: readonly [];
663
+ readonly stateMutability: "nonpayable";
664
+ }, {
665
+ readonly type: "function";
666
+ readonly name: "params";
667
+ readonly inputs: readonly [];
668
+ readonly outputs: readonly [{
669
+ readonly name: "";
670
+ readonly type: "tuple";
671
+ readonly internalType: "struct Params";
672
+ readonly components: readonly [{
673
+ readonly name: "host";
674
+ readonly type: "address";
675
+ readonly internalType: "address";
676
+ }, {
677
+ readonly name: "dispatcher";
678
+ readonly type: "address";
679
+ readonly internalType: "address";
680
+ }, {
681
+ readonly name: "solverSelection";
682
+ readonly type: "bool";
683
+ readonly internalType: "bool";
684
+ }, {
685
+ readonly name: "surplusShareBps";
686
+ readonly type: "uint256";
687
+ readonly internalType: "uint256";
688
+ }, {
689
+ readonly name: "protocolFeeBps";
690
+ readonly type: "uint256";
691
+ readonly internalType: "uint256";
692
+ }, {
693
+ readonly name: "priceOracle";
694
+ readonly type: "address";
695
+ readonly internalType: "address";
696
+ }];
697
+ }];
698
+ readonly stateMutability: "view";
699
+ }, {
700
+ readonly type: "function";
701
+ readonly name: "placeOrder";
702
+ readonly inputs: readonly [{
703
+ readonly name: "order";
704
+ readonly type: "tuple";
705
+ readonly internalType: "struct Order";
706
+ readonly components: readonly [{
707
+ readonly name: "user";
708
+ readonly type: "bytes32";
709
+ readonly internalType: "bytes32";
710
+ }, {
711
+ readonly name: "source";
712
+ readonly type: "bytes";
713
+ readonly internalType: "bytes";
714
+ }, {
715
+ readonly name: "destination";
716
+ readonly type: "bytes";
717
+ readonly internalType: "bytes";
718
+ }, {
719
+ readonly name: "deadline";
720
+ readonly type: "uint256";
721
+ readonly internalType: "uint256";
722
+ }, {
723
+ readonly name: "nonce";
724
+ readonly type: "uint256";
725
+ readonly internalType: "uint256";
726
+ }, {
727
+ readonly name: "fees";
728
+ readonly type: "uint256";
729
+ readonly internalType: "uint256";
730
+ }, {
731
+ readonly name: "session";
732
+ readonly type: "address";
733
+ readonly internalType: "address";
734
+ }, {
735
+ readonly name: "predispatch";
736
+ readonly type: "tuple";
737
+ readonly internalType: "struct DispatchInfo";
738
+ readonly components: readonly [{
739
+ readonly name: "assets";
740
+ readonly type: "tuple[]";
741
+ readonly internalType: "struct TokenInfo[]";
742
+ readonly components: readonly [{
743
+ readonly name: "token";
744
+ readonly type: "bytes32";
745
+ readonly internalType: "bytes32";
746
+ }, {
747
+ readonly name: "amount";
748
+ readonly type: "uint256";
749
+ readonly internalType: "uint256";
750
+ }];
751
+ }, {
752
+ readonly name: "call";
753
+ readonly type: "bytes";
754
+ readonly internalType: "bytes";
755
+ }];
756
+ }, {
757
+ readonly name: "inputs";
758
+ readonly type: "tuple[]";
759
+ readonly internalType: "struct TokenInfo[]";
760
+ readonly components: readonly [{
761
+ readonly name: "token";
762
+ readonly type: "bytes32";
763
+ readonly internalType: "bytes32";
764
+ }, {
765
+ readonly name: "amount";
766
+ readonly type: "uint256";
767
+ readonly internalType: "uint256";
768
+ }];
769
+ }, {
770
+ readonly name: "output";
771
+ readonly type: "tuple";
772
+ readonly internalType: "struct PaymentInfo";
773
+ readonly components: readonly [{
774
+ readonly name: "beneficiary";
775
+ readonly type: "bytes32";
776
+ readonly internalType: "bytes32";
777
+ }, {
778
+ readonly name: "assets";
779
+ readonly type: "tuple[]";
780
+ readonly internalType: "struct TokenInfo[]";
781
+ readonly components: readonly [{
782
+ readonly name: "token";
783
+ readonly type: "bytes32";
784
+ readonly internalType: "bytes32";
785
+ }, {
786
+ readonly name: "amount";
787
+ readonly type: "uint256";
788
+ readonly internalType: "uint256";
789
+ }];
790
+ }, {
791
+ readonly name: "call";
792
+ readonly type: "bytes";
793
+ readonly internalType: "bytes";
794
+ }];
795
+ }];
796
+ }, {
797
+ readonly name: "graffiti";
798
+ readonly type: "bytes32";
799
+ readonly internalType: "bytes32";
800
+ }];
801
+ readonly outputs: readonly [];
802
+ readonly stateMutability: "payable";
803
+ }, {
804
+ readonly type: "function";
805
+ readonly name: "quote";
806
+ readonly inputs: readonly [{
807
+ readonly name: "request";
808
+ readonly type: "tuple";
809
+ readonly internalType: "struct DispatchPost";
810
+ readonly components: readonly [{
811
+ readonly name: "dest";
812
+ readonly type: "bytes";
813
+ readonly internalType: "bytes";
814
+ }, {
815
+ readonly name: "to";
816
+ readonly type: "bytes";
817
+ readonly internalType: "bytes";
818
+ }, {
819
+ readonly name: "body";
820
+ readonly type: "bytes";
821
+ readonly internalType: "bytes";
822
+ }, {
823
+ readonly name: "timeout";
824
+ readonly type: "uint64";
825
+ readonly internalType: "uint64";
826
+ }, {
827
+ readonly name: "fee";
828
+ readonly type: "uint256";
829
+ readonly internalType: "uint256";
830
+ }, {
831
+ readonly name: "payer";
832
+ readonly type: "address";
833
+ readonly internalType: "address";
834
+ }];
835
+ }];
836
+ readonly outputs: readonly [{
837
+ readonly name: "";
838
+ readonly type: "uint256";
839
+ readonly internalType: "uint256";
840
+ }];
841
+ readonly stateMutability: "view";
842
+ }, {
843
+ readonly type: "function";
844
+ readonly name: "quote";
845
+ readonly inputs: readonly [{
846
+ readonly name: "request";
847
+ readonly type: "tuple";
848
+ readonly internalType: "struct DispatchGet";
849
+ readonly components: readonly [{
850
+ readonly name: "dest";
851
+ readonly type: "bytes";
852
+ readonly internalType: "bytes";
853
+ }, {
854
+ readonly name: "height";
855
+ readonly type: "uint64";
856
+ readonly internalType: "uint64";
857
+ }, {
858
+ readonly name: "keys";
859
+ readonly type: "bytes[]";
860
+ readonly internalType: "bytes[]";
861
+ }, {
862
+ readonly name: "timeout";
863
+ readonly type: "uint64";
864
+ readonly internalType: "uint64";
865
+ }, {
866
+ readonly name: "fee";
867
+ readonly type: "uint256";
868
+ readonly internalType: "uint256";
869
+ }, {
870
+ readonly name: "context";
871
+ readonly type: "bytes";
872
+ readonly internalType: "bytes";
873
+ }, {
874
+ readonly name: "payer";
875
+ readonly type: "address";
876
+ readonly internalType: "address";
877
+ }];
878
+ }];
879
+ readonly outputs: readonly [{
880
+ readonly name: "";
881
+ readonly type: "uint256";
882
+ readonly internalType: "uint256";
883
+ }];
884
+ readonly stateMutability: "view";
885
+ }, {
886
+ readonly type: "function";
887
+ readonly name: "select";
888
+ readonly inputs: readonly [{
889
+ readonly name: "options";
890
+ readonly type: "tuple";
891
+ readonly internalType: "struct SelectOptions";
892
+ readonly components: readonly [{
893
+ readonly name: "commitment";
894
+ readonly type: "bytes32";
895
+ readonly internalType: "bytes32";
896
+ }, {
897
+ readonly name: "solver";
898
+ readonly type: "address";
899
+ readonly internalType: "address";
900
+ }, {
901
+ readonly name: "signature";
902
+ readonly type: "bytes";
903
+ readonly internalType: "bytes";
904
+ }];
905
+ }];
906
+ readonly outputs: readonly [{
907
+ readonly name: "";
908
+ readonly type: "address";
909
+ readonly internalType: "address";
910
+ }];
911
+ readonly stateMutability: "nonpayable";
912
+ }, {
913
+ readonly type: "function";
914
+ readonly name: "init";
915
+ readonly inputs: readonly [{
916
+ readonly name: "p";
917
+ readonly type: "tuple";
918
+ readonly internalType: "struct Params";
919
+ readonly components: readonly [{
920
+ readonly name: "host";
921
+ readonly type: "address";
922
+ readonly internalType: "address";
923
+ }, {
924
+ readonly name: "dispatcher";
925
+ readonly type: "address";
926
+ readonly internalType: "address";
927
+ }, {
928
+ readonly name: "solverSelection";
929
+ readonly type: "bool";
930
+ readonly internalType: "bool";
931
+ }, {
932
+ readonly name: "surplusShareBps";
933
+ readonly type: "uint256";
934
+ readonly internalType: "uint256";
935
+ }, {
936
+ readonly name: "protocolFeeBps";
937
+ readonly type: "uint256";
938
+ readonly internalType: "uint256";
939
+ }, {
940
+ readonly name: "priceOracle";
941
+ readonly type: "address";
942
+ readonly internalType: "address";
943
+ }];
944
+ }, {
945
+ readonly name: "deployments";
946
+ readonly type: "tuple[]";
947
+ readonly internalType: "struct Deployment[]";
948
+ readonly components: readonly [{
949
+ readonly name: "chain";
950
+ readonly type: "bytes";
951
+ readonly internalType: "bytes";
952
+ }, {
953
+ readonly name: "gateway";
954
+ readonly type: "address";
955
+ readonly internalType: "address";
956
+ }];
957
+ }];
958
+ readonly outputs: readonly [];
959
+ readonly stateMutability: "nonpayable";
960
+ }, {
961
+ readonly type: "event";
962
+ readonly name: "DestinationProtocolFeeUpdated";
963
+ readonly inputs: readonly [{
964
+ readonly name: "chain";
965
+ readonly type: "string";
966
+ readonly indexed: false;
967
+ readonly internalType: "string";
968
+ }, {
969
+ readonly name: "feeBps";
970
+ readonly type: "uint256";
971
+ readonly indexed: false;
972
+ readonly internalType: "uint256";
973
+ }];
974
+ readonly anonymous: false;
975
+ }, {
976
+ readonly type: "event";
977
+ readonly name: "DustCollected";
978
+ readonly inputs: readonly [{
979
+ readonly name: "token";
980
+ readonly type: "address";
981
+ readonly indexed: false;
982
+ readonly internalType: "address";
983
+ }, {
984
+ readonly name: "amount";
985
+ readonly type: "uint256";
986
+ readonly indexed: false;
987
+ readonly internalType: "uint256";
988
+ }];
989
+ readonly anonymous: false;
990
+ }, {
991
+ readonly type: "event";
992
+ readonly name: "DustSwept";
993
+ readonly inputs: readonly [{
994
+ readonly name: "token";
995
+ readonly type: "address";
996
+ readonly indexed: false;
997
+ readonly internalType: "address";
998
+ }, {
999
+ readonly name: "amount";
1000
+ readonly type: "uint256";
1001
+ readonly indexed: false;
1002
+ readonly internalType: "uint256";
1003
+ }, {
1004
+ readonly name: "beneficiary";
1005
+ readonly type: "address";
1006
+ readonly indexed: false;
1007
+ readonly internalType: "address";
1008
+ }];
1009
+ readonly anonymous: false;
1010
+ }, {
1011
+ readonly type: "event";
1012
+ readonly name: "EIP712DomainChanged";
1013
+ readonly inputs: readonly [];
1014
+ readonly anonymous: false;
1015
+ }, {
1016
+ readonly type: "event";
1017
+ readonly name: "EscrowRefunded";
1018
+ readonly inputs: readonly [{
1019
+ readonly name: "commitment";
1020
+ readonly type: "bytes32";
1021
+ readonly indexed: true;
1022
+ readonly internalType: "bytes32";
1023
+ }, {
1024
+ readonly name: "tokens";
1025
+ readonly type: "tuple[]";
1026
+ readonly indexed: false;
1027
+ readonly internalType: "struct TokenInfo[]";
1028
+ readonly components: readonly [{
1029
+ readonly name: "token";
1030
+ readonly type: "bytes32";
1031
+ readonly internalType: "bytes32";
1032
+ }, {
1033
+ readonly name: "amount";
1034
+ readonly type: "uint256";
1035
+ readonly internalType: "uint256";
1036
+ }];
1037
+ }];
1038
+ readonly anonymous: false;
1039
+ }, {
1040
+ readonly type: "event";
1041
+ readonly name: "EscrowReleased";
1042
+ readonly inputs: readonly [{
1043
+ readonly name: "commitment";
1044
+ readonly type: "bytes32";
1045
+ readonly indexed: true;
1046
+ readonly internalType: "bytes32";
1047
+ }, {
1048
+ readonly name: "tokens";
1049
+ readonly type: "tuple[]";
1050
+ readonly indexed: false;
1051
+ readonly internalType: "struct TokenInfo[]";
1052
+ readonly components: readonly [{
1053
+ readonly name: "token";
1054
+ readonly type: "bytes32";
1055
+ readonly internalType: "bytes32";
1056
+ }, {
1057
+ readonly name: "amount";
1058
+ readonly type: "uint256";
1059
+ readonly internalType: "uint256";
1060
+ }];
1061
+ }];
1062
+ readonly anonymous: false;
1063
+ }, {
1064
+ readonly type: "event";
1065
+ readonly name: "DeploymentAdded";
1066
+ readonly inputs: readonly [{
1067
+ readonly name: "chain";
1068
+ readonly type: "string";
1069
+ readonly indexed: false;
1070
+ readonly internalType: "string";
1071
+ }, {
1072
+ readonly name: "gateway";
1073
+ readonly type: "address";
1074
+ readonly indexed: false;
1075
+ readonly internalType: "address";
1076
+ }];
1077
+ readonly anonymous: false;
1078
+ }, {
1079
+ readonly type: "event";
1080
+ readonly name: "OrderFilled";
1081
+ readonly inputs: readonly [{
1082
+ readonly name: "commitment";
1083
+ readonly type: "bytes32";
1084
+ readonly indexed: true;
1085
+ readonly internalType: "bytes32";
1086
+ }, {
1087
+ readonly name: "filler";
1088
+ readonly type: "address";
1089
+ readonly indexed: false;
1090
+ readonly internalType: "address";
1091
+ }, {
1092
+ readonly name: "outputs";
1093
+ readonly type: "tuple[]";
1094
+ readonly indexed: false;
1095
+ readonly internalType: "struct TokenInfo[]";
1096
+ readonly components: readonly [{
1097
+ readonly name: "token";
1098
+ readonly type: "bytes32";
1099
+ readonly internalType: "bytes32";
1100
+ }, {
1101
+ readonly name: "amount";
1102
+ readonly type: "uint256";
1103
+ readonly internalType: "uint256";
1104
+ }];
1105
+ }, {
1106
+ readonly name: "inputs";
1107
+ readonly type: "tuple[]";
1108
+ readonly indexed: false;
1109
+ readonly internalType: "struct TokenInfo[]";
1110
+ readonly components: readonly [{
1111
+ readonly name: "token";
1112
+ readonly type: "bytes32";
1113
+ readonly internalType: "bytes32";
1114
+ }, {
1115
+ readonly name: "amount";
1116
+ readonly type: "uint256";
1117
+ readonly internalType: "uint256";
1118
+ }];
1119
+ }];
1120
+ readonly anonymous: false;
1121
+ }, {
1122
+ readonly type: "event";
1123
+ readonly name: "OrderPlaced";
1124
+ readonly inputs: readonly [{
1125
+ readonly name: "user";
1126
+ readonly type: "bytes32";
1127
+ readonly indexed: false;
1128
+ readonly internalType: "bytes32";
1129
+ }, {
1130
+ readonly name: "source";
1131
+ readonly type: "string";
1132
+ readonly indexed: false;
1133
+ readonly internalType: "string";
1134
+ }, {
1135
+ readonly name: "destination";
1136
+ readonly type: "string";
1137
+ readonly indexed: false;
1138
+ readonly internalType: "string";
1139
+ }, {
1140
+ readonly name: "deadline";
1141
+ readonly type: "uint256";
1142
+ readonly indexed: false;
1143
+ readonly internalType: "uint256";
1144
+ }, {
1145
+ readonly name: "nonce";
1146
+ readonly type: "uint256";
1147
+ readonly indexed: false;
1148
+ readonly internalType: "uint256";
1149
+ }, {
1150
+ readonly name: "fees";
1151
+ readonly type: "uint256";
1152
+ readonly indexed: false;
1153
+ readonly internalType: "uint256";
1154
+ }, {
1155
+ readonly name: "session";
1156
+ readonly type: "address";
1157
+ readonly indexed: false;
1158
+ readonly internalType: "address";
1159
+ }, {
1160
+ readonly name: "beneficiary";
1161
+ readonly type: "bytes32";
1162
+ readonly indexed: false;
1163
+ readonly internalType: "bytes32";
1164
+ }, {
1165
+ readonly name: "predispatch";
1166
+ readonly type: "tuple[]";
1167
+ readonly indexed: false;
1168
+ readonly internalType: "struct TokenInfo[]";
1169
+ readonly components: readonly [{
1170
+ readonly name: "token";
1171
+ readonly type: "bytes32";
1172
+ readonly internalType: "bytes32";
1173
+ }, {
1174
+ readonly name: "amount";
1175
+ readonly type: "uint256";
1176
+ readonly internalType: "uint256";
1177
+ }];
1178
+ }, {
1179
+ readonly name: "inputs";
1180
+ readonly type: "tuple[]";
1181
+ readonly indexed: false;
1182
+ readonly internalType: "struct TokenInfo[]";
1183
+ readonly components: readonly [{
1184
+ readonly name: "token";
1185
+ readonly type: "bytes32";
1186
+ readonly internalType: "bytes32";
1187
+ }, {
1188
+ readonly name: "amount";
1189
+ readonly type: "uint256";
1190
+ readonly internalType: "uint256";
1191
+ }];
1192
+ }, {
1193
+ readonly name: "outputs";
1194
+ readonly type: "tuple[]";
1195
+ readonly indexed: false;
1196
+ readonly internalType: "struct TokenInfo[]";
1197
+ readonly components: readonly [{
1198
+ readonly name: "token";
1199
+ readonly type: "bytes32";
1200
+ readonly internalType: "bytes32";
1201
+ }, {
1202
+ readonly name: "amount";
1203
+ readonly type: "uint256";
1204
+ readonly internalType: "uint256";
1205
+ }];
1206
+ }];
1207
+ readonly anonymous: false;
1208
+ }, {
1209
+ readonly type: "event";
1210
+ readonly name: "ParamsUpdated";
1211
+ readonly inputs: readonly [{
1212
+ readonly name: "previous";
1213
+ readonly type: "tuple";
1214
+ readonly indexed: false;
1215
+ readonly internalType: "struct Params";
1216
+ readonly components: readonly [{
1217
+ readonly name: "host";
1218
+ readonly type: "address";
1219
+ readonly internalType: "address";
1220
+ }, {
1221
+ readonly name: "dispatcher";
1222
+ readonly type: "address";
1223
+ readonly internalType: "address";
1224
+ }, {
1225
+ readonly name: "solverSelection";
1226
+ readonly type: "bool";
1227
+ readonly internalType: "bool";
1228
+ }, {
1229
+ readonly name: "surplusShareBps";
1230
+ readonly type: "uint256";
1231
+ readonly internalType: "uint256";
1232
+ }, {
1233
+ readonly name: "protocolFeeBps";
1234
+ readonly type: "uint256";
1235
+ readonly internalType: "uint256";
1236
+ }, {
1237
+ readonly name: "priceOracle";
1238
+ readonly type: "address";
1239
+ readonly internalType: "address";
1240
+ }];
1241
+ }, {
1242
+ readonly name: "current";
1243
+ readonly type: "tuple";
1244
+ readonly indexed: false;
1245
+ readonly internalType: "struct Params";
1246
+ readonly components: readonly [{
1247
+ readonly name: "host";
1248
+ readonly type: "address";
1249
+ readonly internalType: "address";
1250
+ }, {
1251
+ readonly name: "dispatcher";
1252
+ readonly type: "address";
1253
+ readonly internalType: "address";
1254
+ }, {
1255
+ readonly name: "solverSelection";
1256
+ readonly type: "bool";
1257
+ readonly internalType: "bool";
1258
+ }, {
1259
+ readonly name: "surplusShareBps";
1260
+ readonly type: "uint256";
1261
+ readonly internalType: "uint256";
1262
+ }, {
1263
+ readonly name: "protocolFeeBps";
1264
+ readonly type: "uint256";
1265
+ readonly internalType: "uint256";
1266
+ }, {
1267
+ readonly name: "priceOracle";
1268
+ readonly type: "address";
1269
+ readonly internalType: "address";
1270
+ }];
1271
+ }];
1272
+ readonly anonymous: false;
1273
+ }, {
1274
+ readonly type: "event";
1275
+ readonly name: "PartialFill";
1276
+ readonly inputs: readonly [{
1277
+ readonly name: "commitment";
1278
+ readonly type: "bytes32";
1279
+ readonly indexed: true;
1280
+ readonly internalType: "bytes32";
1281
+ }, {
1282
+ readonly name: "filler";
1283
+ readonly type: "address";
1284
+ readonly indexed: false;
1285
+ readonly internalType: "address";
1286
+ }, {
1287
+ readonly name: "outputs";
1288
+ readonly type: "tuple[]";
1289
+ readonly indexed: false;
1290
+ readonly internalType: "struct TokenInfo[]";
1291
+ readonly components: readonly [{
1292
+ readonly name: "token";
1293
+ readonly type: "bytes32";
1294
+ readonly internalType: "bytes32";
1295
+ }, {
1296
+ readonly name: "amount";
1297
+ readonly type: "uint256";
1298
+ readonly internalType: "uint256";
1299
+ }];
1300
+ }, {
1301
+ readonly name: "inputs";
1302
+ readonly type: "tuple[]";
1303
+ readonly indexed: false;
1304
+ readonly internalType: "struct TokenInfo[]";
1305
+ readonly components: readonly [{
1306
+ readonly name: "token";
1307
+ readonly type: "bytes32";
1308
+ readonly internalType: "bytes32";
1309
+ }, {
1310
+ readonly name: "amount";
1311
+ readonly type: "uint256";
1312
+ readonly internalType: "uint256";
1313
+ }];
1314
+ }];
1315
+ readonly anonymous: false;
1316
+ }, {
1317
+ readonly type: "error";
1318
+ readonly name: "Cancelled";
1319
+ readonly inputs: readonly [];
1320
+ }, {
1321
+ readonly type: "error";
1322
+ readonly name: "UnknownInstance";
1323
+ readonly inputs: readonly [];
1324
+ }, {
1325
+ readonly type: "error";
1326
+ readonly name: "ECDSAInvalidSignature";
1327
+ readonly inputs: readonly [];
1328
+ }, {
1329
+ readonly type: "error";
1330
+ readonly name: "ECDSAInvalidSignatureLength";
1331
+ readonly inputs: readonly [{
1332
+ readonly name: "length";
1333
+ readonly type: "uint256";
1334
+ readonly internalType: "uint256";
1335
+ }];
1336
+ }, {
1337
+ readonly type: "error";
1338
+ readonly name: "ECDSAInvalidSignatureS";
1339
+ readonly inputs: readonly [{
1340
+ readonly name: "s";
1341
+ readonly type: "bytes32";
1342
+ readonly internalType: "bytes32";
1343
+ }];
1344
+ }, {
1345
+ readonly type: "error";
1346
+ readonly name: "Expired";
1347
+ readonly inputs: readonly [];
1348
+ }, {
1349
+ readonly type: "error";
1350
+ readonly name: "Filled";
1351
+ readonly inputs: readonly [];
1352
+ }, {
1353
+ readonly type: "error";
1354
+ readonly name: "InsufficientNativeToken";
1355
+ readonly inputs: readonly [];
1356
+ }, {
1357
+ readonly type: "error";
1358
+ readonly name: "InvalidInput";
1359
+ readonly inputs: readonly [];
1360
+ }, {
1361
+ readonly type: "error";
1362
+ readonly name: "InvalidShortString";
1363
+ readonly inputs: readonly [];
1364
+ }, {
1365
+ readonly type: "error";
1366
+ readonly name: "NotExpired";
1367
+ readonly inputs: readonly [];
1368
+ }, {
1369
+ readonly type: "error";
1370
+ readonly name: "SafeERC20FailedOperation";
1371
+ readonly inputs: readonly [{
1372
+ readonly name: "token";
1373
+ readonly type: "address";
1374
+ readonly internalType: "address";
1375
+ }];
1376
+ }, {
1377
+ readonly type: "error";
1378
+ readonly name: "StringTooLong";
1379
+ readonly inputs: readonly [{
1380
+ readonly name: "str";
1381
+ readonly type: "string";
1382
+ readonly internalType: "string";
1383
+ }];
1384
+ }, {
1385
+ readonly type: "error";
1386
+ readonly name: "Unauthorized";
1387
+ readonly inputs: readonly [];
1388
+ }, {
1389
+ readonly type: "error";
1390
+ readonly name: "UnauthorizedCall";
1391
+ readonly inputs: readonly [];
1392
+ }, {
1393
+ readonly type: "error";
1394
+ readonly name: "UnexpectedCall";
1395
+ readonly inputs: readonly [];
1396
+ }, {
1397
+ readonly type: "error";
1398
+ readonly name: "UnknownOrder";
1399
+ readonly inputs: readonly [];
1400
+ }, {
1401
+ readonly type: "error";
1402
+ readonly name: "WrongChain";
1403
+ readonly inputs: readonly [];
1404
+ }];
1405
+ /** ERC-4626 vaults per chain, keyed by chain id then lowercase underlying token address. */
1406
+ type YieldVaultMap = Record<string, Record<string, string[]>>;
1407
+ interface FillData {
1408
+ order: Record<string, unknown>;
1409
+ options: Record<string, unknown>;
1410
+ outputToken: HexString;
1411
+ solverAmount: bigint;
1412
+ }
1413
+ interface RpcBidInfo {
1414
+ commitment: string;
1415
+ filler: string;
1416
+ user_op: string;
1417
+ }
1418
+ /** One solver's measured liquidity for a configured token on one chain at this snapshot. */
1419
+ interface LpBalance {
1420
+ solver: string;
1421
+ /** State machine id of the chain the balance was measured on (e.g. EVM-8453). */
1422
+ chain: string;
1423
+ tokenAddress: HexString;
1424
+ balance: bigint;
1425
+ }
1426
+ /** The aggregated result for a single phantom order's bid window. */
1427
+ interface PhantomAggregation {
1428
+ lowestPrice: bigint;
1429
+ highestPrice: bigint;
1430
+ medianPrice: bigint;
1431
+ bidCount: number;
1432
+ lpBalances: LpBalance[];
1433
+ }
1434
+ interface AggregationLogger {
1435
+ warn: (payload: unknown, message: string) => void;
1436
+ }
1437
+ declare function weightedMedian(entries: {
1438
+ price: bigint;
1439
+ weight: bigint;
1440
+ }[]): bigint;
1441
+ declare function extractFillData(callData: HexString, gatewayAddress: string): FillData | null;
1442
+ declare function fetchBidsForOrder(nodeUrl: string, commitment: string): Promise<RpcBidInfo[]>;
1443
+ /**
1444
+ * Aggregates every bid for a phantom order into a single price/liquidity snapshot.
1445
+ *
1446
+ * Fetches the live bids via `intents_getBidsForOrder` and reads each filler's quoted output amount.
1447
+ * The liquidity-weighted median weights every quote by the solver's balance of the output token on
1448
+ * the destination chain, so a solver that can't actually deliver size carries little or no weight —
1449
+ * which is why no fill simulation is needed to filter unfillable quotes. For each bidding solver it
1450
+ * also records a full liquidity sweep — every configured yield-vault token on every supported chain
1451
+ * (raw ERC-20 + vault positions). Returns `null` when there are no decodable bids.
1452
+ *
1453
+ * `extractFill` decodes a bid's ERC-7821 calldata into the fill's order/output; it defaults to the
1454
+ * viem-based {@link extractFillData}, but the indexer injects a VM2-safe variant (viem's
1455
+ * decodeFunctionData keccak throws in the SubQuery sandbox).
1456
+ */
1457
+ declare function aggregatePhantomBids(params: {
1458
+ nodeUrl: string;
1459
+ /** RPC URL per supported EVM chain (stateMachineId -> url); must include the destination chain. */
1460
+ evmRpcUrls: Record<string, string>;
1461
+ chain: string;
1462
+ gatewayAddress: string;
1463
+ commitment: string;
1464
+ yieldVaults: YieldVaultMap;
1465
+ extractFill?: (callData: HexString, gatewayAddress: string) => FillData | null;
1466
+ logger?: AggregationLogger;
1467
+ }): Promise<PhantomAggregation | null>;
1468
+
1469
+ export { type AggregationLogger, FILL_ORDER_ABI, type FetchLike, type FillData, type HexString, type LpBalance, type PhantomAggregation, type RpcBidInfo, type YieldVaultMap, aggregatePhantomBids, extractFillData, fetchBidsForOrder, setAggregationFetch, weightedMedian };