@elmntl/vaults-v2 1.3.4 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/idl/elemental_vault_v2.json +615 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/programs/elemental.d.ts +49 -0
- package/dist/programs/elemental.d.ts.map +1 -1
- package/dist/programs/elemental.js +76 -8
- package/dist/programs/elemental.js.map +1 -1
- package/dist/programs/index.d.ts +1 -1
- package/dist/programs/index.d.ts.map +1 -1
- package/dist/programs/index.js +4 -1
- package/dist/programs/index.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -1
- package/package.json +7 -3
- package/src/generated/idl/elemental_vault_v2.json +615 -3
- package/src/index.ts +7 -1
- package/src/programs/elemental.ts +95 -6
- package/src/programs/index.ts +7 -1
- package/src/types.ts +2 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"address": "
|
|
2
|
+
"address": "ELE7vRKKCzWT5SEt1eey2Snn3z6pWmBuv5AjDq3BeS1Y",
|
|
3
3
|
"metadata": {
|
|
4
4
|
"name": "elemental_vault_v2",
|
|
5
5
|
"version": "2.0.0",
|
|
@@ -7,6 +7,105 @@
|
|
|
7
7
|
"description": "Elemental Vault V2 - Multi-mint vault with pluggable swap adapters"
|
|
8
8
|
},
|
|
9
9
|
"instructions": [
|
|
10
|
+
{
|
|
11
|
+
"name": "admin_migrate_out",
|
|
12
|
+
"docs": [
|
|
13
|
+
"Admin-only sweep twin of `migrate_out` for end-of-window stragglers."
|
|
14
|
+
],
|
|
15
|
+
"discriminator": [
|
|
16
|
+
62,
|
|
17
|
+
8,
|
|
18
|
+
234,
|
|
19
|
+
35,
|
|
20
|
+
168,
|
|
21
|
+
173,
|
|
22
|
+
131,
|
|
23
|
+
142
|
|
24
|
+
],
|
|
25
|
+
"accounts": [
|
|
26
|
+
{
|
|
27
|
+
"name": "admin",
|
|
28
|
+
"signer": true
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "owner",
|
|
32
|
+
"writable": true
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "position",
|
|
36
|
+
"writable": true
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "pool",
|
|
40
|
+
"writable": true
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "pool_authority"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "target_program"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "target_config",
|
|
50
|
+
"writable": true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "target_pool",
|
|
54
|
+
"writable": true
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "target_position",
|
|
58
|
+
"writable": true
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"args": []
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "admin_resync_position",
|
|
65
|
+
"docs": [
|
|
66
|
+
"Admin-only: repair a position whose `reward_before_deposit` bookmark is stale",
|
|
67
|
+
"against the current `pool.reward_per_token`, crediting `epochs_to_credit` epochs",
|
|
68
|
+
"of legitimate yield and re-baselining the bookmark to \"now\". See",
|
|
69
|
+
"`process_admin_resync_position` for full semantics."
|
|
70
|
+
],
|
|
71
|
+
"discriminator": [
|
|
72
|
+
237,
|
|
73
|
+
25,
|
|
74
|
+
225,
|
|
75
|
+
142,
|
|
76
|
+
229,
|
|
77
|
+
89,
|
|
78
|
+
14,
|
|
79
|
+
112
|
|
80
|
+
],
|
|
81
|
+
"accounts": [
|
|
82
|
+
{
|
|
83
|
+
"name": "admin",
|
|
84
|
+
"signer": true
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "pool",
|
|
88
|
+
"docs": [
|
|
89
|
+
"Pool is read-only here — resync does not mutate pool state.",
|
|
90
|
+
"`has_one = admin` enforces signer == pool.admin."
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "position",
|
|
95
|
+
"docs": [
|
|
96
|
+
"Position must belong to the pool above. We do NOT require the position owner",
|
|
97
|
+
"to sign — this is an admin-driven repair."
|
|
98
|
+
],
|
|
99
|
+
"writable": true
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"args": [
|
|
103
|
+
{
|
|
104
|
+
"name": "epochs_to_credit",
|
|
105
|
+
"type": "u32"
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
},
|
|
10
109
|
{
|
|
11
110
|
"name": "approve_admin",
|
|
12
111
|
"discriminator": [
|
|
@@ -62,6 +161,83 @@
|
|
|
62
161
|
],
|
|
63
162
|
"args": []
|
|
64
163
|
},
|
|
164
|
+
{
|
|
165
|
+
"name": "close_migration_config",
|
|
166
|
+
"docs": [
|
|
167
|
+
"Admin-only: revoke one migration path into this pool."
|
|
168
|
+
],
|
|
169
|
+
"discriminator": [
|
|
170
|
+
20,
|
|
171
|
+
77,
|
|
172
|
+
180,
|
|
173
|
+
205,
|
|
174
|
+
76,
|
|
175
|
+
54,
|
|
176
|
+
143,
|
|
177
|
+
77
|
|
178
|
+
],
|
|
179
|
+
"accounts": [
|
|
180
|
+
{
|
|
181
|
+
"name": "admin",
|
|
182
|
+
"writable": true,
|
|
183
|
+
"signer": true
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "pool"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "migration_config",
|
|
190
|
+
"writable": true
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"args": []
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "create_migration_config",
|
|
197
|
+
"docs": [
|
|
198
|
+
"Admin-only: open a migration path into this pool. One config per",
|
|
199
|
+
"(pool, source authority) pair — several source pools may feed this pool.",
|
|
200
|
+
"`authority` must be the source pool's pool_authority PDA (derived,",
|
|
201
|
+
"never pasted); `cap` bounds the cumulative inbound amount per config."
|
|
202
|
+
],
|
|
203
|
+
"discriminator": [
|
|
204
|
+
97,
|
|
205
|
+
60,
|
|
206
|
+
253,
|
|
207
|
+
63,
|
|
208
|
+
90,
|
|
209
|
+
121,
|
|
210
|
+
255,
|
|
211
|
+
85
|
|
212
|
+
],
|
|
213
|
+
"accounts": [
|
|
214
|
+
{
|
|
215
|
+
"name": "admin",
|
|
216
|
+
"writable": true,
|
|
217
|
+
"signer": true
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"name": "pool"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "migration_config",
|
|
224
|
+
"writable": true
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"name": "system_program"
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"args": [
|
|
231
|
+
{
|
|
232
|
+
"name": "authority",
|
|
233
|
+
"type": "pubkey"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"name": "cap",
|
|
237
|
+
"type": "u64"
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
},
|
|
65
241
|
{
|
|
66
242
|
"name": "create_position",
|
|
67
243
|
"docs": [
|
|
@@ -571,6 +747,114 @@
|
|
|
571
747
|
}
|
|
572
748
|
]
|
|
573
749
|
},
|
|
750
|
+
{
|
|
751
|
+
"name": "migrate_in",
|
|
752
|
+
"docs": [
|
|
753
|
+
"Credit migrated principal into an existing position without a token",
|
|
754
|
+
"deposit. CPI-only in practice: the signer must match the pool's",
|
|
755
|
+
"MigrationConfig authority (the v1 pool_authority PDA)."
|
|
756
|
+
],
|
|
757
|
+
"discriminator": [
|
|
758
|
+
193,
|
|
759
|
+
246,
|
|
760
|
+
68,
|
|
761
|
+
91,
|
|
762
|
+
100,
|
|
763
|
+
160,
|
|
764
|
+
66,
|
|
765
|
+
126
|
|
766
|
+
],
|
|
767
|
+
"accounts": [
|
|
768
|
+
{
|
|
769
|
+
"name": "authority",
|
|
770
|
+
"docs": [
|
|
771
|
+
"The v1 source pool's pool_authority PDA, signing via CPI."
|
|
772
|
+
],
|
|
773
|
+
"signer": true
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"name": "migration_config",
|
|
777
|
+
"writable": true
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"name": "pool",
|
|
781
|
+
"writable": true
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
"name": "position",
|
|
785
|
+
"writable": true
|
|
786
|
+
}
|
|
787
|
+
],
|
|
788
|
+
"args": [
|
|
789
|
+
{
|
|
790
|
+
"name": "owner",
|
|
791
|
+
"type": "pubkey"
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
"name": "amount",
|
|
795
|
+
"type": "u64"
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"name": "source_mint",
|
|
799
|
+
"type": "pubkey"
|
|
800
|
+
}
|
|
801
|
+
]
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"name": "migrate_out",
|
|
805
|
+
"docs": [
|
|
806
|
+
"Settle the caller's position (principal + unclaimed rewards), close it",
|
|
807
|
+
"(rent back to the owner), and atomically credit the total into a target",
|
|
808
|
+
"ELE7 pool via CPI `migrate_in`, signed by this pool's authority PDA.",
|
|
809
|
+
"Skips the cooldown.",
|
|
810
|
+
"Enables ELE6 → ELE7 position migration (source and target share this",
|
|
811
|
+
"v2 codebase; only `declare_id!` differs between the two deployments)."
|
|
812
|
+
],
|
|
813
|
+
"discriminator": [
|
|
814
|
+
94,
|
|
815
|
+
240,
|
|
816
|
+
69,
|
|
817
|
+
236,
|
|
818
|
+
4,
|
|
819
|
+
50,
|
|
820
|
+
84,
|
|
821
|
+
13
|
|
822
|
+
],
|
|
823
|
+
"accounts": [
|
|
824
|
+
{
|
|
825
|
+
"name": "owner",
|
|
826
|
+
"writable": true,
|
|
827
|
+
"signer": true
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"name": "position",
|
|
831
|
+
"writable": true
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
"name": "pool",
|
|
835
|
+
"writable": true
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"name": "pool_authority"
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
"name": "target_program"
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"name": "target_config",
|
|
845
|
+
"writable": true
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
"name": "target_pool",
|
|
849
|
+
"writable": true
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
"name": "target_position",
|
|
853
|
+
"writable": true
|
|
854
|
+
}
|
|
855
|
+
],
|
|
856
|
+
"args": []
|
|
857
|
+
},
|
|
574
858
|
{
|
|
575
859
|
"name": "redeem_ticket",
|
|
576
860
|
"docs": [
|
|
@@ -865,6 +1149,19 @@
|
|
|
865
1149
|
}
|
|
866
1150
|
],
|
|
867
1151
|
"accounts": [
|
|
1152
|
+
{
|
|
1153
|
+
"name": "MigrationConfig",
|
|
1154
|
+
"discriminator": [
|
|
1155
|
+
221,
|
|
1156
|
+
35,
|
|
1157
|
+
251,
|
|
1158
|
+
172,
|
|
1159
|
+
252,
|
|
1160
|
+
90,
|
|
1161
|
+
70,
|
|
1162
|
+
161
|
|
1163
|
+
]
|
|
1164
|
+
},
|
|
868
1165
|
{
|
|
869
1166
|
"name": "Pool",
|
|
870
1167
|
"discriminator": [
|
|
@@ -958,6 +1255,58 @@
|
|
|
958
1255
|
45
|
|
959
1256
|
]
|
|
960
1257
|
},
|
|
1258
|
+
{
|
|
1259
|
+
"name": "MigrateOutEvent",
|
|
1260
|
+
"discriminator": [
|
|
1261
|
+
217,
|
|
1262
|
+
131,
|
|
1263
|
+
55,
|
|
1264
|
+
165,
|
|
1265
|
+
233,
|
|
1266
|
+
73,
|
|
1267
|
+
200,
|
|
1268
|
+
81
|
|
1269
|
+
]
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
"name": "MigratedInEvent",
|
|
1273
|
+
"discriminator": [
|
|
1274
|
+
49,
|
|
1275
|
+
101,
|
|
1276
|
+
233,
|
|
1277
|
+
35,
|
|
1278
|
+
191,
|
|
1279
|
+
226,
|
|
1280
|
+
210,
|
|
1281
|
+
66
|
|
1282
|
+
]
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
"name": "MigrationConfigClosedEvent",
|
|
1286
|
+
"discriminator": [
|
|
1287
|
+
148,
|
|
1288
|
+
180,
|
|
1289
|
+
35,
|
|
1290
|
+
220,
|
|
1291
|
+
184,
|
|
1292
|
+
106,
|
|
1293
|
+
58,
|
|
1294
|
+
230
|
|
1295
|
+
]
|
|
1296
|
+
},
|
|
1297
|
+
{
|
|
1298
|
+
"name": "MigrationConfigCreatedEvent",
|
|
1299
|
+
"discriminator": [
|
|
1300
|
+
186,
|
|
1301
|
+
214,
|
|
1302
|
+
179,
|
|
1303
|
+
141,
|
|
1304
|
+
61,
|
|
1305
|
+
173,
|
|
1306
|
+
155,
|
|
1307
|
+
204
|
|
1308
|
+
]
|
|
1309
|
+
},
|
|
961
1310
|
{
|
|
962
1311
|
"name": "PoolUpdatedEvent",
|
|
963
1312
|
"discriminator": [
|
|
@@ -971,6 +1320,19 @@
|
|
|
971
1320
|
141
|
|
972
1321
|
]
|
|
973
1322
|
},
|
|
1323
|
+
{
|
|
1324
|
+
"name": "PositionResyncedEvent",
|
|
1325
|
+
"discriminator": [
|
|
1326
|
+
135,
|
|
1327
|
+
244,
|
|
1328
|
+
210,
|
|
1329
|
+
166,
|
|
1330
|
+
155,
|
|
1331
|
+
124,
|
|
1332
|
+
216,
|
|
1333
|
+
120
|
|
1334
|
+
]
|
|
1335
|
+
},
|
|
974
1336
|
{
|
|
975
1337
|
"name": "PositionUpdatedEvent",
|
|
976
1338
|
"discriminator": [
|
|
@@ -1115,6 +1477,31 @@
|
|
|
1115
1477
|
"code": 6025,
|
|
1116
1478
|
"name": "LegacyDeactivationPending",
|
|
1117
1479
|
"msg": "Legacy deactivation pending - complete withdraw before using tickets"
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
"code": 6026,
|
|
1483
|
+
"name": "TicketAlreadyPending",
|
|
1484
|
+
"msg": "A ticket is already pending — redeem it before creating another"
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
"code": 6027,
|
|
1488
|
+
"name": "InvalidMigrationAuthority",
|
|
1489
|
+
"msg": "Signer is not the configured migration authority"
|
|
1490
|
+
},
|
|
1491
|
+
{
|
|
1492
|
+
"code": 6028,
|
|
1493
|
+
"name": "MigrationAssetMismatch",
|
|
1494
|
+
"msg": "Source mint does not match the target pool's vault mint"
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
"code": 6029,
|
|
1498
|
+
"name": "MigrationCapExceeded",
|
|
1499
|
+
"msg": "Cumulative migration cap exceeded"
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
"code": 6030,
|
|
1503
|
+
"name": "InvalidMigrationAmount",
|
|
1504
|
+
"msg": "Migration amount must be greater than zero"
|
|
1118
1505
|
}
|
|
1119
1506
|
],
|
|
1120
1507
|
"types": [
|
|
@@ -1244,6 +1631,12 @@
|
|
|
1244
1631
|
"type": {
|
|
1245
1632
|
"option": "u32"
|
|
1246
1633
|
}
|
|
1634
|
+
},
|
|
1635
|
+
{
|
|
1636
|
+
"name": "manager_wallet",
|
|
1637
|
+
"type": {
|
|
1638
|
+
"option": "pubkey"
|
|
1639
|
+
}
|
|
1247
1640
|
}
|
|
1248
1641
|
]
|
|
1249
1642
|
}
|
|
@@ -1272,6 +1665,175 @@
|
|
|
1272
1665
|
]
|
|
1273
1666
|
}
|
|
1274
1667
|
},
|
|
1668
|
+
{
|
|
1669
|
+
"name": "MigrateOutEvent",
|
|
1670
|
+
"type": {
|
|
1671
|
+
"kind": "struct",
|
|
1672
|
+
"fields": [
|
|
1673
|
+
{
|
|
1674
|
+
"name": "pool",
|
|
1675
|
+
"type": "pubkey"
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
"name": "position",
|
|
1679
|
+
"type": "pubkey"
|
|
1680
|
+
},
|
|
1681
|
+
{
|
|
1682
|
+
"name": "owner",
|
|
1683
|
+
"type": "pubkey"
|
|
1684
|
+
},
|
|
1685
|
+
{
|
|
1686
|
+
"name": "principal",
|
|
1687
|
+
"type": "u64"
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
"name": "rewards",
|
|
1691
|
+
"type": "u64"
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
"name": "total",
|
|
1695
|
+
"type": "u64"
|
|
1696
|
+
},
|
|
1697
|
+
{
|
|
1698
|
+
"name": "target_pool",
|
|
1699
|
+
"type": "pubkey"
|
|
1700
|
+
}
|
|
1701
|
+
]
|
|
1702
|
+
}
|
|
1703
|
+
},
|
|
1704
|
+
{
|
|
1705
|
+
"name": "MigratedInEvent",
|
|
1706
|
+
"type": {
|
|
1707
|
+
"kind": "struct",
|
|
1708
|
+
"fields": [
|
|
1709
|
+
{
|
|
1710
|
+
"name": "pool",
|
|
1711
|
+
"type": "pubkey"
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
"name": "position",
|
|
1715
|
+
"type": "pubkey"
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
"name": "owner",
|
|
1719
|
+
"type": "pubkey"
|
|
1720
|
+
},
|
|
1721
|
+
{
|
|
1722
|
+
"name": "amount",
|
|
1723
|
+
"type": "u64"
|
|
1724
|
+
},
|
|
1725
|
+
{
|
|
1726
|
+
"name": "source_mint",
|
|
1727
|
+
"type": "pubkey"
|
|
1728
|
+
},
|
|
1729
|
+
{
|
|
1730
|
+
"name": "remaining_cap",
|
|
1731
|
+
"type": "u64"
|
|
1732
|
+
}
|
|
1733
|
+
]
|
|
1734
|
+
}
|
|
1735
|
+
},
|
|
1736
|
+
{
|
|
1737
|
+
"name": "MigrationConfig",
|
|
1738
|
+
"docs": [
|
|
1739
|
+
"Per-(pool, source-authority) migration gate.",
|
|
1740
|
+
"",
|
|
1741
|
+
"Authorizes an external program's PDA (a source pool authority from ELE5 or",
|
|
1742
|
+
"ELE6) to credit positions in this pool via `migrate_in` CPI. Existence of",
|
|
1743
|
+
"this account IS the source→target mapping: one config per (target pool,",
|
|
1744
|
+
"source authority) pair, so several source pools (e.g. the three v1 USDC",
|
|
1745
|
+
"pools) can feed the same target pool concurrently, each with its own cap.",
|
|
1746
|
+
"",
|
|
1747
|
+
"Stored separately from `Pool` on purpose: live mainnet pools were client-sized",
|
|
1748
|
+
"via `#[account(zero)]` (some at 384 bytes) and CANNOT tolerate any growth of the",
|
|
1749
|
+
"Pool borsh footprint."
|
|
1750
|
+
],
|
|
1751
|
+
"type": {
|
|
1752
|
+
"kind": "struct",
|
|
1753
|
+
"fields": [
|
|
1754
|
+
{
|
|
1755
|
+
"name": "pool",
|
|
1756
|
+
"docs": [
|
|
1757
|
+
"The target pool this config belongs to (redundant with PDA seeds, kept for indexing)"
|
|
1758
|
+
],
|
|
1759
|
+
"type": "pubkey"
|
|
1760
|
+
},
|
|
1761
|
+
{
|
|
1762
|
+
"name": "authority",
|
|
1763
|
+
"docs": [
|
|
1764
|
+
"The only signer allowed to call `migrate_in` through this config. MUST be",
|
|
1765
|
+
"the source pool's pool_authority PDA (off-curve). An on-curve key here would",
|
|
1766
|
+
"let that wallet mint arbitrary balances — proposal scripts must derive this,",
|
|
1767
|
+
"never paste it. Also part of the PDA seeds, binding config address to signer."
|
|
1768
|
+
],
|
|
1769
|
+
"type": "pubkey"
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
"name": "remaining_cap",
|
|
1773
|
+
"docs": [
|
|
1774
|
+
"Cumulative inbound cap in vault_mint units, decremented by each `migrate_in`.",
|
|
1775
|
+
"Defense-in-depth: bounds total credit even if `authority` is misconfigured."
|
|
1776
|
+
],
|
|
1777
|
+
"type": "u64"
|
|
1778
|
+
},
|
|
1779
|
+
{
|
|
1780
|
+
"name": "bump",
|
|
1781
|
+
"docs": [
|
|
1782
|
+
"PDA bump, verified via seeds constraint"
|
|
1783
|
+
],
|
|
1784
|
+
"type": "u8"
|
|
1785
|
+
},
|
|
1786
|
+
{
|
|
1787
|
+
"name": "_reserved",
|
|
1788
|
+
"docs": [
|
|
1789
|
+
"Reserved for future use"
|
|
1790
|
+
],
|
|
1791
|
+
"type": {
|
|
1792
|
+
"array": [
|
|
1793
|
+
"u8",
|
|
1794
|
+
32
|
|
1795
|
+
]
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
]
|
|
1799
|
+
}
|
|
1800
|
+
},
|
|
1801
|
+
{
|
|
1802
|
+
"name": "MigrationConfigClosedEvent",
|
|
1803
|
+
"type": {
|
|
1804
|
+
"kind": "struct",
|
|
1805
|
+
"fields": [
|
|
1806
|
+
{
|
|
1807
|
+
"name": "pool",
|
|
1808
|
+
"type": "pubkey"
|
|
1809
|
+
},
|
|
1810
|
+
{
|
|
1811
|
+
"name": "remaining_cap",
|
|
1812
|
+
"type": "u64"
|
|
1813
|
+
}
|
|
1814
|
+
]
|
|
1815
|
+
}
|
|
1816
|
+
},
|
|
1817
|
+
{
|
|
1818
|
+
"name": "MigrationConfigCreatedEvent",
|
|
1819
|
+
"type": {
|
|
1820
|
+
"kind": "struct",
|
|
1821
|
+
"fields": [
|
|
1822
|
+
{
|
|
1823
|
+
"name": "pool",
|
|
1824
|
+
"type": "pubkey"
|
|
1825
|
+
},
|
|
1826
|
+
{
|
|
1827
|
+
"name": "authority",
|
|
1828
|
+
"type": "pubkey"
|
|
1829
|
+
},
|
|
1830
|
+
{
|
|
1831
|
+
"name": "cap",
|
|
1832
|
+
"type": "u64"
|
|
1833
|
+
}
|
|
1834
|
+
]
|
|
1835
|
+
}
|
|
1836
|
+
},
|
|
1275
1837
|
{
|
|
1276
1838
|
"name": "Pool",
|
|
1277
1839
|
"docs": [
|
|
@@ -1357,14 +1919,22 @@
|
|
|
1357
1919
|
{
|
|
1358
1920
|
"name": "reward_per_token",
|
|
1359
1921
|
"docs": [
|
|
1360
|
-
"Reward per token for fixed APR"
|
|
1922
|
+
"Reward per token for fixed APR.",
|
|
1923
|
+
"1e9-scaled fixed point (`utils::FIXED_ONE`); monotonically increasing."
|
|
1361
1924
|
],
|
|
1362
1925
|
"type": "u64"
|
|
1363
1926
|
},
|
|
1364
1927
|
{
|
|
1365
1928
|
"name": "reward_annual_rate",
|
|
1366
1929
|
"docs": [
|
|
1367
|
-
"Annual reward rate
|
|
1930
|
+
"Annual reward rate as a **1e9-scaled fraction**, NOT basis points.",
|
|
1931
|
+
"",
|
|
1932
|
+
"4% APR == 40_000_000",
|
|
1933
|
+
"10% APR == 100_000_000",
|
|
1934
|
+
"",
|
|
1935
|
+
"Passing a basis-point value here (e.g. `400`) accrues **exactly zero**",
|
|
1936
|
+
"rewards, silently and permanently — see",
|
|
1937
|
+
"`processor::update_epoch::tests::basis_point_style_rate_silently_yields_nothing`."
|
|
1368
1938
|
],
|
|
1369
1939
|
"type": "u64"
|
|
1370
1940
|
},
|
|
@@ -1617,6 +2187,38 @@
|
|
|
1617
2187
|
]
|
|
1618
2188
|
}
|
|
1619
2189
|
},
|
|
2190
|
+
{
|
|
2191
|
+
"name": "PositionResyncedEvent",
|
|
2192
|
+
"type": {
|
|
2193
|
+
"kind": "struct",
|
|
2194
|
+
"fields": [
|
|
2195
|
+
{
|
|
2196
|
+
"name": "pool",
|
|
2197
|
+
"type": "pubkey"
|
|
2198
|
+
},
|
|
2199
|
+
{
|
|
2200
|
+
"name": "position",
|
|
2201
|
+
"type": "pubkey"
|
|
2202
|
+
},
|
|
2203
|
+
{
|
|
2204
|
+
"name": "epochs_credited",
|
|
2205
|
+
"type": "u32"
|
|
2206
|
+
},
|
|
2207
|
+
{
|
|
2208
|
+
"name": "reward_earned_added",
|
|
2209
|
+
"type": "u64"
|
|
2210
|
+
},
|
|
2211
|
+
{
|
|
2212
|
+
"name": "reward_before_deposit_after",
|
|
2213
|
+
"type": "u64"
|
|
2214
|
+
},
|
|
2215
|
+
{
|
|
2216
|
+
"name": "last_updated_epoch_index_after",
|
|
2217
|
+
"type": "u32"
|
|
2218
|
+
}
|
|
2219
|
+
]
|
|
2220
|
+
}
|
|
2221
|
+
},
|
|
1620
2222
|
{
|
|
1621
2223
|
"name": "PositionUpdatedData",
|
|
1622
2224
|
"type": {
|
|
@@ -1746,6 +2348,16 @@
|
|
|
1746
2348
|
"type": {
|
|
1747
2349
|
"option": "u32"
|
|
1748
2350
|
}
|
|
2351
|
+
},
|
|
2352
|
+
{
|
|
2353
|
+
"name": "manager_wallet",
|
|
2354
|
+
"docs": [
|
|
2355
|
+
"Destination wallet for `flush_to_manager`. Setting to `Pubkey::default()`",
|
|
2356
|
+
"(system program) disables flush."
|
|
2357
|
+
],
|
|
2358
|
+
"type": {
|
|
2359
|
+
"option": "pubkey"
|
|
2360
|
+
}
|
|
1749
2361
|
}
|
|
1750
2362
|
]
|
|
1751
2363
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
// Main exports
|
|
2
|
-
export {
|
|
2
|
+
export {
|
|
3
|
+
ElementalV2Context,
|
|
4
|
+
VAULT_PROGRAM_ID,
|
|
5
|
+
ELE6_PROGRAM_ID,
|
|
6
|
+
ELE7_PROGRAM_ID,
|
|
7
|
+
MIGRATION_TARGET_PROGRAM_ID,
|
|
8
|
+
} from "./programs";
|
|
3
9
|
export { Pool, Position, WithdrawalTicket } from "./accounts";
|
|
4
10
|
export {
|
|
5
11
|
PoolData,
|