@elmntl/vaults-v2 1.4.5 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +47 -0
  2. package/dist/accounts/index.d.ts +2 -0
  3. package/dist/accounts/index.d.ts.map +1 -1
  4. package/dist/accounts/index.js +3 -1
  5. package/dist/accounts/index.js.map +1 -1
  6. package/dist/accounts/pool.d.ts +6 -0
  7. package/dist/accounts/pool.d.ts.map +1 -1
  8. package/dist/accounts/pool.js +8 -0
  9. package/dist/accounts/pool.js.map +1 -1
  10. package/dist/accounts/poolExt.d.ts +101 -0
  11. package/dist/accounts/poolExt.d.ts.map +1 -0
  12. package/dist/accounts/poolExt.js +211 -0
  13. package/dist/accounts/poolExt.js.map +1 -0
  14. package/dist/accounts/position.d.ts +8 -0
  15. package/dist/accounts/position.d.ts.map +1 -1
  16. package/dist/accounts/position.js +22 -0
  17. package/dist/accounts/position.js.map +1 -1
  18. package/dist/accounts/ticket.d.ts +13 -0
  19. package/dist/accounts/ticket.d.ts.map +1 -1
  20. package/dist/accounts/ticket.js +30 -0
  21. package/dist/accounts/ticket.js.map +1 -1
  22. package/dist/generated/idl/elemental_vault_v2.json +1395 -78
  23. package/dist/index.d.ts +3 -2
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +11 -1
  26. package/dist/index.js.map +1 -1
  27. package/dist/programs/elemental.d.ts +34 -1
  28. package/dist/programs/elemental.d.ts.map +1 -1
  29. package/dist/programs/elemental.js +173 -0
  30. package/dist/programs/elemental.js.map +1 -1
  31. package/dist/types.d.ts +55 -0
  32. package/dist/types.d.ts.map +1 -1
  33. package/dist/types.js +25 -2
  34. package/dist/types.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/accounts/index.ts +2 -0
  37. package/src/accounts/pool.ts +9 -0
  38. package/src/accounts/poolExt.ts +272 -0
  39. package/src/accounts/position.ts +22 -0
  40. package/src/accounts/ticket.ts +35 -0
  41. package/src/generated/idl/elemental_vault_v2.json +1395 -78
  42. package/src/index.ts +12 -1
  43. package/src/programs/elemental.ts +206 -1
  44. package/src/types.ts +66 -1
@@ -337,6 +337,64 @@
337
337
  }
338
338
  ]
339
339
  },
340
+ {
341
+ "name": "create_ticket_alt",
342
+ "docs": [
343
+ "Create a withdrawal ticket to be paid in the alternate token. Locks the current",
344
+ "NAV (Scope-read from remaining_accounts[0], or posted) and exit fee onto the",
345
+ "ticket; the payout is fixed from this moment. amount=0 is yield-only."
346
+ ],
347
+ "discriminator": [
348
+ 185,
349
+ 1,
350
+ 219,
351
+ 108,
352
+ 233,
353
+ 36,
354
+ 14,
355
+ 212
356
+ ],
357
+ "accounts": [
358
+ {
359
+ "name": "payer",
360
+ "writable": true,
361
+ "signer": true
362
+ },
363
+ {
364
+ "name": "position_owner",
365
+ "accounts": [
366
+ {
367
+ "name": "owner",
368
+ "signer": true
369
+ },
370
+ {
371
+ "name": "position",
372
+ "writable": true
373
+ },
374
+ {
375
+ "name": "pool",
376
+ "writable": true
377
+ }
378
+ ]
379
+ },
380
+ {
381
+ "name": "pool_ext"
382
+ },
383
+ {
384
+ "name": "ticket",
385
+ "writable": true
386
+ },
387
+ {
388
+ "name": "system_program"
389
+ }
390
+ ],
391
+ "args": [
392
+ {
393
+ "name": "amount",
394
+ "type": "u64"
395
+ }
396
+ ]
397
+ },
340
398
  {
341
399
  "name": "deactivate",
342
400
  "docs": [
@@ -459,6 +517,76 @@
459
517
  }
460
518
  ]
461
519
  },
520
+ {
521
+ "name": "deposit_alt",
522
+ "docs": [
523
+ "Deposit the alternate token; credited to the position in vault units at the NAV",
524
+ "(Scope-read from remaining_accounts[0], or posted). `min_credit` is the user's",
525
+ "floor in vault units."
526
+ ],
527
+ "discriminator": [
528
+ 31,
529
+ 117,
530
+ 16,
531
+ 195,
532
+ 206,
533
+ 161,
534
+ 196,
535
+ 176
536
+ ],
537
+ "accounts": [
538
+ {
539
+ "name": "position_owner",
540
+ "accounts": [
541
+ {
542
+ "name": "owner",
543
+ "signer": true
544
+ },
545
+ {
546
+ "name": "position",
547
+ "writable": true
548
+ },
549
+ {
550
+ "name": "pool",
551
+ "writable": true
552
+ }
553
+ ]
554
+ },
555
+ {
556
+ "name": "pool_ext"
557
+ },
558
+ {
559
+ "name": "user_alt_account",
560
+ "docs": [
561
+ "User's alt token account"
562
+ ],
563
+ "writable": true
564
+ },
565
+ {
566
+ "name": "alt_holder",
567
+ "docs": [
568
+ "Pool's alt holder (receives the deposit)"
569
+ ],
570
+ "writable": true
571
+ },
572
+ {
573
+ "name": "alt_mint"
574
+ },
575
+ {
576
+ "name": "token_program"
577
+ }
578
+ ],
579
+ "args": [
580
+ {
581
+ "name": "amount",
582
+ "type": "u64"
583
+ },
584
+ {
585
+ "name": "min_credit",
586
+ "type": "u64"
587
+ }
588
+ ]
589
+ },
462
590
  {
463
591
  "name": "deposit_vault_mint",
464
592
  "docs": [
@@ -523,6 +651,48 @@
523
651
  }
524
652
  ]
525
653
  },
654
+ {
655
+ "name": "flush_alt_to_manager",
656
+ "docs": [
657
+ "Permissionless: move all alt tokens in the holder to the pool's manager_wallet."
658
+ ],
659
+ "discriminator": [
660
+ 93,
661
+ 44,
662
+ 26,
663
+ 173,
664
+ 62,
665
+ 62,
666
+ 74,
667
+ 149
668
+ ],
669
+ "accounts": [
670
+ {
671
+ "name": "pool"
672
+ },
673
+ {
674
+ "name": "ext_authority"
675
+ },
676
+ {
677
+ "name": "pool_ext"
678
+ },
679
+ {
680
+ "name": "alt_holder",
681
+ "writable": true
682
+ },
683
+ {
684
+ "name": "manager_alt_account",
685
+ "writable": true
686
+ },
687
+ {
688
+ "name": "alt_mint"
689
+ },
690
+ {
691
+ "name": "token_program"
692
+ }
693
+ ],
694
+ "args": []
695
+ },
526
696
  {
527
697
  "name": "flush_to_manager",
528
698
  "docs": [
@@ -646,6 +816,104 @@
646
816
  }
647
817
  ]
648
818
  },
819
+ {
820
+ "name": "init_pool_ext",
821
+ "docs": [
822
+ "Admin-only: give a pool a second token at its edges. `alt_is_usdc` = true when",
823
+ "the pool is RWA-denominated and the alt is USDC; false when the pool is",
824
+ "USDC-denominated and the alt is the RWA (in-place adaptation of a live pool).",
825
+ "`nav` is USDC per 1 RWA, 1e9-scaled, for the posted source; `nav_oracle`",
826
+ "Some(scope_prices) + `nav_oracle_index` selects the Scope source (NAV read",
827
+ "on-chain at every conversion; requires `nav_max_age` > 0). `flags`: bit0 alt",
828
+ "deposits, bit1 alt exits. `fee_destination` None = exit fee stays in the faucet."
829
+ ],
830
+ "discriminator": [
831
+ 146,
832
+ 90,
833
+ 228,
834
+ 29,
835
+ 101,
836
+ 206,
837
+ 248,
838
+ 68
839
+ ],
840
+ "accounts": [
841
+ {
842
+ "name": "admin",
843
+ "writable": true,
844
+ "signer": true
845
+ },
846
+ {
847
+ "name": "pool"
848
+ },
849
+ {
850
+ "name": "ext_authority",
851
+ "docs": [
852
+ "Never the pool authority (see `PoolExt::ext_authority_bump`)."
853
+ ]
854
+ },
855
+ {
856
+ "name": "pool_ext",
857
+ "writable": true
858
+ },
859
+ {
860
+ "name": "alt_mint"
861
+ },
862
+ {
863
+ "name": "alt_holder",
864
+ "docs": [
865
+ "Receives alt deposits"
866
+ ]
867
+ },
868
+ {
869
+ "name": "alt_faucet",
870
+ "docs": [
871
+ "Pays alt exits"
872
+ ]
873
+ },
874
+ {
875
+ "name": "system_program"
876
+ }
877
+ ],
878
+ "args": [
879
+ {
880
+ "name": "alt_is_usdc",
881
+ "type": "bool"
882
+ },
883
+ {
884
+ "name": "nav",
885
+ "type": "u64"
886
+ },
887
+ {
888
+ "name": "nav_max_age",
889
+ "type": "u32"
890
+ },
891
+ {
892
+ "name": "exit_fee_bps",
893
+ "type": "u16"
894
+ },
895
+ {
896
+ "name": "fee_destination",
897
+ "type": {
898
+ "option": "pubkey"
899
+ }
900
+ },
901
+ {
902
+ "name": "flags",
903
+ "type": "u8"
904
+ },
905
+ {
906
+ "name": "nav_oracle",
907
+ "type": {
908
+ "option": "pubkey"
909
+ }
910
+ },
911
+ {
912
+ "name": "nav_oracle_index",
913
+ "type": "u16"
914
+ }
915
+ ]
916
+ },
649
917
  {
650
918
  "name": "initialize",
651
919
  "docs": [
@@ -874,6 +1142,12 @@
874
1142
  "accounts": [
875
1143
  {
876
1144
  "name": "owner",
1145
+ "docs": [
1146
+ "Receives the closed ticket's lamports (`close = owner` below), so it must be",
1147
+ "writable even when someone else pays the fee. Was unmarked before ele7-rwa-v1.1:",
1148
+ "worked only because every client made the owner the fee payer."
1149
+ ],
1150
+ "writable": true,
877
1151
  "signer": true
878
1152
  },
879
1153
  {
@@ -921,62 +1195,208 @@
921
1195
  "args": []
922
1196
  },
923
1197
  {
924
- "name": "transfer_to_faucet",
1198
+ "name": "redeem_ticket_alt",
925
1199
  "docs": [
926
- "Transfer funds from liquidity_holder to liquidity_faucet (admin only)"
1200
+ "Redeem a matured alternate-token ticket: pays the locked net from the alt faucet."
927
1201
  ],
928
1202
  "discriminator": [
929
- 78,
930
- 27,
931
- 32,
932
- 107,
933
- 119,
934
- 121,
935
- 171,
936
- 0
1203
+ 185,
1204
+ 34,
1205
+ 214,
1206
+ 201,
1207
+ 57,
1208
+ 126,
1209
+ 52,
1210
+ 56
937
1211
  ],
938
1212
  "accounts": [
939
1213
  {
940
- "name": "admin",
941
- "docs": [
942
- "Admin must sign"
943
- ],
1214
+ "name": "owner",
1215
+ "writable": true,
944
1216
  "signer": true
945
1217
  },
1218
+ {
1219
+ "name": "ticket",
1220
+ "writable": true
1221
+ },
1222
+ {
1223
+ "name": "position",
1224
+ "writable": true
1225
+ },
946
1226
  {
947
1227
  "name": "pool",
948
- "docs": [
949
- "The pool (must have admin as the signer)"
950
- ]
1228
+ "writable": true
951
1229
  },
952
1230
  {
953
- "name": "pool_authority"
1231
+ "name": "ext_authority"
954
1232
  },
955
1233
  {
956
- "name": "liquidity_holder",
1234
+ "name": "pool_ext"
1235
+ },
1236
+ {
1237
+ "name": "alt_faucet",
957
1238
  "docs": [
958
- "Source: liquidity_holder (where deposits go)"
1239
+ "Alt faucet (pays the exit)"
959
1240
  ],
960
1241
  "writable": true
961
1242
  },
962
1243
  {
963
- "name": "liquidity_faucet",
1244
+ "name": "user_alt_account",
964
1245
  "docs": [
965
- "Destination: liquidity_faucet (where withdrawals come from)"
1246
+ "User's alt account (receives net)"
966
1247
  ],
967
1248
  "writable": true
968
1249
  },
969
1250
  {
970
- "name": "vault_mint",
1251
+ "name": "fee_destination_account",
971
1252
  "docs": [
972
- "The vault mint"
973
- ]
1253
+ "Fee destination's alt account; required only when PoolExt.fee_destination is set and fee > 0"
1254
+ ],
1255
+ "writable": true,
1256
+ "optional": true
974
1257
  },
975
1258
  {
976
- "name": "token_program",
977
- "docs": [
978
- "Token program"
979
- ]
1259
+ "name": "alt_mint"
1260
+ },
1261
+ {
1262
+ "name": "token_program"
1263
+ }
1264
+ ],
1265
+ "args": []
1266
+ },
1267
+ {
1268
+ "name": "set_migration_convert",
1269
+ "docs": [
1270
+ "Admin-only: allow a migration config to accept the target's alt mint as the",
1271
+ "source asset, credited at the target PoolExt NAV (converting migration)."
1272
+ ],
1273
+ "discriminator": [
1274
+ 226,
1275
+ 104,
1276
+ 66,
1277
+ 143,
1278
+ 13,
1279
+ 59,
1280
+ 40,
1281
+ 246
1282
+ ],
1283
+ "accounts": [
1284
+ {
1285
+ "name": "admin",
1286
+ "signer": true
1287
+ },
1288
+ {
1289
+ "name": "pool"
1290
+ },
1291
+ {
1292
+ "name": "migration_config",
1293
+ "writable": true
1294
+ },
1295
+ {
1296
+ "name": "pool_ext",
1297
+ "docs": [
1298
+ "The target pool's ext must exist for a converting path to make sense."
1299
+ ]
1300
+ }
1301
+ ],
1302
+ "args": [
1303
+ {
1304
+ "name": "allow_convert",
1305
+ "type": "bool"
1306
+ }
1307
+ ]
1308
+ },
1309
+ {
1310
+ "name": "set_vault_exit_fee",
1311
+ "docs": [
1312
+ "Admin-only: fee (bps) on exits paid in the pool's vault token — the USDC leg of a",
1313
+ "USDC-denominated pool. Locked onto tickets at creation; legacy `withdraw` applies",
1314
+ "the current rate. The fee stays in the liquidity faucet. Cap 10%."
1315
+ ],
1316
+ "discriminator": [
1317
+ 243,
1318
+ 33,
1319
+ 212,
1320
+ 141,
1321
+ 171,
1322
+ 192,
1323
+ 93,
1324
+ 107
1325
+ ],
1326
+ "accounts": [
1327
+ {
1328
+ "name": "admin",
1329
+ "signer": true
1330
+ },
1331
+ {
1332
+ "name": "pool",
1333
+ "writable": true
1334
+ }
1335
+ ],
1336
+ "args": [
1337
+ {
1338
+ "name": "bps",
1339
+ "type": "u16"
1340
+ }
1341
+ ]
1342
+ },
1343
+ {
1344
+ "name": "transfer_to_faucet",
1345
+ "docs": [
1346
+ "Transfer funds from liquidity_holder to liquidity_faucet (admin only)"
1347
+ ],
1348
+ "discriminator": [
1349
+ 78,
1350
+ 27,
1351
+ 32,
1352
+ 107,
1353
+ 119,
1354
+ 121,
1355
+ 171,
1356
+ 0
1357
+ ],
1358
+ "accounts": [
1359
+ {
1360
+ "name": "admin",
1361
+ "docs": [
1362
+ "Admin must sign"
1363
+ ],
1364
+ "signer": true
1365
+ },
1366
+ {
1367
+ "name": "pool",
1368
+ "docs": [
1369
+ "The pool (must have admin as the signer)"
1370
+ ]
1371
+ },
1372
+ {
1373
+ "name": "pool_authority"
1374
+ },
1375
+ {
1376
+ "name": "liquidity_holder",
1377
+ "docs": [
1378
+ "Source: liquidity_holder (where deposits go)"
1379
+ ],
1380
+ "writable": true
1381
+ },
1382
+ {
1383
+ "name": "liquidity_faucet",
1384
+ "docs": [
1385
+ "Destination: liquidity_faucet (where withdrawals come from)"
1386
+ ],
1387
+ "writable": true
1388
+ },
1389
+ {
1390
+ "name": "vault_mint",
1391
+ "docs": [
1392
+ "The vault mint"
1393
+ ]
1394
+ },
1395
+ {
1396
+ "name": "token_program",
1397
+ "docs": [
1398
+ "Token program"
1399
+ ]
980
1400
  }
981
1401
  ],
982
1402
  "args": [
@@ -1082,6 +1502,45 @@
1082
1502
  ],
1083
1503
  "args": []
1084
1504
  },
1505
+ {
1506
+ "name": "update_pool_ext",
1507
+ "docs": [
1508
+ "Admin may change any field; the pool's manager_wallet may post `nav` only."
1509
+ ],
1510
+ "discriminator": [
1511
+ 237,
1512
+ 82,
1513
+ 191,
1514
+ 95,
1515
+ 40,
1516
+ 0,
1517
+ 157,
1518
+ 27
1519
+ ],
1520
+ "accounts": [
1521
+ {
1522
+ "name": "signer",
1523
+ "signer": true
1524
+ },
1525
+ {
1526
+ "name": "pool"
1527
+ },
1528
+ {
1529
+ "name": "pool_ext",
1530
+ "writable": true
1531
+ }
1532
+ ],
1533
+ "args": [
1534
+ {
1535
+ "name": "params",
1536
+ "type": {
1537
+ "defined": {
1538
+ "name": "UpdatePoolExtParams"
1539
+ }
1540
+ }
1541
+ }
1542
+ ]
1543
+ },
1085
1544
  {
1086
1545
  "name": "withdraw",
1087
1546
  "docs": [
@@ -1175,6 +1634,19 @@
1175
1634
  188
1176
1635
  ]
1177
1636
  },
1637
+ {
1638
+ "name": "PoolExt",
1639
+ "discriminator": [
1640
+ 136,
1641
+ 76,
1642
+ 222,
1643
+ 248,
1644
+ 241,
1645
+ 143,
1646
+ 24,
1647
+ 212
1648
+ ]
1649
+ },
1178
1650
  {
1179
1651
  "name": "Position",
1180
1652
  "discriminator": [
@@ -1229,6 +1701,45 @@
1229
1701
  11
1230
1702
  ]
1231
1703
  },
1704
+ {
1705
+ "name": "AltDepositedEvent",
1706
+ "discriminator": [
1707
+ 114,
1708
+ 255,
1709
+ 228,
1710
+ 119,
1711
+ 69,
1712
+ 196,
1713
+ 49,
1714
+ 167
1715
+ ]
1716
+ },
1717
+ {
1718
+ "name": "AltRedeemedEvent",
1719
+ "discriminator": [
1720
+ 98,
1721
+ 103,
1722
+ 146,
1723
+ 48,
1724
+ 83,
1725
+ 110,
1726
+ 165,
1727
+ 245
1728
+ ]
1729
+ },
1730
+ {
1731
+ "name": "AltTicketCreatedEvent",
1732
+ "discriminator": [
1733
+ 136,
1734
+ 58,
1735
+ 150,
1736
+ 115,
1737
+ 156,
1738
+ 216,
1739
+ 19,
1740
+ 208
1741
+ ]
1742
+ },
1232
1743
  {
1233
1744
  "name": "ConfigUpdatedEvent",
1234
1745
  "discriminator": [
@@ -1307,6 +1818,45 @@
1307
1818
  204
1308
1819
  ]
1309
1820
  },
1821
+ {
1822
+ "name": "MigrationConvertSetEvent",
1823
+ "discriminator": [
1824
+ 81,
1825
+ 101,
1826
+ 127,
1827
+ 123,
1828
+ 227,
1829
+ 96,
1830
+ 9,
1831
+ 180
1832
+ ]
1833
+ },
1834
+ {
1835
+ "name": "PoolExtInitializedEvent",
1836
+ "discriminator": [
1837
+ 22,
1838
+ 115,
1839
+ 57,
1840
+ 194,
1841
+ 37,
1842
+ 128,
1843
+ 218,
1844
+ 252
1845
+ ]
1846
+ },
1847
+ {
1848
+ "name": "PoolExtUpdatedEvent",
1849
+ "discriminator": [
1850
+ 21,
1851
+ 162,
1852
+ 161,
1853
+ 234,
1854
+ 48,
1855
+ 74,
1856
+ 139,
1857
+ 158
1858
+ ]
1859
+ },
1310
1860
  {
1311
1861
  "name": "PoolUpdatedEvent",
1312
1862
  "discriminator": [
@@ -1345,6 +1895,45 @@
1345
1895
  60,
1346
1896
  172
1347
1897
  ]
1898
+ },
1899
+ {
1900
+ "name": "VaultExitFeeSetEvent",
1901
+ "discriminator": [
1902
+ 121,
1903
+ 173,
1904
+ 101,
1905
+ 103,
1906
+ 255,
1907
+ 29,
1908
+ 77,
1909
+ 126
1910
+ ]
1911
+ },
1912
+ {
1913
+ "name": "VaultRedeemedEvent",
1914
+ "discriminator": [
1915
+ 2,
1916
+ 247,
1917
+ 215,
1918
+ 14,
1919
+ 36,
1920
+ 188,
1921
+ 222,
1922
+ 101
1923
+ ]
1924
+ },
1925
+ {
1926
+ "name": "VaultTicketCreatedEvent",
1927
+ "discriminator": [
1928
+ 133,
1929
+ 238,
1930
+ 236,
1931
+ 96,
1932
+ 41,
1933
+ 88,
1934
+ 238,
1935
+ 55
1936
+ ]
1348
1937
  }
1349
1938
  ],
1350
1939
  "errors": [
@@ -1485,33 +2074,108 @@
1485
2074
  },
1486
2075
  {
1487
2076
  "code": 6027,
2077
+ "name": "PartialDeactivateWouldLeaveDust",
2078
+ "msg": "Partial deactivate would leave a sub-min remainder — do a full withdrawal instead"
2079
+ },
2080
+ {
2081
+ "code": 6028,
1488
2082
  "name": "InvalidMigrationAuthority",
1489
2083
  "msg": "Signer is not the configured migration authority"
1490
2084
  },
1491
2085
  {
1492
- "code": 6028,
2086
+ "code": 6029,
1493
2087
  "name": "MigrationAssetMismatch",
1494
2088
  "msg": "Source mint does not match the target pool's vault mint"
1495
2089
  },
1496
2090
  {
1497
- "code": 6029,
2091
+ "code": 6030,
1498
2092
  "name": "MigrationCapExceeded",
1499
2093
  "msg": "Cumulative migration cap exceeded"
1500
2094
  },
1501
2095
  {
1502
- "code": 6030,
2096
+ "code": 6031,
1503
2097
  "name": "InvalidMigrationAmount",
1504
2098
  "msg": "Migration amount must be greater than zero"
1505
- }
1506
- ],
1507
- "types": [
2099
+ },
1508
2100
  {
1509
- "name": "AdapterConfig",
1510
- "docs": [
1511
- "Adapter-specific configuration stored in pool",
1512
- "",
1513
- "Each adapter type may need different configuration data.",
1514
- "This is stored as a fixed-size byte array for flexibility."
2101
+ "code": 6032,
2102
+ "name": "InvalidNav",
2103
+ "msg": "Posted NAV is zero"
2104
+ },
2105
+ {
2106
+ "code": 6033,
2107
+ "name": "PoolExtNavStale",
2108
+ "msg": "Posted NAV is older than nav_max_age"
2109
+ },
2110
+ {
2111
+ "code": 6034,
2112
+ "name": "AltDepositsDisabled",
2113
+ "msg": "Alternate-token deposits are disabled on this pool"
2114
+ },
2115
+ {
2116
+ "code": 6035,
2117
+ "name": "AltExitsDisabled",
2118
+ "msg": "Alternate-token exits are disabled on this pool"
2119
+ },
2120
+ {
2121
+ "code": 6036,
2122
+ "name": "InvalidPayoutMint",
2123
+ "msg": "Ticket was not created for this payout token"
2124
+ },
2125
+ {
2126
+ "code": 6037,
2127
+ "name": "ExitFeeTooHigh",
2128
+ "msg": "Exit fee exceeds the hard cap"
2129
+ },
2130
+ {
2131
+ "code": 6038,
2132
+ "name": "PoolExtRequired",
2133
+ "msg": "PoolExt account required for this conversion"
2134
+ },
2135
+ {
2136
+ "code": 6039,
2137
+ "name": "PoolExtUnauthorized",
2138
+ "msg": "Signer may not change this PoolExt field"
2139
+ },
2140
+ {
2141
+ "code": 6040,
2142
+ "name": "CreditBelowMinimum",
2143
+ "msg": "Converted credit is below min_credit"
2144
+ },
2145
+ {
2146
+ "code": 6041,
2147
+ "name": "FeeDestinationRequired",
2148
+ "msg": "Fee destination token account required"
2149
+ },
2150
+ {
2151
+ "code": 6042,
2152
+ "name": "SelfMigration",
2153
+ "msg": "A pool cannot migrate into itself"
2154
+ },
2155
+ {
2156
+ "code": 6043,
2157
+ "name": "NavOracleRequired",
2158
+ "msg": "NAV oracle account required for this pool's conversion source"
2159
+ },
2160
+ {
2161
+ "code": 6044,
2162
+ "name": "InvalidNavOracle",
2163
+ "msg": "NAV oracle account is not the pinned one or has an unexpected layout"
2164
+ },
2165
+ {
2166
+ "code": 6045,
2167
+ "name": "NavMaxAgeRequired",
2168
+ "msg": "A Scope-sourced pool needs a non-zero nav_max_age"
2169
+ }
2170
+ ],
2171
+ "types": [
2172
+ {
2173
+ "name": "AdapterConfig",
2174
+ "docs": [
2175
+ "Adapter-specific configuration stored in pool",
2176
+ "",
2177
+ "Each adapter type may need different configuration data.",
2178
+ "This is stored as a fixed-size byte array for flexibility."
1515
2179
  ],
1516
2180
  "type": {
1517
2181
  "kind": "struct",
@@ -1587,6 +2251,142 @@
1587
2251
  ]
1588
2252
  }
1589
2253
  },
2254
+ {
2255
+ "name": "AltDepositedEvent",
2256
+ "type": {
2257
+ "kind": "struct",
2258
+ "fields": [
2259
+ {
2260
+ "name": "pool",
2261
+ "type": "pubkey"
2262
+ },
2263
+ {
2264
+ "name": "position",
2265
+ "type": "pubkey"
2266
+ },
2267
+ {
2268
+ "name": "owner",
2269
+ "type": "pubkey"
2270
+ },
2271
+ {
2272
+ "name": "alt_mint",
2273
+ "type": "pubkey"
2274
+ },
2275
+ {
2276
+ "name": "alt_in",
2277
+ "type": "u64"
2278
+ },
2279
+ {
2280
+ "name": "vault_credited",
2281
+ "type": "u64"
2282
+ },
2283
+ {
2284
+ "name": "nav",
2285
+ "type": "u64"
2286
+ }
2287
+ ]
2288
+ }
2289
+ },
2290
+ {
2291
+ "name": "AltRedeemedEvent",
2292
+ "type": {
2293
+ "kind": "struct",
2294
+ "fields": [
2295
+ {
2296
+ "name": "pool",
2297
+ "type": "pubkey"
2298
+ },
2299
+ {
2300
+ "name": "ticket",
2301
+ "type": "pubkey"
2302
+ },
2303
+ {
2304
+ "name": "owner",
2305
+ "type": "pubkey"
2306
+ },
2307
+ {
2308
+ "name": "alt_mint",
2309
+ "type": "pubkey"
2310
+ },
2311
+ {
2312
+ "name": "vault_total",
2313
+ "type": "u64"
2314
+ },
2315
+ {
2316
+ "name": "nav_locked",
2317
+ "type": "u64"
2318
+ },
2319
+ {
2320
+ "name": "fee_bps_locked",
2321
+ "type": "u16"
2322
+ },
2323
+ {
2324
+ "name": "gross_alt",
2325
+ "type": "u64"
2326
+ },
2327
+ {
2328
+ "name": "fee_alt",
2329
+ "type": "u64"
2330
+ },
2331
+ {
2332
+ "name": "net_alt",
2333
+ "type": "u64"
2334
+ },
2335
+ {
2336
+ "name": "fee_destination",
2337
+ "type": "pubkey"
2338
+ }
2339
+ ]
2340
+ }
2341
+ },
2342
+ {
2343
+ "name": "AltTicketCreatedEvent",
2344
+ "type": {
2345
+ "kind": "struct",
2346
+ "fields": [
2347
+ {
2348
+ "name": "pool",
2349
+ "type": "pubkey"
2350
+ },
2351
+ {
2352
+ "name": "ticket",
2353
+ "type": "pubkey"
2354
+ },
2355
+ {
2356
+ "name": "owner",
2357
+ "type": "pubkey"
2358
+ },
2359
+ {
2360
+ "name": "alt_mint",
2361
+ "type": "pubkey"
2362
+ },
2363
+ {
2364
+ "name": "vault_total",
2365
+ "type": "u64"
2366
+ },
2367
+ {
2368
+ "name": "nav_locked",
2369
+ "type": "u64"
2370
+ },
2371
+ {
2372
+ "name": "fee_bps_locked",
2373
+ "type": "u16"
2374
+ },
2375
+ {
2376
+ "name": "gross_alt",
2377
+ "type": "u64"
2378
+ },
2379
+ {
2380
+ "name": "fee_alt",
2381
+ "type": "u64"
2382
+ },
2383
+ {
2384
+ "name": "net_alt",
2385
+ "type": "u64"
2386
+ }
2387
+ ]
2388
+ }
2389
+ },
1590
2390
  {
1591
2391
  "name": "ConfigUpdatedEvent",
1592
2392
  "type": {
@@ -1720,6 +2520,9 @@
1720
2520
  },
1721
2521
  {
1722
2522
  "name": "amount",
2523
+ "docs": [
2524
+ "Amount in source_mint units as sent by the source pool"
2525
+ ],
1723
2526
  "type": "u64"
1724
2527
  },
1725
2528
  {
@@ -1729,6 +2532,20 @@
1729
2532
  {
1730
2533
  "name": "remaining_cap",
1731
2534
  "type": "u64"
2535
+ },
2536
+ {
2537
+ "name": "credited",
2538
+ "docs": [
2539
+ "Amount credited to the position in vault_mint units (== amount when same asset)"
2540
+ ],
2541
+ "type": "u64"
2542
+ },
2543
+ {
2544
+ "name": "nav",
2545
+ "docs": [
2546
+ "NAV used for a converting migration; 0 for same-asset"
2547
+ ],
2548
+ "type": "u64"
1732
2549
  }
1733
2550
  ]
1734
2551
  }
@@ -1783,6 +2600,15 @@
1783
2600
  ],
1784
2601
  "type": "u8"
1785
2602
  },
2603
+ {
2604
+ "name": "allow_convert",
2605
+ "docs": [
2606
+ "1 = `migrate_in` may accept the target's USDC mint as `source_mint` and credit",
2607
+ "it at the target `PoolExt` NAV. 0 (default, and for configs created before this",
2608
+ "field) keeps the strict same-mint rule. Set by `set_migration_convert`."
2609
+ ],
2610
+ "type": "u8"
2611
+ },
1786
2612
  {
1787
2613
  "name": "_reserved",
1788
2614
  "docs": [
@@ -1791,7 +2617,7 @@
1791
2617
  "type": {
1792
2618
  "array": [
1793
2619
  "u8",
1794
- 32
2620
+ 31
1795
2621
  ]
1796
2622
  }
1797
2623
  }
@@ -1834,6 +2660,26 @@
1834
2660
  ]
1835
2661
  }
1836
2662
  },
2663
+ {
2664
+ "name": "MigrationConvertSetEvent",
2665
+ "type": {
2666
+ "kind": "struct",
2667
+ "fields": [
2668
+ {
2669
+ "name": "pool",
2670
+ "type": "pubkey"
2671
+ },
2672
+ {
2673
+ "name": "authority",
2674
+ "type": "pubkey"
2675
+ },
2676
+ {
2677
+ "name": "allow_convert",
2678
+ "type": "bool"
2679
+ }
2680
+ ]
2681
+ }
2682
+ },
1837
2683
  {
1838
2684
  "name": "Pool",
1839
2685
  "docs": [
@@ -2027,6 +2873,17 @@
2027
2873
  ],
2028
2874
  "type": "u64"
2029
2875
  },
2876
+ {
2877
+ "name": "vault_exit_fee_bps",
2878
+ "docs": [
2879
+ "Fee on exits paid in the pool's own vault token, basis points (ele7-rwa-v1.1).",
2880
+ "Live pools read 0. Set by `set_vault_exit_fee`; locked onto each ticket at",
2881
+ "creation (`WithdrawalTicket.fee_bps_locked`, payout_mint 0) and applied at",
2882
+ "`redeem_ticket`; applied at the current rate by the legacy `withdraw`.",
2883
+ "The fee stays in the liquidity faucet. Carved from the former reserved bytes."
2884
+ ],
2885
+ "type": "u16"
2886
+ },
2030
2887
  {
2031
2888
  "name": "_reserved",
2032
2889
  "docs": [
@@ -2035,7 +2892,7 @@
2035
2892
  "type": {
2036
2893
  "array": [
2037
2894
  "u8",
2038
- 24
2895
+ 22
2039
2896
  ]
2040
2897
  }
2041
2898
  }
@@ -2043,65 +2900,327 @@
2043
2900
  }
2044
2901
  },
2045
2902
  {
2046
- "name": "PoolUpdatedData",
2903
+ "name": "PoolExt",
2904
+ "docs": [
2905
+ "Per-pool sidecar that gives a vault a second token at its edges.",
2906
+ "",
2907
+ "The pool's ledger (positions, tickets, queues, caps, `reward_per_token`) stays",
2908
+ "in `vault_mint` units. This account names the ALTERNATE token (`alt_mint`),",
2909
+ "where it lands and is paid from, the NAV source, the exit fee, and the",
2910
+ "switches. It works in both directions:",
2911
+ "",
2912
+ "- vault = RWA, alt = USDC (`alt_is_usdc = 1`): USDC deposits credit RWA, RWA",
2913
+ "tickets can pay USDC.",
2914
+ "- vault = USDC, alt = RWA (`alt_is_usdc = 0`): RWA deposits credit USDC, USDC",
2915
+ "tickets can pay RWA. This is how an existing USDC-denominated pool adapts",
2916
+ "in place.",
2917
+ "",
2918
+ "NAV convention is the same either way: USDC per ONE whole RWA token,",
2919
+ "1e9-scaled (1.05 USDC per RWA == 1_050_000_000). Decimals are folded in by",
2920
+ "the conversion helpers using `Pool::per_token_amount` (10^vault_decimals)",
2921
+ "and `alt_decimals`. It is a separate PDA because live pools were client-sized",
2922
+ "at `Pool::LEN` and cannot grow."
2923
+ ],
2047
2924
  "type": {
2048
2925
  "kind": "struct",
2049
2926
  "fields": [
2050
2927
  {
2051
- "name": "current_supply",
2052
- "type": "u64"
2053
- },
2054
- {
2055
- "name": "next_supply",
2056
- "type": "u64"
2928
+ "name": "pool",
2929
+ "docs": [
2930
+ "The pool this ext belongs to (also in the PDA seeds)"
2931
+ ],
2932
+ "type": "pubkey"
2057
2933
  },
2058
2934
  {
2059
- "name": "reward_per_token",
2060
- "type": "u64"
2935
+ "name": "alt_mint",
2936
+ "docs": [
2937
+ "The alternate token (USDC on an RWA pool; the RWA on a USDC pool)"
2938
+ ],
2939
+ "type": "pubkey"
2061
2940
  },
2062
2941
  {
2063
- "name": "deactivating_amount_n0",
2064
- "type": "u64"
2942
+ "name": "alt_holder",
2943
+ "docs": [
2944
+ "Token account receiving alt deposits; owned by pool_authority"
2945
+ ],
2946
+ "type": "pubkey"
2065
2947
  },
2066
2948
  {
2067
- "name": "claiming_amount_n0",
2068
- "type": "u64"
2949
+ "name": "alt_faucet",
2950
+ "docs": [
2951
+ "Token account paying alt exits; owned by pool_authority"
2952
+ ],
2953
+ "type": "pubkey"
2069
2954
  },
2070
2955
  {
2071
- "name": "deactivating_amount_n1",
2072
- "type": "u64"
2956
+ "name": "fee_destination",
2957
+ "docs": [
2958
+ "Wallet whose alt-mint token account receives exit fees. `Pubkey::default()` = fee stays in the faucet."
2959
+ ],
2960
+ "type": "pubkey"
2073
2961
  },
2074
2962
  {
2075
- "name": "claiming_amount_n1",
2963
+ "name": "nav",
2964
+ "docs": [
2965
+ "Posted NAV: USDC per 1 RWA token, 1e9-scaled (used when conversion_source == CUSTODIAL)"
2966
+ ],
2076
2967
  "type": "u64"
2077
2968
  },
2078
2969
  {
2079
- "name": "pending_amount",
2080
- "type": "u64"
2970
+ "name": "nav_updated_at",
2971
+ "docs": [
2972
+ "Unix time the NAV was last posted"
2973
+ ],
2974
+ "type": "i64"
2081
2975
  },
2082
2976
  {
2083
- "name": "epoch_index",
2977
+ "name": "nav_max_age",
2978
+ "docs": [
2979
+ "Max age in seconds before conversions reject; 0 = no staleness check"
2980
+ ],
2084
2981
  "type": "u32"
2085
2982
  },
2086
2983
  {
2087
- "name": "epoch_start_time",
2088
- "type": "u32"
2089
- }
2090
- ]
2091
- }
2092
- },
2093
- {
2094
- "name": "PoolUpdatedEvent",
2095
- "type": {
2096
- "kind": "struct",
2097
- "fields": [
2984
+ "name": "exit_fee_bps",
2985
+ "docs": [
2986
+ "Fee on alt exits, basis points, applied on the conversion"
2987
+ ],
2988
+ "type": "u16"
2989
+ },
2098
2990
  {
2099
- "name": "pubkey",
2100
- "type": "pubkey"
2991
+ "name": "alt_decimals",
2992
+ "docs": [
2993
+ "Decimals of `alt_mint`, recorded at init so no mint account is needed to convert"
2994
+ ],
2995
+ "type": "u8"
2101
2996
  },
2102
2997
  {
2103
- "name": "data",
2104
- "type": {
2998
+ "name": "flags",
2999
+ "docs": [
3000
+ "Bit flags, see `PoolExt::FLAG_*`"
3001
+ ],
3002
+ "type": "u8"
3003
+ },
3004
+ {
3005
+ "name": "conversion_source",
3006
+ "docs": [
3007
+ "Where the NAV comes from: 0 = posted here, 1 = read from Scope at every conversion."
3008
+ ],
3009
+ "type": "u8"
3010
+ },
3011
+ {
3012
+ "name": "bump",
3013
+ "docs": [
3014
+ "PDA bump"
3015
+ ],
3016
+ "type": "u8"
3017
+ },
3018
+ {
3019
+ "name": "nav_oracle",
3020
+ "docs": [
3021
+ "Scope `OraclePrices` account the NAV is read from when",
3022
+ "`conversion_source == CONVERSION_SCOPE`; pinned at init/update by the admin."
3023
+ ],
3024
+ "type": "pubkey"
3025
+ },
3026
+ {
3027
+ "name": "nav_oracle_index",
3028
+ "docs": [
3029
+ "Index of the token's `DatedPrice` entry inside that account"
3030
+ ],
3031
+ "type": "u16"
3032
+ },
3033
+ {
3034
+ "name": "alt_is_usdc",
3035
+ "docs": [
3036
+ "1 = the alt is USDC and the vault is the RWA; 0 = the vault is USDC and the alt is the RWA."
3037
+ ],
3038
+ "type": "u8"
3039
+ },
3040
+ {
3041
+ "name": "ext_authority_bump",
3042
+ "docs": [
3043
+ "Bump of the ext authority PDA `[\"ext_authority\", pool]` that owns `alt_holder` and `alt_faucet`.",
3044
+ "",
3045
+ "Deliberately NOT the pool authority: the OnRe adapter signs as the pool",
3046
+ "authority and hands OnRe a caller-chosen USDC source, so any USDC account",
3047
+ "the pool authority owns could be spent by anyone calling `deposit`."
3048
+ ],
3049
+ "type": "u8"
3050
+ },
3051
+ {
3052
+ "name": "_reserved",
3053
+ "docs": [
3054
+ "Reserved for future use"
3055
+ ],
3056
+ "type": {
3057
+ "array": [
3058
+ "u8",
3059
+ 28
3060
+ ]
3061
+ }
3062
+ }
3063
+ ]
3064
+ }
3065
+ },
3066
+ {
3067
+ "name": "PoolExtInitializedEvent",
3068
+ "type": {
3069
+ "kind": "struct",
3070
+ "fields": [
3071
+ {
3072
+ "name": "pool",
3073
+ "type": "pubkey"
3074
+ },
3075
+ {
3076
+ "name": "pool_ext",
3077
+ "type": "pubkey"
3078
+ },
3079
+ {
3080
+ "name": "alt_mint",
3081
+ "type": "pubkey"
3082
+ },
3083
+ {
3084
+ "name": "alt_holder",
3085
+ "type": "pubkey"
3086
+ },
3087
+ {
3088
+ "name": "alt_faucet",
3089
+ "type": "pubkey"
3090
+ },
3091
+ {
3092
+ "name": "alt_is_usdc",
3093
+ "type": "bool"
3094
+ },
3095
+ {
3096
+ "name": "conversion_source",
3097
+ "type": "u8"
3098
+ },
3099
+ {
3100
+ "name": "nav",
3101
+ "type": "u64"
3102
+ },
3103
+ {
3104
+ "name": "exit_fee_bps",
3105
+ "type": "u16"
3106
+ },
3107
+ {
3108
+ "name": "flags",
3109
+ "type": "u8"
3110
+ }
3111
+ ]
3112
+ }
3113
+ },
3114
+ {
3115
+ "name": "PoolExtUpdatedEvent",
3116
+ "type": {
3117
+ "kind": "struct",
3118
+ "fields": [
3119
+ {
3120
+ "name": "pool",
3121
+ "type": "pubkey"
3122
+ },
3123
+ {
3124
+ "name": "signer",
3125
+ "type": "pubkey"
3126
+ },
3127
+ {
3128
+ "name": "nav",
3129
+ "type": {
3130
+ "option": "u64"
3131
+ }
3132
+ },
3133
+ {
3134
+ "name": "nav_max_age",
3135
+ "type": {
3136
+ "option": "u32"
3137
+ }
3138
+ },
3139
+ {
3140
+ "name": "exit_fee_bps",
3141
+ "type": {
3142
+ "option": "u16"
3143
+ }
3144
+ },
3145
+ {
3146
+ "name": "fee_destination",
3147
+ "type": {
3148
+ "option": "pubkey"
3149
+ }
3150
+ },
3151
+ {
3152
+ "name": "flags",
3153
+ "type": {
3154
+ "option": "u8"
3155
+ }
3156
+ },
3157
+ {
3158
+ "name": "nav_updated_at",
3159
+ "type": "i64"
3160
+ }
3161
+ ]
3162
+ }
3163
+ },
3164
+ {
3165
+ "name": "PoolUpdatedData",
3166
+ "type": {
3167
+ "kind": "struct",
3168
+ "fields": [
3169
+ {
3170
+ "name": "current_supply",
3171
+ "type": "u64"
3172
+ },
3173
+ {
3174
+ "name": "next_supply",
3175
+ "type": "u64"
3176
+ },
3177
+ {
3178
+ "name": "reward_per_token",
3179
+ "type": "u64"
3180
+ },
3181
+ {
3182
+ "name": "deactivating_amount_n0",
3183
+ "type": "u64"
3184
+ },
3185
+ {
3186
+ "name": "claiming_amount_n0",
3187
+ "type": "u64"
3188
+ },
3189
+ {
3190
+ "name": "deactivating_amount_n1",
3191
+ "type": "u64"
3192
+ },
3193
+ {
3194
+ "name": "claiming_amount_n1",
3195
+ "type": "u64"
3196
+ },
3197
+ {
3198
+ "name": "pending_amount",
3199
+ "type": "u64"
3200
+ },
3201
+ {
3202
+ "name": "epoch_index",
3203
+ "type": "u32"
3204
+ },
3205
+ {
3206
+ "name": "epoch_start_time",
3207
+ "type": "u32"
3208
+ }
3209
+ ]
3210
+ }
3211
+ },
3212
+ {
3213
+ "name": "PoolUpdatedEvent",
3214
+ "type": {
3215
+ "kind": "struct",
3216
+ "fields": [
3217
+ {
3218
+ "name": "pubkey",
3219
+ "type": "pubkey"
3220
+ },
3221
+ {
3222
+ "name": "data",
3223
+ "type": {
2105
3224
  "defined": {
2106
3225
  "name": "PoolUpdatedData"
2107
3226
  }
@@ -2175,12 +3294,40 @@
2175
3294
  ],
2176
3295
  "type": "u16"
2177
3296
  },
3297
+ {
3298
+ "name": "alt_deposited",
3299
+ "docs": [
3300
+ "Alt tokens deposited through `deposit_alt` or a converting `migrate_in` (alt units)"
3301
+ ],
3302
+ "type": "u64"
3303
+ },
3304
+ {
3305
+ "name": "vault_deposited",
3306
+ "docs": [
3307
+ "vault_mint deposited through `deposit`, `deposit_vault_mint` or a same-asset `migrate_in`"
3308
+ ],
3309
+ "type": "u64"
3310
+ },
3311
+ {
3312
+ "name": "alt_withdrawn",
3313
+ "docs": [
3314
+ "Alt tokens paid out through `redeem_ticket_alt`, net of fee (alt units)"
3315
+ ],
3316
+ "type": "u64"
3317
+ },
3318
+ {
3319
+ "name": "vault_withdrawn",
3320
+ "docs": [
3321
+ "vault_mint paid out through `redeem_ticket` / `withdraw`"
3322
+ ],
3323
+ "type": "u64"
3324
+ },
2178
3325
  {
2179
3326
  "name": "_reserved",
2180
3327
  "type": {
2181
3328
  "array": [
2182
3329
  "u8",
2183
- 64
3330
+ 32
2184
3331
  ]
2185
3332
  }
2186
3333
  }
@@ -2362,6 +3509,154 @@
2362
3509
  ]
2363
3510
  }
2364
3511
  },
3512
+ {
3513
+ "name": "UpdatePoolExtParams",
3514
+ "type": {
3515
+ "kind": "struct",
3516
+ "fields": [
3517
+ {
3518
+ "name": "nav",
3519
+ "type": {
3520
+ "option": "u64"
3521
+ }
3522
+ },
3523
+ {
3524
+ "name": "nav_max_age",
3525
+ "type": {
3526
+ "option": "u32"
3527
+ }
3528
+ },
3529
+ {
3530
+ "name": "exit_fee_bps",
3531
+ "type": {
3532
+ "option": "u16"
3533
+ }
3534
+ },
3535
+ {
3536
+ "name": "fee_destination",
3537
+ "docs": [
3538
+ "`Some(Pubkey::default())` clears the destination (fee stays in the faucet)"
3539
+ ],
3540
+ "type": {
3541
+ "option": "pubkey"
3542
+ }
3543
+ },
3544
+ {
3545
+ "name": "flags",
3546
+ "type": {
3547
+ "option": "u8"
3548
+ }
3549
+ },
3550
+ {
3551
+ "name": "nav_oracle",
3552
+ "docs": [
3553
+ "Admin only. `Some(Pubkey::default())` switches back to the posted NAV (custodial);",
3554
+ "any other key switches to Scope and pins that OraclePrices account."
3555
+ ],
3556
+ "type": {
3557
+ "option": "pubkey"
3558
+ }
3559
+ },
3560
+ {
3561
+ "name": "nav_oracle_index",
3562
+ "docs": [
3563
+ "Admin only."
3564
+ ],
3565
+ "type": {
3566
+ "option": "u16"
3567
+ }
3568
+ }
3569
+ ]
3570
+ }
3571
+ },
3572
+ {
3573
+ "name": "VaultExitFeeSetEvent",
3574
+ "type": {
3575
+ "kind": "struct",
3576
+ "fields": [
3577
+ {
3578
+ "name": "pool",
3579
+ "type": "pubkey"
3580
+ },
3581
+ {
3582
+ "name": "bps",
3583
+ "type": "u16"
3584
+ }
3585
+ ]
3586
+ }
3587
+ },
3588
+ {
3589
+ "name": "VaultRedeemedEvent",
3590
+ "type": {
3591
+ "kind": "struct",
3592
+ "fields": [
3593
+ {
3594
+ "name": "pool",
3595
+ "type": "pubkey"
3596
+ },
3597
+ {
3598
+ "name": "ticket",
3599
+ "type": "pubkey"
3600
+ },
3601
+ {
3602
+ "name": "owner",
3603
+ "type": "pubkey"
3604
+ },
3605
+ {
3606
+ "name": "vault_total",
3607
+ "type": "u64"
3608
+ },
3609
+ {
3610
+ "name": "fee_bps_locked",
3611
+ "type": "u16"
3612
+ },
3613
+ {
3614
+ "name": "fee",
3615
+ "type": "u64"
3616
+ },
3617
+ {
3618
+ "name": "net",
3619
+ "type": "u64"
3620
+ }
3621
+ ]
3622
+ }
3623
+ },
3624
+ {
3625
+ "name": "VaultTicketCreatedEvent",
3626
+ "type": {
3627
+ "kind": "struct",
3628
+ "fields": [
3629
+ {
3630
+ "name": "pool",
3631
+ "type": "pubkey"
3632
+ },
3633
+ {
3634
+ "name": "ticket",
3635
+ "type": "pubkey"
3636
+ },
3637
+ {
3638
+ "name": "owner",
3639
+ "type": "pubkey"
3640
+ },
3641
+ {
3642
+ "name": "vault_total",
3643
+ "type": "u64"
3644
+ },
3645
+ {
3646
+ "name": "fee_bps_locked",
3647
+ "type": "u16"
3648
+ },
3649
+ {
3650
+ "name": "fee",
3651
+ "type": "u64"
3652
+ },
3653
+ {
3654
+ "name": "net",
3655
+ "type": "u64"
3656
+ }
3657
+ ]
3658
+ }
3659
+ },
2365
3660
  {
2366
3661
  "name": "WithdrawalTicket",
2367
3662
  "type": {
@@ -2409,6 +3704,28 @@
2409
3704
  "Bump seed for PDA"
2410
3705
  ],
2411
3706
  "type": "u8"
3707
+ },
3708
+ {
3709
+ "name": "payout_mint",
3710
+ "docs": [
3711
+ "Payout declared at creation: 0 = vault_mint (default, legacy tickets read 0),",
3712
+ "1 = the pool's alt token via `redeem_ticket_alt`, with the two locked fields below."
3713
+ ],
3714
+ "type": "u8"
3715
+ },
3716
+ {
3717
+ "name": "nav_locked",
3718
+ "docs": [
3719
+ "NAV (USDC per RWA, 1e9) resolved when an alt ticket was created"
3720
+ ],
3721
+ "type": "u64"
3722
+ },
3723
+ {
3724
+ "name": "fee_bps_locked",
3725
+ "docs": [
3726
+ "Exit fee bps copied from PoolExt when an alt ticket was created"
3727
+ ],
3728
+ "type": "u16"
2412
3729
  }
2413
3730
  ]
2414
3731
  }