@pushchain/core 2.0.1 → 2.0.3

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 (44) 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 +1004 -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 +167 -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 +18 -0
  28. package/src/lib/orchestrator/orchestrator.js +720 -4
  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 +66 -0
  32. package/src/lib/progress-hook/progress-hook.js.map +1 -1
  33. package/src/lib/progress-hook/progress-hook.types.d.ts +9 -0
  34. package/src/lib/progress-hook/progress-hook.types.js +12 -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
@@ -0,0 +1,1004 @@
1
+ {
2
+ "address": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS",
3
+ "metadata": {
4
+ "address": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS",
5
+ "name": "pushsolanagateway",
6
+ "version": "0.1.0",
7
+ "spec": "0.1.0",
8
+ "description": "Push Solana Gateway - Universal Gateway for Solana"
9
+ },
10
+ "instructions": [
11
+ {
12
+ "name": "add_funds",
13
+ "discriminator": [132, 237, 76, 57, 80, 10, 179, 138],
14
+ "accounts": [
15
+ {
16
+ "name": "config",
17
+ "pda": {
18
+ "seeds": [
19
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
20
+ ]
21
+ }
22
+ },
23
+ {
24
+ "name": "vault",
25
+ "writable": true,
26
+ "pda": {
27
+ "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }]
28
+ }
29
+ },
30
+ { "name": "user", "writable": true, "signer": true },
31
+ { "name": "price_update" },
32
+ {
33
+ "name": "system_program",
34
+ "address": "11111111111111111111111111111111"
35
+ }
36
+ ],
37
+ "args": [
38
+ { "name": "amount", "type": "u64" },
39
+ { "name": "transaction_hash", "type": { "array": ["u8", 32] } }
40
+ ]
41
+ },
42
+ {
43
+ "name": "get_sol_price",
44
+ "discriminator": [230, 145, 206, 175, 43, 184, 97, 110],
45
+ "accounts": [{ "name": "price_update" }],
46
+ "args": [],
47
+ "returns": { "defined": { "name": "PriceData" } }
48
+ },
49
+ {
50
+ "name": "init_tss",
51
+ "discriminator": [47, 31, 100, 111, 115, 2, 22, 208],
52
+ "accounts": [
53
+ {
54
+ "name": "tss_pda",
55
+ "writable": true,
56
+ "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115] }] }
57
+ },
58
+ { "name": "authority", "writable": true, "signer": true },
59
+ {
60
+ "name": "system_program",
61
+ "address": "11111111111111111111111111111111"
62
+ }
63
+ ],
64
+ "args": [
65
+ { "name": "tss_eth_address", "type": { "array": ["u8", 20] } },
66
+ { "name": "chain_id", "type": "u64" }
67
+ ]
68
+ },
69
+ {
70
+ "name": "initialize",
71
+ "discriminator": [175, 175, 109, 31, 13, 152, 155, 237],
72
+ "accounts": [
73
+ {
74
+ "name": "config",
75
+ "writable": true,
76
+ "pda": {
77
+ "seeds": [
78
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
79
+ ]
80
+ }
81
+ },
82
+ {
83
+ "name": "vault",
84
+ "writable": true,
85
+ "pda": {
86
+ "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }]
87
+ }
88
+ },
89
+ { "name": "admin", "writable": true, "signer": true },
90
+ {
91
+ "name": "system_program",
92
+ "address": "11111111111111111111111111111111"
93
+ }
94
+ ],
95
+ "args": [
96
+ { "name": "admin", "type": "pubkey" },
97
+ { "name": "pauser", "type": "pubkey" },
98
+ { "name": "tss", "type": "pubkey" },
99
+ { "name": "min_cap_usd", "type": "u128" },
100
+ { "name": "max_cap_usd", "type": "u128" },
101
+ { "name": "pyth_price_feed", "type": "pubkey" }
102
+ ]
103
+ },
104
+ {
105
+ "name": "pause",
106
+ "discriminator": [211, 22, 221, 251, 74, 121, 193, 47],
107
+ "accounts": [
108
+ {
109
+ "name": "config",
110
+ "writable": true,
111
+ "pda": {
112
+ "seeds": [
113
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
114
+ ]
115
+ }
116
+ },
117
+ { "name": "pauser", "signer": true }
118
+ ],
119
+ "args": []
120
+ },
121
+ {
122
+ "name": "remove_whitelist_token",
123
+ "discriminator": [65, 182, 42, 255, 198, 163, 73, 46],
124
+ "accounts": [
125
+ {
126
+ "name": "config",
127
+ "writable": true,
128
+ "pda": {
129
+ "seeds": [
130
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
131
+ ]
132
+ }
133
+ },
134
+ {
135
+ "name": "whitelist",
136
+ "writable": true,
137
+ "pda": {
138
+ "seeds": [
139
+ {
140
+ "kind": "const",
141
+ "value": [119, 104, 105, 116, 101, 108, 105, 115, 116]
142
+ }
143
+ ]
144
+ }
145
+ },
146
+ { "name": "admin", "writable": true, "signer": true },
147
+ {
148
+ "name": "system_program",
149
+ "address": "11111111111111111111111111111111"
150
+ }
151
+ ],
152
+ "args": [{ "name": "token", "type": "pubkey" }]
153
+ },
154
+ {
155
+ "name": "reset_nonce",
156
+ "discriminator": [104, 139, 110, 85, 234, 155, 132, 248],
157
+ "accounts": [
158
+ {
159
+ "name": "tss_pda",
160
+ "writable": true,
161
+ "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115] }] }
162
+ },
163
+ { "name": "authority", "signer": true }
164
+ ],
165
+ "args": [{ "name": "new_nonce", "type": "u64" }]
166
+ },
167
+ {
168
+ "name": "revert_withdraw",
169
+ "discriminator": [8, 232, 107, 216, 153, 25, 204, 116],
170
+ "accounts": [
171
+ {
172
+ "name": "config",
173
+ "pda": {
174
+ "seeds": [
175
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
176
+ ]
177
+ }
178
+ },
179
+ {
180
+ "name": "vault",
181
+ "writable": true,
182
+ "pda": {
183
+ "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }]
184
+ }
185
+ },
186
+ {
187
+ "name": "tss_pda",
188
+ "writable": true,
189
+ "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115] }] }
190
+ },
191
+ { "name": "recipient", "writable": true },
192
+ {
193
+ "name": "system_program",
194
+ "address": "11111111111111111111111111111111"
195
+ }
196
+ ],
197
+ "args": [
198
+ { "name": "amount", "type": "u64" },
199
+ {
200
+ "name": "revert_cfg",
201
+ "type": { "defined": { "name": "RevertSettings" } }
202
+ },
203
+ { "name": "signature", "type": { "array": ["u8", 64] } },
204
+ { "name": "recovery_id", "type": "u8" },
205
+ { "name": "message_hash", "type": { "array": ["u8", 32] } },
206
+ { "name": "nonce", "type": "u64" }
207
+ ]
208
+ },
209
+ {
210
+ "name": "revert_withdraw_spl_token",
211
+ "discriminator": [172, 155, 56, 3, 92, 190, 159, 191],
212
+ "accounts": [
213
+ {
214
+ "name": "config",
215
+ "pda": {
216
+ "seeds": [
217
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
218
+ ]
219
+ }
220
+ },
221
+ { "name": "whitelist" },
222
+ {
223
+ "name": "vault",
224
+ "writable": true,
225
+ "pda": {
226
+ "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }]
227
+ }
228
+ },
229
+ { "name": "token_vault", "writable": true },
230
+ {
231
+ "name": "tss_pda",
232
+ "writable": true,
233
+ "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115] }] }
234
+ },
235
+ { "name": "recipient_token_account", "writable": true },
236
+ { "name": "token_mint" },
237
+ {
238
+ "name": "token_program",
239
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
240
+ }
241
+ ],
242
+ "args": [
243
+ { "name": "amount", "type": "u64" },
244
+ {
245
+ "name": "revert_cfg",
246
+ "type": { "defined": { "name": "RevertSettings" } }
247
+ },
248
+ { "name": "signature", "type": { "array": ["u8", 64] } },
249
+ { "name": "recovery_id", "type": "u8" },
250
+ { "name": "message_hash", "type": { "array": ["u8", 32] } },
251
+ { "name": "nonce", "type": "u64" }
252
+ ]
253
+ },
254
+ {
255
+ "name": "send_funds",
256
+ "discriminator": [84, 247, 211, 40, 63, 106, 15, 59],
257
+ "accounts": [
258
+ {
259
+ "name": "config",
260
+ "writable": true,
261
+ "pda": {
262
+ "seeds": [
263
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
264
+ ]
265
+ }
266
+ },
267
+ {
268
+ "name": "vault",
269
+ "writable": true,
270
+ "pda": {
271
+ "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }]
272
+ }
273
+ },
274
+ {
275
+ "name": "token_whitelist",
276
+ "pda": {
277
+ "seeds": [
278
+ {
279
+ "kind": "const",
280
+ "value": [119, 104, 105, 116, 101, 108, 105, 115, 116]
281
+ }
282
+ ]
283
+ }
284
+ },
285
+ { "name": "user_token_account", "writable": true },
286
+ { "name": "gateway_token_account", "writable": true },
287
+ { "name": "user", "writable": true, "signer": true },
288
+ { "name": "bridge_token" },
289
+ {
290
+ "name": "token_program",
291
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
292
+ },
293
+ {
294
+ "name": "system_program",
295
+ "address": "11111111111111111111111111111111"
296
+ }
297
+ ],
298
+ "args": [
299
+ { "name": "recipient", "type": "pubkey" },
300
+ { "name": "bridge_token", "type": "pubkey" },
301
+ { "name": "bridge_amount", "type": "u64" },
302
+ {
303
+ "name": "revert_cfg",
304
+ "type": { "defined": { "name": "RevertSettings" } }
305
+ }
306
+ ]
307
+ },
308
+ {
309
+ "name": "send_funds_native",
310
+ "discriminator": [245, 51, 222, 185, 98, 79, 40, 25],
311
+ "accounts": [
312
+ {
313
+ "name": "config",
314
+ "writable": true,
315
+ "pda": {
316
+ "seeds": [
317
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
318
+ ]
319
+ }
320
+ },
321
+ {
322
+ "name": "vault",
323
+ "writable": true,
324
+ "pda": {
325
+ "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }]
326
+ }
327
+ },
328
+ { "name": "user", "writable": true, "signer": true },
329
+ {
330
+ "name": "system_program",
331
+ "address": "11111111111111111111111111111111"
332
+ }
333
+ ],
334
+ "args": [
335
+ { "name": "recipient", "type": "pubkey" },
336
+ { "name": "bridge_amount", "type": "u64" },
337
+ {
338
+ "name": "revert_cfg",
339
+ "type": { "defined": { "name": "RevertSettings" } }
340
+ }
341
+ ]
342
+ },
343
+ {
344
+ "name": "send_tx_with_funds",
345
+ "discriminator": [224, 179, 202, 222, 121, 238, 38, 168],
346
+ "accounts": [
347
+ {
348
+ "name": "config",
349
+ "writable": true,
350
+ "pda": {
351
+ "seeds": [
352
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
353
+ ]
354
+ }
355
+ },
356
+ {
357
+ "name": "vault",
358
+ "writable": true,
359
+ "pda": {
360
+ "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }]
361
+ }
362
+ },
363
+ {
364
+ "name": "token_whitelist",
365
+ "pda": {
366
+ "seeds": [
367
+ {
368
+ "kind": "const",
369
+ "value": [119, 104, 105, 116, 101, 108, 105, 115, 116]
370
+ }
371
+ ]
372
+ }
373
+ },
374
+ { "name": "user_token_account", "writable": true },
375
+ { "name": "gateway_token_account", "writable": true },
376
+ { "name": "user", "writable": true, "signer": true },
377
+ { "name": "price_update" },
378
+ { "name": "bridge_token" },
379
+ {
380
+ "name": "token_program",
381
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
382
+ },
383
+ {
384
+ "name": "system_program",
385
+ "address": "11111111111111111111111111111111"
386
+ }
387
+ ],
388
+ "args": [
389
+ { "name": "bridge_token", "type": "pubkey" },
390
+ { "name": "bridge_amount", "type": "u64" },
391
+ {
392
+ "name": "payload",
393
+ "type": { "defined": { "name": "UniversalPayload" } }
394
+ },
395
+ {
396
+ "name": "revert_cfg",
397
+ "type": { "defined": { "name": "RevertSettings" } }
398
+ },
399
+ { "name": "gas_amount", "type": "u64" },
400
+ { "name": "signature_data", "type": { "array": ["u8", 32] } }
401
+ ]
402
+ },
403
+ {
404
+ "name": "send_tx_with_gas",
405
+ "discriminator": [220, 10, 179, 127, 41, 153, 193, 213],
406
+ "accounts": [
407
+ {
408
+ "name": "config",
409
+ "writable": true,
410
+ "pda": {
411
+ "seeds": [
412
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
413
+ ]
414
+ }
415
+ },
416
+ {
417
+ "name": "vault",
418
+ "writable": true,
419
+ "pda": {
420
+ "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }]
421
+ }
422
+ },
423
+ { "name": "user", "writable": true, "signer": true },
424
+ { "name": "price_update" },
425
+ {
426
+ "name": "system_program",
427
+ "address": "11111111111111111111111111111111"
428
+ }
429
+ ],
430
+ "args": [
431
+ {
432
+ "name": "payload",
433
+ "type": { "defined": { "name": "UniversalPayload" } }
434
+ },
435
+ {
436
+ "name": "revert_cfg",
437
+ "type": { "defined": { "name": "RevertSettings" } }
438
+ },
439
+ { "name": "amount", "type": "u64" }
440
+ ]
441
+ },
442
+ {
443
+ "name": "set_caps_usd",
444
+ "discriminator": [136, 160, 17, 54, 239, 108, 125, 129],
445
+ "accounts": [
446
+ {
447
+ "name": "config",
448
+ "writable": true,
449
+ "pda": {
450
+ "seeds": [
451
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
452
+ ]
453
+ }
454
+ },
455
+ { "name": "admin", "signer": true }
456
+ ],
457
+ "args": [
458
+ { "name": "min_cap", "type": "u128" },
459
+ { "name": "max_cap", "type": "u128" }
460
+ ]
461
+ },
462
+ {
463
+ "name": "set_pyth_confidence_threshold",
464
+ "discriminator": [213, 69, 242, 123, 122, 165, 125, 21],
465
+ "accounts": [
466
+ {
467
+ "name": "config",
468
+ "writable": true,
469
+ "pda": {
470
+ "seeds": [
471
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
472
+ ]
473
+ }
474
+ },
475
+ { "name": "admin", "signer": true }
476
+ ],
477
+ "args": [{ "name": "threshold", "type": "u64" }]
478
+ },
479
+ {
480
+ "name": "set_pyth_price_feed",
481
+ "discriminator": [202, 185, 109, 150, 255, 130, 210, 208],
482
+ "accounts": [
483
+ {
484
+ "name": "config",
485
+ "writable": true,
486
+ "pda": {
487
+ "seeds": [
488
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
489
+ ]
490
+ }
491
+ },
492
+ { "name": "admin", "signer": true }
493
+ ],
494
+ "args": [{ "name": "price_feed", "type": "pubkey" }]
495
+ },
496
+ {
497
+ "name": "set_tss_address",
498
+ "discriminator": [158, 254, 147, 0, 154, 3, 56, 50],
499
+ "accounts": [
500
+ {
501
+ "name": "config",
502
+ "writable": true,
503
+ "pda": {
504
+ "seeds": [
505
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
506
+ ]
507
+ }
508
+ },
509
+ { "name": "admin", "signer": true }
510
+ ],
511
+ "args": [{ "name": "new_tss", "type": "pubkey" }]
512
+ },
513
+ {
514
+ "name": "unpause",
515
+ "discriminator": [169, 144, 4, 38, 10, 141, 188, 255],
516
+ "accounts": [
517
+ {
518
+ "name": "config",
519
+ "writable": true,
520
+ "pda": {
521
+ "seeds": [
522
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
523
+ ]
524
+ }
525
+ },
526
+ { "name": "pauser", "signer": true }
527
+ ],
528
+ "args": []
529
+ },
530
+ {
531
+ "name": "update_tss",
532
+ "discriminator": [227, 136, 3, 242, 177, 168, 10, 160],
533
+ "accounts": [
534
+ {
535
+ "name": "tss_pda",
536
+ "writable": true,
537
+ "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115] }] }
538
+ },
539
+ { "name": "authority", "signer": true }
540
+ ],
541
+ "args": [
542
+ { "name": "tss_eth_address", "type": { "array": ["u8", 20] } },
543
+ { "name": "chain_id", "type": "u64" }
544
+ ]
545
+ },
546
+ {
547
+ "name": "whitelist_token",
548
+ "discriminator": [6, 141, 83, 167, 31, 6, 2, 224],
549
+ "accounts": [
550
+ {
551
+ "name": "config",
552
+ "writable": true,
553
+ "pda": {
554
+ "seeds": [
555
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
556
+ ]
557
+ }
558
+ },
559
+ {
560
+ "name": "whitelist",
561
+ "writable": true,
562
+ "pda": {
563
+ "seeds": [
564
+ {
565
+ "kind": "const",
566
+ "value": [119, 104, 105, 116, 101, 108, 105, 115, 116]
567
+ }
568
+ ]
569
+ }
570
+ },
571
+ { "name": "admin", "writable": true, "signer": true },
572
+ {
573
+ "name": "system_program",
574
+ "address": "11111111111111111111111111111111"
575
+ }
576
+ ],
577
+ "args": [{ "name": "token", "type": "pubkey" }]
578
+ },
579
+ {
580
+ "name": "withdraw_spl_token_tss",
581
+ "discriminator": [238, 209, 47, 229, 44, 234, 138, 198],
582
+ "accounts": [
583
+ {
584
+ "name": "config",
585
+ "pda": {
586
+ "seeds": [
587
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
588
+ ]
589
+ }
590
+ },
591
+ { "name": "whitelist" },
592
+ {
593
+ "name": "vault",
594
+ "writable": true,
595
+ "pda": {
596
+ "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }]
597
+ }
598
+ },
599
+ { "name": "token_vault", "writable": true },
600
+ {
601
+ "name": "tss_pda",
602
+ "writable": true,
603
+ "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115] }] }
604
+ },
605
+ { "name": "recipient_token_account", "writable": true },
606
+ { "name": "token_mint" },
607
+ {
608
+ "name": "token_program",
609
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
610
+ }
611
+ ],
612
+ "args": [
613
+ { "name": "amount", "type": "u64" },
614
+ { "name": "signature", "type": { "array": ["u8", 64] } },
615
+ { "name": "recovery_id", "type": "u8" },
616
+ { "name": "message_hash", "type": { "array": ["u8", 32] } },
617
+ { "name": "nonce", "type": "u64" }
618
+ ]
619
+ },
620
+ {
621
+ "name": "withdraw_tss",
622
+ "discriminator": [112, 51, 93, 250, 136, 175, 118, 100],
623
+ "accounts": [
624
+ {
625
+ "name": "config",
626
+ "pda": {
627
+ "seeds": [
628
+ { "kind": "const", "value": [99, 111, 110, 102, 105, 103] }
629
+ ]
630
+ }
631
+ },
632
+ {
633
+ "name": "vault",
634
+ "writable": true,
635
+ "pda": {
636
+ "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }]
637
+ }
638
+ },
639
+ {
640
+ "name": "tss_pda",
641
+ "writable": true,
642
+ "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115] }] }
643
+ },
644
+ { "name": "recipient", "writable": true },
645
+ {
646
+ "name": "system_program",
647
+ "address": "11111111111111111111111111111111"
648
+ }
649
+ ],
650
+ "args": [
651
+ { "name": "amount", "type": "u64" },
652
+ { "name": "signature", "type": { "array": ["u8", 64] } },
653
+ { "name": "recovery_id", "type": "u8" },
654
+ { "name": "message_hash", "type": { "array": ["u8", 32] } },
655
+ { "name": "nonce", "type": "u64" }
656
+ ]
657
+ }
658
+ ],
659
+ "accounts": [
660
+ {
661
+ "name": "Config",
662
+ "discriminator": [155, 12, 170, 224, 30, 250, 204, 130]
663
+ },
664
+ {
665
+ "name": "PriceUpdateV2",
666
+ "discriminator": [34, 241, 35, 99, 157, 126, 244, 205]
667
+ },
668
+ {
669
+ "name": "TokenWhitelist",
670
+ "discriminator": [105, 240, 104, 47, 95, 13, 48, 78]
671
+ },
672
+ {
673
+ "name": "TssPda",
674
+ "discriminator": [121, 138, 162, 251, 127, 95, 238, 135]
675
+ }
676
+ ],
677
+ "events": [
678
+ {
679
+ "name": "CapsUpdated",
680
+ "discriminator": [147, 181, 117, 249, 72, 147, 156, 255]
681
+ },
682
+ {
683
+ "name": "FundsAddedEvent",
684
+ "discriminator": [127, 31, 108, 255, 187, 19, 70, 68]
685
+ },
686
+ {
687
+ "name": "TSSAddressUpdated",
688
+ "discriminator": [157, 148, 149, 250, 42, 118, 17, 232]
689
+ },
690
+ {
691
+ "name": "TokenRemovedFromWhitelist",
692
+ "discriminator": [200, 69, 55, 209, 167, 225, 117, 11]
693
+ },
694
+ {
695
+ "name": "TokenWhitelisted",
696
+ "discriminator": [65, 3, 231, 165, 235, 116, 154, 51]
697
+ },
698
+ {
699
+ "name": "TxWithFunds",
700
+ "discriminator": [43, 31, 31, 2, 4, 236, 107, 255]
701
+ },
702
+ {
703
+ "name": "TxWithGas",
704
+ "discriminator": [182, 110, 243, 17, 145, 36, 153, 15]
705
+ },
706
+ {
707
+ "name": "WithdrawFunds",
708
+ "discriminator": [4, 77, 4, 28, 115, 6, 39, 233]
709
+ }
710
+ ],
711
+ "errors": [
712
+ { "code": 6000, "name": "PausedError", "msg": "Contract is paused" },
713
+ { "code": 6001, "name": "Unauthorized", "msg": "Unauthorized access" },
714
+ { "code": 6002, "name": "InvalidAmount", "msg": "Invalid amount" },
715
+ { "code": 6003, "name": "InvalidRecipient", "msg": "Invalid recipient" },
716
+ { "code": 6004, "name": "BelowMinCap", "msg": "Amount below minimum cap" },
717
+ { "code": 6005, "name": "AboveMaxCap", "msg": "Amount above maximum cap" },
718
+ { "code": 6006, "name": "ZeroAddress", "msg": "Zero address not allowed" },
719
+ { "code": 6007, "name": "InvalidCapRange", "msg": "Invalid cap range" },
720
+ { "code": 6008, "name": "InvalidPayload", "msg": "Invalid payload" },
721
+ { "code": 6009, "name": "DeadlineExceeded", "msg": "Deadline exceeded" },
722
+ { "code": 6010, "name": "InvalidPrice", "msg": "Invalid price data" },
723
+ {
724
+ "code": 6011,
725
+ "name": "TokenAlreadyWhitelisted",
726
+ "msg": "Token already whitelisted"
727
+ },
728
+ {
729
+ "code": 6012,
730
+ "name": "TokenNotWhitelisted",
731
+ "msg": "Token not whitelisted"
732
+ },
733
+ {
734
+ "code": 6013,
735
+ "name": "TokenTransferFailed",
736
+ "msg": "Token transfer failed"
737
+ },
738
+ { "code": 6014, "name": "InvalidTokenVault", "msg": "Invalid token vault" },
739
+ { "code": 6015, "name": "InvalidOwner", "msg": "Invalid owner" },
740
+ {
741
+ "code": 6016,
742
+ "name": "SlippageExceededOrExpired",
743
+ "msg": "Slippage exceeded or expired"
744
+ },
745
+ { "code": 6017, "name": "Paused", "msg": "Contract is paused" },
746
+ { "code": 6018, "name": "InvalidInput", "msg": "Invalid input" },
747
+ { "code": 6019, "name": "InvalidMint", "msg": "Invalid mint" },
748
+ {
749
+ "code": 6020,
750
+ "name": "InsufficientBalance",
751
+ "msg": "Insufficient balance"
752
+ },
753
+ { "code": 6021, "name": "InvalidToken", "msg": "Invalid token" }
754
+ ],
755
+ "types": [
756
+ {
757
+ "name": "CapsUpdated",
758
+ "type": {
759
+ "kind": "struct",
760
+ "fields": [
761
+ { "name": "min_cap_usd", "type": "u128" },
762
+ { "name": "max_cap_usd", "type": "u128" }
763
+ ]
764
+ }
765
+ },
766
+ {
767
+ "name": "Config",
768
+ "type": {
769
+ "kind": "struct",
770
+ "fields": [
771
+ { "name": "admin", "type": "pubkey" },
772
+ { "name": "tss_address", "type": "pubkey" },
773
+ { "name": "pauser", "type": "pubkey" },
774
+ { "name": "min_cap_universal_tx_usd", "type": "u128" },
775
+ { "name": "max_cap_universal_tx_usd", "type": "u128" },
776
+ { "name": "paused", "type": "bool" },
777
+ { "name": "bump", "type": "u8" },
778
+ { "name": "vault_bump", "type": "u8" },
779
+ { "name": "pyth_price_feed", "type": "pubkey" },
780
+ { "name": "pyth_confidence_threshold", "type": "u64" }
781
+ ]
782
+ }
783
+ },
784
+ {
785
+ "name": "FundsAddedEvent",
786
+ "type": {
787
+ "kind": "struct",
788
+ "fields": [
789
+ { "name": "user", "type": "pubkey" },
790
+ { "name": "sol_amount", "type": "u64" },
791
+ { "name": "usd_equivalent", "type": "i128" },
792
+ { "name": "usd_exponent", "type": "i32" },
793
+ { "name": "transaction_hash", "type": { "array": ["u8", 32] } }
794
+ ]
795
+ }
796
+ },
797
+ {
798
+ "name": "PriceData",
799
+ "type": {
800
+ "kind": "struct",
801
+ "fields": [
802
+ { "name": "price", "type": "i64" },
803
+ { "name": "exponent", "type": "i32" },
804
+ { "name": "publish_time", "type": "i64" },
805
+ { "name": "confidence", "type": "u64" }
806
+ ]
807
+ }
808
+ },
809
+ {
810
+ "name": "PriceFeedMessage",
811
+ "repr": { "kind": "c" },
812
+ "type": {
813
+ "kind": "struct",
814
+ "fields": [
815
+ { "name": "feed_id", "type": { "array": ["u8", 32] } },
816
+ { "name": "price", "type": "i64" },
817
+ { "name": "conf", "type": "u64" },
818
+ { "name": "exponent", "type": "i32" },
819
+ { "name": "publish_time", "type": "i64" },
820
+ { "name": "prev_publish_time", "type": "i64" },
821
+ { "name": "ema_price", "type": "i64" },
822
+ { "name": "ema_conf", "type": "u64" }
823
+ ]
824
+ }
825
+ },
826
+ {
827
+ "name": "PriceUpdateV2",
828
+ "type": {
829
+ "kind": "struct",
830
+ "fields": [
831
+ { "name": "write_authority", "type": "pubkey" },
832
+ {
833
+ "name": "verification_level",
834
+ "type": { "defined": { "name": "VerificationLevel" } }
835
+ },
836
+ {
837
+ "name": "price_message",
838
+ "type": { "defined": { "name": "PriceFeedMessage" } }
839
+ },
840
+ { "name": "posted_slot", "type": "u64" }
841
+ ]
842
+ }
843
+ },
844
+ {
845
+ "name": "RevertSettings",
846
+ "type": {
847
+ "kind": "struct",
848
+ "fields": [
849
+ { "name": "fund_recipient", "type": "pubkey" },
850
+ { "name": "revert_msg", "type": "bytes" }
851
+ ]
852
+ }
853
+ },
854
+ {
855
+ "name": "TSSAddressUpdated",
856
+ "type": {
857
+ "kind": "struct",
858
+ "fields": [
859
+ { "name": "old_tss", "type": "pubkey" },
860
+ { "name": "new_tss", "type": "pubkey" }
861
+ ]
862
+ }
863
+ },
864
+ {
865
+ "name": "TokenRemovedFromWhitelist",
866
+ "type": {
867
+ "kind": "struct",
868
+ "fields": [{ "name": "token_address", "type": "pubkey" }]
869
+ }
870
+ },
871
+ {
872
+ "name": "TokenWhitelist",
873
+ "type": {
874
+ "kind": "struct",
875
+ "fields": [
876
+ { "name": "tokens", "type": { "vec": "pubkey" } },
877
+ { "name": "bump", "type": "u8" }
878
+ ]
879
+ }
880
+ },
881
+ {
882
+ "name": "TokenWhitelisted",
883
+ "type": {
884
+ "kind": "struct",
885
+ "fields": [{ "name": "token_address", "type": "pubkey" }]
886
+ }
887
+ },
888
+ {
889
+ "name": "TssPda",
890
+ "type": {
891
+ "kind": "struct",
892
+ "fields": [
893
+ { "name": "tss_eth_address", "type": { "array": ["u8", 20] } },
894
+ { "name": "chain_id", "type": "u64" },
895
+ { "name": "nonce", "type": "u64" },
896
+ { "name": "authority", "type": "pubkey" },
897
+ { "name": "bump", "type": "u8" }
898
+ ]
899
+ }
900
+ },
901
+ {
902
+ "name": "TxType",
903
+ "type": {
904
+ "kind": "enum",
905
+ "variants": [
906
+ { "name": "Gas" },
907
+ { "name": "GasAndPayload" },
908
+ { "name": "Funds" },
909
+ { "name": "FundsAndPayload" }
910
+ ]
911
+ }
912
+ },
913
+ {
914
+ "name": "TxWithFunds",
915
+ "type": {
916
+ "kind": "struct",
917
+ "fields": [
918
+ { "name": "sender", "type": "pubkey" },
919
+ { "name": "recipient", "type": "pubkey" },
920
+ { "name": "bridge_amount", "type": "u64" },
921
+ { "name": "gas_amount", "type": "u64" },
922
+ { "name": "bridge_token", "type": "pubkey" },
923
+ { "name": "data", "type": "bytes" },
924
+ {
925
+ "name": "revert_cfg",
926
+ "type": { "defined": { "name": "RevertSettings" } }
927
+ },
928
+ { "name": "tx_type", "type": { "defined": { "name": "TxType" } } },
929
+ { "name": "signature_data", "type": { "array": ["u8", 32] } }
930
+ ]
931
+ }
932
+ },
933
+ {
934
+ "name": "TxWithGas",
935
+ "type": {
936
+ "kind": "struct",
937
+ "fields": [
938
+ { "name": "sender", "type": "pubkey" },
939
+ { "name": "payload_hash", "type": { "array": ["u8", 32] } },
940
+ { "name": "native_token_deposited", "type": "u64" },
941
+ {
942
+ "name": "revert_cfg",
943
+ "type": { "defined": { "name": "RevertSettings" } }
944
+ },
945
+ { "name": "tx_type", "type": { "defined": { "name": "TxType" } } }
946
+ ]
947
+ }
948
+ },
949
+ {
950
+ "name": "UniversalPayload",
951
+ "type": {
952
+ "kind": "struct",
953
+ "fields": [
954
+ { "name": "to", "type": "pubkey" },
955
+ { "name": "value", "type": "u64" },
956
+ { "name": "data", "type": "bytes" },
957
+ { "name": "gas_limit", "type": "u64" },
958
+ { "name": "max_fee_per_gas", "type": "u64" },
959
+ { "name": "max_priority_fee_per_gas", "type": "u64" },
960
+ { "name": "nonce", "type": "u64" },
961
+ { "name": "deadline", "type": "i64" },
962
+ {
963
+ "name": "v_type",
964
+ "type": { "defined": { "name": "VerificationType" } }
965
+ }
966
+ ]
967
+ }
968
+ },
969
+ {
970
+ "name": "VerificationLevel",
971
+ "type": {
972
+ "kind": "enum",
973
+ "variants": [
974
+ {
975
+ "name": "Partial",
976
+ "fields": [{ "name": "num_signatures", "type": "u8" }]
977
+ },
978
+ { "name": "Full" }
979
+ ]
980
+ }
981
+ },
982
+ {
983
+ "name": "VerificationType",
984
+ "type": {
985
+ "kind": "enum",
986
+ "variants": [
987
+ { "name": "SignedVerification" },
988
+ { "name": "UniversalTxVerification" }
989
+ ]
990
+ }
991
+ },
992
+ {
993
+ "name": "WithdrawFunds",
994
+ "type": {
995
+ "kind": "struct",
996
+ "fields": [
997
+ { "name": "recipient", "type": "pubkey" },
998
+ { "name": "amount", "type": "u64" },
999
+ { "name": "token", "type": "pubkey" }
1000
+ ]
1001
+ }
1002
+ }
1003
+ ]
1004
+ }