torchsdk 10.2.0 → 10.2.2

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.
@@ -2,17 +2,13 @@
2
2
  "address": "8hbUkonssSEEtkqzwM7ZcZrD9evacM92TcWSooVF4BeT",
3
3
  "metadata": {
4
4
  "name": "torch_market",
5
- "version": "10.2.0",
5
+ "version": "10.2.2",
6
6
  "spec": "0.1.0",
7
7
  "description": "torch.market"
8
8
  },
9
9
  "instructions": [
10
10
  {
11
11
  "name": "advance_protocol_epoch",
12
- "docs": [
13
- "[V11] Advance the protocol treasury epoch.",
14
- "Permissionless crank - calculates distributable amount above reserve floor."
15
- ],
16
12
  "discriminator": [
17
13
  215,
18
14
  39,
@@ -68,10 +64,6 @@
68
64
  },
69
65
  {
70
66
  "name": "borrow",
71
- "docs": [
72
- "[V2.4] Borrow SOL from treasury using tokens as collateral.",
73
- "Lock tokens in collateral vault, receive SOL up to 50% of collateral value."
74
- ],
75
67
  "discriminator": [
76
68
  228,
77
69
  253,
@@ -147,9 +139,6 @@
147
139
  },
148
140
  {
149
141
  "name": "collateral_vault",
150
- "docs": [
151
- "Collateral vault - holds locked tokens. Created on first borrow for this token."
152
- ],
153
142
  "writable": true,
154
143
  "pda": {
155
144
  "seeds": [
@@ -183,9 +172,6 @@
183
172
  },
184
173
  {
185
174
  "name": "borrower_token_account",
186
- "docs": [
187
- "Borrower's token account (source of collateral)"
188
- ],
189
175
  "writable": true,
190
176
  "pda": {
191
177
  "seeds": [
@@ -243,9 +229,6 @@
243
229
  },
244
230
  {
245
231
  "name": "loan_position",
246
- "docs": [
247
- "Loan position PDA - created on first borrow"
248
- ],
249
232
  "writable": true,
250
233
  "pda": {
251
234
  "seeds": [
@@ -270,36 +253,21 @@
270
253
  }
271
254
  },
272
255
  {
273
- "name": "pool_state",
274
- "docs": [
275
- "[V27] Raydium pool state — constrained via PDA derivation"
276
- ]
256
+ "name": "pool_state"
277
257
  },
278
258
  {
279
- "name": "token_vault_0",
280
- "docs": [
281
- "[V27] Pool token vault 0 — constrained via PDA derivation"
282
- ]
259
+ "name": "token_vault_0"
283
260
  },
284
261
  {
285
- "name": "token_vault_1",
286
- "docs": [
287
- "[V27] Pool token vault 1 — constrained via PDA derivation"
288
- ]
262
+ "name": "token_vault_1"
289
263
  },
290
264
  {
291
265
  "name": "torch_vault",
292
- "docs": [
293
- "[V18] Optional: Torch vault — collateral comes from vault ATA, SOL goes to vault"
294
- ],
295
266
  "writable": true,
296
267
  "optional": true
297
268
  },
298
269
  {
299
270
  "name": "vault_wallet_link",
300
- "docs": [
301
- "[V18] Optional: Proves borrower is authorized to use the vault"
302
- ],
303
271
  "optional": true,
304
272
  "pda": {
305
273
  "seeds": [
@@ -329,9 +297,6 @@
329
297
  },
330
298
  {
331
299
  "name": "vault_token_account",
332
- "docs": [
333
- "[V18] Optional: Vault's token ATA — collateral taken from here"
334
- ],
335
300
  "writable": true,
336
301
  "optional": true,
337
302
  "pda": {
@@ -409,9 +374,6 @@
409
374
  },
410
375
  {
411
376
  "name": "buy",
412
- "docs": [
413
- "Buy tokens from the bonding curve."
414
- ],
415
377
  "discriminator": [
416
378
  102,
417
379
  6,
@@ -550,9 +512,6 @@
550
512
  },
551
513
  {
552
514
  "name": "token_treasury",
553
- "docs": [
554
- "Per-token treasury for buybacks [V2]"
555
- ],
556
515
  "writable": true,
557
516
  "pda": {
558
517
  "seeds": [
@@ -578,9 +537,6 @@
578
537
  },
579
538
  {
580
539
  "name": "treasury_token_account",
581
- "docs": [
582
- "[V13] Treasury's token account - holds vote vault tokens during bonding"
583
- ],
584
540
  "writable": true,
585
541
  "pda": {
586
542
  "seeds": [
@@ -729,10 +685,6 @@
729
685
  },
730
686
  {
731
687
  "name": "user_stats",
732
- "docs": [
733
- "[V4] Optional: User stats for volume tracking (platform rewards)",
734
- "If platform_treasury is not initialized, these can be omitted"
735
- ],
736
688
  "writable": true,
737
689
  "optional": true,
738
690
  "pda": {
@@ -761,9 +713,6 @@
761
713
  },
762
714
  {
763
715
  "name": "protocol_treasury",
764
- "docs": [
765
- "[V13] Protocol treasury receives protocol fees (0.75% after dev split)"
766
- ],
767
716
  "writable": true,
768
717
  "pda": {
769
718
  "seeds": [
@@ -798,25 +747,15 @@
798
747
  },
799
748
  {
800
749
  "name": "creator",
801
- "docs": [
802
- "[V34] Creator wallet — receives SOL share during bonding (0.2%→1%)"
803
- ],
804
750
  "writable": true
805
751
  },
806
752
  {
807
753
  "name": "torch_vault",
808
- "docs": [
809
- "[V14.1] Optional: Torch vault as SOL source (agent safety)",
810
- "Passed explicitly — validated via vault_wallet_link constraint"
811
- ],
812
754
  "writable": true,
813
755
  "optional": true
814
756
  },
815
757
  {
816
758
  "name": "vault_wallet_link",
817
- "docs": [
818
- "[V14.1] Optional: Proves buyer is authorized to use the vault"
819
- ],
820
759
  "optional": true,
821
760
  "pda": {
822
761
  "seeds": [
@@ -846,10 +785,6 @@
846
785
  },
847
786
  {
848
787
  "name": "vault_token_account",
849
- "docs": [
850
- "[V18] Optional: Vault's token ATA — tokens go here instead of buyer's wallet",
851
- "When present, torch_vault must also be present."
852
- ],
853
788
  "writable": true,
854
789
  "optional": true,
855
790
  "pda": {
@@ -931,10 +866,6 @@
931
866
  },
932
867
  {
933
868
  "name": "claim_protocol_rewards",
934
- "docs": [
935
- "[V11] Claim protocol rewards.",
936
- "Users with >= 10 SOL volume in previous epoch can claim proportional share."
937
- ],
938
869
  "discriminator": [
939
870
  2,
940
871
  233,
@@ -1018,17 +949,11 @@
1018
949
  },
1019
950
  {
1020
951
  "name": "torch_vault",
1021
- "docs": [
1022
- "[V20] Optional: Torch vault — receives claimed SOL"
1023
- ],
1024
952
  "writable": true,
1025
953
  "optional": true
1026
954
  },
1027
955
  {
1028
956
  "name": "vault_wallet_link",
1029
- "docs": [
1030
- "[V20] Optional: Proves user is authorized to use the vault"
1031
- ],
1032
957
  "optional": true,
1033
958
  "pda": {
1034
959
  "seeds": [
@@ -1061,10 +986,6 @@
1061
986
  },
1062
987
  {
1063
988
  "name": "close_short",
1064
- "docs": [
1065
- "[V5] Close or partially repay a short position.",
1066
- "Return tokens, receive SOL collateral back."
1067
- ],
1068
989
  "discriminator": [
1069
990
  159,
1070
991
  16,
@@ -1140,9 +1061,6 @@
1140
1061
  },
1141
1062
  {
1142
1063
  "name": "treasury_lock",
1143
- "docs": [
1144
- "Treasury lock PDA (owns the locked token ATA)"
1145
- ],
1146
1064
  "pda": {
1147
1065
  "seeds": [
1148
1066
  {
@@ -1172,9 +1090,6 @@
1172
1090
  },
1173
1091
  {
1174
1092
  "name": "treasury_lock_token_account",
1175
- "docs": [
1176
- "Treasury lock's token account (receives returned tokens)"
1177
- ],
1178
1093
  "writable": true,
1179
1094
  "pda": {
1180
1095
  "seeds": [
@@ -1287,9 +1202,6 @@
1287
1202
  },
1288
1203
  {
1289
1204
  "name": "shorter_token_account",
1290
- "docs": [
1291
- "Shorter's token account (source of returned tokens)"
1292
- ],
1293
1205
  "writable": true,
1294
1206
  "pda": {
1295
1207
  "seeds": [
@@ -1376,10 +1288,6 @@
1376
1288
  },
1377
1289
  {
1378
1290
  "name": "contribute_revival",
1379
- "docs": [
1380
- "[V12] Contribute SOL to revive a reclaimed token.",
1381
- "When contributions reach 30 SOL, the token is automatically revived."
1382
- ],
1383
1291
  "discriminator": [
1384
1292
  105,
1385
1293
  16,
@@ -1397,16 +1305,10 @@
1397
1305
  "signer": true
1398
1306
  },
1399
1307
  {
1400
- "name": "mint",
1401
- "docs": [
1402
- "The mint of the reclaimed token"
1403
- ]
1308
+ "name": "mint"
1404
1309
  },
1405
1310
  {
1406
1311
  "name": "bonding_curve",
1407
- "docs": [
1408
- "Bonding curve - must be reclaimed to accept revival contributions"
1409
- ],
1410
1312
  "writable": true,
1411
1313
  "pda": {
1412
1314
  "seeds": [
@@ -1449,9 +1351,6 @@
1449
1351
  },
1450
1352
  {
1451
1353
  "name": "create_token",
1452
- "docs": [
1453
- "[V3] Create a new Token-2022 token with transfer fee extension."
1454
- ],
1455
1354
  "discriminator": [
1456
1355
  84,
1457
1356
  52,
@@ -1559,18 +1458,10 @@
1559
1458
  },
1560
1459
  {
1561
1460
  "name": "treasury_token_account",
1562
- "docs": [
1563
- "then buyback tokens post-migration. Created via CPI."
1564
- ],
1565
1461
  "writable": true
1566
1462
  },
1567
1463
  {
1568
1464
  "name": "treasury_lock",
1569
- "docs": [
1570
- "[V27] Treasury lock PDA — owns the locked token ATA (250M).",
1571
- "Initialized at token creation. Also serves as type discriminator",
1572
- "for V27 vs legacy tokens in revival handler."
1573
- ],
1574
1465
  "writable": true,
1575
1466
  "pda": {
1576
1467
  "seeds": [
@@ -1601,12 +1492,6 @@
1601
1492
  },
1602
1493
  {
1603
1494
  "name": "treasury_lock_token_account",
1604
- "docs": [
1605
- "Created via CPI to associated token program (same pattern as token_vault",
1606
- "and treasury_token_account above). Address validated by CPI: the associated",
1607
- "token program derives the correct ATA from (treasury_lock PDA, mint, Token-2022)",
1608
- "and rejects mismatched addresses. mint_to CPI further validates mint authority."
1609
- ],
1610
1495
  "writable": true
1611
1496
  },
1612
1497
  {
@@ -1638,11 +1523,6 @@
1638
1523
  },
1639
1524
  {
1640
1525
  "name": "create_vault",
1641
- "docs": [
1642
- "[V14] Create a per-user SOL vault for safe agent interaction.",
1643
- "The vault PDA enforces spending caps at the protocol level.",
1644
- "[V14.1] Also creates a VaultWalletLink for the creator."
1645
- ],
1646
1526
  "discriminator": [
1647
1527
  29,
1648
1528
  237,
@@ -1689,9 +1569,6 @@
1689
1569
  },
1690
1570
  {
1691
1571
  "name": "wallet_link",
1692
- "docs": [
1693
- "Auto-created wallet link for the creator"
1694
- ],
1695
1572
  "writable": true,
1696
1573
  "pda": {
1697
1574
  "seeds": [
@@ -1728,9 +1605,6 @@
1728
1605
  },
1729
1606
  {
1730
1607
  "name": "deposit_vault",
1731
- "docs": [
1732
- "[V14] Deposit SOL into a vault. Anyone can deposit (multi-wallet)."
1733
- ],
1734
1608
  "discriminator": [
1735
1609
  126,
1736
1610
  224,
@@ -1790,10 +1664,6 @@
1790
1664
  },
1791
1665
  {
1792
1666
  "name": "enable_short_selling",
1793
- "docs": [
1794
- "[V5] Enable short selling for a specific token. Admin only.",
1795
- "Creates ShortConfig PDA and sets Treasury sentinel flags."
1796
- ],
1797
1667
  "discriminator": [
1798
1668
  222,
1799
1669
  128,
@@ -1930,11 +1800,6 @@
1930
1800
  },
1931
1801
  {
1932
1802
  "name": "fund_migration_wsol",
1933
- "docs": [
1934
- "[V26] Fund bonding curve's WSOL ATA with bonding curve SOL.",
1935
- "Must be called BEFORE migrate_to_dex in the same transaction.",
1936
- "Isolates direct lamport manipulation from CPIs to avoid runtime balance errors."
1937
- ],
1938
1803
  "discriminator": [
1939
1804
  143,
1940
1805
  163,
@@ -1948,22 +1813,13 @@
1948
1813
  "accounts": [
1949
1814
  {
1950
1815
  "name": "payer",
1951
- "docs": [
1952
- "Anyone can trigger (permissionless)"
1953
- ],
1954
1816
  "signer": true
1955
1817
  },
1956
1818
  {
1957
- "name": "mint",
1958
- "docs": [
1959
- "Token mint being migrated"
1960
- ]
1819
+ "name": "mint"
1961
1820
  },
1962
1821
  {
1963
1822
  "name": "bonding_curve",
1964
- "docs": [
1965
- "Bonding curve — SOL source"
1966
- ],
1967
1823
  "writable": true,
1968
1824
  "pda": {
1969
1825
  "seeds": [
@@ -1994,9 +1850,6 @@
1994
1850
  },
1995
1851
  {
1996
1852
  "name": "bc_wsol",
1997
- "docs": [
1998
- "Bonding curve's WSOL ATA (lamport destination — protocol controlled)"
1999
- ],
2000
1853
  "writable": true
2001
1854
  }
2002
1855
  ],
@@ -2004,11 +1857,6 @@
2004
1857
  },
2005
1858
  {
2006
1859
  "name": "fund_vault_wsol",
2007
- "docs": [
2008
- "[V19] Fund vault WSOL ATA with lamports from vault PDA.",
2009
- "Must be called before vault_swap (buy) in the same transaction.",
2010
- "Isolates direct lamport manipulation from CPIs to avoid runtime balance errors."
2011
- ],
2012
1860
  "discriminator": [
2013
1861
  100,
2014
1862
  184,
@@ -2022,16 +1870,10 @@
2022
1870
  "accounts": [
2023
1871
  {
2024
1872
  "name": "signer",
2025
- "docs": [
2026
- "Controller wallet (linked to vault)"
2027
- ],
2028
1873
  "signer": true
2029
1874
  },
2030
1875
  {
2031
1876
  "name": "torch_vault",
2032
- "docs": [
2033
- "Vault PDA (SOL source)"
2034
- ],
2035
1877
  "writable": true,
2036
1878
  "pda": {
2037
1879
  "seeds": [
@@ -2061,9 +1903,6 @@
2061
1903
  },
2062
1904
  {
2063
1905
  "name": "vault_wallet_link",
2064
- "docs": [
2065
- "Vault wallet link (proves signer is authorized)"
2066
- ],
2067
1906
  "pda": {
2068
1907
  "seeds": [
2069
1908
  {
@@ -2092,9 +1931,6 @@
2092
1931
  },
2093
1932
  {
2094
1933
  "name": "vault_wsol_account",
2095
- "docs": [
2096
- "Vault's WSOL ATA (lamport destination)"
2097
- ],
2098
1934
  "writable": true
2099
1935
  }
2100
1936
  ],
@@ -2107,9 +1943,6 @@
2107
1943
  },
2108
1944
  {
2109
1945
  "name": "harvest_fees",
2110
- "docs": [
2111
- "[V3] Harvest accumulated transfer fees."
2112
- ],
2113
1946
  "discriminator": [
2114
1947
  90,
2115
1948
  149,
@@ -2123,9 +1956,6 @@
2123
1956
  "accounts": [
2124
1957
  {
2125
1958
  "name": "payer",
2126
- "docs": [
2127
- "Anyone can harvest fees (permissionless)"
2128
- ],
2129
1959
  "writable": true,
2130
1960
  "signer": true
2131
1961
  },
@@ -2164,9 +1994,6 @@
2164
1994
  },
2165
1995
  {
2166
1996
  "name": "token_treasury",
2167
- "docs": [
2168
- "Token treasury PDA (withdraw authority for fees)"
2169
- ],
2170
1997
  "writable": true,
2171
1998
  "pda": {
2172
1999
  "seeds": [
@@ -2192,9 +2019,6 @@
2192
2019
  },
2193
2020
  {
2194
2021
  "name": "treasury_token_account",
2195
- "docs": [
2196
- "Treasury's Token-2022 ATA — must match treasury PDA's ATA for this mint"
2197
- ],
2198
2022
  "writable": true,
2199
2023
  "pda": {
2200
2024
  "seeds": [
@@ -2262,9 +2086,6 @@
2262
2086
  },
2263
2087
  {
2264
2088
  "name": "initialize",
2265
- "docs": [
2266
- "Initialize the torch.market protocol."
2267
- ],
2268
2089
  "discriminator": [
2269
2090
  175,
2270
2091
  175,
@@ -2322,10 +2143,6 @@
2322
2143
  },
2323
2144
  {
2324
2145
  "name": "initialize_protocol_treasury",
2325
- "docs": [
2326
- "[V11] Initialize the protocol treasury PDA.",
2327
- "Protocol fees (0.5%) accumulate here with 1500 SOL reserve floor."
2328
- ],
2329
2146
  "discriminator": [
2330
2147
  125,
2331
2148
  148,
@@ -2413,9 +2230,6 @@
2413
2230
  },
2414
2231
  {
2415
2232
  "name": "link_wallet",
2416
- "docs": [
2417
- "[V14.1] Link a new wallet to a vault. Authority only."
2418
- ],
2419
2233
  "discriminator": [
2420
2234
  86,
2421
2235
  92,
@@ -2505,10 +2319,6 @@
2505
2319
  },
2506
2320
  {
2507
2321
  "name": "liquidate",
2508
- "docs": [
2509
- "[V2.4] Liquidate an underwater loan position.",
2510
- "Permissionless - anyone can call when LTV exceeds liquidation threshold."
2511
- ],
2512
2322
  "discriminator": [
2513
2323
  223,
2514
2324
  179,
@@ -2522,9 +2332,6 @@
2522
2332
  "accounts": [
2523
2333
  {
2524
2334
  "name": "liquidator",
2525
- "docs": [
2526
- "Liquidator pays SOL to treasury, receives collateral tokens"
2527
- ],
2528
2335
  "writable": true,
2529
2336
  "signer": true
2530
2337
  },
@@ -2591,9 +2398,6 @@
2591
2398
  },
2592
2399
  {
2593
2400
  "name": "collateral_vault",
2594
- "docs": [
2595
- "Collateral vault - source of seized collateral"
2596
- ],
2597
2401
  "writable": true,
2598
2402
  "pda": {
2599
2403
  "seeds": [
@@ -2627,9 +2431,6 @@
2627
2431
  },
2628
2432
  {
2629
2433
  "name": "liquidator_token_account",
2630
- "docs": [
2631
- "Liquidator's token account (receives seized collateral + bonus)"
2632
- ],
2633
2434
  "writable": true,
2634
2435
  "pda": {
2635
2436
  "seeds": [
@@ -2687,9 +2488,6 @@
2687
2488
  },
2688
2489
  {
2689
2490
  "name": "loan_position",
2690
- "docs": [
2691
- "Loan position being liquidated"
2692
- ],
2693
2491
  "writable": true,
2694
2492
  "pda": {
2695
2493
  "seeds": [
@@ -2714,22 +2512,13 @@
2714
2512
  }
2715
2513
  },
2716
2514
  {
2717
- "name": "pool_state",
2718
- "docs": [
2719
- "[V27] Raydium pool state — constrained via PDA derivation"
2720
- ]
2515
+ "name": "pool_state"
2721
2516
  },
2722
2517
  {
2723
- "name": "token_vault_0",
2724
- "docs": [
2725
- "[V27] Pool token vault 0 — constrained via PDA derivation"
2726
- ]
2518
+ "name": "token_vault_0"
2727
2519
  },
2728
2520
  {
2729
- "name": "token_vault_1",
2730
- "docs": [
2731
- "[V27] Pool token vault 1 — constrained via PDA derivation"
2732
- ]
2521
+ "name": "token_vault_1"
2733
2522
  },
2734
2523
  {
2735
2524
  "name": "token_program"
@@ -2744,17 +2533,11 @@
2744
2533
  },
2745
2534
  {
2746
2535
  "name": "torch_vault",
2747
- "docs": [
2748
- "[V20] Optional: Torch vault — SOL paid from vault, collateral received to vault ATA"
2749
- ],
2750
2536
  "writable": true,
2751
2537
  "optional": true
2752
2538
  },
2753
2539
  {
2754
2540
  "name": "vault_wallet_link",
2755
- "docs": [
2756
- "[V20] Optional: Proves liquidator is authorized to use the vault"
2757
- ],
2758
2541
  "optional": true,
2759
2542
  "pda": {
2760
2543
  "seeds": [
@@ -2784,9 +2567,6 @@
2784
2567
  },
2785
2568
  {
2786
2569
  "name": "vault_token_account",
2787
- "docs": [
2788
- "[V20] Optional: Vault's token ATA — receives seized collateral + bonus"
2789
- ],
2790
2570
  "writable": true,
2791
2571
  "optional": true,
2792
2572
  "pda": {
@@ -2848,10 +2628,6 @@
2848
2628
  },
2849
2629
  {
2850
2630
  "name": "liquidate_short",
2851
- "docs": [
2852
- "[V5] Liquidate an underwater short position. Permissionless.",
2853
- "When token price rises and LTV exceeds 65%, anyone can call this."
2854
- ],
2855
2631
  "discriminator": [
2856
2632
  197,
2857
2633
  62,
@@ -2931,9 +2707,6 @@
2931
2707
  },
2932
2708
  {
2933
2709
  "name": "treasury_lock",
2934
- "docs": [
2935
- "Treasury lock PDA (owns the locked token ATA)"
2936
- ],
2937
2710
  "pda": {
2938
2711
  "seeds": [
2939
2712
  {
@@ -2963,9 +2736,6 @@
2963
2736
  },
2964
2737
  {
2965
2738
  "name": "treasury_lock_token_account",
2966
- "docs": [
2967
- "Treasury lock's token account (receives liquidator's tokens to cover debt)"
2968
- ],
2969
2739
  "writable": true,
2970
2740
  "pda": {
2971
2741
  "seeds": [
@@ -3078,9 +2848,6 @@
3078
2848
  },
3079
2849
  {
3080
2850
  "name": "liquidator_token_account",
3081
- "docs": [
3082
- "Liquidator's token account (source of tokens to cover debt)"
3083
- ],
3084
2851
  "writable": true,
3085
2852
  "pda": {
3086
2853
  "seeds": [
@@ -3171,12 +2938,6 @@
3171
2938
  },
3172
2939
  {
3173
2940
  "name": "migrate_to_dex",
3174
- "docs": [
3175
- "[V26] Migrate bonded token to Raydium CPMM DEX.",
3176
- "Permissionless — anyone can call once bonding completes.",
3177
- "bc_wsol must be pre-funded via fund_migration_wsol.",
3178
- "Creates a Raydium pool with locked liquidity (LP tokens burned)."
3179
- ],
3180
2941
  "discriminator": [
3181
2942
  246,
3182
2943
  150,
@@ -3190,17 +2951,11 @@
3190
2951
  "accounts": [
3191
2952
  {
3192
2953
  "name": "payer",
3193
- "docs": [
3194
- "Anyone can trigger migration (pays rent for new accounts)"
3195
- ],
3196
2954
  "writable": true,
3197
2955
  "signer": true
3198
2956
  },
3199
2957
  {
3200
2958
  "name": "global_config",
3201
- "docs": [
3202
- "Global config for protocol settings"
3203
- ],
3204
2959
  "pda": {
3205
2960
  "seeds": [
3206
2961
  {
@@ -3226,16 +2981,10 @@
3226
2981
  },
3227
2982
  {
3228
2983
  "name": "mint",
3229
- "docs": [
3230
- "Token mint being migrated"
3231
- ],
3232
2984
  "writable": true
3233
2985
  },
3234
2986
  {
3235
2987
  "name": "bonding_curve",
3236
- "docs": [
3237
- "Bonding curve being migrated"
3238
- ],
3239
2988
  "writable": true,
3240
2989
  "pda": {
3241
2990
  "seeds": [
@@ -3266,9 +3015,6 @@
3266
3015
  },
3267
3016
  {
3268
3017
  "name": "treasury",
3269
- "docs": [
3270
- "Token treasury (reimburses payer for Raydium migration costs)"
3271
- ],
3272
3018
  "writable": true,
3273
3019
  "pda": {
3274
3020
  "seeds": [
@@ -3294,9 +3040,6 @@
3294
3040
  },
3295
3041
  {
3296
3042
  "name": "token_vault",
3297
- "docs": [
3298
- "Bonding curve token vault (source of tokens for LP)"
3299
- ],
3300
3043
  "writable": true,
3301
3044
  "pda": {
3302
3045
  "seeds": [
@@ -3354,9 +3097,6 @@
3354
3097
  },
3355
3098
  {
3356
3099
  "name": "treasury_token_account",
3357
- "docs": [
3358
- "[V13] Treasury's token account - holds vote vault tokens to be returned or burned"
3359
- ],
3360
3100
  "writable": true,
3361
3101
  "pda": {
3362
3102
  "seeds": [
@@ -3414,16 +3154,10 @@
3414
3154
  },
3415
3155
  {
3416
3156
  "name": "treasury_lock_token_account",
3417
- "docs": [
3418
- "[V31] Treasury lock's token account — receives vote-return tokens."
3419
- ],
3420
3157
  "writable": true
3421
3158
  },
3422
3159
  {
3423
3160
  "name": "treasury_lock",
3424
- "docs": [
3425
- "[V31] Treasury lock PDA — authority over locked tokens"
3426
- ],
3427
3161
  "pda": {
3428
3162
  "seeds": [
3429
3163
  {
@@ -3453,24 +3187,14 @@
3453
3187
  },
3454
3188
  {
3455
3189
  "name": "bc_wsol",
3456
- "docs": [
3457
- "[V26] Bonding curve's WSOL ATA — pre-funded by fund_migration_wsol.",
3458
- "Closed to payer_wsol at start of migration (CPI, no direct lamport manipulation)."
3459
- ],
3460
3190
  "writable": true
3461
3191
  },
3462
3192
  {
3463
3193
  "name": "payer_wsol",
3464
- "docs": [
3465
- "Payer's WSOL account — receives SOL from bc_wsol close, used by Raydium."
3466
- ],
3467
3194
  "writable": true
3468
3195
  },
3469
3196
  {
3470
3197
  "name": "payer_token",
3471
- "docs": [
3472
- "Payer's token account (receives tokens from bonding curve)"
3473
- ],
3474
3198
  "writable": true
3475
3199
  },
3476
3200
  {
@@ -3479,71 +3203,41 @@
3479
3203
  },
3480
3204
  {
3481
3205
  "name": "amm_config",
3482
- "docs": [
3483
- "Raydium AMM config — constrained to prevent pool creation with wrong fee tier"
3484
- ],
3485
3206
  "address": "D4FPEruKEHrG5TenZ2mpDGEfu1iUvTiqBxvpU8HLBvC2"
3486
3207
  },
3487
3208
  {
3488
- "name": "raydium_authority",
3489
- "docs": [
3490
- "Raydium authority PDA"
3491
- ]
3209
+ "name": "raydium_authority"
3492
3210
  },
3493
3211
  {
3494
3212
  "name": "pool_state",
3495
- "docs": [
3496
- "Raydium pool state PDA (created by Raydium via init)"
3497
- ],
3498
3213
  "writable": true
3499
3214
  },
3500
3215
  {
3501
3216
  "name": "wsol_mint",
3502
- "docs": [
3503
- "WSOL mint"
3504
- ],
3505
3217
  "address": "So11111111111111111111111111111111111111112"
3506
3218
  },
3507
3219
  {
3508
3220
  "name": "token_0_vault",
3509
- "docs": [
3510
- "Pool token 0 vault (WSOL or token depending on ordering)"
3511
- ],
3512
3221
  "writable": true
3513
3222
  },
3514
3223
  {
3515
3224
  "name": "token_1_vault",
3516
- "docs": [
3517
- "Pool token 1 vault"
3518
- ],
3519
3225
  "writable": true
3520
3226
  },
3521
3227
  {
3522
3228
  "name": "lp_mint",
3523
- "docs": [
3524
- "LP token mint PDA (created by Raydium via init)"
3525
- ],
3526
3229
  "writable": true
3527
3230
  },
3528
3231
  {
3529
3232
  "name": "payer_lp_token",
3530
- "docs": [
3531
- "Payer's LP token account (receives LP tokens, then burned)"
3532
- ],
3533
3233
  "writable": true
3534
3234
  },
3535
3235
  {
3536
3236
  "name": "observation_state",
3537
- "docs": [
3538
- "Raydium observation state PDA (created by Raydium via init)"
3539
- ],
3540
3237
  "writable": true
3541
3238
  },
3542
3239
  {
3543
3240
  "name": "create_pool_fee",
3544
- "docs": [
3545
- "Raydium fee receiver (pool creation fee)"
3546
- ],
3547
3241
  "writable": true
3548
3242
  },
3549
3243
  {
@@ -3568,10 +3262,6 @@
3568
3262
  },
3569
3263
  {
3570
3264
  "name": "open_short",
3571
- "docs": [
3572
- "[V5] Open or add to a short position.",
3573
- "Post SOL collateral, borrow tokens from treasury."
3574
- ],
3575
3265
  "discriminator": [
3576
3266
  66,
3577
3267
  191,
@@ -3647,9 +3337,6 @@
3647
3337
  },
3648
3338
  {
3649
3339
  "name": "treasury_lock",
3650
- "docs": [
3651
- "Treasury lock PDA (owns the 300M locked token ATA — lending pool for shorts)"
3652
- ],
3653
3340
  "pda": {
3654
3341
  "seeds": [
3655
3342
  {
@@ -3679,9 +3366,6 @@
3679
3366
  },
3680
3367
  {
3681
3368
  "name": "treasury_lock_token_account",
3682
- "docs": [
3683
- "Treasury lock's token account (source of borrowed tokens)"
3684
- ],
3685
3369
  "writable": true,
3686
3370
  "pda": {
3687
3371
  "seeds": [
@@ -3794,9 +3478,6 @@
3794
3478
  },
3795
3479
  {
3796
3480
  "name": "shorter_token_account",
3797
- "docs": [
3798
- "Shorter's token account (receives borrowed tokens)"
3799
- ],
3800
3481
  "writable": true,
3801
3482
  "pda": {
3802
3483
  "seeds": [
@@ -3896,9 +3577,6 @@
3896
3577
  },
3897
3578
  {
3898
3579
  "name": "reclaim_failed_token",
3899
- "docs": [
3900
- "[V12] Reclaim SOL from a failed token (inactive for 1+ epochs)."
3901
- ],
3902
3580
  "discriminator": [
3903
3581
  20,
3904
3582
  104,
@@ -3975,9 +3653,6 @@
3975
3653
  },
3976
3654
  {
3977
3655
  "name": "protocol_treasury",
3978
- "docs": [
3979
- "[V3.2] Protocol treasury receives reclaimed SOL (was platform_treasury)"
3980
- ],
3981
3656
  "writable": true,
3982
3657
  "pda": {
3983
3658
  "seeds": [
@@ -4019,10 +3694,6 @@
4019
3694
  },
4020
3695
  {
4021
3696
  "name": "repay",
4022
- "docs": [
4023
- "[V2.4] Repay SOL debt and receive collateral back.",
4024
- "Partial repay reduces debt. Full repay returns all collateral and closes position."
4025
- ],
4026
3697
  "discriminator": [
4027
3698
  234,
4028
3699
  103,
@@ -4069,9 +3740,6 @@
4069
3740
  },
4070
3741
  {
4071
3742
  "name": "collateral_vault",
4072
- "docs": [
4073
- "Collateral vault - returns tokens on repay"
4074
- ],
4075
3743
  "writable": true,
4076
3744
  "pda": {
4077
3745
  "seeds": [
@@ -4105,9 +3773,6 @@
4105
3773
  },
4106
3774
  {
4107
3775
  "name": "borrower_token_account",
4108
- "docs": [
4109
- "Borrower's token account (receives collateral back on full repay)"
4110
- ],
4111
3776
  "writable": true,
4112
3777
  "pda": {
4113
3778
  "seeds": [
@@ -4165,9 +3830,6 @@
4165
3830
  },
4166
3831
  {
4167
3832
  "name": "loan_position",
4168
- "docs": [
4169
- "Loan position PDA"
4170
- ],
4171
3833
  "writable": true,
4172
3834
  "pda": {
4173
3835
  "seeds": [
@@ -4193,17 +3855,11 @@
4193
3855
  },
4194
3856
  {
4195
3857
  "name": "torch_vault",
4196
- "docs": [
4197
- "[V18] Optional: Torch vault — SOL repaid from vault, collateral returned to vault ATA"
4198
- ],
4199
3858
  "writable": true,
4200
3859
  "optional": true
4201
3860
  },
4202
3861
  {
4203
3862
  "name": "vault_wallet_link",
4204
- "docs": [
4205
- "[V18] Optional: Proves borrower is authorized to use the vault"
4206
- ],
4207
3863
  "optional": true,
4208
3864
  "pda": {
4209
3865
  "seeds": [
@@ -4233,9 +3889,6 @@
4233
3889
  },
4234
3890
  {
4235
3891
  "name": "vault_token_account",
4236
- "docs": [
4237
- "[V18] Optional: Vault's token ATA — returned collateral goes here"
4238
- ],
4239
3892
  "writable": true,
4240
3893
  "optional": true,
4241
3894
  "pda": {
@@ -4309,9 +3962,6 @@
4309
3962
  },
4310
3963
  {
4311
3964
  "name": "sell",
4312
- "docs": [
4313
- "Sell tokens back to the bonding curve."
4314
- ],
4315
3965
  "discriminator": [
4316
3966
  51,
4317
3967
  230,
@@ -4477,11 +4127,6 @@
4477
4127
  },
4478
4128
  {
4479
4129
  "name": "user_position",
4480
- "docs": [
4481
- "[V35] Optional: user_position is not read/written during sell — only",
4482
- "needed for historical compatibility. Users who received tokens via",
4483
- "transfer (no prior buy) can sell without this account."
4484
- ],
4485
4130
  "optional": true,
4486
4131
  "pda": {
4487
4132
  "seeds": [
@@ -4516,9 +4161,6 @@
4516
4161
  },
4517
4162
  {
4518
4163
  "name": "token_treasury",
4519
- "docs": [
4520
- "Per-token treasury receives sell fee [V2]"
4521
- ],
4522
4164
  "writable": true,
4523
4165
  "pda": {
4524
4166
  "seeds": [
@@ -4544,9 +4186,6 @@
4544
4186
  },
4545
4187
  {
4546
4188
  "name": "user_stats",
4547
- "docs": [
4548
- "[V4] Optional: User stats for volume tracking (platform rewards)"
4549
- ],
4550
4189
  "writable": true,
4551
4190
  "optional": true,
4552
4191
  "pda": {
@@ -4575,10 +4214,6 @@
4575
4214
  },
4576
4215
  {
4577
4216
  "name": "protocol_treasury",
4578
- "docs": [
4579
- "[V11] Optional: Protocol treasury receives protocol fees",
4580
- "If provided, fees go here instead of legacy wallet"
4581
- ],
4582
4217
  "writable": true,
4583
4218
  "optional": true,
4584
4219
  "pda": {
@@ -4614,17 +4249,11 @@
4614
4249
  },
4615
4250
  {
4616
4251
  "name": "torch_vault",
4617
- "docs": [
4618
- "[V18] Optional: Torch vault as SOL destination (agent safety)"
4619
- ],
4620
4252
  "writable": true,
4621
4253
  "optional": true
4622
4254
  },
4623
4255
  {
4624
4256
  "name": "vault_wallet_link",
4625
- "docs": [
4626
- "[V18] Optional: Proves seller is authorized to use the vault"
4627
- ],
4628
4257
  "optional": true,
4629
4258
  "pda": {
4630
4259
  "seeds": [
@@ -4654,9 +4283,6 @@
4654
4283
  },
4655
4284
  {
4656
4285
  "name": "vault_token_account",
4657
- "docs": [
4658
- "[V18] Optional: Vault's token ATA — tokens sold from here instead of seller's wallet"
4659
- ],
4660
4286
  "writable": true,
4661
4287
  "optional": true,
4662
4288
  "pda": {
@@ -4734,10 +4360,6 @@
4734
4360
  },
4735
4361
  {
4736
4362
  "name": "star_token",
4737
- "docs": [
4738
- "[V10] Star a token to show appreciation.",
4739
- "When 2000 stars is reached, auto-pays accumulated SOL to creator."
4740
- ],
4741
4363
  "discriminator": [
4742
4364
  206,
4743
4365
  110,
@@ -4755,16 +4377,10 @@
4755
4377
  "signer": true
4756
4378
  },
4757
4379
  {
4758
- "name": "mint",
4759
- "docs": [
4760
- "Token mint being starred"
4761
- ]
4380
+ "name": "mint"
4762
4381
  },
4763
4382
  {
4764
4383
  "name": "bonding_curve",
4765
- "docs": [
4766
- "Bonding curve - to get creator address for auto-payout"
4767
- ],
4768
4384
  "pda": {
4769
4385
  "seeds": [
4770
4386
  {
@@ -4794,9 +4410,6 @@
4794
4410
  },
4795
4411
  {
4796
4412
  "name": "token_treasury",
4797
- "docs": [
4798
- "Token treasury receives star SOL and tracks stars"
4799
- ],
4800
4413
  "writable": true,
4801
4414
  "pda": {
4802
4415
  "seeds": [
@@ -4826,9 +4439,6 @@
4826
4439
  },
4827
4440
  {
4828
4441
  "name": "star_record",
4829
- "docs": [
4830
- "Star record PDA - prevents double-starring"
4831
- ],
4832
4442
  "writable": true,
4833
4443
  "pda": {
4834
4444
  "seeds": [
@@ -4861,17 +4471,11 @@
4861
4471
  },
4862
4472
  {
4863
4473
  "name": "torch_vault",
4864
- "docs": [
4865
- "[V18] Optional: Torch vault as SOL source (agent safety)"
4866
- ],
4867
4474
  "writable": true,
4868
4475
  "optional": true
4869
4476
  },
4870
4477
  {
4871
4478
  "name": "vault_wallet_link",
4872
- "docs": [
4873
- "[V18] Optional: Proves user is authorized to use the vault"
4874
- ],
4875
4479
  "optional": true,
4876
4480
  "pda": {
4877
4481
  "seeds": [
@@ -4908,10 +4512,6 @@
4908
4512
  },
4909
4513
  {
4910
4514
  "name": "swap_fees_to_sol",
4911
- "docs": [
4912
- "[V20] Swap harvested transfer fee tokens to SOL via Raydium.",
4913
- "Sells treasury's Token-2022 tokens for SOL. Permissionless."
4914
- ],
4915
4515
  "discriminator": [
4916
4516
  138,
4917
4517
  113,
@@ -4925,24 +4525,15 @@
4925
4525
  "accounts": [
4926
4526
  {
4927
4527
  "name": "payer",
4928
- "docs": [
4929
- "Anyone can trigger (permissionless)"
4930
- ],
4931
4528
  "writable": true,
4932
4529
  "signer": true
4933
4530
  },
4934
4531
  {
4935
4532
  "name": "mint",
4936
- "docs": [
4937
- "Token mint (Token-2022)"
4938
- ],
4939
4533
  "writable": true
4940
4534
  },
4941
4535
  {
4942
4536
  "name": "bonding_curve",
4943
- "docs": [
4944
- "Bonding curve (must be migrated + Token-2022)"
4945
- ],
4946
4537
  "pda": {
4947
4538
  "seeds": [
4948
4539
  {
@@ -4972,16 +4563,10 @@
4972
4563
  },
4973
4564
  {
4974
4565
  "name": "creator",
4975
- "docs": [
4976
- "[V34] Creator wallet — receives 15% of fee swap proceeds"
4977
- ],
4978
4566
  "writable": true
4979
4567
  },
4980
4568
  {
4981
4569
  "name": "treasury",
4982
- "docs": [
4983
- "Token treasury (sells tokens, receives SOL)"
4984
- ],
4985
4570
  "writable": true,
4986
4571
  "pda": {
4987
4572
  "seeds": [
@@ -5007,9 +4592,6 @@
5007
4592
  },
5008
4593
  {
5009
4594
  "name": "treasury_token_account",
5010
- "docs": [
5011
- "Treasury's Token-2022 ATA (source of harvested tokens)"
5012
- ],
5013
4595
  "writable": true,
5014
4596
  "pda": {
5015
4597
  "seeds": [
@@ -5067,9 +4649,6 @@
5067
4649
  },
5068
4650
  {
5069
4651
  "name": "treasury_wsol",
5070
- "docs": [
5071
- "Treasury's WSOL ATA (receives swap proceeds, then closed)"
5072
- ],
5073
4652
  "writable": true
5074
4653
  },
5075
4654
  {
@@ -5081,51 +4660,30 @@
5081
4660
  },
5082
4661
  {
5083
4662
  "name": "amm_config",
5084
- "docs": [
5085
- "Raydium AMM config — constrained to prevent pool substitution attacks"
5086
- ],
5087
4663
  "address": "D4FPEruKEHrG5TenZ2mpDGEfu1iUvTiqBxvpU8HLBvC2"
5088
4664
  },
5089
4665
  {
5090
4666
  "name": "pool_state",
5091
- "docs": [
5092
- "Raydium pool state — constrained via PDA derivation"
5093
- ],
5094
4667
  "writable": true
5095
4668
  },
5096
4669
  {
5097
4670
  "name": "token_vault",
5098
- "docs": [
5099
- "Pool's token vault — constrained via PDA derivation"
5100
- ],
5101
4671
  "writable": true
5102
4672
  },
5103
4673
  {
5104
4674
  "name": "wsol_vault",
5105
- "docs": [
5106
- "Pool's WSOL vault — constrained via PDA derivation"
5107
- ],
5108
4675
  "writable": true
5109
4676
  },
5110
4677
  {
5111
4678
  "name": "wsol_mint",
5112
- "docs": [
5113
- "WSOL mint"
5114
- ],
5115
4679
  "address": "So11111111111111111111111111111111111111112"
5116
4680
  },
5117
4681
  {
5118
4682
  "name": "observation_state",
5119
- "docs": [
5120
- "Raydium observation state — constrained via PDA derivation"
5121
- ],
5122
4683
  "writable": true
5123
4684
  },
5124
4685
  {
5125
- "name": "token_program",
5126
- "docs": [
5127
- "SPL Token program (for WSOL operations)"
5128
- ]
4686
+ "name": "token_program"
5129
4687
  },
5130
4688
  {
5131
4689
  "name": "token_2022_program"
@@ -5144,10 +4702,6 @@
5144
4702
  },
5145
4703
  {
5146
4704
  "name": "transfer_authority",
5147
- "docs": [
5148
- "[V14.1] Transfer vault authority to a new wallet.",
5149
- "Does NOT affect wallet links."
5150
- ],
5151
4705
  "discriminator": [
5152
4706
  48,
5153
4707
  169,
@@ -5203,10 +4757,6 @@
5203
4757
  },
5204
4758
  {
5205
4759
  "name": "unlink_wallet",
5206
- "docs": [
5207
- "[V14.1] Unlink a wallet from a vault. Authority only.",
5208
- "Closes the VaultWalletLink PDA, returning rent to authority."
5209
- ],
5210
4760
  "discriminator": [
5211
4761
  220,
5212
4762
  121,
@@ -5296,9 +4846,6 @@
5296
4846
  },
5297
4847
  {
5298
4848
  "name": "update_dev_wallet",
5299
- "docs": [
5300
- "[V8] Update the dev wallet address."
5301
- ],
5302
4849
  "discriminator": [
5303
4850
  152,
5304
4851
  37,
@@ -5351,11 +4898,6 @@
5351
4898
  },
5352
4899
  {
5353
4900
  "name": "vault_swap",
5354
- "docs": [
5355
- "[V19] Vault-routed Raydium CPMM swap for migrated Torch tokens.",
5356
- "Controller wallet signs, vault PDA executes. Full custody preserved.",
5357
- "Handles both buy (SOL→Token) and sell (Token→SOL) via `is_buy` flag."
5358
- ],
5359
4901
  "discriminator": [
5360
4902
  143,
5361
4903
  194,
@@ -5369,17 +4911,11 @@
5369
4911
  "accounts": [
5370
4912
  {
5371
4913
  "name": "signer",
5372
- "docs": [
5373
- "Controller wallet (linked to vault)"
5374
- ],
5375
4914
  "writable": true,
5376
4915
  "signer": true
5377
4916
  },
5378
4917
  {
5379
4918
  "name": "torch_vault",
5380
- "docs": [
5381
- "Vault (SOL source/destination)"
5382
- ],
5383
4919
  "writable": true,
5384
4920
  "pda": {
5385
4921
  "seeds": [
@@ -5409,9 +4945,6 @@
5409
4945
  },
5410
4946
  {
5411
4947
  "name": "vault_wallet_link",
5412
- "docs": [
5413
- "Vault wallet link (proves signer is authorized)"
5414
- ],
5415
4948
  "pda": {
5416
4949
  "seeds": [
5417
4950
  {
@@ -5440,16 +4973,10 @@
5440
4973
  },
5441
4974
  {
5442
4975
  "name": "mint",
5443
- "docs": [
5444
- "Token mint (mutable for Token-2022 transfer fee bookkeeping)"
5445
- ],
5446
4976
  "writable": true
5447
4977
  },
5448
4978
  {
5449
4979
  "name": "bonding_curve",
5450
- "docs": [
5451
- "Bonding curve (validates this is a Torch token + migrated)"
5452
- ],
5453
4980
  "pda": {
5454
4981
  "seeds": [
5455
4982
  {
@@ -5479,10 +5006,6 @@
5479
5006
  },
5480
5007
  {
5481
5008
  "name": "vault_token_account",
5482
- "docs": [
5483
- "Vault's token ATA (Token-2022)",
5484
- "Token source (sell) or destination (buy)"
5485
- ],
5486
5009
  "writable": true,
5487
5010
  "pda": {
5488
5011
  "seeds": [
@@ -5540,10 +5063,6 @@
5540
5063
  },
5541
5064
  {
5542
5065
  "name": "vault_wsol_account",
5543
- "docs": [
5544
- "Vault's WSOL ATA (SPL Token)",
5545
- "SOL source (buy) or destination (sell)"
5546
- ],
5547
5066
  "writable": true
5548
5067
  },
5549
5068
  {
@@ -5555,63 +5074,36 @@
5555
5074
  },
5556
5075
  {
5557
5076
  "name": "amm_config",
5558
- "docs": [
5559
- "Raydium AMM config — constrained to prevent pool substitution attacks"
5560
- ],
5561
5077
  "address": "D4FPEruKEHrG5TenZ2mpDGEfu1iUvTiqBxvpU8HLBvC2"
5562
5078
  },
5563
5079
  {
5564
5080
  "name": "pool_state",
5565
- "docs": [
5566
- "[V27] Raydium pool state — constrained via PDA derivation"
5567
- ],
5568
5081
  "writable": true
5569
5082
  },
5570
5083
  {
5571
5084
  "name": "pool_token_vault_0",
5572
- "docs": [
5573
- "[V27] Pool token vault 0 — constrained via PDA derivation"
5574
- ],
5575
5085
  "writable": true
5576
5086
  },
5577
5087
  {
5578
5088
  "name": "pool_token_vault_1",
5579
- "docs": [
5580
- "[V27] Pool token vault 1 — constrained via PDA derivation"
5581
- ],
5582
5089
  "writable": true
5583
5090
  },
5584
5091
  {
5585
5092
  "name": "observation_state",
5586
- "docs": [
5587
- "[V27] Raydium observation state — constrained via PDA derivation"
5588
- ],
5589
5093
  "writable": true
5590
5094
  },
5591
5095
  {
5592
5096
  "name": "wsol_mint",
5593
- "docs": [
5594
- "WSOL mint"
5595
- ],
5596
5097
  "address": "So11111111111111111111111111111111111111112"
5597
5098
  },
5598
5099
  {
5599
- "name": "token_program",
5600
- "docs": [
5601
- "SPL Token program (for WSOL operations)"
5602
- ]
5100
+ "name": "token_program"
5603
5101
  },
5604
5102
  {
5605
- "name": "token_2022_program",
5606
- "docs": [
5607
- "Token-2022 program (for Torch token operations)"
5608
- ]
5103
+ "name": "token_2022_program"
5609
5104
  },
5610
5105
  {
5611
5106
  "name": "associated_token_program",
5612
- "docs": [
5613
- "Associated Token Program (for WSOL ATA creation)"
5614
- ],
5615
5107
  "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
5616
5108
  },
5617
5109
  {
@@ -5636,10 +5128,6 @@
5636
5128
  },
5637
5129
  {
5638
5130
  "name": "withdraw_tokens",
5639
- "docs": [
5640
- "[V18] Withdraw tokens from vault ATA. Authority only.",
5641
- "Composability escape hatch for external DeFi usage."
5642
- ],
5643
5131
  "discriminator": [
5644
5132
  2,
5645
5133
  4,
@@ -5693,9 +5181,6 @@
5693
5181
  },
5694
5182
  {
5695
5183
  "name": "vault_token_account",
5696
- "docs": [
5697
- "Vault's token ATA (source)"
5698
- ],
5699
5184
  "writable": true,
5700
5185
  "pda": {
5701
5186
  "seeds": [
@@ -5753,9 +5238,6 @@
5753
5238
  },
5754
5239
  {
5755
5240
  "name": "destination_token_account",
5756
- "docs": [
5757
- "Destination token account (any wallet's ATA)"
5758
- ],
5759
5241
  "writable": true
5760
5242
  },
5761
5243
  {
@@ -5771,9 +5253,6 @@
5771
5253
  },
5772
5254
  {
5773
5255
  "name": "withdraw_vault",
5774
- "docs": [
5775
- "[V14.1] Withdraw SOL from vault. Authority only."
5776
- ],
5777
5256
  "discriminator": [
5778
5257
  135,
5779
5258
  7,
@@ -6493,156 +5972,102 @@
6493
5972
  "code": 6070,
6494
5973
  "name": "ShortAlreadyEnabled",
6495
5974
  "msg": "Short selling already enabled for this token"
5975
+ },
5976
+ {
5977
+ "code": 6071,
5978
+ "name": "PoolTooThin",
5979
+ "msg": "Pool liquidity too low for safe collateral valuation"
5980
+ },
5981
+ {
5982
+ "code": 6072,
5983
+ "name": "PriceDeviationTooHigh",
5984
+ "msg": "Pool price deviates too far from baseline for new margin positions"
6496
5985
  }
6497
5986
  ],
6498
5987
  "types": [
6499
5988
  {
6500
5989
  "name": "BondingCurve",
6501
- "docs": [
6502
- "Per-token bonding curve state"
6503
- ],
6504
5990
  "type": {
6505
5991
  "kind": "struct",
6506
5992
  "fields": [
6507
5993
  {
6508
5994
  "name": "mint",
6509
- "docs": [
6510
- "Token mint"
6511
- ],
6512
5995
  "type": "pubkey"
6513
5996
  },
6514
5997
  {
6515
5998
  "name": "creator",
6516
- "docs": [
6517
- "Token creator"
6518
- ],
6519
5999
  "type": "pubkey"
6520
6000
  },
6521
6001
  {
6522
6002
  "name": "virtual_sol_reserves",
6523
- "docs": [
6524
- "Virtual SOL for pricing"
6525
- ],
6526
6003
  "type": "u64"
6527
6004
  },
6528
6005
  {
6529
6006
  "name": "virtual_token_reserves",
6530
- "docs": [
6531
- "Virtual tokens for pricing"
6532
- ],
6533
6007
  "type": "u64"
6534
6008
  },
6535
6009
  {
6536
6010
  "name": "real_sol_reserves",
6537
- "docs": [
6538
- "Actual SOL in pool"
6539
- ],
6540
6011
  "type": "u64"
6541
6012
  },
6542
6013
  {
6543
6014
  "name": "real_token_reserves",
6544
- "docs": [
6545
- "Actual tokens available"
6546
- ],
6547
6015
  "type": "u64"
6548
6016
  },
6549
6017
  {
6550
6018
  "name": "vote_vault_balance",
6551
- "docs": [
6552
- "[V2.2] Tokens in vote vault (10%, subject to community vote)",
6553
- "Held in Treasury's token account until vote finalizes"
6554
- ],
6555
6019
  "type": "u64"
6556
6020
  },
6557
6021
  {
6558
6022
  "name": "permanently_burned_tokens",
6559
- "docs": [
6560
- "Tokens permanently burned via post-migration buybacks"
6561
- ],
6562
6023
  "type": "u64"
6563
6024
  },
6564
6025
  {
6565
6026
  "name": "bonding_complete",
6566
- "docs": [
6567
- "Reached bonding target"
6568
- ],
6569
6027
  "type": "bool"
6570
6028
  },
6571
6029
  {
6572
6030
  "name": "bonding_complete_slot",
6573
- "docs": [
6574
- "Slot when bonding completed"
6575
- ],
6576
6031
  "type": "u64"
6577
6032
  },
6578
6033
  {
6579
6034
  "name": "votes_return",
6580
- "docs": [
6581
- "Votes to return tokens"
6582
- ],
6583
6035
  "type": "u64"
6584
6036
  },
6585
6037
  {
6586
6038
  "name": "votes_burn",
6587
- "docs": [
6588
- "Votes to burn tokens"
6589
- ],
6590
6039
  "type": "u64"
6591
6040
  },
6592
6041
  {
6593
6042
  "name": "total_voters",
6594
- "docs": [
6595
- "Total unique voters"
6596
- ],
6597
6043
  "type": "u64"
6598
6044
  },
6599
6045
  {
6600
6046
  "name": "vote_finalized",
6601
- "docs": [
6602
- "Voting ended"
6603
- ],
6604
6047
  "type": "bool"
6605
6048
  },
6606
6049
  {
6607
6050
  "name": "vote_result_return",
6608
- "docs": [
6609
- "Vote result"
6610
- ],
6611
6051
  "type": "bool"
6612
6052
  },
6613
6053
  {
6614
6054
  "name": "migrated",
6615
- "docs": [
6616
- "Migrated to DEX"
6617
- ],
6618
6055
  "type": "bool"
6619
6056
  },
6620
6057
  {
6621
6058
  "name": "is_token_2022",
6622
- "docs": [
6623
- "Is Token-2022 mint (V3)"
6624
- ],
6625
6059
  "type": "bool"
6626
6060
  },
6627
6061
  {
6628
6062
  "name": "last_activity_slot",
6629
- "docs": [
6630
- "Last activity slot (buy/sell) for V4 inactivity tracking"
6631
- ],
6632
6063
  "type": "u64"
6633
6064
  },
6634
6065
  {
6635
6066
  "name": "reclaimed",
6636
- "docs": [
6637
- "Has been reclaimed (V4 - failed token)"
6638
- ],
6639
6067
  "type": "bool"
6640
6068
  },
6641
6069
  {
6642
6070
  "name": "name",
6643
- "docs": [
6644
- "Token name"
6645
- ],
6646
6071
  "type": {
6647
6072
  "array": [
6648
6073
  "u8",
@@ -6652,9 +6077,6 @@
6652
6077
  },
6653
6078
  {
6654
6079
  "name": "symbol",
6655
- "docs": [
6656
- "Token symbol"
6657
- ],
6658
6080
  "type": {
6659
6081
  "array": [
6660
6082
  "u8",
@@ -6664,9 +6086,6 @@
6664
6086
  },
6665
6087
  {
6666
6088
  "name": "uri",
6667
- "docs": [
6668
- "Metadata URI"
6669
- ],
6670
6089
  "type": {
6671
6090
  "array": [
6672
6091
  "u8",
@@ -6676,24 +6095,14 @@
6676
6095
  },
6677
6096
  {
6678
6097
  "name": "bump",
6679
- "docs": [
6680
- "PDA bump"
6681
- ],
6682
6098
  "type": "u8"
6683
6099
  },
6684
6100
  {
6685
6101
  "name": "treasury_bump",
6686
- "docs": [
6687
- "Treasury bump [V2]"
6688
- ],
6689
6102
  "type": "u8"
6690
6103
  },
6691
6104
  {
6692
6105
  "name": "bonding_target",
6693
- "docs": [
6694
- "Per-token graduation target in lamports [V23]",
6695
- "0 = default (200 SOL) for backwards compat with existing tokens"
6696
- ],
6697
6106
  "type": "u64"
6698
6107
  }
6699
6108
  ]
@@ -6706,16 +6115,10 @@
6706
6115
  "fields": [
6707
6116
  {
6708
6117
  "name": "collateral_amount",
6709
- "docs": [
6710
- "Tokens to lock as collateral (can be 0 if adding debt to existing position)"
6711
- ],
6712
6118
  "type": "u64"
6713
6119
  },
6714
6120
  {
6715
6121
  "name": "sol_to_borrow",
6716
- "docs": [
6717
- "SOL to borrow from treasury (can be 0 if just adding collateral)"
6718
- ],
6719
6122
  "type": "u64"
6720
6123
  }
6721
6124
  ]
@@ -6767,73 +6170,43 @@
6767
6170
  },
6768
6171
  {
6769
6172
  "name": "GlobalConfig",
6770
- "docs": [
6771
- "Global protocol configuration"
6772
- ],
6773
6173
  "type": {
6774
6174
  "kind": "struct",
6775
6175
  "fields": [
6776
6176
  {
6777
6177
  "name": "authority",
6778
- "docs": [
6779
- "Protocol admin"
6780
- ],
6781
6178
  "type": "pubkey"
6782
6179
  },
6783
6180
  {
6784
6181
  "name": "treasury",
6785
- "docs": [
6786
- "Fee recipient (protocol fee 0.5%)"
6787
- ],
6788
6182
  "type": "pubkey"
6789
6183
  },
6790
6184
  {
6791
6185
  "name": "dev_wallet",
6792
- "docs": [
6793
- "Dev/RD wallet (receives 25% of treasury fee) [V8]"
6794
- ],
6795
6186
  "type": "pubkey"
6796
6187
  },
6797
6188
  {
6798
6189
  "name": "_deprecated_platform_treasury",
6799
- "docs": [
6800
- "[DEPRECATED V3.2] Was platform treasury. Kept for byte layout compatibility."
6801
- ],
6802
6190
  "type": "pubkey"
6803
6191
  },
6804
6192
  {
6805
6193
  "name": "protocol_fee_bps",
6806
- "docs": [
6807
- "Fee in basis points"
6808
- ],
6809
6194
  "type": "u16"
6810
6195
  },
6811
6196
  {
6812
6197
  "name": "paused",
6813
- "docs": [
6814
- "Emergency pause"
6815
- ],
6816
6198
  "type": "bool"
6817
6199
  },
6818
6200
  {
6819
6201
  "name": "total_tokens_launched",
6820
- "docs": [
6821
- "Tokens launched counter"
6822
- ],
6823
6202
  "type": "u64"
6824
6203
  },
6825
6204
  {
6826
6205
  "name": "total_volume_sol",
6827
- "docs": [
6828
- "Cumulative SOL volume"
6829
- ],
6830
6206
  "type": "u64"
6831
6207
  },
6832
6208
  {
6833
6209
  "name": "bump",
6834
- "docs": [
6835
- "PDA bump"
6836
- ],
6837
6210
  "type": "u8"
6838
6211
  }
6839
6212
  ]
@@ -6901,62 +6274,35 @@
6901
6274
  },
6902
6275
  {
6903
6276
  "name": "LoanPosition",
6904
- "docs": [
6905
- "[V2.4] Per-user, per-token loan position for treasury lending",
6906
- "",
6907
- "Created on first borrow. Tracks collateral locked and SOL owed.",
6908
- "Closed (rent reclaimed) on full repay or full liquidation."
6909
- ],
6910
6277
  "type": {
6911
6278
  "kind": "struct",
6912
6279
  "fields": [
6913
6280
  {
6914
6281
  "name": "user",
6915
- "docs": [
6916
- "Borrower wallet"
6917
- ],
6918
6282
  "type": "pubkey"
6919
6283
  },
6920
6284
  {
6921
6285
  "name": "mint",
6922
- "docs": [
6923
- "Token mint (for PDA derivation)"
6924
- ],
6925
6286
  "type": "pubkey"
6926
6287
  },
6927
6288
  {
6928
6289
  "name": "collateral_amount",
6929
- "docs": [
6930
- "Tokens locked as collateral in collateral vault"
6931
- ],
6932
6290
  "type": "u64"
6933
6291
  },
6934
6292
  {
6935
6293
  "name": "borrowed_amount",
6936
- "docs": [
6937
- "SOL principal owed (excludes accrued interest)"
6938
- ],
6939
6294
  "type": "u64"
6940
6295
  },
6941
6296
  {
6942
6297
  "name": "accrued_interest",
6943
- "docs": [
6944
- "Interest accumulated since last update"
6945
- ],
6946
6298
  "type": "u64"
6947
6299
  },
6948
6300
  {
6949
6301
  "name": "last_update_slot",
6950
- "docs": [
6951
- "Last slot when interest was calculated"
6952
- ],
6953
6302
  "type": "u64"
6954
6303
  },
6955
6304
  {
6956
6305
  "name": "bump",
6957
- "docs": [
6958
- "PDA bump"
6959
- ],
6960
6306
  "type": "u8"
6961
6307
  }
6962
6308
  ]
@@ -7001,16 +6347,10 @@
7001
6347
  "fields": [
7002
6348
  {
7003
6349
  "name": "sol_collateral",
7004
- "docs": [
7005
- "SOL to post as collateral (can be 0 if adding debt to existing position)"
7006
- ],
7007
6350
  "type": "u64"
7008
6351
  },
7009
6352
  {
7010
6353
  "name": "tokens_to_borrow",
7011
- "docs": [
7012
- "Tokens to borrow from treasury (can be 0 if just adding collateral)"
7013
- ],
7014
6354
  "type": "u64"
7015
6355
  }
7016
6356
  ]
@@ -7018,92 +6358,51 @@
7018
6358
  },
7019
6359
  {
7020
6360
  "name": "ProtocolTreasury",
7021
- "docs": [
7022
- "[V11] Protocol-level treasury for fee distribution to active traders",
7023
- "",
7024
- "Unlike GlobalConfig.treasury (a wallet), this is a PDA that:",
7025
- "- Receives 0.5% protocol fees from all trades",
7026
- "- Maintains a 1500 SOL reserve floor",
7027
- "- Distributes excess SOL weekly to users with >= 10 SOL epoch volume"
7028
- ],
7029
6361
  "type": {
7030
6362
  "kind": "struct",
7031
6363
  "fields": [
7032
6364
  {
7033
6365
  "name": "authority",
7034
- "docs": [
7035
- "Protocol authority"
7036
- ],
7037
6366
  "type": "pubkey"
7038
6367
  },
7039
6368
  {
7040
6369
  "name": "current_balance",
7041
- "docs": [
7042
- "Current SOL balance held by this PDA"
7043
- ],
7044
6370
  "type": "u64"
7045
6371
  },
7046
6372
  {
7047
6373
  "name": "reserve_floor",
7048
- "docs": [
7049
- "Reserve floor - no payouts below this (1500 SOL)"
7050
- ],
7051
6374
  "type": "u64"
7052
6375
  },
7053
6376
  {
7054
6377
  "name": "total_fees_received",
7055
- "docs": [
7056
- "Total SOL ever received from protocol fees"
7057
- ],
7058
6378
  "type": "u64"
7059
6379
  },
7060
6380
  {
7061
6381
  "name": "total_distributed",
7062
- "docs": [
7063
- "Total SOL ever distributed to users"
7064
- ],
7065
6382
  "type": "u64"
7066
6383
  },
7067
6384
  {
7068
6385
  "name": "current_epoch",
7069
- "docs": [
7070
- "Current distribution epoch"
7071
- ],
7072
6386
  "type": "u64"
7073
6387
  },
7074
6388
  {
7075
6389
  "name": "last_epoch_ts",
7076
- "docs": [
7077
- "Timestamp of last epoch advance"
7078
- ],
7079
6390
  "type": "i64"
7080
6391
  },
7081
6392
  {
7082
6393
  "name": "total_volume_current_epoch",
7083
- "docs": [
7084
- "Total platform volume in current epoch"
7085
- ],
7086
6394
  "type": "u64"
7087
6395
  },
7088
6396
  {
7089
6397
  "name": "total_volume_previous_epoch",
7090
- "docs": [
7091
- "Total platform volume in previous epoch (for payout calculation)"
7092
- ],
7093
6398
  "type": "u64"
7094
6399
  },
7095
6400
  {
7096
6401
  "name": "distributable_amount",
7097
- "docs": [
7098
- "SOL available for distribution this epoch (balance - reserve_floor)"
7099
- ],
7100
6402
  "type": "u64"
7101
6403
  },
7102
6404
  {
7103
6405
  "name": "bump",
7104
- "docs": [
7105
- "PDA bump"
7106
- ],
7107
6406
  "type": "u8"
7108
6407
  }
7109
6408
  ]
@@ -7111,9 +6410,6 @@
7111
6410
  },
7112
6411
  {
7113
6412
  "name": "RevivalContribution",
7114
- "docs": [
7115
- "Emitted when someone contributes to a token revival"
7116
- ],
7117
6413
  "type": {
7118
6414
  "kind": "struct",
7119
6415
  "fields": [
@@ -7194,51 +6490,27 @@
7194
6490
  },
7195
6491
  {
7196
6492
  "name": "ShortConfig",
7197
- "docs": [
7198
- "[V5] Per-token aggregate state for short positions.",
7199
- "",
7200
- "Tracks token utilization and position counts. Holds NO SOL —",
7201
- "short collateral lives in the Treasury PDA, tracked via the",
7202
- "repurposed `total_burned_from_buyback` field.",
7203
- "",
7204
- "Seeds: [\"short_config\", mint.key()]"
7205
- ],
7206
6493
  "type": {
7207
6494
  "kind": "struct",
7208
6495
  "fields": [
7209
6496
  {
7210
6497
  "name": "mint",
7211
- "docs": [
7212
- "Token mint"
7213
- ],
7214
6498
  "type": "pubkey"
7215
6499
  },
7216
6500
  {
7217
6501
  "name": "total_tokens_lent",
7218
- "docs": [
7219
- "Tokens currently borrowed by all short sellers"
7220
- ],
7221
6502
  "type": "u64"
7222
6503
  },
7223
6504
  {
7224
6505
  "name": "active_positions",
7225
- "docs": [
7226
- "Count of open short positions"
7227
- ],
7228
6506
  "type": "u64"
7229
6507
  },
7230
6508
  {
7231
6509
  "name": "total_interest_collected",
7232
- "docs": [
7233
- "Cumulative interest collected (tokens returned to treasury)"
7234
- ],
7235
6510
  "type": "u64"
7236
6511
  },
7237
6512
  {
7238
6513
  "name": "bump",
7239
- "docs": [
7240
- "PDA bump"
7241
- ],
7242
6514
  "type": "u8"
7243
6515
  }
7244
6516
  ]
@@ -7306,65 +6578,35 @@
7306
6578
  },
7307
6579
  {
7308
6580
  "name": "ShortPosition",
7309
- "docs": [
7310
- "[V5] Per-user, per-token short position for margin trading",
7311
- "",
7312
- "Created on first open_short. Tracks SOL collateral posted and tokens owed.",
7313
- "Closed (rent reclaimed) on full close or full liquidation.",
7314
- "Mirror of LoanPosition but with inverted collateral/debt assets.",
7315
- "",
7316
- "Seeds: [\"short\", mint.key(), user.key()]"
7317
- ],
7318
6581
  "type": {
7319
6582
  "kind": "struct",
7320
6583
  "fields": [
7321
6584
  {
7322
6585
  "name": "user",
7323
- "docs": [
7324
- "Short seller wallet"
7325
- ],
7326
6586
  "type": "pubkey"
7327
6587
  },
7328
6588
  {
7329
6589
  "name": "mint",
7330
- "docs": [
7331
- "Token mint (for PDA derivation)"
7332
- ],
7333
6590
  "type": "pubkey"
7334
6591
  },
7335
6592
  {
7336
6593
  "name": "sol_collateral",
7337
- "docs": [
7338
- "SOL posted as collateral (lamports), held in Treasury"
7339
- ],
7340
6594
  "type": "u64"
7341
6595
  },
7342
6596
  {
7343
6597
  "name": "tokens_borrowed",
7344
- "docs": [
7345
- "Tokens owed to treasury"
7346
- ],
7347
6598
  "type": "u64"
7348
6599
  },
7349
6600
  {
7350
6601
  "name": "accrued_interest",
7351
- "docs": [
7352
- "Interest accumulated in token terms"
7353
- ],
7354
6602
  "type": "u64"
7355
6603
  },
7356
6604
  {
7357
6605
  "name": "last_update_slot",
7358
- "docs": [
7359
- "Last slot when interest was calculated"
7360
- ],
7361
6606
  "type": "u64"
7362
6607
  },
7363
6608
  {
7364
6609
  "name": "bump",
7365
- "docs": [
7366
- "PDA bump"
7367
- ],
7368
6610
  "type": "u8"
7369
6611
  }
7370
6612
  ]
@@ -7388,38 +6630,23 @@
7388
6630
  },
7389
6631
  {
7390
6632
  "name": "StarRecord",
7391
- "docs": [
7392
- "Individual star record - prevents double-starring (V7, updated V10)"
7393
- ],
7394
6633
  "type": {
7395
6634
  "kind": "struct",
7396
6635
  "fields": [
7397
6636
  {
7398
6637
  "name": "user",
7399
- "docs": [
7400
- "User who gave the star"
7401
- ],
7402
6638
  "type": "pubkey"
7403
6639
  },
7404
6640
  {
7405
6641
  "name": "mint",
7406
- "docs": [
7407
- "[V10] Token mint that received the star (was: creator)"
7408
- ],
7409
6642
  "type": "pubkey"
7410
6643
  },
7411
6644
  {
7412
6645
  "name": "starred_at_slot",
7413
- "docs": [
7414
- "Slot when star was given"
7415
- ],
7416
6646
  "type": "u64"
7417
6647
  },
7418
6648
  {
7419
6649
  "name": "bump",
7420
- "docs": [
7421
- "PDA bump"
7422
- ],
7423
6650
  "type": "u8"
7424
6651
  }
7425
6652
  ]
@@ -7427,9 +6654,6 @@
7427
6654
  },
7428
6655
  {
7429
6656
  "name": "TokenRevived",
7430
- "docs": [
7431
- "Emitted when a token is successfully revived"
7432
- ],
7433
6657
  "type": {
7434
6658
  "kind": "struct",
7435
6659
  "fields": [
@@ -7450,87 +6674,47 @@
7450
6674
  },
7451
6675
  {
7452
6676
  "name": "TorchVault",
7453
- "docs": [
7454
- "[V14] Per-user SOL escrow for safe agent interaction.",
7455
- "[V14.1] Multi-wallet identity: one vault, many wallets.",
7456
- "",
7457
- "The vault holds SOL earmarked for torch_market operations.",
7458
- "When present in a transaction, SOL is drawn from the vault",
7459
- "instead of the user's wallet. The vault PDA signs internal",
7460
- "CPI transfers. Anyone can deposit, only authority can withdraw.",
7461
- "Linked wallets can use the vault for buys."
7462
- ],
7463
6677
  "type": {
7464
6678
  "kind": "struct",
7465
6679
  "fields": [
7466
6680
  {
7467
6681
  "name": "creator",
7468
- "docs": [
7469
- "Immutable creator wallet — used as PDA seed (never changes)"
7470
- ],
7471
6682
  "type": "pubkey"
7472
6683
  },
7473
6684
  {
7474
6685
  "name": "authority",
7475
- "docs": [
7476
- "Current authority — controls withdraw, link/unlink, transfer"
7477
- ],
7478
6686
  "type": "pubkey"
7479
6687
  },
7480
6688
  {
7481
6689
  "name": "sol_balance",
7482
- "docs": [
7483
- "Available SOL in vault"
7484
- ],
7485
6690
  "type": "u64"
7486
6691
  },
7487
6692
  {
7488
6693
  "name": "total_deposited",
7489
- "docs": [
7490
- "Lifetime SOL deposited"
7491
- ],
7492
6694
  "type": "u64"
7493
6695
  },
7494
6696
  {
7495
6697
  "name": "total_withdrawn",
7496
- "docs": [
7497
- "Lifetime SOL withdrawn"
7498
- ],
7499
6698
  "type": "u64"
7500
6699
  },
7501
6700
  {
7502
6701
  "name": "total_spent",
7503
- "docs": [
7504
- "Lifetime SOL spent on torch operations"
7505
- ],
7506
6702
  "type": "u64"
7507
6703
  },
7508
6704
  {
7509
6705
  "name": "total_received",
7510
- "docs": [
7511
- "[V18] Lifetime SOL received back (sells, borrow proceeds)"
7512
- ],
7513
6706
  "type": "u64"
7514
6707
  },
7515
6708
  {
7516
6709
  "name": "linked_wallets",
7517
- "docs": [
7518
- "Number of wallets currently linked"
7519
- ],
7520
6710
  "type": "u8"
7521
6711
  },
7522
6712
  {
7523
6713
  "name": "created_at",
7524
- "docs": [
7525
- "Creation timestamp"
7526
- ],
7527
6714
  "type": "i64"
7528
6715
  },
7529
6716
  {
7530
6717
  "name": "bump",
7531
- "docs": [
7532
- "PDA bump"
7533
- ],
7534
6718
  "type": "u8"
7535
6719
  }
7536
6720
  ]
@@ -7538,230 +6722,131 @@
7538
6722
  },
7539
6723
  {
7540
6724
  "name": "Treasury",
7541
- "docs": [
7542
- "Per-token treasury for buybacks (V2, extended in V9, V10)"
7543
- ],
7544
6725
  "type": {
7545
6726
  "kind": "struct",
7546
6727
  "fields": [
7547
6728
  {
7548
6729
  "name": "bonding_curve",
7549
- "docs": [
7550
- "Associated bonding curve"
7551
- ],
7552
6730
  "type": "pubkey"
7553
6731
  },
7554
6732
  {
7555
6733
  "name": "mint",
7556
- "docs": [
7557
- "Token mint"
7558
- ],
7559
6734
  "type": "pubkey"
7560
6735
  },
7561
6736
  {
7562
6737
  "name": "sol_balance",
7563
- "docs": [
7564
- "SOL balance available for buybacks"
7565
- ],
7566
6738
  "type": "u64"
7567
6739
  },
7568
6740
  {
7569
6741
  "name": "total_bought_back",
7570
- "docs": [
7571
- "Total tokens bought back"
7572
- ],
7573
6742
  "type": "u64"
7574
6743
  },
7575
6744
  {
7576
6745
  "name": "total_burned_from_buyback",
7577
- "docs": [
7578
- "Total tokens burned via buyback"
7579
- ],
7580
6746
  "type": "u64"
7581
6747
  },
7582
6748
  {
7583
6749
  "name": "tokens_held",
7584
- "docs": [
7585
- "Tokens held in treasury (after supply floor reached)"
7586
- ],
7587
6750
  "type": "u64"
7588
6751
  },
7589
6752
  {
7590
6753
  "name": "last_buyback_slot",
7591
- "docs": [
7592
- "Last buyback slot"
7593
- ],
7594
6754
  "type": "u64"
7595
6755
  },
7596
6756
  {
7597
6757
  "name": "buyback_count",
7598
- "docs": [
7599
- "Total buybacks executed"
7600
- ],
7601
6758
  "type": "u64"
7602
6759
  },
7603
6760
  {
7604
6761
  "name": "harvested_fees",
7605
- "docs": [
7606
- "Transfer fees harvested (V3)"
7607
- ],
7608
6762
  "type": "u64"
7609
6763
  },
7610
6764
  {
7611
6765
  "name": "bump",
7612
- "docs": [
7613
- "PDA bump"
7614
- ],
7615
6766
  "type": "u8"
7616
6767
  },
7617
6768
  {
7618
6769
  "name": "baseline_sol_reserves",
7619
- "docs": [
7620
- "Pool SOL reserves at migration time (baseline for ratio calculation)"
7621
- ],
7622
6770
  "type": "u64"
7623
6771
  },
7624
6772
  {
7625
6773
  "name": "baseline_token_reserves",
7626
- "docs": [
7627
- "Pool token reserves at migration time (baseline for ratio calculation)"
7628
- ],
7629
6774
  "type": "u64"
7630
6775
  },
7631
6776
  {
7632
6777
  "name": "ratio_threshold_bps",
7633
- "docs": [
7634
- "Ratio threshold in basis points (e.g., 8000 = 80%)",
7635
- "Buyback triggers when: current_ratio < baseline_ratio * (threshold / 10000)"
7636
- ],
7637
6778
  "type": "u16"
7638
6779
  },
7639
6780
  {
7640
6781
  "name": "reserve_ratio_bps",
7641
- "docs": [
7642
- "Reserve ratio in basis points (e.g., 3000 = 30%)",
7643
- "This percentage of treasury SOL is never spent on buybacks"
7644
- ],
7645
6782
  "type": "u16"
7646
6783
  },
7647
6784
  {
7648
6785
  "name": "buyback_percent_bps",
7649
- "docs": [
7650
- "Buyback amount per call in basis points (e.g., 1500 = 15%)",
7651
- "Each buyback call spends this percentage of available (non-reserved) SOL"
7652
- ],
7653
6786
  "type": "u16"
7654
6787
  },
7655
6788
  {
7656
6789
  "name": "min_buyback_interval_slots",
7657
- "docs": [
7658
- "Minimum slots between buyback calls"
7659
- ],
7660
6790
  "type": "u64"
7661
6791
  },
7662
6792
  {
7663
6793
  "name": "baseline_initialized",
7664
- "docs": [
7665
- "Whether baseline has been set (can only set once, at migration)"
7666
- ],
7667
6794
  "type": "bool"
7668
6795
  },
7669
6796
  {
7670
6797
  "name": "total_stars",
7671
- "docs": [
7672
- "Total stars received for this token"
7673
- ],
7674
6798
  "type": "u64"
7675
6799
  },
7676
6800
  {
7677
6801
  "name": "star_sol_balance",
7678
- "docs": [
7679
- "SOL accumulated from stars (separate from sol_balance for buybacks)"
7680
- ],
7681
6802
  "type": "u64"
7682
6803
  },
7683
6804
  {
7684
6805
  "name": "creator_paid_out",
7685
- "docs": [
7686
- "Whether creator has been paid out (one-time payout on threshold)"
7687
- ],
7688
6806
  "type": "bool"
7689
6807
  },
7690
6808
  {
7691
6809
  "name": "total_sol_lent",
7692
- "docs": [
7693
- "Total SOL currently lent out to borrowers"
7694
- ],
7695
6810
  "type": "u64"
7696
6811
  },
7697
6812
  {
7698
6813
  "name": "total_collateral_locked",
7699
- "docs": [
7700
- "Total tokens currently locked as collateral"
7701
- ],
7702
6814
  "type": "u64"
7703
6815
  },
7704
6816
  {
7705
6817
  "name": "active_loans",
7706
- "docs": [
7707
- "Number of active loan positions"
7708
- ],
7709
6818
  "type": "u64"
7710
6819
  },
7711
6820
  {
7712
6821
  "name": "total_interest_collected",
7713
- "docs": [
7714
- "All-time interest collected from loans"
7715
- ],
7716
6822
  "type": "u64"
7717
6823
  },
7718
6824
  {
7719
6825
  "name": "lending_enabled",
7720
- "docs": [
7721
- "Whether lending is enabled for this token (admin toggle)"
7722
- ],
7723
6826
  "type": "bool"
7724
6827
  },
7725
6828
  {
7726
6829
  "name": "interest_rate_bps",
7727
- "docs": [
7728
- "Interest rate per epoch in basis points (default: 200 = 2%)"
7729
- ],
7730
6830
  "type": "u16"
7731
6831
  },
7732
6832
  {
7733
6833
  "name": "max_ltv_bps",
7734
- "docs": [
7735
- "Maximum loan-to-value ratio in basis points (default: 5000 = 50%)"
7736
- ],
7737
6834
  "type": "u16"
7738
6835
  },
7739
6836
  {
7740
6837
  "name": "liquidation_threshold_bps",
7741
- "docs": [
7742
- "LTV threshold that triggers liquidation (default: 6500 = 65%)"
7743
- ],
7744
6838
  "type": "u16"
7745
6839
  },
7746
6840
  {
7747
6841
  "name": "liquidation_bonus_bps",
7748
- "docs": [
7749
- "Bonus collateral given to liquidator (default: 1000 = 10%)"
7750
- ],
7751
6842
  "type": "u16"
7752
6843
  },
7753
6844
  {
7754
6845
  "name": "liquidation_close_bps",
7755
- "docs": [
7756
- "Max percentage of position liquidatable per call (default: 5000 = 50%)"
7757
- ],
7758
6846
  "type": "u16"
7759
6847
  },
7760
6848
  {
7761
6849
  "name": "lending_utilization_cap_bps",
7762
- "docs": [
7763
- "Max percentage of treasury SOL that can be lent (default: 5000 = 50%)"
7764
- ],
7765
6850
  "type": "u16"
7766
6851
  }
7767
6852
  ]
@@ -7769,34 +6854,15 @@
7769
6854
  },
7770
6855
  {
7771
6856
  "name": "TreasuryLock",
7772
- "docs": [
7773
- "[V27] Treasury lock for new tokens. Owns the locked token ATA (250M).",
7774
- "",
7775
- "Every new token gets a TreasuryLock PDA that holds 25% of supply in a",
7776
- "community-governed reserve. The lock PDA owns a Token-2022 ATA containing",
7777
- "the locked tokens. No instruction can withdraw — release logic is deferred",
7778
- "to a future governance mechanism.",
7779
- "",
7780
- "Also serves as a type discriminator: its existence tells the revival handler",
7781
- "to use V27 thresholds (IVS = 3BT/8) instead of legacy V25 thresholds (IVS = BT/8).",
7782
- "",
7783
- "Seeds: [\"treasury_lock\", mint.key()]"
7784
- ],
7785
6857
  "type": {
7786
6858
  "kind": "struct",
7787
6859
  "fields": [
7788
6860
  {
7789
6861
  "name": "mint",
7790
- "docs": [
7791
- "Token mint this lock belongs to"
7792
- ],
7793
6862
  "type": "pubkey"
7794
6863
  },
7795
6864
  {
7796
6865
  "name": "bump",
7797
- "docs": [
7798
- "PDA bump"
7799
- ],
7800
6866
  "type": "u8"
7801
6867
  }
7802
6868
  ]
@@ -7804,73 +6870,43 @@
7804
6870
  },
7805
6871
  {
7806
6872
  "name": "UserPosition",
7807
- "docs": [
7808
- "Per-user position for a token"
7809
- ],
7810
6873
  "type": {
7811
6874
  "kind": "struct",
7812
6875
  "fields": [
7813
6876
  {
7814
6877
  "name": "user",
7815
- "docs": [
7816
- "User wallet"
7817
- ],
7818
6878
  "type": "pubkey"
7819
6879
  },
7820
6880
  {
7821
6881
  "name": "bonding_curve",
7822
- "docs": [
7823
- "Bonding curve reference"
7824
- ],
7825
6882
  "type": "pubkey"
7826
6883
  },
7827
6884
  {
7828
6885
  "name": "total_purchased",
7829
- "docs": [
7830
- "Gross tokens purchased"
7831
- ],
7832
6886
  "type": "u64"
7833
6887
  },
7834
6888
  {
7835
6889
  "name": "tokens_received",
7836
- "docs": [
7837
- "Net tokens received"
7838
- ],
7839
6890
  "type": "u64"
7840
6891
  },
7841
6892
  {
7842
6893
  "name": "tokens_burned",
7843
- "docs": [
7844
- "Tokens sent to burn"
7845
- ],
7846
6894
  "type": "u64"
7847
6895
  },
7848
6896
  {
7849
6897
  "name": "total_sol_spent",
7850
- "docs": [
7851
- "SOL spent"
7852
- ],
7853
6898
  "type": "u64"
7854
6899
  },
7855
6900
  {
7856
6901
  "name": "has_voted",
7857
- "docs": [
7858
- "Has voted"
7859
- ],
7860
6902
  "type": "bool"
7861
6903
  },
7862
6904
  {
7863
6905
  "name": "vote_return",
7864
- "docs": [
7865
- "Vote choice"
7866
- ],
7867
6906
  "type": "bool"
7868
6907
  },
7869
6908
  {
7870
6909
  "name": "bump",
7871
- "docs": [
7872
- "PDA bump"
7873
- ],
7874
6910
  "type": "u8"
7875
6911
  }
7876
6912
  ]
@@ -7878,66 +6914,39 @@
7878
6914
  },
7879
6915
  {
7880
6916
  "name": "UserStats",
7881
- "docs": [
7882
- "Per-user stats for platform-wide volume tracking and rewards (V4)"
7883
- ],
7884
6917
  "type": {
7885
6918
  "kind": "struct",
7886
6919
  "fields": [
7887
6920
  {
7888
6921
  "name": "user",
7889
- "docs": [
7890
- "User wallet"
7891
- ],
7892
6922
  "type": "pubkey"
7893
6923
  },
7894
6924
  {
7895
6925
  "name": "total_volume",
7896
- "docs": [
7897
- "All-time SOL volume (buys + sells)"
7898
- ],
7899
6926
  "type": "u64"
7900
6927
  },
7901
6928
  {
7902
6929
  "name": "volume_current_epoch",
7903
- "docs": [
7904
- "Volume in current epoch"
7905
- ],
7906
6930
  "type": "u64"
7907
6931
  },
7908
6932
  {
7909
6933
  "name": "volume_previous_epoch",
7910
- "docs": [
7911
- "Volume in previous epoch (for claiming)"
7912
- ],
7913
6934
  "type": "u64"
7914
6935
  },
7915
6936
  {
7916
6937
  "name": "last_epoch_claimed",
7917
- "docs": [
7918
- "Last epoch user claimed rewards for"
7919
- ],
7920
6938
  "type": "u64"
7921
6939
  },
7922
6940
  {
7923
6941
  "name": "total_rewards_claimed",
7924
- "docs": [
7925
- "Total rewards claimed all-time"
7926
- ],
7927
6942
  "type": "u64"
7928
6943
  },
7929
6944
  {
7930
6945
  "name": "last_volume_epoch",
7931
- "docs": [
7932
- "Last epoch when volume was recorded (for lazy epoch transition)"
7933
- ],
7934
6946
  "type": "u64"
7935
6947
  },
7936
6948
  {
7937
6949
  "name": "bump",
7938
- "docs": [
7939
- "PDA bump"
7940
- ],
7941
6950
  "type": "u8"
7942
6951
  }
7943
6952
  ]
@@ -7977,41 +6986,23 @@
7977
6986
  },
7978
6987
  {
7979
6988
  "name": "VaultWalletLink",
7980
- "docs": [
7981
- "[V14.1] Reverse pointer linking a wallet to a vault.",
7982
- "",
7983
- "PDA seed: [b\"vault_wallet\", wallet.key()] — one link per wallet.",
7984
- "Given any wallet, derive its VaultWalletLink PDA to find which vault it belongs to."
7985
- ],
7986
6989
  "type": {
7987
6990
  "kind": "struct",
7988
6991
  "fields": [
7989
6992
  {
7990
6993
  "name": "vault",
7991
- "docs": [
7992
- "The vault this wallet is linked to"
7993
- ],
7994
6994
  "type": "pubkey"
7995
6995
  },
7996
6996
  {
7997
6997
  "name": "wallet",
7998
- "docs": [
7999
- "The linked wallet"
8000
- ],
8001
6998
  "type": "pubkey"
8002
6999
  },
8003
7000
  {
8004
7001
  "name": "linked_at",
8005
- "docs": [
8006
- "When this link was created"
8007
- ],
8008
7002
  "type": "i64"
8009
7003
  },
8010
7004
  {
8011
7005
  "name": "bump",
8012
- "docs": [
8013
- "PDA bump"
8014
- ],
8015
7006
  "type": "u8"
8016
7007
  }
8017
7008
  ]