@omnipair/dusk-sdk 2.21.0-next.20261113 → 2.27.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 (100) hide show
  1. package/README.md +104 -18
  2. package/dist/constants.d.ts +11 -9
  3. package/dist/constants.d.ts.map +1 -1
  4. package/dist/constants.js +20 -18
  5. package/dist/constants.js.map +1 -1
  6. package/dist/delegate.d.ts +8 -5
  7. package/dist/delegate.d.ts.map +1 -1
  8. package/dist/delegate.js +11 -8
  9. package/dist/delegate.js.map +1 -1
  10. package/dist/dusk.d.ts.map +1 -1
  11. package/dist/dusk.js +1 -1
  12. package/dist/dusk.js.map +1 -1
  13. package/dist/get.d.ts +284 -167
  14. package/dist/get.d.ts.map +1 -1
  15. package/dist/get.js +32 -19
  16. package/dist/get.js.map +1 -1
  17. package/dist/hlp-liquidation-client.d.ts +30 -5
  18. package/dist/hlp-liquidation-client.d.ts.map +1 -1
  19. package/dist/hlp-liquidation-client.js +39 -8
  20. package/dist/hlp-liquidation-client.js.map +1 -1
  21. package/dist/idl_delegate.json +495 -307
  22. package/dist/idl_v2.json +489 -368
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +1 -0
  26. package/dist/index.js.map +1 -1
  27. package/dist/interest-accounting.d.ts +22 -4
  28. package/dist/interest-accounting.d.ts.map +1 -1
  29. package/dist/interest-accounting.js +48 -9
  30. package/dist/interest-accounting.js.map +1 -1
  31. package/dist/leverage-preview.d.ts +59 -29
  32. package/dist/leverage-preview.d.ts.map +1 -1
  33. package/dist/liquidation-client.d.ts +30 -6
  34. package/dist/liquidation-client.d.ts.map +1 -1
  35. package/dist/liquidation-client.js +14 -3
  36. package/dist/liquidation-client.js.map +1 -1
  37. package/dist/market-bootstrap.d.ts +30 -3
  38. package/dist/market-bootstrap.d.ts.map +1 -1
  39. package/dist/market-bootstrap.js +42 -3
  40. package/dist/market-bootstrap.js.map +1 -1
  41. package/dist/operator-client.js +3 -3
  42. package/dist/operator-client.js.map +1 -1
  43. package/dist/protection.d.ts +12 -1
  44. package/dist/protection.d.ts.map +1 -1
  45. package/dist/protection.js +20 -5
  46. package/dist/protection.js.map +1 -1
  47. package/dist/protocol-auctions.d.ts +34 -0
  48. package/dist/protocol-auctions.d.ts.map +1 -0
  49. package/dist/protocol-auctions.js +57 -0
  50. package/dist/protocol-auctions.js.map +1 -0
  51. package/dist/referral.d.ts +2 -0
  52. package/dist/referral.d.ts.map +1 -1
  53. package/dist/referral.js +3 -2
  54. package/dist/referral.js.map +1 -1
  55. package/dist/tranche-client.d.ts +11 -2
  56. package/dist/tranche-client.d.ts.map +1 -1
  57. package/dist/tranche-client.js +23 -4
  58. package/dist/tranche-client.js.map +1 -1
  59. package/dist/type-aliases.d.ts +6 -3
  60. package/dist/type-aliases.d.ts.map +1 -1
  61. package/dist/types_delegate.d.ts +495 -307
  62. package/dist/types_delegate.d.ts.map +1 -1
  63. package/dist/types_v2.d.ts +489 -368
  64. package/dist/types_v2.d.ts.map +1 -1
  65. package/dist/virtual-book/market.d.ts +58 -28
  66. package/dist/virtual-book/market.d.ts.map +1 -1
  67. package/dist/virtual-book/projection.d.ts.map +1 -1
  68. package/dist/virtual-book/projection.js +17 -2
  69. package/dist/virtual-book/projection.js.map +1 -1
  70. package/dist/virtual-book/quotes.d.ts +116 -56
  71. package/dist/virtual-book/quotes.d.ts.map +1 -1
  72. package/dist/virtual-book/quotes.js +3 -4
  73. package/dist/virtual-book/quotes.js.map +1 -1
  74. package/dist/write.d.ts +36 -2
  75. package/dist/write.d.ts.map +1 -1
  76. package/dist/write.js +164 -78
  77. package/dist/write.js.map +1 -1
  78. package/package.json +2 -2
  79. package/src/constants.ts +30 -18
  80. package/src/delegate.ts +14 -10
  81. package/src/dusk.ts +2 -1
  82. package/src/get.ts +52 -19
  83. package/src/hlp-liquidation-client.ts +59 -12
  84. package/src/idl_delegate.json +495 -307
  85. package/src/idl_v2.json +489 -368
  86. package/src/index.ts +2 -0
  87. package/src/interest-accounting.ts +62 -11
  88. package/src/liquidation-client.ts +30 -7
  89. package/src/market-bootstrap.ts +58 -3
  90. package/src/operator-client.ts +3 -3
  91. package/src/protection.ts +21 -5
  92. package/src/protocol-auctions.ts +68 -0
  93. package/src/referral.ts +6 -2
  94. package/src/tranche-client.ts +29 -4
  95. package/src/type-aliases.ts +6 -3
  96. package/src/types_delegate.ts +495 -307
  97. package/src/types_v2.ts +489 -368
  98. package/src/virtual-book/projection.ts +16 -2
  99. package/src/virtual-book/quotes.ts +3 -4
  100. package/src/write.ts +191 -90
@@ -1,5 +1,5 @@
1
1
  {
2
- "address": "A1aX1f3fx9x43FVYunRp25pu6HBczmYz1obEW9jZCf2B",
2
+ "address": "DeLegABhDLREbDpwwcsbkHvDS5MwqKPAw1CJKoooUXFQ",
3
3
  "metadata": {
4
4
  "name": "leverage_delegate",
5
5
  "version": "2.0.0",
@@ -181,8 +181,7 @@
181
181
  {
182
182
  "name": "collateral_mint",
183
183
  "docs": [
184
- "Collateral mint is needed to reproduce the exact net reserve credit for",
185
- "Token-2022 transfer-fee assets before approving a partial close."
184
+ "Used to verify the exact net reserve credit for Token-2022 collateral."
186
185
  ]
187
186
  },
188
187
  {
@@ -283,8 +282,7 @@
283
282
  {
284
283
  "name": "collateral_mint",
285
284
  "docs": [
286
- "Collateral mint is needed to reproduce the exact net reserve credit for",
287
- "Token-2022 transfer-fee assets before approving a partial close."
285
+ "Used to verify the exact net reserve credit for Token-2022 collateral."
288
286
  ]
289
287
  },
290
288
  {
@@ -631,6 +629,128 @@
631
629
  ],
632
630
  "args": []
633
631
  },
632
+ {
633
+ "name": "close_protection_order",
634
+ "docs": [
635
+ "Close a cancelled order whose LP custody is empty and whose yield",
636
+ "accounts have nothing left to claim. Rent returns to the sponsor."
637
+ ],
638
+ "discriminator": [
639
+ 37,
640
+ 228,
641
+ 136,
642
+ 164,
643
+ 116,
644
+ 239,
645
+ 241,
646
+ 17
647
+ ],
648
+ "accounts": [
649
+ {
650
+ "name": "order",
651
+ "writable": true,
652
+ "pda": {
653
+ "seeds": [
654
+ {
655
+ "kind": "const",
656
+ "value": [
657
+ 112,
658
+ 114,
659
+ 111,
660
+ 116,
661
+ 101,
662
+ 99,
663
+ 116,
664
+ 105,
665
+ 111,
666
+ 110,
667
+ 95,
668
+ 111,
669
+ 114,
670
+ 100,
671
+ 101,
672
+ 114
673
+ ]
674
+ },
675
+ {
676
+ "kind": "account",
677
+ "path": "owner"
678
+ },
679
+ {
680
+ "kind": "account",
681
+ "path": "order.order_id",
682
+ "account": "ProtectionOrder"
683
+ }
684
+ ]
685
+ }
686
+ },
687
+ {
688
+ "name": "custody_lp_account",
689
+ "docs": [
690
+ "Must be empty. Cancellation refunds the whole balance, so repeating it",
691
+ "returns a later LP transfer into custody."
692
+ ],
693
+ "writable": true
694
+ },
695
+ {
696
+ "name": "base_yield_account"
697
+ },
698
+ {
699
+ "name": "quote_yield_account"
700
+ },
701
+ {
702
+ "name": "base_mint",
703
+ "docs": [
704
+ "Writable so Token-2022 can harvest withheld transfer fees before close."
705
+ ],
706
+ "writable": true
707
+ },
708
+ {
709
+ "name": "quote_mint",
710
+ "writable": true
711
+ },
712
+ {
713
+ "name": "custody_base_account",
714
+ "docs": [
715
+ "Order-owned asset custody that execution used, usually the order's ATA."
716
+ ],
717
+ "writable": true,
718
+ "optional": true
719
+ },
720
+ {
721
+ "name": "custody_quote_account",
722
+ "writable": true,
723
+ "optional": true
724
+ },
725
+ {
726
+ "name": "owner_base_account",
727
+ "docs": [
728
+ "Required only when the matching custody account holds a balance."
729
+ ],
730
+ "writable": true,
731
+ "optional": true
732
+ },
733
+ {
734
+ "name": "owner_quote_account",
735
+ "writable": true,
736
+ "optional": true
737
+ },
738
+ {
739
+ "name": "owner",
740
+ "writable": true,
741
+ "signer": true
742
+ },
743
+ {
744
+ "name": "token_program",
745
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
746
+ },
747
+ {
748
+ "name": "token_2022_program",
749
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
750
+ }
751
+ ],
752
+ "args": []
753
+ },
634
754
  {
635
755
  "name": "create_hlp_order",
636
756
  "discriminator": [
@@ -745,45 +865,45 @@
745
865
  "program": {
746
866
  "kind": "const",
747
867
  "value": [
748
- 224,
749
- 71,
750
- 254,
751
- 44,
752
- 127,
753
- 224,
754
- 153,
755
- 12,
868
+ 191,
869
+ 215,
870
+ 212,
871
+ 33,
872
+ 74,
873
+ 68,
874
+ 126,
875
+ 168,
876
+ 251,
877
+ 64,
878
+ 60,
756
879
  251,
757
- 165,
758
- 18,
759
- 48,
760
- 149,
761
- 182,
762
- 13,
763
- 95,
764
- 16,
765
- 242,
766
- 38,
767
- 225,
768
- 170,
769
- 252,
770
- 122,
771
- 128,
772
- 120,
773
- 50,
774
- 26,
775
- 28,
776
- 104,
777
- 117,
880
+ 142,
881
+ 177,
882
+ 167,
883
+ 146,
884
+ 144,
885
+ 83,
886
+ 163,
887
+ 155,
888
+ 161,
889
+ 57,
890
+ 93,
891
+ 175,
892
+ 240,
893
+ 188,
894
+ 80,
895
+ 198,
896
+ 110,
897
+ 6,
778
898
  64,
779
- 179
899
+ 2
780
900
  ]
781
901
  }
782
902
  }
783
903
  },
784
904
  {
785
905
  "name": "dusk_program",
786
- "address": "G6VzihcGWCxt1nujxtKPB4oUYz36GPR2t5mLdXEH8yYN"
906
+ "address": "DuskWhswJYrzABDn8GqQD191X9RobRi5jhgGntXEdnKj"
787
907
  },
788
908
  {
789
909
  "name": "token_2022_program",
@@ -1109,45 +1229,45 @@
1109
1229
  "program": {
1110
1230
  "kind": "const",
1111
1231
  "value": [
1112
- 224,
1113
- 71,
1114
- 254,
1115
- 44,
1116
- 127,
1117
- 224,
1118
- 153,
1119
- 12,
1232
+ 191,
1233
+ 215,
1234
+ 212,
1235
+ 33,
1236
+ 74,
1237
+ 68,
1238
+ 126,
1239
+ 168,
1240
+ 251,
1241
+ 64,
1242
+ 60,
1120
1243
  251,
1121
- 165,
1122
- 18,
1123
- 48,
1124
- 149,
1125
- 182,
1126
- 13,
1127
- 95,
1128
- 16,
1129
- 242,
1130
- 38,
1131
- 225,
1132
- 170,
1133
- 252,
1134
- 122,
1135
- 128,
1136
- 120,
1137
- 50,
1138
- 26,
1139
- 28,
1140
- 104,
1141
- 117,
1244
+ 142,
1245
+ 177,
1246
+ 167,
1247
+ 146,
1248
+ 144,
1249
+ 83,
1250
+ 163,
1251
+ 155,
1252
+ 161,
1253
+ 57,
1254
+ 93,
1255
+ 175,
1256
+ 240,
1257
+ 188,
1258
+ 80,
1259
+ 198,
1260
+ 110,
1261
+ 6,
1142
1262
  64,
1143
- 179
1263
+ 2
1144
1264
  ]
1145
1265
  }
1146
1266
  }
1147
1267
  },
1148
1268
  {
1149
1269
  "name": "dusk_program",
1150
- "address": "G6VzihcGWCxt1nujxtKPB4oUYz36GPR2t5mLdXEH8yYN"
1270
+ "address": "DuskWhswJYrzABDn8GqQD191X9RobRi5jhgGntXEdnKj"
1151
1271
  },
1152
1272
  {
1153
1273
  "name": "token_2022_program",
@@ -1323,45 +1443,45 @@
1323
1443
  "program": {
1324
1444
  "kind": "const",
1325
1445
  "value": [
1326
- 224,
1327
- 71,
1328
- 254,
1329
- 44,
1330
- 127,
1331
- 224,
1332
- 153,
1333
- 12,
1446
+ 191,
1447
+ 215,
1448
+ 212,
1449
+ 33,
1450
+ 74,
1451
+ 68,
1452
+ 126,
1453
+ 168,
1334
1454
  251,
1335
- 165,
1336
- 18,
1337
- 48,
1338
- 149,
1339
- 182,
1340
- 13,
1341
- 95,
1342
- 16,
1343
- 242,
1344
- 38,
1345
- 225,
1346
- 170,
1347
- 252,
1348
- 122,
1349
- 128,
1350
- 120,
1351
- 50,
1352
- 26,
1353
- 28,
1354
- 104,
1355
- 117,
1356
1455
  64,
1357
- 179
1456
+ 60,
1457
+ 251,
1458
+ 142,
1459
+ 177,
1460
+ 167,
1461
+ 146,
1462
+ 144,
1463
+ 83,
1464
+ 163,
1465
+ 155,
1466
+ 161,
1467
+ 57,
1468
+ 93,
1469
+ 175,
1470
+ 240,
1471
+ 188,
1472
+ 80,
1473
+ 198,
1474
+ 110,
1475
+ 6,
1476
+ 64,
1477
+ 2
1358
1478
  ]
1359
1479
  }
1360
1480
  }
1361
1481
  },
1362
1482
  {
1363
1483
  "name": "dusk_program",
1364
- "address": "G6VzihcGWCxt1nujxtKPB4oUYz36GPR2t5mLdXEH8yYN"
1484
+ "address": "DuskWhswJYrzABDn8GqQD191X9RobRi5jhgGntXEdnKj"
1365
1485
  },
1366
1486
  {
1367
1487
  "name": "protocol_fee",
@@ -1544,45 +1664,45 @@
1544
1664
  "program": {
1545
1665
  "kind": "const",
1546
1666
  "value": [
1547
- 224,
1548
- 71,
1549
- 254,
1550
- 44,
1551
- 127,
1552
- 224,
1553
- 153,
1554
- 12,
1667
+ 191,
1668
+ 215,
1669
+ 212,
1670
+ 33,
1671
+ 74,
1672
+ 68,
1673
+ 126,
1674
+ 168,
1675
+ 251,
1676
+ 64,
1677
+ 60,
1555
1678
  251,
1556
- 165,
1557
- 18,
1558
- 48,
1559
- 149,
1560
- 182,
1561
- 13,
1562
- 95,
1563
- 16,
1564
- 242,
1565
- 38,
1566
- 225,
1567
- 170,
1568
- 252,
1569
- 122,
1570
- 128,
1571
- 120,
1572
- 50,
1573
- 26,
1574
- 28,
1575
- 104,
1576
- 117,
1679
+ 142,
1680
+ 177,
1681
+ 167,
1682
+ 146,
1683
+ 144,
1684
+ 83,
1685
+ 163,
1686
+ 155,
1687
+ 161,
1688
+ 57,
1689
+ 93,
1690
+ 175,
1691
+ 240,
1692
+ 188,
1693
+ 80,
1694
+ 198,
1695
+ 110,
1696
+ 6,
1577
1697
  64,
1578
- 179
1698
+ 2
1579
1699
  ]
1580
1700
  }
1581
1701
  }
1582
1702
  },
1583
1703
  {
1584
1704
  "name": "dusk_program",
1585
- "address": "G6VzihcGWCxt1nujxtKPB4oUYz36GPR2t5mLdXEH8yYN"
1705
+ "address": "DuskWhswJYrzABDn8GqQD191X9RobRi5jhgGntXEdnKj"
1586
1706
  },
1587
1707
  {
1588
1708
  "name": "protocol_fee",
@@ -1808,45 +1928,45 @@
1808
1928
  "program": {
1809
1929
  "kind": "const",
1810
1930
  "value": [
1811
- 224,
1812
- 71,
1813
- 254,
1814
- 44,
1815
- 127,
1816
- 224,
1817
- 153,
1818
- 12,
1931
+ 191,
1932
+ 215,
1933
+ 212,
1934
+ 33,
1935
+ 74,
1936
+ 68,
1937
+ 126,
1938
+ 168,
1939
+ 251,
1940
+ 64,
1941
+ 60,
1819
1942
  251,
1820
- 165,
1821
- 18,
1822
- 48,
1823
- 149,
1824
- 182,
1825
- 13,
1826
- 95,
1827
- 16,
1828
- 242,
1829
- 38,
1830
- 225,
1831
- 170,
1832
- 252,
1833
- 122,
1834
- 128,
1835
- 120,
1836
- 50,
1837
- 26,
1838
- 28,
1839
- 104,
1840
- 117,
1943
+ 142,
1944
+ 177,
1945
+ 167,
1946
+ 146,
1947
+ 144,
1948
+ 83,
1949
+ 163,
1950
+ 155,
1951
+ 161,
1952
+ 57,
1953
+ 93,
1954
+ 175,
1955
+ 240,
1956
+ 188,
1957
+ 80,
1958
+ 198,
1959
+ 110,
1960
+ 6,
1841
1961
  64,
1842
- 179
1962
+ 2
1843
1963
  ]
1844
1964
  }
1845
1965
  }
1846
1966
  },
1847
1967
  {
1848
1968
  "name": "dusk_program",
1849
- "address": "G6VzihcGWCxt1nujxtKPB4oUYz36GPR2t5mLdXEH8yYN"
1969
+ "address": "DuskWhswJYrzABDn8GqQD191X9RobRi5jhgGntXEdnKj"
1850
1970
  },
1851
1971
  {
1852
1972
  "name": "protocol_fee",
@@ -2085,38 +2205,38 @@
2085
2205
  "program": {
2086
2206
  "kind": "const",
2087
2207
  "value": [
2088
- 224,
2089
- 71,
2090
- 254,
2091
- 44,
2092
- 127,
2093
- 224,
2094
- 153,
2095
- 12,
2208
+ 191,
2209
+ 215,
2210
+ 212,
2211
+ 33,
2212
+ 74,
2213
+ 68,
2214
+ 126,
2215
+ 168,
2216
+ 251,
2217
+ 64,
2218
+ 60,
2096
2219
  251,
2097
- 165,
2098
- 18,
2099
- 48,
2100
- 149,
2101
- 182,
2102
- 13,
2103
- 95,
2104
- 16,
2105
- 242,
2106
- 38,
2107
- 225,
2108
- 170,
2109
- 252,
2110
- 122,
2111
- 128,
2112
- 120,
2113
- 50,
2114
- 26,
2115
- 28,
2116
- 104,
2117
- 117,
2220
+ 142,
2221
+ 177,
2222
+ 167,
2223
+ 146,
2224
+ 144,
2225
+ 83,
2226
+ 163,
2227
+ 155,
2228
+ 161,
2229
+ 57,
2230
+ 93,
2231
+ 175,
2232
+ 240,
2233
+ 188,
2234
+ 80,
2235
+ 198,
2236
+ 110,
2237
+ 6,
2118
2238
  64,
2119
- 179
2239
+ 2
2120
2240
  ]
2121
2241
  }
2122
2242
  }
@@ -2204,45 +2324,45 @@
2204
2324
  "program": {
2205
2325
  "kind": "const",
2206
2326
  "value": [
2207
- 224,
2208
- 71,
2209
- 254,
2210
- 44,
2211
- 127,
2212
- 224,
2213
- 153,
2214
- 12,
2327
+ 191,
2328
+ 215,
2329
+ 212,
2330
+ 33,
2331
+ 74,
2332
+ 68,
2333
+ 126,
2334
+ 168,
2215
2335
  251,
2216
- 165,
2217
- 18,
2218
- 48,
2219
- 149,
2220
- 182,
2221
- 13,
2222
- 95,
2223
- 16,
2224
- 242,
2225
- 38,
2226
- 225,
2227
- 170,
2228
- 252,
2229
- 122,
2230
- 128,
2231
- 120,
2232
- 50,
2233
- 26,
2234
- 28,
2235
- 104,
2236
- 117,
2237
2336
  64,
2238
- 179
2337
+ 60,
2338
+ 251,
2339
+ 142,
2340
+ 177,
2341
+ 167,
2342
+ 146,
2343
+ 144,
2344
+ 83,
2345
+ 163,
2346
+ 155,
2347
+ 161,
2348
+ 57,
2349
+ 93,
2350
+ 175,
2351
+ 240,
2352
+ 188,
2353
+ 80,
2354
+ 198,
2355
+ 110,
2356
+ 6,
2357
+ 64,
2358
+ 2
2239
2359
  ]
2240
2360
  }
2241
2361
  }
2242
2362
  },
2243
2363
  {
2244
2364
  "name": "dusk_program",
2245
- "address": "G6VzihcGWCxt1nujxtKPB4oUYz36GPR2t5mLdXEH8yYN"
2365
+ "address": "DuskWhswJYrzABDn8GqQD191X9RobRi5jhgGntXEdnKj"
2246
2366
  },
2247
2367
  {
2248
2368
  "name": "token_program",
@@ -2556,6 +2676,26 @@
2556
2676
  "code": 6005,
2557
2677
  "name": "InvalidMarketVersion",
2558
2678
  "msg": "Unsupported Dusk market version"
2679
+ },
2680
+ {
2681
+ "code": 6006,
2682
+ "name": "MinimumPayoutNotMet",
2683
+ "msg": "Net close payout is below the owner's minimum"
2684
+ },
2685
+ {
2686
+ "code": 6007,
2687
+ "name": "HlpCohortRetired",
2688
+ "msg": "The order's hLP cohort was retired; only cancellation remains"
2689
+ },
2690
+ {
2691
+ "code": 6008,
2692
+ "name": "MinimumMarginNotMet",
2693
+ "msg": "Opened margin is below the owner's minimum"
2694
+ },
2695
+ {
2696
+ "code": 6009,
2697
+ "name": "UnclaimedYield",
2698
+ "msg": "Harvest the order's earned yield before closing it"
2559
2699
  }
2560
2700
  ],
2561
2701
  "types": [
@@ -2730,6 +2870,19 @@
2730
2870
  }
2731
2871
  }
2732
2872
  },
2873
+ {
2874
+ "name": "hlp_funding_base_pricing_offset_nad",
2875
+ "docs": [
2876
+ "Pricing-only translations between the ordinary ownership books and",
2877
+ "trading coordinates. Funding payments settle cash and liabilities;",
2878
+ "these non-redeemable offsets keep them outside trading principal."
2879
+ ],
2880
+ "type": "i128"
2881
+ },
2882
+ {
2883
+ "name": "hlp_funding_quote_pricing_offset_nad",
2884
+ "type": "i128"
2885
+ },
2733
2886
  {
2734
2887
  "name": "center_price_nad",
2735
2888
  "type": "u64"
@@ -3026,7 +3179,10 @@
3026
3179
  "type": "u64"
3027
3180
  },
3028
3181
  {
3029
- "name": "full_output",
3182
+ "name": "reserved",
3183
+ "docs": [
3184
+ "Reserved to preserve the position account layout."
3185
+ ],
3030
3186
  "type": "u64"
3031
3187
  }
3032
3188
  ]
@@ -3269,7 +3425,10 @@
3269
3425
  "type": "u8"
3270
3426
  },
3271
3427
  {
3272
- "name": "trigger_closeout_price_nad",
3428
+ "name": "trigger_price_nad",
3429
+ "docs": [
3430
+ "Symmetric EMA threshold in whole debt tokens per collateral token, scaled by NAD."
3431
+ ],
3273
3432
  "type": "u64"
3274
3433
  },
3275
3434
  {
@@ -3279,6 +3438,13 @@
3279
3438
  "full close; smaller values realize one proportional slice."
3280
3439
  ],
3281
3440
  "type": "u16"
3441
+ },
3442
+ {
3443
+ "name": "min_owner_payout",
3444
+ "docs": [
3445
+ "Positive minimum owner credit in debt-token atoms after debt and all fees."
3446
+ ],
3447
+ "type": "u64"
3282
3448
  }
3283
3449
  ]
3284
3450
  }
@@ -3349,10 +3515,11 @@
3349
3515
  {
3350
3516
  "name": "borrowed_bucket",
3351
3517
  "docs": [
3352
- "Gross principal lent out through the public borrow path. Internal hLP",
3353
- "funding and isolated leverage do not consume this capacity. This is a",
3354
- "24-hour leaky/token bucket, not an exact trailing-window sum: it permits",
3355
- "a full burst after idle and then refills at the configured daily rate."
3518
+ "Principal lent out through the public borrow path, net of principal",
3519
+ "repaid through the public repay path. Internal hLP funding and isolated",
3520
+ "leverage do not consume this capacity. This is a 24-hour leaky/token",
3521
+ "bucket, not an exact trailing-window sum: it permits a full burst after",
3522
+ "idle and then refills at the configured daily rate."
3356
3523
  ],
3357
3524
  "type": "u64"
3358
3525
  },
@@ -3676,51 +3843,34 @@
3676
3843
  "type": "u64"
3677
3844
  },
3678
3845
  {
3679
- "name": "fee_auction_reference_market",
3680
- "docs": [
3681
- "Governance-approved reference market for fee-lane auctions. A default",
3682
- "key permits only the sold market itself when it directly pairs the sold",
3683
- "and accepted mints."
3684
- ],
3685
- "type": "pubkey"
3686
- },
3687
- {
3688
- "name": "buyback_auction_reference_market",
3689
- "docs": [
3690
- "Governance-approved reference market for buyback-lane auctions. A",
3691
- "default key has the same direct-market-only meaning as above."
3692
- ],
3693
- "type": "pubkey"
3694
- },
3695
- {
3696
- "name": "fee_swap_auction_epoch",
3846
+ "name": "fee_swap_auction",
3697
3847
  "type": {
3698
3848
  "defined": {
3699
- "name": "ProtocolAuctionEpoch"
3849
+ "name": "ProtocolAuctionState"
3700
3850
  }
3701
3851
  }
3702
3852
  },
3703
3853
  {
3704
- "name": "fee_interest_auction_epoch",
3854
+ "name": "fee_interest_auction",
3705
3855
  "type": {
3706
3856
  "defined": {
3707
- "name": "ProtocolAuctionEpoch"
3857
+ "name": "ProtocolAuctionState"
3708
3858
  }
3709
3859
  }
3710
3860
  },
3711
3861
  {
3712
- "name": "buyback_swap_auction_epoch",
3862
+ "name": "buyback_swap_auction",
3713
3863
  "type": {
3714
3864
  "defined": {
3715
- "name": "ProtocolAuctionEpoch"
3865
+ "name": "ProtocolAuctionState"
3716
3866
  }
3717
3867
  }
3718
3868
  },
3719
3869
  {
3720
- "name": "buyback_interest_auction_epoch",
3870
+ "name": "buyback_interest_auction",
3721
3871
  "type": {
3722
3872
  "defined": {
3723
- "name": "ProtocolAuctionEpoch"
3873
+ "name": "ProtocolAuctionState"
3724
3874
  }
3725
3875
  }
3726
3876
  }
@@ -4302,10 +4452,28 @@
4302
4452
  "name": "debt_asset",
4303
4453
  "type": "u8"
4304
4454
  },
4455
+ {
4456
+ "name": "deposit_credit",
4457
+ "docs": [
4458
+ "Measured vault credit of `deposit_amount`, which funds the margin and",
4459
+ "the executor's gross bounty. The protocol fee deposit is not included."
4460
+ ],
4461
+ "type": "u64"
4462
+ },
4305
4463
  {
4306
4464
  "name": "margin_amount",
4307
4465
  "docs": [
4308
- "Gross vault debit forwarded to Dusk as margin."
4466
+ "Gross vault debit forwarded to Dusk as margin at the creation epoch's",
4467
+ "transfer fee. Execution forwards less when a later fee increase raises",
4468
+ "the bounty's gross debit."
4469
+ ],
4470
+ "type": "u64"
4471
+ },
4472
+ {
4473
+ "name": "min_margin_amount",
4474
+ "docs": [
4475
+ "Minimum margin Dusk must record for the opened position, after every",
4476
+ "transfer fee."
4309
4477
  ],
4310
4478
  "type": "u64"
4311
4479
  },
@@ -4441,7 +4609,10 @@
4441
4609
  "type": "u8"
4442
4610
  },
4443
4611
  {
4444
- "name": "trigger_closeout_price_nad",
4612
+ "name": "trigger_price_nad",
4613
+ "docs": [
4614
+ "Symmetric EMA threshold in whole debt tokens per collateral token, scaled by NAD."
4615
+ ],
4445
4616
  "type": "u64"
4446
4617
  },
4447
4618
  {
@@ -4449,7 +4620,11 @@
4449
4620
  "type": "u16"
4450
4621
  },
4451
4622
  {
4452
- "name": "staged_margin",
4623
+ "name": "min_owner_payout",
4624
+ "docs": [
4625
+ "Minimum owner credit in debt-token atoms. Zero marks an order awaiting",
4626
+ "owner reauthorization. This occupies the former staged margin field."
4627
+ ],
4453
4628
  "type": "u64"
4454
4629
  },
4455
4630
  {
@@ -4578,12 +4753,16 @@
4578
4753
  {
4579
4754
  "name": "margin_amount",
4580
4755
  "docs": [
4581
- "Entry equity valued in debt-token atoms."
4756
+ "Entry equity valued in debt-token atoms, for the collateral still held.",
4757
+ "A partial close releases the sold share in proportion to collateral."
4582
4758
  ],
4583
4759
  "type": "u64"
4584
4760
  },
4585
4761
  {
4586
4762
  "name": "open_notional",
4763
+ "docs": [
4764
+ "Entry notional for the collateral still held, released like `margin_amount`."
4765
+ ],
4587
4766
  "type": "u64"
4588
4767
  },
4589
4768
  {
@@ -5361,6 +5540,12 @@
5361
5540
  },
5362
5541
  {
5363
5542
  "name": "OrderProtocolFeePaid",
5543
+ "docs": [
5544
+ "Protocol fee charged on one order execution. `value` is the execution",
5545
+ "value the fee is assessed on. `debit` is the gross amount spent, capped by",
5546
+ "the order's fee budget; `credited` is what the treasury received after any",
5547
+ "transfer fee, and `fee` equals `credited`."
5548
+ ],
5364
5549
  "type": {
5365
5550
  "kind": "struct",
5366
5551
  "fields": [
@@ -5536,6 +5721,10 @@
5536
5721
  "fields": [
5537
5722
  {
5538
5723
  "name": "accepted_mint",
5724
+ "docs": [
5725
+ "Default payment mint for newly configured curves. Each curve stores its",
5726
+ "own mint; changing this default never reinterprets existing reserves."
5727
+ ],
5539
5728
  "type": "pubkey"
5540
5729
  },
5541
5730
  {
@@ -5545,99 +5734,88 @@
5545
5734
  "name": "ProtocolAuctionRecipients"
5546
5735
  }
5547
5736
  }
5548
- },
5549
- {
5550
- "name": "params",
5551
- "type": {
5552
- "defined": {
5553
- "name": "ProtocolAuctionParams"
5554
- }
5555
- }
5556
5737
  }
5557
5738
  ]
5558
5739
  }
5559
5740
  },
5560
5741
  {
5561
- "name": "ProtocolAuctionEpoch",
5742
+ "name": "ProtocolAuctionRecipients",
5562
5743
  "type": {
5563
5744
  "kind": "struct",
5564
5745
  "fields": [
5565
5746
  {
5566
- "name": "start_slot",
5567
- "type": "u64"
5747
+ "name": "treasury",
5748
+ "type": "pubkey"
5568
5749
  },
5569
5750
  {
5570
- "name": "tracked_inventory",
5571
- "docs": [
5572
- "Liability remaining immediately after the preceding fill. A larger",
5573
- "current liability proves that new inventory arrived and starts a new",
5574
- "epoch instead of inheriting an old floor price."
5575
- ],
5576
- "type": "u64"
5751
+ "name": "staking_vault",
5752
+ "type": "pubkey"
5753
+ },
5754
+ {
5755
+ "name": "treasury_bps",
5756
+ "type": "u16"
5757
+ },
5758
+ {
5759
+ "name": "staking_vault_bps",
5760
+ "type": "u16"
5577
5761
  }
5578
5762
  ]
5579
5763
  }
5580
5764
  },
5581
5765
  {
5582
- "name": "ProtocolAuctionParams",
5766
+ "name": "ProtocolAuctionSplit",
5583
5767
  "type": {
5584
5768
  "kind": "struct",
5585
5769
  "fields": [
5586
5770
  {
5587
- "name": "start_multiplier_bps",
5771
+ "name": "fee_auction_bps",
5588
5772
  "type": "u16"
5589
5773
  },
5590
5774
  {
5591
- "name": "floor_multiplier_bps",
5775
+ "name": "buyback_auction_bps",
5592
5776
  "type": "u16"
5593
- },
5594
- {
5595
- "name": "duration_slots",
5596
- "type": "u64"
5597
- },
5598
- {
5599
- "name": "max_reference_age_slots",
5600
- "type": "u64"
5601
5777
  }
5602
5778
  ]
5603
5779
  }
5604
5780
  },
5605
5781
  {
5606
- "name": "ProtocolAuctionRecipients",
5782
+ "name": "ProtocolAuctionState",
5607
5783
  "type": {
5608
5784
  "kind": "struct",
5609
5785
  "fields": [
5610
5786
  {
5611
- "name": "treasury",
5787
+ "name": "accepted_mint",
5788
+ "docs": [
5789
+ "A configured curve binds raw payment reserves to this specific mint."
5790
+ ],
5612
5791
  "type": "pubkey"
5613
5792
  },
5614
5793
  {
5615
- "name": "staking_vault",
5616
- "type": "pubkey"
5794
+ "name": "virtual_sold_reserve",
5795
+ "type": "u128"
5617
5796
  },
5618
5797
  {
5619
- "name": "treasury_bps",
5620
- "type": "u16"
5798
+ "name": "virtual_payment_reserve",
5799
+ "type": "u128"
5621
5800
  },
5622
5801
  {
5623
- "name": "staking_vault_bps",
5624
- "type": "u16"
5625
- }
5626
- ]
5627
- }
5628
- },
5629
- {
5630
- "name": "ProtocolAuctionSplit",
5631
- "type": {
5632
- "kind": "struct",
5633
- "fields": [
5802
+ "name": "sold_rate_per_day",
5803
+ "type": "u64"
5804
+ },
5634
5805
  {
5635
- "name": "fee_auction_bps",
5636
- "type": "u16"
5806
+ "name": "last_update_slot",
5807
+ "docs": [
5808
+ "Initialized by governance, then advanced only by successful settlements.",
5809
+ "Fee arrivals and exhaustion of actual inventory never restart this clock."
5810
+ ],
5811
+ "type": "u64"
5637
5812
  },
5638
5813
  {
5639
- "name": "buyback_auction_bps",
5640
- "type": "u16"
5814
+ "name": "stream_remainder",
5815
+ "docs": [
5816
+ "Fractional streamed atoms, with a denominator of nominal slots per day."
5817
+ ],
5818
+ "type": "u64"
5641
5819
  }
5642
5820
  ]
5643
5821
  }
@@ -6155,12 +6333,22 @@
6155
6333
  "type": "u8"
6156
6334
  },
6157
6335
  {
6158
- "name": "trigger_closeout_price_nad",
6336
+ "name": "trigger_price_nad",
6337
+ "docs": [
6338
+ "Symmetric EMA threshold in whole debt tokens per collateral token, scaled by NAD."
6339
+ ],
6159
6340
  "type": "u64"
6160
6341
  },
6161
6342
  {
6162
6343
  "name": "close_bps",
6163
6344
  "type": "u16"
6345
+ },
6346
+ {
6347
+ "name": "min_owner_payout",
6348
+ "docs": [
6349
+ "Positive minimum owner credit in debt-token atoms after debt and all fees."
6350
+ ],
6351
+ "type": "u64"
6164
6352
  }
6165
6353
  ]
6166
6354
  }