@reyaxyz/sdk 0.50.0 → 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +1 -1
  2. package/dist/abis/CoreProxy.json +5600 -0
  3. package/dist/abis/Periphery.json +380 -92
  4. package/dist/abis/socket/VaultWithPayload.json +6 -1
  5. package/dist/services/encode.js +2 -2
  6. package/dist/services/encode.js.map +1 -1
  7. package/dist/services/lp/bridgeAndDepositPassivePool.js +2 -2
  8. package/dist/services/lp/bridgeAndDepositPassivePool.js.map +1 -1
  9. package/dist/services/lp/encode.js +10 -6
  10. package/dist/services/lp/encode.js.map +1 -1
  11. package/dist/services/lp/transferFromMAToPool.js +1 -1
  12. package/dist/services/lp/transferFromMAToPool.js.map +1 -1
  13. package/dist/services/lp/types.js.map +1 -1
  14. package/dist/services/lp/withdrawPassivePoolAndBridge.js +2 -2
  15. package/dist/services/lp/withdrawPassivePoolAndBridge.js.map +1 -1
  16. package/dist/services/margin-accounts/bridgeAndDepositExistingMA.js +4 -9
  17. package/dist/services/margin-accounts/bridgeAndDepositExistingMA.js.map +1 -1
  18. package/dist/services/margin-accounts/bridgeAndDepositNewMA.js +2 -2
  19. package/dist/services/margin-accounts/bridgeAndDepositNewMA.js.map +1 -1
  20. package/dist/services/margin-accounts/encode.js +17 -12
  21. package/dist/services/margin-accounts/encode.js.map +1 -1
  22. package/dist/services/margin-accounts/withdrawMAAndBridge.js +1 -1
  23. package/dist/services/margin-accounts/withdrawMAAndBridge.js.map +1 -1
  24. package/dist/services/orders/encode.js +2 -2
  25. package/dist/services/orders/encode.js.map +1 -1
  26. package/dist/types/services/lp/bridgeAndDepositPassivePool.d.ts.map +1 -1
  27. package/dist/types/services/lp/encode.d.ts +3 -3
  28. package/dist/types/services/lp/encode.d.ts.map +1 -1
  29. package/dist/types/services/lp/transferFromMAToPool.d.ts.map +1 -1
  30. package/dist/types/services/lp/types.d.ts +1 -1
  31. package/dist/types/services/lp/types.d.ts.map +1 -1
  32. package/dist/types/services/lp/withdrawPassivePoolAndBridge.d.ts.map +1 -1
  33. package/dist/types/services/margin-accounts/bridgeAndDepositExistingMA.d.ts.map +1 -1
  34. package/dist/types/services/margin-accounts/bridgeAndDepositNewMA.d.ts.map +1 -1
  35. package/dist/types/services/margin-accounts/encode.d.ts +3 -3
  36. package/dist/types/services/margin-accounts/encode.d.ts.map +1 -1
  37. package/dist/types/services/margin-accounts/withdrawMAAndBridge.d.ts.map +1 -1
  38. package/package.json +3 -3
  39. package/src/abis/CoreProxy.json +5394 -0
  40. package/src/abis/Periphery.json +380 -92
  41. package/src/abis/socket/VaultWithPayload.json +6 -1
  42. package/src/services/encode.ts +1 -1
  43. package/src/services/lp/bridgeAndDepositPassivePool.ts +2 -0
  44. package/src/services/lp/encode.ts +12 -3
  45. package/src/services/lp/transferFromMAToPool.ts +1 -0
  46. package/src/services/lp/types.ts +1 -1
  47. package/src/services/lp/withdrawPassivePoolAndBridge.ts +2 -0
  48. package/src/services/margin-accounts/bridgeAndDepositExistingMA.ts +2 -14
  49. package/src/services/margin-accounts/bridgeAndDepositNewMA.ts +2 -0
  50. package/src/services/margin-accounts/encode.ts +17 -9
  51. package/src/services/margin-accounts/withdrawMAAndBridge.ts +1 -0
  52. package/src/services/orders/encode.ts +1 -1
  53. package/dist/abis/AccountModule.json +0 -1079
  54. package/dist/abis/ExecutionModule.json +0 -758
  55. package/src/abis/AccountModule.json +0 -1079
  56. package/src/abis/ExecutionModule.json +0 -758
@@ -1,758 +0,0 @@
1
- {
2
- "abi": [
3
- {
4
- "type": "function",
5
- "name": "execute",
6
- "inputs": [
7
- {
8
- "name": "accountId",
9
- "type": "uint128",
10
- "internalType": "uint128"
11
- },
12
- {
13
- "name": "commands",
14
- "type": "tuple[]",
15
- "internalType": "struct Command[]",
16
- "components": [
17
- {
18
- "name": "commandType",
19
- "type": "uint8",
20
- "internalType": "enum CommandType"
21
- },
22
- {
23
- "name": "inputs",
24
- "type": "bytes",
25
- "internalType": "bytes"
26
- },
27
- {
28
- "name": "marketId",
29
- "type": "uint128",
30
- "internalType": "uint128"
31
- },
32
- {
33
- "name": "exchangeId",
34
- "type": "uint128",
35
- "internalType": "uint128"
36
- }
37
- ]
38
- }
39
- ],
40
- "outputs": [
41
- {
42
- "name": "outputs",
43
- "type": "bytes[]",
44
- "internalType": "bytes[]"
45
- },
46
- {
47
- "name": "usdNodeMarginInfo",
48
- "type": "tuple",
49
- "internalType": "struct MarginInfo",
50
- "components": [
51
- {
52
- "name": "collateral",
53
- "type": "address",
54
- "internalType": "address"
55
- },
56
- {
57
- "name": "marginBalance",
58
- "type": "int256",
59
- "internalType": "int256"
60
- },
61
- {
62
- "name": "realBalance",
63
- "type": "int256",
64
- "internalType": "int256"
65
- },
66
- {
67
- "name": "initialDelta",
68
- "type": "int256",
69
- "internalType": "int256"
70
- },
71
- {
72
- "name": "maintenanceDelta",
73
- "type": "int256",
74
- "internalType": "int256"
75
- },
76
- {
77
- "name": "liquidationDelta",
78
- "type": "int256",
79
- "internalType": "int256"
80
- },
81
- {
82
- "name": "dutchDelta",
83
- "type": "int256",
84
- "internalType": "int256"
85
- },
86
- {
87
- "name": "adlDelta",
88
- "type": "int256",
89
- "internalType": "int256"
90
- },
91
- {
92
- "name": "initialBufferDelta",
93
- "type": "int256",
94
- "internalType": "int256"
95
- },
96
- {
97
- "name": "liquidationMarginRequirement",
98
- "type": "uint256",
99
- "internalType": "uint256"
100
- }
101
- ]
102
- }
103
- ],
104
- "stateMutability": "nonpayable"
105
- },
106
- {
107
- "type": "function",
108
- "name": "executeBySig",
109
- "inputs": [
110
- {
111
- "name": "accountId",
112
- "type": "uint128",
113
- "internalType": "uint128"
114
- },
115
- {
116
- "name": "commands",
117
- "type": "tuple[]",
118
- "internalType": "struct Command[]",
119
- "components": [
120
- {
121
- "name": "commandType",
122
- "type": "uint8",
123
- "internalType": "enum CommandType"
124
- },
125
- {
126
- "name": "inputs",
127
- "type": "bytes",
128
- "internalType": "bytes"
129
- },
130
- {
131
- "name": "marketId",
132
- "type": "uint128",
133
- "internalType": "uint128"
134
- },
135
- {
136
- "name": "exchangeId",
137
- "type": "uint128",
138
- "internalType": "uint128"
139
- }
140
- ]
141
- },
142
- {
143
- "name": "sig",
144
- "type": "tuple",
145
- "internalType": "struct EIP712Signature",
146
- "components": [
147
- {
148
- "name": "v",
149
- "type": "uint8",
150
- "internalType": "uint8"
151
- },
152
- {
153
- "name": "r",
154
- "type": "bytes32",
155
- "internalType": "bytes32"
156
- },
157
- {
158
- "name": "s",
159
- "type": "bytes32",
160
- "internalType": "bytes32"
161
- },
162
- {
163
- "name": "deadline",
164
- "type": "uint256",
165
- "internalType": "uint256"
166
- }
167
- ]
168
- }
169
- ],
170
- "outputs": [
171
- {
172
- "name": "outputs",
173
- "type": "bytes[]",
174
- "internalType": "bytes[]"
175
- },
176
- {
177
- "name": "usdNodeMarginInfo",
178
- "type": "tuple",
179
- "internalType": "struct MarginInfo",
180
- "components": [
181
- {
182
- "name": "collateral",
183
- "type": "address",
184
- "internalType": "address"
185
- },
186
- {
187
- "name": "marginBalance",
188
- "type": "int256",
189
- "internalType": "int256"
190
- },
191
- {
192
- "name": "realBalance",
193
- "type": "int256",
194
- "internalType": "int256"
195
- },
196
- {
197
- "name": "initialDelta",
198
- "type": "int256",
199
- "internalType": "int256"
200
- },
201
- {
202
- "name": "maintenanceDelta",
203
- "type": "int256",
204
- "internalType": "int256"
205
- },
206
- {
207
- "name": "liquidationDelta",
208
- "type": "int256",
209
- "internalType": "int256"
210
- },
211
- {
212
- "name": "dutchDelta",
213
- "type": "int256",
214
- "internalType": "int256"
215
- },
216
- {
217
- "name": "adlDelta",
218
- "type": "int256",
219
- "internalType": "int256"
220
- },
221
- {
222
- "name": "initialBufferDelta",
223
- "type": "int256",
224
- "internalType": "int256"
225
- },
226
- {
227
- "name": "liquidationMarginRequirement",
228
- "type": "uint256",
229
- "internalType": "uint256"
230
- }
231
- ]
232
- }
233
- ],
234
- "stateMutability": "nonpayable"
235
- },
236
- {
237
- "type": "error",
238
- "name": "AccountBelowIM",
239
- "inputs": [
240
- {
241
- "name": "accountId",
242
- "type": "uint128",
243
- "internalType": "uint128"
244
- },
245
- {
246
- "name": "delta",
247
- "type": "int256",
248
- "internalType": "int256"
249
- }
250
- ]
251
- },
252
- {
253
- "type": "error",
254
- "name": "AccountNotFound",
255
- "inputs": [
256
- {
257
- "name": "accountId",
258
- "type": "uint128",
259
- "internalType": "uint128"
260
- }
261
- ]
262
- },
263
- {
264
- "type": "error",
265
- "name": "AccountPermissionDenied",
266
- "inputs": [
267
- {
268
- "name": "accountId",
269
- "type": "uint128",
270
- "internalType": "uint128"
271
- },
272
- {
273
- "name": "target",
274
- "type": "address",
275
- "internalType": "address"
276
- }
277
- ]
278
- },
279
- {
280
- "type": "error",
281
- "name": "BackstopLpWithdrawPeriodInactive",
282
- "inputs": [
283
- {
284
- "name": "backstopLpAccountId",
285
- "type": "uint128",
286
- "internalType": "uint128"
287
- },
288
- {
289
- "name": "blockTimestamp",
290
- "type": "uint256",
291
- "internalType": "uint256"
292
- }
293
- ]
294
- },
295
- {
296
- "type": "error",
297
- "name": "CollateralCapExceeded",
298
- "inputs": [
299
- {
300
- "name": "collateralPoolId",
301
- "type": "uint128",
302
- "internalType": "uint128"
303
- },
304
- {
305
- "name": "collateral",
306
- "type": "address",
307
- "internalType": "address"
308
- },
309
- {
310
- "name": "collateralCap",
311
- "type": "uint256",
312
- "internalType": "uint256"
313
- },
314
- {
315
- "name": "poolBalance",
316
- "type": "uint256",
317
- "internalType": "uint256"
318
- }
319
- ]
320
- },
321
- {
322
- "type": "error",
323
- "name": "CollateralIsNotQuote",
324
- "inputs": [
325
- {
326
- "name": "collateralPoolId",
327
- "type": "uint128",
328
- "internalType": "uint128"
329
- },
330
- {
331
- "name": "collateral",
332
- "type": "address",
333
- "internalType": "address"
334
- }
335
- ]
336
- },
337
- {
338
- "type": "error",
339
- "name": "CollateralNotConfigured",
340
- "inputs": [
341
- {
342
- "name": "collateralPoolId",
343
- "type": "uint128",
344
- "internalType": "uint128"
345
- },
346
- {
347
- "name": "collateral",
348
- "type": "address",
349
- "internalType": "address"
350
- }
351
- ]
352
- },
353
- {
354
- "type": "error",
355
- "name": "CollateralPoolCollision",
356
- "inputs": [
357
- {
358
- "name": "collateralPoolId",
359
- "type": "uint128",
360
- "internalType": "uint128"
361
- },
362
- {
363
- "name": "counterpartyCollateralPoolId",
364
- "type": "uint128",
365
- "internalType": "uint128"
366
- }
367
- ]
368
- },
369
- {
370
- "type": "error",
371
- "name": "CollateralPoolNotFound",
372
- "inputs": [
373
- {
374
- "name": "id",
375
- "type": "uint128",
376
- "internalType": "uint128"
377
- }
378
- ]
379
- },
380
- {
381
- "type": "error",
382
- "name": "ExchangeNotFound",
383
- "inputs": [
384
- {
385
- "name": "exchangeId",
386
- "type": "uint128",
387
- "internalType": "uint128"
388
- }
389
- ]
390
- },
391
- {
392
- "type": "error",
393
- "name": "FailedTransfer",
394
- "inputs": [
395
- {
396
- "name": "from",
397
- "type": "address",
398
- "internalType": "address"
399
- },
400
- {
401
- "name": "to",
402
- "type": "address",
403
- "internalType": "address"
404
- },
405
- {
406
- "name": "value",
407
- "type": "uint256",
408
- "internalType": "uint256"
409
- }
410
- ]
411
- },
412
- {
413
- "type": "error",
414
- "name": "FeatureUnavailable",
415
- "inputs": [
416
- {
417
- "name": "which",
418
- "type": "bytes32",
419
- "internalType": "bytes32"
420
- }
421
- ]
422
- },
423
- {
424
- "type": "error",
425
- "name": "GlobalCollateralNotFound",
426
- "inputs": [
427
- {
428
- "name": "collateral",
429
- "type": "address",
430
- "internalType": "address"
431
- }
432
- ]
433
- },
434
- {
435
- "type": "error",
436
- "name": "GlobalWithdrawLimitReached",
437
- "inputs": [
438
- {
439
- "name": "collateral",
440
- "type": "address",
441
- "internalType": "address"
442
- }
443
- ]
444
- },
445
- {
446
- "type": "error",
447
- "name": "InsufficientAllowance",
448
- "inputs": [
449
- {
450
- "name": "required",
451
- "type": "uint256",
452
- "internalType": "uint256"
453
- },
454
- {
455
- "name": "existing",
456
- "type": "uint256",
457
- "internalType": "uint256"
458
- }
459
- ]
460
- },
461
- {
462
- "type": "error",
463
- "name": "InvalidAccountPermission",
464
- "inputs": [
465
- {
466
- "name": "permission",
467
- "type": "bytes32",
468
- "internalType": "bytes32"
469
- }
470
- ]
471
- },
472
- {
473
- "type": "error",
474
- "name": "InvalidCommandType",
475
- "inputs": [
476
- {
477
- "name": "commandType",
478
- "type": "uint8",
479
- "internalType": "enum CommandType"
480
- }
481
- ]
482
- },
483
- {
484
- "type": "error",
485
- "name": "InvalidFilledExposures",
486
- "inputs": [
487
- {
488
- "name": "filledExposures",
489
- "type": "tuple[]",
490
- "internalType": "struct FilledExposure[]",
491
- "components": [
492
- {
493
- "name": "riskMatrixIndex",
494
- "type": "uint256",
495
- "internalType": "uint256"
496
- },
497
- {
498
- "name": "exposure",
499
- "type": "int256",
500
- "internalType": "int256"
501
- }
502
- ]
503
- }
504
- ]
505
- },
506
- {
507
- "type": "error",
508
- "name": "InvalidMatchOrderFees",
509
- "inputs": [
510
- {
511
- "name": "matchOrderFees",
512
- "type": "tuple",
513
- "internalType": "struct MatchOrderFees",
514
- "components": [
515
- {
516
- "name": "protocolFeeCredit",
517
- "type": "uint256",
518
- "internalType": "uint256"
519
- },
520
- {
521
- "name": "exchangeFeeCredit",
522
- "type": "uint256",
523
- "internalType": "uint256"
524
- },
525
- {
526
- "name": "takerFeeDebit",
527
- "type": "uint256",
528
- "internalType": "uint256"
529
- },
530
- {
531
- "name": "makerPayments",
532
- "type": "int256[]",
533
- "internalType": "int256[]"
534
- }
535
- ]
536
- }
537
- ]
538
- },
539
- {
540
- "type": "error",
541
- "name": "MarketNotFound",
542
- "inputs": [
543
- {
544
- "name": "marketId",
545
- "type": "uint128",
546
- "internalType": "uint128"
547
- }
548
- ]
549
- },
550
- {
551
- "type": "error",
552
- "name": "NegativeAccountRealBalance",
553
- "inputs": [
554
- {
555
- "name": "accountId",
556
- "type": "uint128",
557
- "internalType": "uint128"
558
- },
559
- {
560
- "name": "realBalance",
561
- "type": "int256",
562
- "internalType": "int256"
563
- }
564
- ]
565
- },
566
- {
567
- "type": "error",
568
- "name": "NoCounterpartiesInMatchOrder",
569
- "inputs": [
570
- {
571
- "name": "command",
572
- "type": "tuple",
573
- "internalType": "struct Command",
574
- "components": [
575
- {
576
- "name": "commandType",
577
- "type": "uint8",
578
- "internalType": "enum CommandType"
579
- },
580
- {
581
- "name": "inputs",
582
- "type": "bytes",
583
- "internalType": "bytes"
584
- },
585
- {
586
- "name": "marketId",
587
- "type": "uint128",
588
- "internalType": "uint128"
589
- },
590
- {
591
- "name": "exchangeId",
592
- "type": "uint128",
593
- "internalType": "uint128"
594
- }
595
- ]
596
- }
597
- ]
598
- },
599
- {
600
- "type": "error",
601
- "name": "OverflowInt256ToUint256",
602
- "inputs": []
603
- },
604
- {
605
- "type": "error",
606
- "name": "OverflowUint256ToInt256",
607
- "inputs": []
608
- },
609
- {
610
- "type": "error",
611
- "name": "OverflowUint256ToUint128",
612
- "inputs": []
613
- },
614
- {
615
- "type": "error",
616
- "name": "PRBMath_MulDiv18_Overflow",
617
- "inputs": [
618
- {
619
- "name": "x",
620
- "type": "uint256",
621
- "internalType": "uint256"
622
- },
623
- {
624
- "name": "y",
625
- "type": "uint256",
626
- "internalType": "uint256"
627
- }
628
- ]
629
- },
630
- {
631
- "type": "error",
632
- "name": "PRBMath_MulDiv_Overflow",
633
- "inputs": [
634
- {
635
- "name": "x",
636
- "type": "uint256",
637
- "internalType": "uint256"
638
- },
639
- {
640
- "name": "y",
641
- "type": "uint256",
642
- "internalType": "uint256"
643
- },
644
- {
645
- "name": "denominator",
646
- "type": "uint256",
647
- "internalType": "uint256"
648
- }
649
- ]
650
- },
651
- {
652
- "type": "error",
653
- "name": "PRBMath_SD59x18_IntoUD60x18_Underflow",
654
- "inputs": [
655
- {
656
- "name": "x",
657
- "type": "int256",
658
- "internalType": "SD59x18"
659
- }
660
- ]
661
- },
662
- {
663
- "type": "error",
664
- "name": "PRBMath_SD59x18_Mul_InputTooSmall",
665
- "inputs": []
666
- },
667
- {
668
- "type": "error",
669
- "name": "PRBMath_SD59x18_Mul_Overflow",
670
- "inputs": [
671
- {
672
- "name": "x",
673
- "type": "int256",
674
- "internalType": "SD59x18"
675
- },
676
- {
677
- "name": "y",
678
- "type": "int256",
679
- "internalType": "SD59x18"
680
- }
681
- ]
682
- },
683
- {
684
- "type": "error",
685
- "name": "PRBMath_UD60x18_Sqrt_Overflow",
686
- "inputs": [
687
- {
688
- "name": "x",
689
- "type": "uint256",
690
- "internalType": "UD60x18"
691
- }
692
- ]
693
- },
694
- {
695
- "type": "error",
696
- "name": "SignatureExpired",
697
- "inputs": []
698
- },
699
- {
700
- "type": "error",
701
- "name": "SignatureInvalid",
702
- "inputs": []
703
- },
704
- {
705
- "type": "error",
706
- "name": "ValueAlreadyInSet",
707
- "inputs": []
708
- },
709
- {
710
- "type": "error",
711
- "name": "ZeroDeposit",
712
- "inputs": [
713
- {
714
- "name": "accountId",
715
- "type": "uint128",
716
- "internalType": "uint128"
717
- },
718
- {
719
- "name": "collateral",
720
- "type": "address",
721
- "internalType": "address"
722
- }
723
- ]
724
- },
725
- {
726
- "type": "error",
727
- "name": "ZeroWithdraw",
728
- "inputs": [
729
- {
730
- "name": "accountId",
731
- "type": "uint128",
732
- "internalType": "uint128"
733
- },
734
- {
735
- "name": "collateral",
736
- "type": "address",
737
- "internalType": "address"
738
- }
739
- ]
740
- },
741
- {
742
- "type": "error",
743
- "name": "collateralWithdrawLimitReached",
744
- "inputs": [
745
- {
746
- "name": "collateral",
747
- "type": "address",
748
- "internalType": "address"
749
- },
750
- {
751
- "name": "windowStartTimestamp",
752
- "type": "uint32",
753
- "internalType": "uint32"
754
- }
755
- ]
756
- }
757
- ]
758
- }