@kamino-finance/klend-sdk 5.10.25-beta.1 → 5.10.26-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/classes/index.d.ts +3 -0
  2. package/dist/classes/index.d.ts.map +1 -1
  3. package/dist/classes/index.js +3 -0
  4. package/dist/classes/index.js.map +1 -1
  5. package/dist/classes/manager.d.ts.map +1 -1
  6. package/dist/classes/manager.js +8 -0
  7. package/dist/classes/manager.js.map +1 -1
  8. package/dist/classes/stakePool.d.ts +8 -0
  9. package/dist/classes/stakePool.d.ts.map +1 -0
  10. package/dist/classes/stakePool.js +18 -0
  11. package/dist/classes/stakePool.js.map +1 -0
  12. package/dist/classes/standardStakePool.d.ts +254 -0
  13. package/dist/classes/standardStakePool.d.ts.map +1 -0
  14. package/dist/classes/standardStakePool.js +275 -0
  15. package/dist/classes/standardStakePool.js.map +1 -0
  16. package/dist/classes/types.d.ts +13 -1
  17. package/dist/classes/types.d.ts.map +1 -1
  18. package/dist/classes/unstakingPool.d.ts +111 -0
  19. package/dist/classes/unstakingPool.d.ts.map +1 -0
  20. package/dist/classes/unstakingPool.js +437 -0
  21. package/dist/classes/unstakingPool.js.map +1 -0
  22. package/dist/idl_codegen_unstaking_pool/accounts/PoolState.d.ts +50 -0
  23. package/dist/idl_codegen_unstaking_pool/accounts/PoolState.d.ts.map +1 -0
  24. package/dist/idl_codegen_unstaking_pool/accounts/PoolState.js +156 -0
  25. package/dist/idl_codegen_unstaking_pool/accounts/PoolState.js.map +1 -0
  26. package/dist/idl_codegen_unstaking_pool/accounts/index.d.ts +3 -0
  27. package/dist/idl_codegen_unstaking_pool/accounts/index.d.ts.map +1 -0
  28. package/dist/idl_codegen_unstaking_pool/accounts/index.js +6 -0
  29. package/dist/idl_codegen_unstaking_pool/accounts/index.js.map +1 -0
  30. package/dist/idl_codegen_unstaking_pool/errors/anchor.d.ts +435 -0
  31. package/dist/idl_codegen_unstaking_pool/errors/anchor.d.ts.map +1 -0
  32. package/dist/idl_codegen_unstaking_pool/errors/anchor.js +767 -0
  33. package/dist/idl_codegen_unstaking_pool/errors/anchor.js.map +1 -0
  34. package/dist/idl_codegen_unstaking_pool/errors/custom.d.ts +163 -0
  35. package/dist/idl_codegen_unstaking_pool/errors/custom.d.ts.map +1 -0
  36. package/dist/idl_codegen_unstaking_pool/errors/custom.js +290 -0
  37. package/dist/idl_codegen_unstaking_pool/errors/custom.js.map +1 -0
  38. package/dist/idl_codegen_unstaking_pool/errors/index.d.ts +6 -0
  39. package/dist/idl_codegen_unstaking_pool/errors/index.d.ts.map +1 -0
  40. package/dist/idl_codegen_unstaking_pool/errors/index.js +75 -0
  41. package/dist/idl_codegen_unstaking_pool/errors/index.js.map +1 -0
  42. package/dist/idl_codegen_unstaking_pool/instructions/burn.d.ts +21 -0
  43. package/dist/idl_codegen_unstaking_pool/instructions/burn.d.ts.map +1 -0
  44. package/dist/idl_codegen_unstaking_pool/instructions/burn.js +73 -0
  45. package/dist/idl_codegen_unstaking_pool/instructions/burn.js.map +1 -0
  46. package/dist/idl_codegen_unstaking_pool/instructions/collect.d.ts +16 -0
  47. package/dist/idl_codegen_unstaking_pool/instructions/collect.d.ts.map +1 -0
  48. package/dist/idl_codegen_unstaking_pool/instructions/collect.js +29 -0
  49. package/dist/idl_codegen_unstaking_pool/instructions/collect.js.map +1 -0
  50. package/dist/idl_codegen_unstaking_pool/instructions/index.d.ts +11 -0
  51. package/dist/idl_codegen_unstaking_pool/instructions/index.d.ts.map +1 -0
  52. package/dist/idl_codegen_unstaking_pool/instructions/index.js +14 -0
  53. package/dist/idl_codegen_unstaking_pool/instructions/index.js.map +1 -0
  54. package/dist/idl_codegen_unstaking_pool/instructions/initializePool.d.ts +15 -0
  55. package/dist/idl_codegen_unstaking_pool/instructions/initializePool.d.ts.map +1 -0
  56. package/dist/idl_codegen_unstaking_pool/instructions/initializePool.js +28 -0
  57. package/dist/idl_codegen_unstaking_pool/instructions/initializePool.js.map +1 -0
  58. package/dist/idl_codegen_unstaking_pool/instructions/mint.d.ts +21 -0
  59. package/dist/idl_codegen_unstaking_pool/instructions/mint.d.ts.map +1 -0
  60. package/dist/idl_codegen_unstaking_pool/instructions/mint.js +77 -0
  61. package/dist/idl_codegen_unstaking_pool/instructions/mint.js.map +1 -0
  62. package/dist/idl_codegen_unstaking_pool/instructions/updatePoolConfig.d.ts +13 -0
  63. package/dist/idl_codegen_unstaking_pool/instructions/updatePoolConfig.d.ts.map +1 -0
  64. package/dist/idl_codegen_unstaking_pool/instructions/updatePoolConfig.js +58 -0
  65. package/dist/idl_codegen_unstaking_pool/instructions/updatePoolConfig.js.map +1 -0
  66. package/dist/idl_codegen_unstaking_pool/programId.d.ts +4 -0
  67. package/dist/idl_codegen_unstaking_pool/programId.d.ts.map +1 -0
  68. package/dist/idl_codegen_unstaking_pool/programId.js +9 -0
  69. package/dist/idl_codegen_unstaking_pool/programId.js.map +1 -0
  70. package/dist/idl_codegen_unstaking_pool/types/PoolConfigField.d.ts +32 -0
  71. package/dist/idl_codegen_unstaking_pool/types/PoolConfigField.d.ts.map +1 -0
  72. package/dist/idl_codegen_unstaking_pool/types/PoolConfigField.js +105 -0
  73. package/dist/idl_codegen_unstaking_pool/types/PoolConfigField.js.map +1 -0
  74. package/dist/idl_codegen_unstaking_pool/types/index.d.ts +5 -0
  75. package/dist/idl_codegen_unstaking_pool/types/index.d.ts.map +1 -0
  76. package/dist/idl_codegen_unstaking_pool/types/index.js +39 -0
  77. package/dist/idl_codegen_unstaking_pool/types/index.js.map +1 -0
  78. package/package.json +4 -1
  79. package/src/classes/index.ts +3 -0
  80. package/src/classes/manager.ts +15 -2
  81. package/src/classes/stakePool.ts +21 -0
  82. package/src/classes/standardStakePool.ts +361 -0
  83. package/src/classes/types.ts +17 -1
  84. package/src/classes/unstakingPool.ts +565 -0
  85. package/src/idl_codegen_unstaking_pool/accounts/PoolState.ts +163 -0
  86. package/src/idl_codegen_unstaking_pool/accounts/index.ts +2 -0
  87. package/src/idl_codegen_unstaking_pool/errors/anchor.ts +764 -0
  88. package/src/idl_codegen_unstaking_pool/errors/custom.ts +288 -0
  89. package/src/idl_codegen_unstaking_pool/errors/index.ts +49 -0
  90. package/src/idl_codegen_unstaking_pool/instructions/burn.ts +60 -0
  91. package/src/idl_codegen_unstaking_pool/instructions/collect.ts +43 -0
  92. package/src/idl_codegen_unstaking_pool/instructions/index.ts +10 -0
  93. package/src/idl_codegen_unstaking_pool/instructions/initializePool.ts +41 -0
  94. package/src/idl_codegen_unstaking_pool/instructions/mint.ts +64 -0
  95. package/src/idl_codegen_unstaking_pool/instructions/updatePoolConfig.ts +40 -0
  96. package/src/idl_codegen_unstaking_pool/programId.ts +7 -0
  97. package/src/idl_codegen_unstaking_pool/types/PoolConfigField.ts +85 -0
  98. package/src/idl_codegen_unstaking_pool/types/index.ts +6 -0
  99. package/src/idl_unstaking_pool.json +456 -0
@@ -0,0 +1,6 @@
1
+ import * as PoolConfigField from './PoolConfigField';
2
+
3
+ export { PoolConfigField };
4
+
5
+ export type PoolConfigFieldKind = PoolConfigField.ActionAuthority | PoolConfigField.LookupTable;
6
+ export type PoolConfigFieldJSON = PoolConfigField.ActionAuthorityJSON | PoolConfigField.LookupTableJSON;
@@ -0,0 +1,456 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "name": "unstaking_pool",
4
+ "instructions": [
5
+ {
6
+ "name": "initializePool",
7
+ "accounts": [
8
+ {
9
+ "name": "admin",
10
+ "isMut": true,
11
+ "isSigner": true
12
+ },
13
+ {
14
+ "name": "poolState",
15
+ "isMut": true,
16
+ "isSigner": false
17
+ },
18
+ {
19
+ "name": "unstakingSolMint",
20
+ "isMut": true,
21
+ "isSigner": false
22
+ },
23
+ {
24
+ "name": "wsolMint",
25
+ "isMut": false,
26
+ "isSigner": false
27
+ },
28
+ {
29
+ "name": "basePoolAuthority",
30
+ "isMut": false,
31
+ "isSigner": false
32
+ },
33
+ {
34
+ "name": "wsolVault",
35
+ "isMut": true,
36
+ "isSigner": false
37
+ },
38
+ {
39
+ "name": "systemProgram",
40
+ "isMut": false,
41
+ "isSigner": false
42
+ },
43
+ {
44
+ "name": "rent",
45
+ "isMut": false,
46
+ "isSigner": false
47
+ },
48
+ {
49
+ "name": "tokenProgram",
50
+ "isMut": false,
51
+ "isSigner": false
52
+ },
53
+ {
54
+ "name": "associatedTokenProgram",
55
+ "isMut": false,
56
+ "isSigner": false
57
+ }
58
+ ],
59
+ "args": []
60
+ },
61
+ {
62
+ "name": "mint",
63
+ "accounts": [
64
+ {
65
+ "name": "user",
66
+ "isMut": true,
67
+ "isSigner": true
68
+ },
69
+ {
70
+ "name": "actionAuthority",
71
+ "isMut": false,
72
+ "isSigner": true
73
+ },
74
+ {
75
+ "name": "userStakedSolToken",
76
+ "isMut": true,
77
+ "isSigner": false
78
+ },
79
+ {
80
+ "name": "userUnstakingSolToken",
81
+ "isMut": true,
82
+ "isSigner": false
83
+ },
84
+ {
85
+ "name": "stakedSolMint",
86
+ "isMut": true,
87
+ "isSigner": false
88
+ },
89
+ {
90
+ "name": "poolState",
91
+ "isMut": true,
92
+ "isSigner": false
93
+ },
94
+ {
95
+ "name": "unstakingSolMint",
96
+ "isMut": true,
97
+ "isSigner": false
98
+ },
99
+ {
100
+ "name": "basePoolAuthority",
101
+ "isMut": true,
102
+ "isSigner": false
103
+ },
104
+ {
105
+ "name": "systemProgram",
106
+ "isMut": false,
107
+ "isSigner": false
108
+ },
109
+ {
110
+ "name": "unstakingSolTokenProgram",
111
+ "isMut": false,
112
+ "isSigner": false
113
+ },
114
+ {
115
+ "name": "stakedSolTokenProgram",
116
+ "isMut": false,
117
+ "isSigner": false
118
+ }
119
+ ],
120
+ "args": [
121
+ {
122
+ "name": "stakedSolToDeposit",
123
+ "type": "u64"
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "name": "collect",
129
+ "accounts": [
130
+ {
131
+ "name": "payer",
132
+ "isMut": true,
133
+ "isSigner": true
134
+ },
135
+ {
136
+ "name": "stakeAccount",
137
+ "isMut": true,
138
+ "isSigner": false
139
+ },
140
+ {
141
+ "name": "poolState",
142
+ "isMut": true,
143
+ "isSigner": false
144
+ },
145
+ {
146
+ "name": "basePoolAuthority",
147
+ "isMut": true,
148
+ "isSigner": false
149
+ },
150
+ {
151
+ "name": "wsolVault",
152
+ "isMut": true,
153
+ "isSigner": false
154
+ },
155
+ {
156
+ "name": "wsolMint",
157
+ "isMut": false,
158
+ "isSigner": false
159
+ },
160
+ {
161
+ "name": "tokenProgram",
162
+ "isMut": false,
163
+ "isSigner": false
164
+ },
165
+ {
166
+ "name": "systemProgram",
167
+ "isMut": false,
168
+ "isSigner": false
169
+ },
170
+ {
171
+ "name": "clockProgramId",
172
+ "isMut": false,
173
+ "isSigner": false
174
+ },
175
+ {
176
+ "name": "stakeProgramId",
177
+ "isMut": false,
178
+ "isSigner": false
179
+ },
180
+ {
181
+ "name": "stakeHistoryProgramId",
182
+ "isMut": false,
183
+ "isSigner": false
184
+ }
185
+ ],
186
+ "args": []
187
+ },
188
+ {
189
+ "name": "burn",
190
+ "accounts": [
191
+ {
192
+ "name": "user",
193
+ "isMut": false,
194
+ "isSigner": true
195
+ },
196
+ {
197
+ "name": "userWsolToken",
198
+ "isMut": true,
199
+ "isSigner": false
200
+ },
201
+ {
202
+ "name": "userUnstakingSolToken",
203
+ "isMut": true,
204
+ "isSigner": false
205
+ },
206
+ {
207
+ "name": "wsolVault",
208
+ "isMut": true,
209
+ "isSigner": false
210
+ },
211
+ {
212
+ "name": "wsolMint",
213
+ "isMut": true,
214
+ "isSigner": false
215
+ },
216
+ {
217
+ "name": "poolState",
218
+ "isMut": true,
219
+ "isSigner": false
220
+ },
221
+ {
222
+ "name": "unstakingSolMint",
223
+ "isMut": true,
224
+ "isSigner": false
225
+ },
226
+ {
227
+ "name": "basePoolAuthority",
228
+ "isMut": true,
229
+ "isSigner": false
230
+ },
231
+ {
232
+ "name": "systemProgram",
233
+ "isMut": false,
234
+ "isSigner": false
235
+ },
236
+ {
237
+ "name": "unstakingSolTokenProgram",
238
+ "isMut": false,
239
+ "isSigner": false
240
+ },
241
+ {
242
+ "name": "wsolTokenProgram",
243
+ "isMut": false,
244
+ "isSigner": false
245
+ }
246
+ ],
247
+ "args": [
248
+ {
249
+ "name": "sharesToBurn",
250
+ "type": "u64"
251
+ }
252
+ ]
253
+ },
254
+ {
255
+ "name": "updatePoolConfig",
256
+ "accounts": [
257
+ {
258
+ "name": "admin",
259
+ "isMut": false,
260
+ "isSigner": true
261
+ },
262
+ {
263
+ "name": "poolState",
264
+ "isMut": true,
265
+ "isSigner": false
266
+ }
267
+ ],
268
+ "args": [
269
+ {
270
+ "name": "entry",
271
+ "type": {
272
+ "defined": "PoolConfigField"
273
+ }
274
+ },
275
+ {
276
+ "name": "data",
277
+ "type": "bytes"
278
+ }
279
+ ]
280
+ }
281
+ ],
282
+ "accounts": [
283
+ {
284
+ "name": "PoolState",
285
+ "type": {
286
+ "kind": "struct",
287
+ "fields": [
288
+ {
289
+ "name": "admin",
290
+ "type": "publicKey"
291
+ },
292
+ {
293
+ "name": "basePoolAuthority",
294
+ "type": "publicKey"
295
+ },
296
+ {
297
+ "name": "basePoolAuthorityBump",
298
+ "type": "u64"
299
+ },
300
+ {
301
+ "name": "unstakingSolMint",
302
+ "type": "publicKey"
303
+ },
304
+ {
305
+ "name": "wsolVault",
306
+ "type": "publicKey"
307
+ },
308
+ {
309
+ "name": "actionAuthority",
310
+ "type": "publicKey"
311
+ },
312
+ {
313
+ "name": "poolLookupTable",
314
+ "type": "publicKey"
315
+ },
316
+ {
317
+ "name": "sharesIssued",
318
+ "type": "u64"
319
+ },
320
+ {
321
+ "name": "wsolInVault",
322
+ "type": "u64"
323
+ },
324
+ {
325
+ "name": "padding0",
326
+ "type": "u64"
327
+ },
328
+ {
329
+ "name": "padding",
330
+ "type": {
331
+ "array": ["u128", 256]
332
+ }
333
+ }
334
+ ]
335
+ }
336
+ }
337
+ ],
338
+ "types": [
339
+ {
340
+ "name": "PoolConfigField",
341
+ "type": {
342
+ "kind": "enum",
343
+ "variants": [
344
+ {
345
+ "name": "ActionAuthority"
346
+ },
347
+ {
348
+ "name": "LookupTable"
349
+ }
350
+ ]
351
+ }
352
+ }
353
+ ],
354
+ "errors": [
355
+ {
356
+ "code": 6000,
357
+ "name": "IntegerOverflow",
358
+ "msg": "IntegerOverflow"
359
+ },
360
+ {
361
+ "code": 6001,
362
+ "name": "StakePoolError",
363
+ "msg": "Stake pool specific error"
364
+ },
365
+ {
366
+ "code": 6002,
367
+ "name": "InvalidStakePoolAccounts",
368
+ "msg": "Passed stake pool accounts are not valid"
369
+ },
370
+ {
371
+ "code": 6003,
372
+ "name": "StakePoolDeserializeError",
373
+ "msg": "Stake pool deserialization error"
374
+ },
375
+ {
376
+ "code": 6004,
377
+ "name": "InvalidStakePoolProgram",
378
+ "msg": "Stake pool invalid program"
379
+ },
380
+ {
381
+ "code": 6005,
382
+ "name": "InvalidStakePoolSize",
383
+ "msg": "Stake pool invalid size"
384
+ },
385
+ {
386
+ "code": 6006,
387
+ "name": "InvalidStakeAccountProgram",
388
+ "msg": "Stake account invalid program"
389
+ },
390
+ {
391
+ "code": 6007,
392
+ "name": "InvalidStakeAccountSize",
393
+ "msg": "Stake account invalid size"
394
+ },
395
+ {
396
+ "code": 6008,
397
+ "name": "InvalidStakeAccountCandidate",
398
+ "msg": "Stake account candidates should be uninitialized accounts"
399
+ },
400
+ {
401
+ "code": 6009,
402
+ "name": "StakeAccountDeserializeError",
403
+ "msg": "Stake account deserialization error"
404
+ },
405
+ {
406
+ "code": 6010,
407
+ "name": "UnexpectedSolToDestake",
408
+ "msg": "Simulation and actual cpi call have different results for withdrawing sol from stake pool"
409
+ },
410
+ {
411
+ "code": 6011,
412
+ "name": "UnexpectedSolToCollect",
413
+ "msg": "Simulation and actual cpi call have different results for collecting sol from stake account"
414
+ },
415
+ {
416
+ "code": 6012,
417
+ "name": "InvalidStakedSolProgram",
418
+ "msg": "Staked sol program not support"
419
+ },
420
+ {
421
+ "code": 6013,
422
+ "name": "CannotDepositZeroStakedSol",
423
+ "msg": "Cannot deposit 0 staked sol"
424
+ },
425
+ {
426
+ "code": 6014,
427
+ "name": "CannotMintZeroShares",
428
+ "msg": "Cannot mint 0 shares"
429
+ },
430
+ {
431
+ "code": 6015,
432
+ "name": "CannotBurnZeroShares",
433
+ "msg": "Cannot burn 0 shares"
434
+ },
435
+ {
436
+ "code": 6016,
437
+ "name": "CannotCollectZeroSol",
438
+ "msg": "Cannot collect 0"
439
+ },
440
+ {
441
+ "code": 6017,
442
+ "name": "NotEnoughWsol",
443
+ "msg": "Not enough wsol in vault"
444
+ },
445
+ {
446
+ "code": 6018,
447
+ "name": "NotEnoughSharesIssued",
448
+ "msg": "Not enough shares issued"
449
+ },
450
+ {
451
+ "code": 6019,
452
+ "name": "NotEnoughStakedSolToDeposit",
453
+ "msg": "Not enough staked sol to deposit (must be at least equivalent to minimum pool delegation)"
454
+ }
455
+ ]
456
+ }