@pushchain/core 2.0.2 → 2.0.5

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.
Files changed (46) hide show
  1. package/package.json +4 -3
  2. package/src/lib/constants/abi/erc20.evm.d.ts +36 -0
  3. package/src/lib/constants/abi/erc20.evm.js +26 -0
  4. package/src/lib/constants/abi/erc20.evm.js.map +1 -0
  5. package/src/lib/constants/abi/index.d.ts +3 -0
  6. package/src/lib/constants/abi/index.js +7 -1
  7. package/src/lib/constants/abi/index.js.map +1 -1
  8. package/src/lib/constants/abi/pushsolanagateway.json +1880 -0
  9. package/src/lib/constants/abi/universalGatewayV0.evm.d.ts +31 -0
  10. package/src/lib/constants/abi/universalGatewayV0.evm.js +141 -0
  11. package/src/lib/constants/abi/universalGatewayV0.evm.js.map +1 -0
  12. package/src/lib/constants/index.d.ts +1 -0
  13. package/src/lib/constants/index.js.map +1 -1
  14. package/src/lib/constants/tokens.d.ts +50 -0
  15. package/src/lib/constants/tokens.js +172 -0
  16. package/src/lib/constants/tokens.js.map +1 -0
  17. package/src/lib/generated/uexecutor/v1/query.d.ts +23 -0
  18. package/src/lib/generated/uexecutor/v1/query.js +79 -0
  19. package/src/lib/generated/uexecutor/v1/query.js.map +1 -0
  20. package/src/lib/generated/uexecutor/v1/types.d.ts +91 -0
  21. package/src/lib/generated/uexecutor/v1/types.js +856 -0
  22. package/src/lib/generated/uexecutor/v1/types.js.map +1 -0
  23. package/src/lib/generated/v1/tx.d.ts +4 -4
  24. package/src/lib/generated/v1/tx.js +1 -1
  25. package/src/lib/index.d.ts +1 -0
  26. package/src/lib/index.js.map +1 -1
  27. package/src/lib/orchestrator/orchestrator.d.ts +19 -0
  28. package/src/lib/orchestrator/orchestrator.js +796 -7
  29. package/src/lib/orchestrator/orchestrator.js.map +1 -1
  30. package/src/lib/orchestrator/orchestrator.types.d.ts +13 -0
  31. package/src/lib/progress-hook/progress-hook.js +61 -2
  32. package/src/lib/progress-hook/progress-hook.js.map +1 -1
  33. package/src/lib/progress-hook/progress-hook.types.d.ts +8 -0
  34. package/src/lib/progress-hook/progress-hook.types.js +11 -0
  35. package/src/lib/progress-hook/progress-hook.types.js.map +1 -1
  36. package/src/lib/push-chain/push-chain.d.ts +17 -0
  37. package/src/lib/push-chain/push-chain.js +190 -0
  38. package/src/lib/push-chain/push-chain.js.map +1 -1
  39. package/src/lib/push-client/push-client.d.ts +5 -0
  40. package/src/lib/push-client/push-client.js +15 -0
  41. package/src/lib/push-client/push-client.js.map +1 -1
  42. package/src/lib/utils.d.ts +98 -2
  43. package/src/lib/utils.js +264 -8
  44. package/src/lib/utils.js.map +1 -1
  45. package/src/lib/vm-client/svm-client.js +83 -4
  46. package/src/lib/vm-client/svm-client.js.map +1 -1
@@ -0,0 +1,1880 @@
1
+ {
2
+ "address": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS",
3
+ "metadata": {
4
+ "name": "pushsolanagateway",
5
+ "version": "0.1.0",
6
+ "spec": "0.1.0",
7
+ "description": "Push Solana Gateway - Universal Gateway for Solana"
8
+ },
9
+ "instructions": [
10
+ {
11
+ "name": "add_funds",
12
+ "docs": [
13
+ "@notice Legacy-compatible add funds event for offchain relayers (pushsolanalocker)"
14
+ ],
15
+ "discriminator": [132, 237, 76, 57, 80, 10, 179, 138],
16
+ "accounts": [
17
+ {
18
+ "name": "config",
19
+ "pda": {
20
+ "seeds": [
21
+ {
22
+ "kind": "const",
23
+ "value": [99, 111, 110, 102, 105, 103]
24
+ }
25
+ ]
26
+ }
27
+ },
28
+ {
29
+ "name": "vault",
30
+ "writable": true,
31
+ "pda": {
32
+ "seeds": [
33
+ {
34
+ "kind": "const",
35
+ "value": [118, 97, 117, 108, 116]
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ {
41
+ "name": "user",
42
+ "writable": true,
43
+ "signer": true
44
+ },
45
+ {
46
+ "name": "price_update"
47
+ },
48
+ {
49
+ "name": "system_program",
50
+ "address": "11111111111111111111111111111111"
51
+ }
52
+ ],
53
+ "args": [
54
+ {
55
+ "name": "amount",
56
+ "type": "u64"
57
+ },
58
+ {
59
+ "name": "transaction_hash",
60
+ "type": {
61
+ "array": ["u8", 32]
62
+ }
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "name": "get_sol_price",
68
+ "docs": [
69
+ "@notice View function for SOL price (locker-compatible)",
70
+ "@dev Anyone can fetch SOL price in USD"
71
+ ],
72
+ "discriminator": [230, 145, 206, 175, 43, 184, 97, 110],
73
+ "accounts": [
74
+ {
75
+ "name": "price_update"
76
+ }
77
+ ],
78
+ "args": [],
79
+ "returns": {
80
+ "defined": {
81
+ "name": "PriceData"
82
+ }
83
+ }
84
+ },
85
+ {
86
+ "name": "init_tss",
87
+ "discriminator": [47, 31, 100, 111, 115, 2, 22, 208],
88
+ "accounts": [
89
+ {
90
+ "name": "tss_pda",
91
+ "writable": true,
92
+ "pda": {
93
+ "seeds": [
94
+ {
95
+ "kind": "const",
96
+ "value": [116, 115, 115]
97
+ }
98
+ ]
99
+ }
100
+ },
101
+ {
102
+ "name": "authority",
103
+ "writable": true,
104
+ "signer": true
105
+ },
106
+ {
107
+ "name": "system_program",
108
+ "address": "11111111111111111111111111111111"
109
+ }
110
+ ],
111
+ "args": [
112
+ {
113
+ "name": "tss_eth_address",
114
+ "type": {
115
+ "array": ["u8", 20]
116
+ }
117
+ },
118
+ {
119
+ "name": "chain_id",
120
+ "type": "u64"
121
+ }
122
+ ]
123
+ },
124
+ {
125
+ "name": "initialize",
126
+ "docs": ["@notice Initialize the gateway"],
127
+ "discriminator": [175, 175, 109, 31, 13, 152, 155, 237],
128
+ "accounts": [
129
+ {
130
+ "name": "config",
131
+ "writable": true,
132
+ "pda": {
133
+ "seeds": [
134
+ {
135
+ "kind": "const",
136
+ "value": [99, 111, 110, 102, 105, 103]
137
+ }
138
+ ]
139
+ }
140
+ },
141
+ {
142
+ "name": "vault",
143
+ "writable": true,
144
+ "pda": {
145
+ "seeds": [
146
+ {
147
+ "kind": "const",
148
+ "value": [118, 97, 117, 108, 116]
149
+ }
150
+ ]
151
+ }
152
+ },
153
+ {
154
+ "name": "admin",
155
+ "writable": true,
156
+ "signer": true
157
+ },
158
+ {
159
+ "name": "system_program",
160
+ "address": "11111111111111111111111111111111"
161
+ }
162
+ ],
163
+ "args": [
164
+ {
165
+ "name": "admin",
166
+ "type": "pubkey"
167
+ },
168
+ {
169
+ "name": "pauser",
170
+ "type": "pubkey"
171
+ },
172
+ {
173
+ "name": "tss",
174
+ "type": "pubkey"
175
+ },
176
+ {
177
+ "name": "min_cap_usd",
178
+ "type": "u128"
179
+ },
180
+ {
181
+ "name": "max_cap_usd",
182
+ "type": "u128"
183
+ },
184
+ {
185
+ "name": "pyth_price_feed",
186
+ "type": "pubkey"
187
+ }
188
+ ]
189
+ },
190
+ {
191
+ "name": "pause",
192
+ "docs": ["@notice Pause the gateway"],
193
+ "discriminator": [211, 22, 221, 251, 74, 121, 193, 47],
194
+ "accounts": [
195
+ {
196
+ "name": "config",
197
+ "writable": true,
198
+ "pda": {
199
+ "seeds": [
200
+ {
201
+ "kind": "const",
202
+ "value": [99, 111, 110, 102, 105, 103]
203
+ }
204
+ ]
205
+ }
206
+ },
207
+ {
208
+ "name": "pauser",
209
+ "signer": true
210
+ }
211
+ ],
212
+ "args": []
213
+ },
214
+ {
215
+ "name": "remove_whitelist_token",
216
+ "docs": ["@notice Remove token from whitelist"],
217
+ "discriminator": [65, 182, 42, 255, 198, 163, 73, 46],
218
+ "accounts": [
219
+ {
220
+ "name": "config",
221
+ "writable": true,
222
+ "pda": {
223
+ "seeds": [
224
+ {
225
+ "kind": "const",
226
+ "value": [99, 111, 110, 102, 105, 103]
227
+ }
228
+ ]
229
+ }
230
+ },
231
+ {
232
+ "name": "whitelist",
233
+ "writable": true,
234
+ "pda": {
235
+ "seeds": [
236
+ {
237
+ "kind": "const",
238
+ "value": [119, 104, 105, 116, 101, 108, 105, 115, 116]
239
+ }
240
+ ]
241
+ }
242
+ },
243
+ {
244
+ "name": "admin",
245
+ "writable": true,
246
+ "signer": true
247
+ },
248
+ {
249
+ "name": "system_program",
250
+ "address": "11111111111111111111111111111111"
251
+ }
252
+ ],
253
+ "args": [
254
+ {
255
+ "name": "token",
256
+ "type": "pubkey"
257
+ }
258
+ ]
259
+ },
260
+ {
261
+ "name": "reset_nonce",
262
+ "discriminator": [104, 139, 110, 85, 234, 155, 132, 248],
263
+ "accounts": [
264
+ {
265
+ "name": "tss_pda",
266
+ "writable": true,
267
+ "pda": {
268
+ "seeds": [
269
+ {
270
+ "kind": "const",
271
+ "value": [116, 115, 115]
272
+ }
273
+ ]
274
+ }
275
+ },
276
+ {
277
+ "name": "authority",
278
+ "signer": true
279
+ }
280
+ ],
281
+ "args": [
282
+ {
283
+ "name": "new_nonce",
284
+ "type": "u64"
285
+ }
286
+ ]
287
+ },
288
+ {
289
+ "name": "revert_withdraw",
290
+ "docs": ["@notice TSS-verified revert withdraw for SOL"],
291
+ "discriminator": [8, 232, 107, 216, 153, 25, 204, 116],
292
+ "accounts": [
293
+ {
294
+ "name": "config",
295
+ "pda": {
296
+ "seeds": [
297
+ {
298
+ "kind": "const",
299
+ "value": [99, 111, 110, 102, 105, 103]
300
+ }
301
+ ]
302
+ }
303
+ },
304
+ {
305
+ "name": "vault",
306
+ "writable": true,
307
+ "pda": {
308
+ "seeds": [
309
+ {
310
+ "kind": "const",
311
+ "value": [118, 97, 117, 108, 116]
312
+ }
313
+ ]
314
+ }
315
+ },
316
+ {
317
+ "name": "tss_pda",
318
+ "writable": true,
319
+ "pda": {
320
+ "seeds": [
321
+ {
322
+ "kind": "const",
323
+ "value": [116, 115, 115]
324
+ }
325
+ ]
326
+ }
327
+ },
328
+ {
329
+ "name": "recipient",
330
+ "writable": true
331
+ },
332
+ {
333
+ "name": "system_program",
334
+ "address": "11111111111111111111111111111111"
335
+ }
336
+ ],
337
+ "args": [
338
+ {
339
+ "name": "amount",
340
+ "type": "u64"
341
+ },
342
+ {
343
+ "name": "revert_cfg",
344
+ "type": {
345
+ "defined": {
346
+ "name": "RevertSettings"
347
+ }
348
+ }
349
+ },
350
+ {
351
+ "name": "signature",
352
+ "type": {
353
+ "array": ["u8", 64]
354
+ }
355
+ },
356
+ {
357
+ "name": "recovery_id",
358
+ "type": "u8"
359
+ },
360
+ {
361
+ "name": "message_hash",
362
+ "type": {
363
+ "array": ["u8", 32]
364
+ }
365
+ },
366
+ {
367
+ "name": "nonce",
368
+ "type": "u64"
369
+ }
370
+ ]
371
+ },
372
+ {
373
+ "name": "revert_withdraw_spl_token",
374
+ "docs": ["@notice TSS-verified revert withdraw for SPL tokens"],
375
+ "discriminator": [172, 155, 56, 3, 92, 190, 159, 191],
376
+ "accounts": [
377
+ {
378
+ "name": "config",
379
+ "pda": {
380
+ "seeds": [
381
+ {
382
+ "kind": "const",
383
+ "value": [99, 111, 110, 102, 105, 103]
384
+ }
385
+ ]
386
+ }
387
+ },
388
+ {
389
+ "name": "whitelist"
390
+ },
391
+ {
392
+ "name": "vault",
393
+ "writable": true,
394
+ "pda": {
395
+ "seeds": [
396
+ {
397
+ "kind": "const",
398
+ "value": [118, 97, 117, 108, 116]
399
+ }
400
+ ]
401
+ }
402
+ },
403
+ {
404
+ "name": "token_vault",
405
+ "writable": true
406
+ },
407
+ {
408
+ "name": "tss_pda",
409
+ "writable": true,
410
+ "pda": {
411
+ "seeds": [
412
+ {
413
+ "kind": "const",
414
+ "value": [116, 115, 115]
415
+ }
416
+ ]
417
+ }
418
+ },
419
+ {
420
+ "name": "recipient_token_account",
421
+ "writable": true
422
+ },
423
+ {
424
+ "name": "token_mint"
425
+ },
426
+ {
427
+ "name": "token_program",
428
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
429
+ }
430
+ ],
431
+ "args": [
432
+ {
433
+ "name": "amount",
434
+ "type": "u64"
435
+ },
436
+ {
437
+ "name": "revert_cfg",
438
+ "type": {
439
+ "defined": {
440
+ "name": "RevertSettings"
441
+ }
442
+ }
443
+ },
444
+ {
445
+ "name": "signature",
446
+ "type": {
447
+ "array": ["u8", 64]
448
+ }
449
+ },
450
+ {
451
+ "name": "recovery_id",
452
+ "type": "u8"
453
+ },
454
+ {
455
+ "name": "message_hash",
456
+ "type": {
457
+ "array": ["u8", 32]
458
+ }
459
+ },
460
+ {
461
+ "name": "nonce",
462
+ "type": "u64"
463
+ }
464
+ ]
465
+ },
466
+ {
467
+ "name": "send_funds",
468
+ "docs": [
469
+ "@notice Allows initiating a TX for movement of funds from source chain to Push Chain.",
470
+ "@dev Supports both native SOL and SPL token deposits (like ETH Gateway).",
471
+ "For native SOL: pass Pubkey::default() as bridge_token",
472
+ "For SPL tokens: pass token mint address as bridge_token",
473
+ "The route emits TxWithFunds event."
474
+ ],
475
+ "discriminator": [84, 247, 211, 40, 63, 106, 15, 59],
476
+ "accounts": [
477
+ {
478
+ "name": "config",
479
+ "writable": true,
480
+ "pda": {
481
+ "seeds": [
482
+ {
483
+ "kind": "const",
484
+ "value": [99, 111, 110, 102, 105, 103]
485
+ }
486
+ ]
487
+ }
488
+ },
489
+ {
490
+ "name": "vault",
491
+ "writable": true,
492
+ "pda": {
493
+ "seeds": [
494
+ {
495
+ "kind": "const",
496
+ "value": [118, 97, 117, 108, 116]
497
+ }
498
+ ]
499
+ }
500
+ },
501
+ {
502
+ "name": "token_whitelist",
503
+ "pda": {
504
+ "seeds": [
505
+ {
506
+ "kind": "const",
507
+ "value": [119, 104, 105, 116, 101, 108, 105, 115, 116]
508
+ }
509
+ ]
510
+ }
511
+ },
512
+ {
513
+ "name": "user_token_account",
514
+ "writable": true
515
+ },
516
+ {
517
+ "name": "gateway_token_account",
518
+ "writable": true
519
+ },
520
+ {
521
+ "name": "user",
522
+ "writable": true,
523
+ "signer": true
524
+ },
525
+ {
526
+ "name": "bridge_token"
527
+ },
528
+ {
529
+ "name": "token_program",
530
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
531
+ },
532
+ {
533
+ "name": "system_program",
534
+ "address": "11111111111111111111111111111111"
535
+ }
536
+ ],
537
+ "args": [
538
+ {
539
+ "name": "recipient",
540
+ "type": {
541
+ "array": ["u8", 20]
542
+ }
543
+ },
544
+ {
545
+ "name": "bridge_token",
546
+ "type": "pubkey"
547
+ },
548
+ {
549
+ "name": "bridge_amount",
550
+ "type": "u64"
551
+ },
552
+ {
553
+ "name": "revert_cfg",
554
+ "type": {
555
+ "defined": {
556
+ "name": "RevertSettings"
557
+ }
558
+ }
559
+ }
560
+ ]
561
+ },
562
+ {
563
+ "name": "send_tx_with_funds",
564
+ "docs": [
565
+ "@notice Allows initiating a TX for movement of funds and payload from source chain to Push Chain.",
566
+ "@dev Supports both native SOL and SPL token deposits with payload execution.",
567
+ "The route emits both TxWithGas and TxWithFunds events."
568
+ ],
569
+ "discriminator": [224, 179, 202, 222, 121, 238, 38, 168],
570
+ "accounts": [
571
+ {
572
+ "name": "config",
573
+ "writable": true,
574
+ "pda": {
575
+ "seeds": [
576
+ {
577
+ "kind": "const",
578
+ "value": [99, 111, 110, 102, 105, 103]
579
+ }
580
+ ]
581
+ }
582
+ },
583
+ {
584
+ "name": "vault",
585
+ "writable": true,
586
+ "pda": {
587
+ "seeds": [
588
+ {
589
+ "kind": "const",
590
+ "value": [118, 97, 117, 108, 116]
591
+ }
592
+ ]
593
+ }
594
+ },
595
+ {
596
+ "name": "token_whitelist",
597
+ "pda": {
598
+ "seeds": [
599
+ {
600
+ "kind": "const",
601
+ "value": [119, 104, 105, 116, 101, 108, 105, 115, 116]
602
+ }
603
+ ]
604
+ }
605
+ },
606
+ {
607
+ "name": "user_token_account",
608
+ "writable": true
609
+ },
610
+ {
611
+ "name": "gateway_token_account",
612
+ "writable": true
613
+ },
614
+ {
615
+ "name": "user",
616
+ "writable": true,
617
+ "signer": true
618
+ },
619
+ {
620
+ "name": "price_update"
621
+ },
622
+ {
623
+ "name": "bridge_token"
624
+ },
625
+ {
626
+ "name": "token_program",
627
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
628
+ },
629
+ {
630
+ "name": "system_program",
631
+ "address": "11111111111111111111111111111111"
632
+ }
633
+ ],
634
+ "args": [
635
+ {
636
+ "name": "bridge_token",
637
+ "type": "pubkey"
638
+ },
639
+ {
640
+ "name": "bridge_amount",
641
+ "type": "u64"
642
+ },
643
+ {
644
+ "name": "payload",
645
+ "type": {
646
+ "defined": {
647
+ "name": "UniversalPayload"
648
+ }
649
+ }
650
+ },
651
+ {
652
+ "name": "revert_cfg",
653
+ "type": {
654
+ "defined": {
655
+ "name": "RevertSettings"
656
+ }
657
+ }
658
+ },
659
+ {
660
+ "name": "gas_amount",
661
+ "type": "u64"
662
+ },
663
+ {
664
+ "name": "signature_data",
665
+ "type": "bytes"
666
+ }
667
+ ]
668
+ },
669
+ {
670
+ "name": "send_tx_with_gas",
671
+ "docs": [
672
+ "@notice Allows initiating a TX for funding UEA with gas deposits from source chain.",
673
+ "@dev Supports only native SOL deposits for gas funding.",
674
+ "The route emits TxWithGas event - important for Instant TX Route."
675
+ ],
676
+ "discriminator": [220, 10, 179, 127, 41, 153, 193, 213],
677
+ "accounts": [
678
+ {
679
+ "name": "config",
680
+ "writable": true,
681
+ "pda": {
682
+ "seeds": [
683
+ {
684
+ "kind": "const",
685
+ "value": [99, 111, 110, 102, 105, 103]
686
+ }
687
+ ]
688
+ }
689
+ },
690
+ {
691
+ "name": "vault",
692
+ "writable": true,
693
+ "pda": {
694
+ "seeds": [
695
+ {
696
+ "kind": "const",
697
+ "value": [118, 97, 117, 108, 116]
698
+ }
699
+ ]
700
+ }
701
+ },
702
+ {
703
+ "name": "user",
704
+ "writable": true,
705
+ "signer": true
706
+ },
707
+ {
708
+ "name": "price_update"
709
+ },
710
+ {
711
+ "name": "system_program",
712
+ "address": "11111111111111111111111111111111"
713
+ }
714
+ ],
715
+ "args": [
716
+ {
717
+ "name": "payload",
718
+ "type": {
719
+ "defined": {
720
+ "name": "UniversalPayload"
721
+ }
722
+ }
723
+ },
724
+ {
725
+ "name": "revert_cfg",
726
+ "type": {
727
+ "defined": {
728
+ "name": "RevertSettings"
729
+ }
730
+ }
731
+ },
732
+ {
733
+ "name": "amount",
734
+ "type": "u64"
735
+ }
736
+ ]
737
+ },
738
+ {
739
+ "name": "set_caps_usd",
740
+ "docs": ["@notice Set USD caps"],
741
+ "discriminator": [136, 160, 17, 54, 239, 108, 125, 129],
742
+ "accounts": [
743
+ {
744
+ "name": "config",
745
+ "writable": true,
746
+ "pda": {
747
+ "seeds": [
748
+ {
749
+ "kind": "const",
750
+ "value": [99, 111, 110, 102, 105, 103]
751
+ }
752
+ ]
753
+ }
754
+ },
755
+ {
756
+ "name": "admin",
757
+ "signer": true
758
+ }
759
+ ],
760
+ "args": [
761
+ {
762
+ "name": "min_cap",
763
+ "type": "u128"
764
+ },
765
+ {
766
+ "name": "max_cap",
767
+ "type": "u128"
768
+ }
769
+ ]
770
+ },
771
+ {
772
+ "name": "set_pyth_confidence_threshold",
773
+ "docs": ["@notice Set Pyth confidence threshold"],
774
+ "discriminator": [213, 69, 242, 123, 122, 165, 125, 21],
775
+ "accounts": [
776
+ {
777
+ "name": "config",
778
+ "writable": true,
779
+ "pda": {
780
+ "seeds": [
781
+ {
782
+ "kind": "const",
783
+ "value": [99, 111, 110, 102, 105, 103]
784
+ }
785
+ ]
786
+ }
787
+ },
788
+ {
789
+ "name": "admin",
790
+ "signer": true
791
+ }
792
+ ],
793
+ "args": [
794
+ {
795
+ "name": "threshold",
796
+ "type": "u64"
797
+ }
798
+ ]
799
+ },
800
+ {
801
+ "name": "set_pyth_price_feed",
802
+ "docs": ["@notice Set Pyth price feed"],
803
+ "discriminator": [202, 185, 109, 150, 255, 130, 210, 208],
804
+ "accounts": [
805
+ {
806
+ "name": "config",
807
+ "writable": true,
808
+ "pda": {
809
+ "seeds": [
810
+ {
811
+ "kind": "const",
812
+ "value": [99, 111, 110, 102, 105, 103]
813
+ }
814
+ ]
815
+ }
816
+ },
817
+ {
818
+ "name": "admin",
819
+ "signer": true
820
+ }
821
+ ],
822
+ "args": [
823
+ {
824
+ "name": "price_feed",
825
+ "type": "pubkey"
826
+ }
827
+ ]
828
+ },
829
+ {
830
+ "name": "set_tss_address",
831
+ "docs": ["@notice Set TSS address"],
832
+ "discriminator": [158, 254, 147, 0, 154, 3, 56, 50],
833
+ "accounts": [
834
+ {
835
+ "name": "config",
836
+ "writable": true,
837
+ "pda": {
838
+ "seeds": [
839
+ {
840
+ "kind": "const",
841
+ "value": [99, 111, 110, 102, 105, 103]
842
+ }
843
+ ]
844
+ }
845
+ },
846
+ {
847
+ "name": "admin",
848
+ "signer": true
849
+ }
850
+ ],
851
+ "args": [
852
+ {
853
+ "name": "new_tss",
854
+ "type": "pubkey"
855
+ }
856
+ ]
857
+ },
858
+ {
859
+ "name": "unpause",
860
+ "docs": ["@notice Unpause the gateway"],
861
+ "discriminator": [169, 144, 4, 38, 10, 141, 188, 255],
862
+ "accounts": [
863
+ {
864
+ "name": "config",
865
+ "writable": true,
866
+ "pda": {
867
+ "seeds": [
868
+ {
869
+ "kind": "const",
870
+ "value": [99, 111, 110, 102, 105, 103]
871
+ }
872
+ ]
873
+ }
874
+ },
875
+ {
876
+ "name": "pauser",
877
+ "signer": true
878
+ }
879
+ ],
880
+ "args": []
881
+ },
882
+ {
883
+ "name": "update_tss",
884
+ "discriminator": [227, 136, 3, 242, 177, 168, 10, 160],
885
+ "accounts": [
886
+ {
887
+ "name": "tss_pda",
888
+ "writable": true,
889
+ "pda": {
890
+ "seeds": [
891
+ {
892
+ "kind": "const",
893
+ "value": [116, 115, 115]
894
+ }
895
+ ]
896
+ }
897
+ },
898
+ {
899
+ "name": "authority",
900
+ "signer": true
901
+ }
902
+ ],
903
+ "args": [
904
+ {
905
+ "name": "tss_eth_address",
906
+ "type": {
907
+ "array": ["u8", 20]
908
+ }
909
+ },
910
+ {
911
+ "name": "chain_id",
912
+ "type": "u64"
913
+ }
914
+ ]
915
+ },
916
+ {
917
+ "name": "whitelist_token",
918
+ "docs": ["@notice Whitelist a token"],
919
+ "discriminator": [6, 141, 83, 167, 31, 6, 2, 224],
920
+ "accounts": [
921
+ {
922
+ "name": "config",
923
+ "writable": true,
924
+ "pda": {
925
+ "seeds": [
926
+ {
927
+ "kind": "const",
928
+ "value": [99, 111, 110, 102, 105, 103]
929
+ }
930
+ ]
931
+ }
932
+ },
933
+ {
934
+ "name": "whitelist",
935
+ "writable": true,
936
+ "pda": {
937
+ "seeds": [
938
+ {
939
+ "kind": "const",
940
+ "value": [119, 104, 105, 116, 101, 108, 105, 115, 116]
941
+ }
942
+ ]
943
+ }
944
+ },
945
+ {
946
+ "name": "admin",
947
+ "writable": true,
948
+ "signer": true
949
+ },
950
+ {
951
+ "name": "system_program",
952
+ "address": "11111111111111111111111111111111"
953
+ }
954
+ ],
955
+ "args": [
956
+ {
957
+ "name": "token",
958
+ "type": "pubkey"
959
+ }
960
+ ]
961
+ },
962
+ {
963
+ "name": "withdraw_spl_token_tss",
964
+ "docs": ["@notice TSS-verified withdraw of SPL tokens"],
965
+ "discriminator": [238, 209, 47, 229, 44, 234, 138, 198],
966
+ "accounts": [
967
+ {
968
+ "name": "config",
969
+ "pda": {
970
+ "seeds": [
971
+ {
972
+ "kind": "const",
973
+ "value": [99, 111, 110, 102, 105, 103]
974
+ }
975
+ ]
976
+ }
977
+ },
978
+ {
979
+ "name": "whitelist"
980
+ },
981
+ {
982
+ "name": "vault",
983
+ "writable": true,
984
+ "pda": {
985
+ "seeds": [
986
+ {
987
+ "kind": "const",
988
+ "value": [118, 97, 117, 108, 116]
989
+ }
990
+ ]
991
+ }
992
+ },
993
+ {
994
+ "name": "token_vault",
995
+ "writable": true
996
+ },
997
+ {
998
+ "name": "tss_pda",
999
+ "writable": true,
1000
+ "pda": {
1001
+ "seeds": [
1002
+ {
1003
+ "kind": "const",
1004
+ "value": [116, 115, 115]
1005
+ }
1006
+ ]
1007
+ }
1008
+ },
1009
+ {
1010
+ "name": "recipient_token_account",
1011
+ "writable": true
1012
+ },
1013
+ {
1014
+ "name": "token_mint"
1015
+ },
1016
+ {
1017
+ "name": "token_program",
1018
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1019
+ }
1020
+ ],
1021
+ "args": [
1022
+ {
1023
+ "name": "amount",
1024
+ "type": "u64"
1025
+ },
1026
+ {
1027
+ "name": "signature",
1028
+ "type": {
1029
+ "array": ["u8", 64]
1030
+ }
1031
+ },
1032
+ {
1033
+ "name": "recovery_id",
1034
+ "type": "u8"
1035
+ },
1036
+ {
1037
+ "name": "message_hash",
1038
+ "type": {
1039
+ "array": ["u8", 32]
1040
+ }
1041
+ },
1042
+ {
1043
+ "name": "nonce",
1044
+ "type": "u64"
1045
+ }
1046
+ ]
1047
+ },
1048
+ {
1049
+ "name": "withdraw_tss",
1050
+ "docs": ["@notice TSS-verified withdraw of native SOL"],
1051
+ "discriminator": [112, 51, 93, 250, 136, 175, 118, 100],
1052
+ "accounts": [
1053
+ {
1054
+ "name": "config",
1055
+ "pda": {
1056
+ "seeds": [
1057
+ {
1058
+ "kind": "const",
1059
+ "value": [99, 111, 110, 102, 105, 103]
1060
+ }
1061
+ ]
1062
+ }
1063
+ },
1064
+ {
1065
+ "name": "vault",
1066
+ "writable": true,
1067
+ "pda": {
1068
+ "seeds": [
1069
+ {
1070
+ "kind": "const",
1071
+ "value": [118, 97, 117, 108, 116]
1072
+ }
1073
+ ]
1074
+ }
1075
+ },
1076
+ {
1077
+ "name": "tss_pda",
1078
+ "writable": true,
1079
+ "pda": {
1080
+ "seeds": [
1081
+ {
1082
+ "kind": "const",
1083
+ "value": [116, 115, 115]
1084
+ }
1085
+ ]
1086
+ }
1087
+ },
1088
+ {
1089
+ "name": "recipient",
1090
+ "writable": true
1091
+ },
1092
+ {
1093
+ "name": "system_program",
1094
+ "address": "11111111111111111111111111111111"
1095
+ }
1096
+ ],
1097
+ "args": [
1098
+ {
1099
+ "name": "amount",
1100
+ "type": "u64"
1101
+ },
1102
+ {
1103
+ "name": "signature",
1104
+ "type": {
1105
+ "array": ["u8", 64]
1106
+ }
1107
+ },
1108
+ {
1109
+ "name": "recovery_id",
1110
+ "type": "u8"
1111
+ },
1112
+ {
1113
+ "name": "message_hash",
1114
+ "type": {
1115
+ "array": ["u8", 32]
1116
+ }
1117
+ },
1118
+ {
1119
+ "name": "nonce",
1120
+ "type": "u64"
1121
+ }
1122
+ ]
1123
+ }
1124
+ ],
1125
+ "accounts": [
1126
+ {
1127
+ "name": "Config",
1128
+ "discriminator": [155, 12, 170, 224, 30, 250, 204, 130]
1129
+ },
1130
+ {
1131
+ "name": "PriceUpdateV2",
1132
+ "discriminator": [34, 241, 35, 99, 157, 126, 244, 205]
1133
+ },
1134
+ {
1135
+ "name": "TokenWhitelist",
1136
+ "discriminator": [105, 240, 104, 47, 95, 13, 48, 78]
1137
+ },
1138
+ {
1139
+ "name": "TssPda",
1140
+ "discriminator": [121, 138, 162, 251, 127, 95, 238, 135]
1141
+ }
1142
+ ],
1143
+ "events": [
1144
+ {
1145
+ "name": "CapsUpdated",
1146
+ "discriminator": [147, 181, 117, 249, 72, 147, 156, 255]
1147
+ },
1148
+ {
1149
+ "name": "FundsAddedEvent",
1150
+ "discriminator": [127, 31, 108, 255, 187, 19, 70, 68]
1151
+ },
1152
+ {
1153
+ "name": "TSSAddressUpdated",
1154
+ "discriminator": [157, 148, 149, 250, 42, 118, 17, 232]
1155
+ },
1156
+ {
1157
+ "name": "TokenRemovedFromWhitelist",
1158
+ "discriminator": [200, 69, 55, 209, 167, 225, 117, 11]
1159
+ },
1160
+ {
1161
+ "name": "TokenWhitelisted",
1162
+ "discriminator": [65, 3, 231, 165, 235, 116, 154, 51]
1163
+ },
1164
+ {
1165
+ "name": "TxWithFunds",
1166
+ "discriminator": [43, 31, 31, 2, 4, 236, 107, 255]
1167
+ },
1168
+ {
1169
+ "name": "TxWithGas",
1170
+ "discriminator": [182, 110, 243, 17, 145, 36, 153, 15]
1171
+ },
1172
+ {
1173
+ "name": "WithdrawFunds",
1174
+ "discriminator": [4, 77, 4, 28, 115, 6, 39, 233]
1175
+ }
1176
+ ],
1177
+ "errors": [
1178
+ {
1179
+ "code": 6000,
1180
+ "name": "PausedError",
1181
+ "msg": "Contract is paused"
1182
+ },
1183
+ {
1184
+ "code": 6001,
1185
+ "name": "Unauthorized",
1186
+ "msg": "Unauthorized access"
1187
+ },
1188
+ {
1189
+ "code": 6002,
1190
+ "name": "InvalidAmount",
1191
+ "msg": "Invalid amount"
1192
+ },
1193
+ {
1194
+ "code": 6003,
1195
+ "name": "InvalidRecipient",
1196
+ "msg": "Invalid recipient"
1197
+ },
1198
+ {
1199
+ "code": 6004,
1200
+ "name": "BelowMinCap",
1201
+ "msg": "Amount below minimum cap"
1202
+ },
1203
+ {
1204
+ "code": 6005,
1205
+ "name": "AboveMaxCap",
1206
+ "msg": "Amount above maximum cap"
1207
+ },
1208
+ {
1209
+ "code": 6006,
1210
+ "name": "ZeroAddress",
1211
+ "msg": "Zero address not allowed"
1212
+ },
1213
+ {
1214
+ "code": 6007,
1215
+ "name": "InvalidCapRange",
1216
+ "msg": "Invalid cap range"
1217
+ },
1218
+ {
1219
+ "code": 6008,
1220
+ "name": "InvalidPayload",
1221
+ "msg": "Invalid payload"
1222
+ },
1223
+ {
1224
+ "code": 6009,
1225
+ "name": "DeadlineExceeded",
1226
+ "msg": "Deadline exceeded"
1227
+ },
1228
+ {
1229
+ "code": 6010,
1230
+ "name": "InvalidPrice",
1231
+ "msg": "Invalid price data"
1232
+ },
1233
+ {
1234
+ "code": 6011,
1235
+ "name": "TokenAlreadyWhitelisted",
1236
+ "msg": "Token already whitelisted"
1237
+ },
1238
+ {
1239
+ "code": 6012,
1240
+ "name": "TokenNotWhitelisted",
1241
+ "msg": "Token not whitelisted"
1242
+ },
1243
+ {
1244
+ "code": 6013,
1245
+ "name": "TokenTransferFailed",
1246
+ "msg": "Token transfer failed"
1247
+ },
1248
+ {
1249
+ "code": 6014,
1250
+ "name": "InvalidTokenVault",
1251
+ "msg": "Invalid token vault"
1252
+ },
1253
+ {
1254
+ "code": 6015,
1255
+ "name": "InvalidOwner",
1256
+ "msg": "Invalid owner"
1257
+ },
1258
+ {
1259
+ "code": 6016,
1260
+ "name": "SlippageExceededOrExpired",
1261
+ "msg": "Slippage exceeded or expired"
1262
+ },
1263
+ {
1264
+ "code": 6017,
1265
+ "name": "Paused",
1266
+ "msg": "Contract is paused"
1267
+ },
1268
+ {
1269
+ "code": 6018,
1270
+ "name": "InvalidInput",
1271
+ "msg": "Invalid input"
1272
+ },
1273
+ {
1274
+ "code": 6019,
1275
+ "name": "InvalidMint",
1276
+ "msg": "Invalid mint"
1277
+ },
1278
+ {
1279
+ "code": 6020,
1280
+ "name": "InsufficientBalance",
1281
+ "msg": "Insufficient balance"
1282
+ },
1283
+ {
1284
+ "code": 6021,
1285
+ "name": "InvalidToken",
1286
+ "msg": "Invalid token"
1287
+ }
1288
+ ],
1289
+ "types": [
1290
+ {
1291
+ "name": "CapsUpdated",
1292
+ "type": {
1293
+ "kind": "struct",
1294
+ "fields": [
1295
+ {
1296
+ "name": "min_cap_usd",
1297
+ "type": "u128"
1298
+ },
1299
+ {
1300
+ "name": "max_cap_usd",
1301
+ "type": "u128"
1302
+ }
1303
+ ]
1304
+ }
1305
+ },
1306
+ {
1307
+ "name": "Config",
1308
+ "docs": [
1309
+ "Gateway configuration state (authorities, caps, oracle).",
1310
+ "PDA: `[b\"config\"]`. Holds USD caps (8 decimals) for gas-route deposits and oracle config."
1311
+ ],
1312
+ "type": {
1313
+ "kind": "struct",
1314
+ "fields": [
1315
+ {
1316
+ "name": "admin",
1317
+ "type": "pubkey"
1318
+ },
1319
+ {
1320
+ "name": "tss_address",
1321
+ "type": "pubkey"
1322
+ },
1323
+ {
1324
+ "name": "pauser",
1325
+ "type": "pubkey"
1326
+ },
1327
+ {
1328
+ "name": "min_cap_universal_tx_usd",
1329
+ "type": "u128"
1330
+ },
1331
+ {
1332
+ "name": "max_cap_universal_tx_usd",
1333
+ "type": "u128"
1334
+ },
1335
+ {
1336
+ "name": "paused",
1337
+ "type": "bool"
1338
+ },
1339
+ {
1340
+ "name": "bump",
1341
+ "type": "u8"
1342
+ },
1343
+ {
1344
+ "name": "vault_bump",
1345
+ "type": "u8"
1346
+ },
1347
+ {
1348
+ "name": "pyth_price_feed",
1349
+ "type": "pubkey"
1350
+ },
1351
+ {
1352
+ "name": "pyth_confidence_threshold",
1353
+ "type": "u64"
1354
+ }
1355
+ ]
1356
+ }
1357
+ },
1358
+ {
1359
+ "name": "FundsAddedEvent",
1360
+ "docs": [
1361
+ "Legacy event for fee-abstraction route (locker-compatible).",
1362
+ "Matches `pushsolanalocker` `FundsAddedEvent` exactly for offchain compatibility."
1363
+ ],
1364
+ "type": {
1365
+ "kind": "struct",
1366
+ "fields": [
1367
+ {
1368
+ "name": "user",
1369
+ "type": "pubkey"
1370
+ },
1371
+ {
1372
+ "name": "sol_amount",
1373
+ "type": "u64"
1374
+ },
1375
+ {
1376
+ "name": "usd_equivalent",
1377
+ "type": "i128"
1378
+ },
1379
+ {
1380
+ "name": "usd_exponent",
1381
+ "type": "i32"
1382
+ },
1383
+ {
1384
+ "name": "transaction_hash",
1385
+ "type": {
1386
+ "array": ["u8", 32]
1387
+ }
1388
+ }
1389
+ ]
1390
+ }
1391
+ },
1392
+ {
1393
+ "name": "PriceData",
1394
+ "type": {
1395
+ "kind": "struct",
1396
+ "fields": [
1397
+ {
1398
+ "name": "price",
1399
+ "type": "i64"
1400
+ },
1401
+ {
1402
+ "name": "exponent",
1403
+ "type": "i32"
1404
+ },
1405
+ {
1406
+ "name": "publish_time",
1407
+ "type": "i64"
1408
+ },
1409
+ {
1410
+ "name": "confidence",
1411
+ "type": "u64"
1412
+ }
1413
+ ]
1414
+ }
1415
+ },
1416
+ {
1417
+ "name": "PriceFeedMessage",
1418
+ "repr": {
1419
+ "kind": "c"
1420
+ },
1421
+ "type": {
1422
+ "kind": "struct",
1423
+ "fields": [
1424
+ {
1425
+ "name": "feed_id",
1426
+ "docs": [
1427
+ "`FeedId` but avoid the type alias because of compatibility issues with Anchor's `idl-build` feature."
1428
+ ],
1429
+ "type": {
1430
+ "array": ["u8", 32]
1431
+ }
1432
+ },
1433
+ {
1434
+ "name": "price",
1435
+ "type": "i64"
1436
+ },
1437
+ {
1438
+ "name": "conf",
1439
+ "type": "u64"
1440
+ },
1441
+ {
1442
+ "name": "exponent",
1443
+ "type": "i32"
1444
+ },
1445
+ {
1446
+ "name": "publish_time",
1447
+ "docs": ["The timestamp of this price update in seconds"],
1448
+ "type": "i64"
1449
+ },
1450
+ {
1451
+ "name": "prev_publish_time",
1452
+ "docs": [
1453
+ "The timestamp of the previous price update. This field is intended to allow users to",
1454
+ "identify the single unique price update for any moment in time:",
1455
+ "for any time t, the unique update is the one such that prev_publish_time < t <= publish_time.",
1456
+ "",
1457
+ "Note that there may not be such an update while we are migrating to the new message-sending logic,",
1458
+ "as some price updates on pythnet may not be sent to other chains (because the message-sending",
1459
+ "logic may not have triggered). We can solve this problem by making the message-sending mandatory",
1460
+ "(which we can do once publishers have migrated over).",
1461
+ "",
1462
+ "Additionally, this field may be equal to publish_time if the message is sent on a slot where",
1463
+ "where the aggregation was unsuccesful. This problem will go away once all publishers have",
1464
+ "migrated over to a recent version of pyth-agent."
1465
+ ],
1466
+ "type": "i64"
1467
+ },
1468
+ {
1469
+ "name": "ema_price",
1470
+ "type": "i64"
1471
+ },
1472
+ {
1473
+ "name": "ema_conf",
1474
+ "type": "u64"
1475
+ }
1476
+ ]
1477
+ }
1478
+ },
1479
+ {
1480
+ "name": "PriceUpdateV2",
1481
+ "docs": [
1482
+ "A price update account. This account is used by the Pyth Receiver program to store a verified price update from a Pyth price feed.",
1483
+ "It contains:",
1484
+ "- `write_authority`: The write authority for this account. This authority can close this account to reclaim rent or update the account to contain a different price update.",
1485
+ "- `verification_level`: The [`VerificationLevel`] of this price update. This represents how many Wormhole guardian signatures have been verified for this price update.",
1486
+ "- `price_message`: The actual price update.",
1487
+ "- `posted_slot`: The slot at which this price update was posted."
1488
+ ],
1489
+ "type": {
1490
+ "kind": "struct",
1491
+ "fields": [
1492
+ {
1493
+ "name": "write_authority",
1494
+ "type": "pubkey"
1495
+ },
1496
+ {
1497
+ "name": "verification_level",
1498
+ "type": {
1499
+ "defined": {
1500
+ "name": "VerificationLevel"
1501
+ }
1502
+ }
1503
+ },
1504
+ {
1505
+ "name": "price_message",
1506
+ "type": {
1507
+ "defined": {
1508
+ "name": "PriceFeedMessage"
1509
+ }
1510
+ }
1511
+ },
1512
+ {
1513
+ "name": "posted_slot",
1514
+ "type": "u64"
1515
+ }
1516
+ ]
1517
+ }
1518
+ },
1519
+ {
1520
+ "name": "RevertSettings",
1521
+ "docs": [
1522
+ "Revert settings for failed transactions (parity with EVM `RevertSettings`)."
1523
+ ],
1524
+ "type": {
1525
+ "kind": "struct",
1526
+ "fields": [
1527
+ {
1528
+ "name": "fund_recipient",
1529
+ "type": "pubkey"
1530
+ },
1531
+ {
1532
+ "name": "revert_msg",
1533
+ "type": "bytes"
1534
+ }
1535
+ ]
1536
+ }
1537
+ },
1538
+ {
1539
+ "name": "TSSAddressUpdated",
1540
+ "type": {
1541
+ "kind": "struct",
1542
+ "fields": [
1543
+ {
1544
+ "name": "old_tss",
1545
+ "type": "pubkey"
1546
+ },
1547
+ {
1548
+ "name": "new_tss",
1549
+ "type": "pubkey"
1550
+ }
1551
+ ]
1552
+ }
1553
+ },
1554
+ {
1555
+ "name": "TokenRemovedFromWhitelist",
1556
+ "type": {
1557
+ "kind": "struct",
1558
+ "fields": [
1559
+ {
1560
+ "name": "token_address",
1561
+ "type": "pubkey"
1562
+ }
1563
+ ]
1564
+ }
1565
+ },
1566
+ {
1567
+ "name": "TokenWhitelist",
1568
+ "docs": [
1569
+ "SPL token whitelist state.",
1570
+ "PDA: `[b\"whitelist\"]`. Simple list of supported SPL mints."
1571
+ ],
1572
+ "type": {
1573
+ "kind": "struct",
1574
+ "fields": [
1575
+ {
1576
+ "name": "tokens",
1577
+ "type": {
1578
+ "vec": "pubkey"
1579
+ }
1580
+ },
1581
+ {
1582
+ "name": "bump",
1583
+ "type": "u8"
1584
+ }
1585
+ ]
1586
+ }
1587
+ },
1588
+ {
1589
+ "name": "TokenWhitelisted",
1590
+ "type": {
1591
+ "kind": "struct",
1592
+ "fields": [
1593
+ {
1594
+ "name": "token_address",
1595
+ "type": "pubkey"
1596
+ }
1597
+ ]
1598
+ }
1599
+ },
1600
+ {
1601
+ "name": "TssPda",
1602
+ "docs": [
1603
+ "TSS state PDA for ECDSA verification (Ethereum-style secp256k1).",
1604
+ "Stores 20-byte ETH address, chain id, and replay-protection nonce."
1605
+ ],
1606
+ "type": {
1607
+ "kind": "struct",
1608
+ "fields": [
1609
+ {
1610
+ "name": "tss_eth_address",
1611
+ "type": {
1612
+ "array": ["u8", 20]
1613
+ }
1614
+ },
1615
+ {
1616
+ "name": "chain_id",
1617
+ "type": "u64"
1618
+ },
1619
+ {
1620
+ "name": "nonce",
1621
+ "type": "u64"
1622
+ },
1623
+ {
1624
+ "name": "authority",
1625
+ "type": "pubkey"
1626
+ },
1627
+ {
1628
+ "name": "bump",
1629
+ "type": "u8"
1630
+ }
1631
+ ]
1632
+ }
1633
+ },
1634
+ {
1635
+ "name": "TxType",
1636
+ "docs": [
1637
+ "Transaction types matching the EVM Universal Gateway `TX_TYPE`.",
1638
+ "Kept 1:1 for relayer/event parity with the EVM implementation."
1639
+ ],
1640
+ "type": {
1641
+ "kind": "enum",
1642
+ "variants": [
1643
+ {
1644
+ "name": "Gas"
1645
+ },
1646
+ {
1647
+ "name": "GasAndPayload"
1648
+ },
1649
+ {
1650
+ "name": "Funds"
1651
+ },
1652
+ {
1653
+ "name": "FundsAndPayload"
1654
+ }
1655
+ ]
1656
+ }
1657
+ },
1658
+ {
1659
+ "name": "TxWithFunds",
1660
+ "docs": [
1661
+ "FUNDS deposit event (parity with EVM `TxWithFunds`). Emitted for FUNDS-only and FUNDS+PAYLOAD routes."
1662
+ ],
1663
+ "type": {
1664
+ "kind": "struct",
1665
+ "fields": [
1666
+ {
1667
+ "name": "sender",
1668
+ "type": "pubkey"
1669
+ },
1670
+ {
1671
+ "name": "recipient",
1672
+ "type": {
1673
+ "array": ["u8", 20]
1674
+ }
1675
+ },
1676
+ {
1677
+ "name": "bridge_amount",
1678
+ "type": "u64"
1679
+ },
1680
+ {
1681
+ "name": "gas_amount",
1682
+ "type": "u64"
1683
+ },
1684
+ {
1685
+ "name": "bridge_token",
1686
+ "type": "pubkey"
1687
+ },
1688
+ {
1689
+ "name": "data",
1690
+ "type": "bytes"
1691
+ },
1692
+ {
1693
+ "name": "revert_cfg",
1694
+ "type": {
1695
+ "defined": {
1696
+ "name": "RevertSettings"
1697
+ }
1698
+ }
1699
+ },
1700
+ {
1701
+ "name": "tx_type",
1702
+ "type": {
1703
+ "defined": {
1704
+ "name": "TxType"
1705
+ }
1706
+ }
1707
+ },
1708
+ {
1709
+ "name": "signature_data",
1710
+ "type": "bytes"
1711
+ }
1712
+ ]
1713
+ }
1714
+ },
1715
+ {
1716
+ "name": "TxWithGas",
1717
+ "docs": [
1718
+ "GAS deposit event (parity with EVM `TxWithGas`). Emitted for gas funding on both GAS and GAS+PAYLOAD routes."
1719
+ ],
1720
+ "type": {
1721
+ "kind": "struct",
1722
+ "fields": [
1723
+ {
1724
+ "name": "sender",
1725
+ "type": "pubkey"
1726
+ },
1727
+ {
1728
+ "name": "payload_hash",
1729
+ "type": {
1730
+ "array": ["u8", 32]
1731
+ }
1732
+ },
1733
+ {
1734
+ "name": "native_token_deposited",
1735
+ "type": "u64"
1736
+ },
1737
+ {
1738
+ "name": "revert_cfg",
1739
+ "type": {
1740
+ "defined": {
1741
+ "name": "RevertSettings"
1742
+ }
1743
+ }
1744
+ },
1745
+ {
1746
+ "name": "tx_type",
1747
+ "type": {
1748
+ "defined": {
1749
+ "name": "TxType"
1750
+ }
1751
+ }
1752
+ }
1753
+ ]
1754
+ }
1755
+ },
1756
+ {
1757
+ "name": "UniversalPayload",
1758
+ "docs": [
1759
+ "Universal payload for cross-chain execution (parity with EVM `UniversalPayload`).",
1760
+ "Serialized and hashed for event parity with EVM (payload bytes/hash)."
1761
+ ],
1762
+ "type": {
1763
+ "kind": "struct",
1764
+ "fields": [
1765
+ {
1766
+ "name": "to",
1767
+ "type": {
1768
+ "array": ["u8", 20]
1769
+ }
1770
+ },
1771
+ {
1772
+ "name": "value",
1773
+ "type": "u64"
1774
+ },
1775
+ {
1776
+ "name": "data",
1777
+ "type": "bytes"
1778
+ },
1779
+ {
1780
+ "name": "gas_limit",
1781
+ "type": "u64"
1782
+ },
1783
+ {
1784
+ "name": "max_fee_per_gas",
1785
+ "type": "u64"
1786
+ },
1787
+ {
1788
+ "name": "max_priority_fee_per_gas",
1789
+ "type": "u64"
1790
+ },
1791
+ {
1792
+ "name": "nonce",
1793
+ "type": "u64"
1794
+ },
1795
+ {
1796
+ "name": "deadline",
1797
+ "type": "i64"
1798
+ },
1799
+ {
1800
+ "name": "v_type",
1801
+ "type": {
1802
+ "defined": {
1803
+ "name": "VerificationType"
1804
+ }
1805
+ }
1806
+ }
1807
+ ]
1808
+ }
1809
+ },
1810
+ {
1811
+ "name": "VerificationLevel",
1812
+ "docs": [
1813
+ "Pyth price updates are bridged to all blockchains via Wormhole.",
1814
+ "Using the price updates on another chain requires verifying the signatures of the Wormhole guardians.",
1815
+ "The usual process is to check the signatures for two thirds of the total number of guardians, but this can be cumbersome on Solana because of the transaction size limits,",
1816
+ "so we also allow for partial verification.",
1817
+ "",
1818
+ "This enum represents how much a price update has been verified:",
1819
+ "- If `Full`, we have verified the signatures for two thirds of the current guardians.",
1820
+ "- If `Partial`, only `num_signatures` guardian signatures have been checked.",
1821
+ "",
1822
+ "# Warning",
1823
+ "Using partially verified price updates is dangerous, as it lowers the threshold of guardians that need to collude to produce a malicious price update."
1824
+ ],
1825
+ "type": {
1826
+ "kind": "enum",
1827
+ "variants": [
1828
+ {
1829
+ "name": "Partial",
1830
+ "fields": [
1831
+ {
1832
+ "name": "num_signatures",
1833
+ "type": "u8"
1834
+ }
1835
+ ]
1836
+ },
1837
+ {
1838
+ "name": "Full"
1839
+ }
1840
+ ]
1841
+ }
1842
+ },
1843
+ {
1844
+ "name": "VerificationType",
1845
+ "docs": ["Verification types for payload execution (parity with EVM)."],
1846
+ "type": {
1847
+ "kind": "enum",
1848
+ "variants": [
1849
+ {
1850
+ "name": "SignedVerification"
1851
+ },
1852
+ {
1853
+ "name": "UniversalTxVerification"
1854
+ }
1855
+ ]
1856
+ }
1857
+ },
1858
+ {
1859
+ "name": "WithdrawFunds",
1860
+ "docs": ["Withdraw event (parity with EVM `WithdrawFunds`)."],
1861
+ "type": {
1862
+ "kind": "struct",
1863
+ "fields": [
1864
+ {
1865
+ "name": "recipient",
1866
+ "type": "pubkey"
1867
+ },
1868
+ {
1869
+ "name": "amount",
1870
+ "type": "u64"
1871
+ },
1872
+ {
1873
+ "name": "token",
1874
+ "type": "pubkey"
1875
+ }
1876
+ ]
1877
+ }
1878
+ }
1879
+ ]
1880
+ }