@exponent-labs/kamino-lend-standard 0.9.3

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 (58) hide show
  1. package/build/anchor/idl.json +2889 -0
  2. package/build/anchor/type.d.ts +2895 -0
  3. package/build/anchor/type.js +3 -0
  4. package/build/anchor/type.js.map +1 -0
  5. package/build/constants.d.ts +44 -0
  6. package/build/constants.js +144 -0
  7. package/build/constants.js.map +1 -0
  8. package/build/index.d.ts +103 -0
  9. package/build/index.js +318 -0
  10. package/build/index.js.map +1 -0
  11. package/build/instructions/addEmission.d.ts +11 -0
  12. package/build/instructions/addEmission.js +58 -0
  13. package/build/instructions/addEmission.js.map +1 -0
  14. package/build/instructions/createStandardToken.d.ts +0 -0
  15. package/build/instructions/createStandardToken.js +56 -0
  16. package/build/instructions/createStandardToken.js.map +1 -0
  17. package/build/instructions/depositInstruction.d.ts +17 -0
  18. package/build/instructions/depositInstruction.js +119 -0
  19. package/build/instructions/depositInstruction.js.map +1 -0
  20. package/build/instructions/getPositionInstruction.d.ts +15 -0
  21. package/build/instructions/getPositionInstruction.js +114 -0
  22. package/build/instructions/getPositionInstruction.js.map +1 -0
  23. package/build/instructions/index.d.ts +2 -0
  24. package/build/instructions/index.js +19 -0
  25. package/build/instructions/index.js.map +1 -0
  26. package/build/instructions/initializeKaminoLendAccount.d.ts +18 -0
  27. package/build/instructions/initializeKaminoLendAccount.js +85 -0
  28. package/build/instructions/initializeKaminoLendAccount.js.map +1 -0
  29. package/build/instructions/initializePositionInstruction.d.ts +8 -0
  30. package/build/instructions/initializePositionInstruction.js +55 -0
  31. package/build/instructions/initializePositionInstruction.js.map +1 -0
  32. package/build/instructions/mintInstruction.d.ts +19 -0
  33. package/build/instructions/mintInstruction.js +132 -0
  34. package/build/instructions/mintInstruction.js.map +1 -0
  35. package/build/instructions/redeemInstruction.d.ts +21 -0
  36. package/build/instructions/redeemInstruction.js +129 -0
  37. package/build/instructions/redeemInstruction.js.map +1 -0
  38. package/build/instructions/withdrawInstruction.d.ts +17 -0
  39. package/build/instructions/withdrawInstruction.js +122 -0
  40. package/build/instructions/withdrawInstruction.js.map +1 -0
  41. package/package.json +22 -0
  42. package/src/anchor/idl.json +2889 -0
  43. package/src/anchor/type.ts +2895 -0
  44. package/src/constants.d.ts +44 -0
  45. package/src/constants.js +133 -0
  46. package/src/constants.ts +205 -0
  47. package/src/index.ts +500 -0
  48. package/src/instructions/addEmission.ts +39 -0
  49. package/src/instructions/createStandardToken.ts +57 -0
  50. package/src/instructions/depositInstruction.ts +130 -0
  51. package/src/instructions/getPositionInstruction.ts +117 -0
  52. package/src/instructions/index.ts +2 -0
  53. package/src/instructions/initializeKaminoLendAccount.ts +101 -0
  54. package/src/instructions/initializePositionInstruction.ts +31 -0
  55. package/src/instructions/mintInstruction.ts +149 -0
  56. package/src/instructions/redeemInstruction.ts +140 -0
  57. package/src/instructions/withdrawInstruction.ts +137 -0
  58. package/tsconfig.json +19 -0
package/src/index.ts ADDED
@@ -0,0 +1,500 @@
1
+ import { AnchorProvider, BN, Program, web3 } from "@coral-xyz/anchor"
2
+ import { initializeKaminoLendAccountInstruction, mintInstruction } from "./instructions"
3
+ import { KaminoLendStandard } from "./anchor/type"
4
+ import IDL from "./anchor/idl.json"
5
+ import { BankrunProvider } from "anchor-bankrun"
6
+ import { redeemInstruction } from "./instructions/redeemInstruction"
7
+ import { depositInstruction } from "./instructions/depositInstruction"
8
+ import { initializePositionInstruction } from "./instructions/initializePositionInstruction"
9
+ import { withdrawInstruction } from "./instructions/withdrawInstruction"
10
+ import { addEmissionInstruction } from "./instructions/addEmission"
11
+ import { getAssociatedTokenAddressSync } from "@solana/spl-token"
12
+ import { getKaminoFarmsRewardsTreasuryVault, getKaminoFarmsRewardsVault, getMeta } from "./constants"
13
+ import { getPositionInstruction } from "./instructions/getPositionInstruction"
14
+
15
+ export * from "./constants"
16
+
17
+ export { IDL }
18
+
19
+ const PROGRAM_ID = new web3.PublicKey(IDL.address)
20
+
21
+ export class KaminoLendStandardSDK {
22
+ public program: Program<KaminoLendStandard>
23
+ public kaminoLendProgramId: web3.PublicKey
24
+ public kaminoFarmsProgramId: web3.PublicKey
25
+ public kaminoLendingMarketId: web3.PublicKey
26
+ public kaminoLendingMarketAuthorityId: web3.PublicKey
27
+ public kaminoFarmsGlobalConfigId: web3.PublicKey
28
+
29
+ constructor(
30
+ public provider: AnchorProvider | BankrunProvider,
31
+ public kaminoLendProgramKey: web3.PublicKey,
32
+ public kaminoFarmsProgramKey: web3.PublicKey,
33
+ public kaminoLendingMarketKey: web3.PublicKey,
34
+ public kaminoLendingMarketAuthorityKey: web3.PublicKey,
35
+ public kaminoFarmsGlobalConfigKey: web3.PublicKey,
36
+ public programId: web3.PublicKey = PROGRAM_ID,
37
+ ) {
38
+ this.program = new Program<KaminoLendStandard>(IDL as KaminoLendStandard, provider)
39
+ this.kaminoLendProgramId = kaminoLendProgramKey
40
+ this.kaminoFarmsProgramId = kaminoFarmsProgramKey
41
+ this.kaminoLendingMarketId = kaminoLendingMarketKey
42
+ this.kaminoLendingMarketAuthorityId = kaminoLendingMarketAuthorityKey
43
+ this.kaminoFarmsGlobalConfigId = kaminoFarmsGlobalConfigKey
44
+ }
45
+
46
+ initializeKaminoLendAccount({
47
+ signer,
48
+ feePayer,
49
+ reserve,
50
+ reserveFarmState,
51
+ userLookupTable,
52
+ baseMint,
53
+ baseTokenProgram,
54
+ minMintSize = new BN(1000),
55
+ minRedeemSize = new BN(1000),
56
+ }: {
57
+ signer: web3.PublicKey
58
+ feePayer: web3.PublicKey
59
+ reserve: web3.PublicKey
60
+ reserveFarmState: web3.PublicKey
61
+ userLookupTable: web3.PublicKey
62
+ baseMint: web3.PublicKey
63
+ baseTokenProgram: web3.PublicKey
64
+ minMintSize: BN
65
+ minRedeemSize: BN
66
+ }) {
67
+ return initializeKaminoLendAccountInstruction({
68
+ kaminoLendStandardProgram: this.program,
69
+ kaminoFarmsProgramId: this.kaminoFarmsProgramId,
70
+ kaminoLendProgramId: this.kaminoLendProgramId,
71
+ lendingMarket: this.kaminoLendingMarketId,
72
+ lendingMarketAuthority: this.kaminoLendingMarketAuthorityId,
73
+ reserve,
74
+ reserveFarmState,
75
+ signer,
76
+ feePayer,
77
+ userLookupTable,
78
+ baseMint,
79
+ baseTokenProgram,
80
+ minMintSize,
81
+ minRedeemSize,
82
+ })
83
+ }
84
+
85
+ mint({
86
+ signer,
87
+ feePayer,
88
+ amount,
89
+ reserve,
90
+ reserveFarmState,
91
+ baseMint,
92
+ signerBaseTokenAccount,
93
+ signerReceiptTokenAccount,
94
+ remainingAccounts,
95
+ tokenProgramBase,
96
+ }: {
97
+ signer: web3.PublicKey
98
+ feePayer: web3.PublicKey
99
+ amount: BN
100
+ reserve: web3.PublicKey
101
+ reserveFarmState: web3.PublicKey
102
+ baseMint: web3.PublicKey
103
+ signerBaseTokenAccount: web3.PublicKey
104
+ signerReceiptTokenAccount: web3.PublicKey
105
+ remainingAccounts: web3.AccountMeta[]
106
+ tokenProgramBase: web3.PublicKey
107
+ }) {
108
+ return mintInstruction({
109
+ kaminoLendStandardProgram: this.program,
110
+ kaminoFarmsProgramId: this.kaminoFarmsProgramId,
111
+ kaminoLendProgramId: this.kaminoLendProgramId,
112
+ amount,
113
+ lendingMarket: this.kaminoLendingMarketId,
114
+ lendingMarketAuthority: this.kaminoLendingMarketAuthorityId,
115
+ reserve,
116
+ reserveFarmState,
117
+ signer,
118
+ feePayer,
119
+ baseMint,
120
+ signerBaseTokenAccount,
121
+ signerReceiptTokenAccount,
122
+ remainingAccounts,
123
+ tokenProgramBase,
124
+ })
125
+ }
126
+
127
+ redeem({
128
+ signer,
129
+ feePayer,
130
+ amount,
131
+ reserve,
132
+ reserveFarmState,
133
+ baseMint,
134
+ signerBaseTokenAccount,
135
+ signerReceiptTokenAccount,
136
+ reserveCollateralMint,
137
+ reserveSourceCollateral,
138
+ reserveLiquiditySupply,
139
+ remainingAccounts,
140
+ }: {
141
+ signer: web3.PublicKey
142
+ feePayer: web3.PublicKey
143
+ amount: BN
144
+ reserve: web3.PublicKey
145
+ reserveFarmState: web3.PublicKey
146
+ baseMint: web3.PublicKey
147
+ signerBaseTokenAccount: web3.PublicKey
148
+ signerReceiptTokenAccount: web3.PublicKey
149
+ reserveCollateralMint: web3.PublicKey
150
+ reserveSourceCollateral: web3.PublicKey
151
+ reserveLiquiditySupply: web3.PublicKey
152
+ remainingAccounts: web3.AccountMeta[]
153
+ }) {
154
+ return redeemInstruction({
155
+ kaminoLendStandardProgram: this.program,
156
+ kaminoFarmsProgramId: this.kaminoFarmsProgramId,
157
+ kaminoLendProgramId: this.kaminoLendProgramId,
158
+ amount,
159
+ lendingMarket: this.kaminoLendingMarketId,
160
+ lendingMarketAuthority: this.kaminoLendingMarketAuthorityId,
161
+ reserve,
162
+ reserveFarmState,
163
+ signer,
164
+ feePayer,
165
+ baseMint,
166
+ signerBaseTokenAccount,
167
+ signerReceiptTokenAccount,
168
+ reserveCollateralMint,
169
+ reserveSourceCollateral,
170
+ reserveLiquiditySupply,
171
+ remainingAccounts,
172
+ })
173
+ }
174
+
175
+ deposit({
176
+ amount,
177
+ feePayer,
178
+ signer,
179
+ kaminoFarm,
180
+ kaminoReserve,
181
+ signerReceiptTokenAccount,
182
+ emissionInfos,
183
+ }: {
184
+ amount: BN
185
+ feePayer: web3.PublicKey
186
+ signer: web3.PublicKey
187
+ kaminoFarm: web3.PublicKey
188
+ kaminoReserve: web3.PublicKey
189
+ signerReceiptTokenAccount: web3.PublicKey
190
+ emissionInfos: EmissionInfo[]
191
+ }) {
192
+ const remainingAccounts = emissionInfos
193
+ .map((info) => {
194
+ const accountAuthorityRewardAta = getAssociatedTokenAddressSync(
195
+ info.emissionMint,
196
+ getMeta(kaminoReserve, this.programId),
197
+ true,
198
+ info.emissionTokenProgram,
199
+ )
200
+
201
+ console.log("emission topken program", info.emissionTokenProgram.toBase58())
202
+
203
+ const rewardsTreasuryVault = getKaminoFarmsRewardsTreasuryVault(
204
+ info.emissionMint,
205
+ info.farmsGlobalConfig,
206
+ this.kaminoFarmsProgramId,
207
+ )
208
+
209
+ const rewardsVault = getKaminoFarmsRewardsVault(
210
+ info.emissionMint,
211
+ info.farmsFarmState,
212
+ this.kaminoFarmsProgramId,
213
+ )
214
+
215
+ return [
216
+ {
217
+ pubkey: accountAuthorityRewardAta,
218
+ isSigner: false,
219
+ isWritable: true,
220
+ },
221
+ {
222
+ pubkey: info.emissionMint,
223
+ isSigner: false,
224
+ isWritable: false,
225
+ },
226
+ {
227
+ pubkey: rewardsTreasuryVault,
228
+ isSigner: false,
229
+ isWritable: true,
230
+ },
231
+ {
232
+ pubkey: rewardsVault,
233
+ isSigner: false,
234
+ isWritable: true,
235
+ },
236
+ {
237
+ pubkey: info.emissionTokenProgram,
238
+ isSigner: false,
239
+ isWritable: false,
240
+ },
241
+ ]
242
+ })
243
+ .flat()
244
+
245
+ return depositInstruction({
246
+ amount,
247
+ feePayer,
248
+ kaminoLendStandardProgram: this.program,
249
+ kaminoFarm,
250
+ kaminoFarmsProgramId: this.kaminoFarmsProgramId,
251
+ kaminoGlobalConfig: this.kaminoFarmsGlobalConfigId,
252
+ kaminoLendProgramId: this.kaminoLendProgramId,
253
+ lendingMarket: this.kaminoLendingMarketId,
254
+ remainingAccounts,
255
+ reserve: kaminoReserve,
256
+ reserveFarmState: kaminoFarm,
257
+ signer,
258
+ signerReceiptTokenAccount,
259
+ })
260
+ }
261
+
262
+ withdraw({
263
+ amount,
264
+ feePayer,
265
+ signer,
266
+ kaminoFarm,
267
+ kaminoReserve,
268
+ signerReceiptTokenAccount,
269
+ emissionInfos,
270
+ }: {
271
+ amount: BN
272
+ feePayer: web3.PublicKey
273
+ signer: web3.PublicKey
274
+ kaminoFarm: web3.PublicKey
275
+ kaminoReserve: web3.PublicKey
276
+ signerReceiptTokenAccount: web3.PublicKey
277
+ emissionInfos: EmissionInfo[]
278
+ }) {
279
+ const remainingAccounts = emissionInfos
280
+ .map((info) => {
281
+ const accountAuthorityRewardAta = getAssociatedTokenAddressSync(
282
+ info.emissionMint,
283
+ getMeta(kaminoReserve, this.programId),
284
+ true,
285
+ info.emissionTokenProgram,
286
+ )
287
+
288
+ console.log("emission topken program", info.emissionTokenProgram.toBase58())
289
+
290
+ const rewardsTreasuryVault = getKaminoFarmsRewardsTreasuryVault(
291
+ info.emissionMint,
292
+ info.farmsGlobalConfig,
293
+ this.kaminoFarmsProgramId,
294
+ )
295
+
296
+ const rewardsVault = getKaminoFarmsRewardsVault(
297
+ info.emissionMint,
298
+ info.farmsFarmState,
299
+ this.kaminoFarmsProgramId,
300
+ )
301
+
302
+ return [
303
+ {
304
+ pubkey: accountAuthorityRewardAta,
305
+ isSigner: false,
306
+ isWritable: true,
307
+ },
308
+ {
309
+ pubkey: info.emissionMint,
310
+ isSigner: false,
311
+ isWritable: false,
312
+ },
313
+ {
314
+ pubkey: rewardsTreasuryVault,
315
+ isSigner: false,
316
+ isWritable: true,
317
+ },
318
+ {
319
+ pubkey: rewardsVault,
320
+ isSigner: false,
321
+ isWritable: true,
322
+ },
323
+ {
324
+ pubkey: info.emissionTokenProgram,
325
+ isSigner: false,
326
+ isWritable: false,
327
+ },
328
+ ]
329
+ })
330
+ .flat()
331
+
332
+ return withdrawInstruction({
333
+ amount,
334
+ feePayer,
335
+ kaminoLendStandardProgram: this.program,
336
+ kaminoFarm,
337
+ kaminoFarmsProgramId: this.kaminoFarmsProgramId,
338
+ kaminoGlobalConfig: this.kaminoFarmsGlobalConfigId,
339
+ kaminoLendProgramId: this.kaminoLendProgramId,
340
+ lendingMarket: this.kaminoLendingMarketId,
341
+ remainingAccounts,
342
+ reserve: kaminoReserve,
343
+ reserveFarmState: kaminoFarm,
344
+ signer,
345
+ signerReceiptTokenAccount,
346
+ })
347
+ }
348
+
349
+ getSyPosition({
350
+ feePayer,
351
+ signer,
352
+ kaminoFarm,
353
+ kaminoReserve,
354
+ emissionInfos,
355
+ }: {
356
+ feePayer: web3.PublicKey
357
+ signer: web3.PublicKey
358
+ kaminoFarm: web3.PublicKey
359
+ kaminoReserve: web3.PublicKey
360
+ emissionInfos: EmissionInfo[]
361
+ }) {
362
+ const remainingAccounts = emissionInfos
363
+ .map((info) => {
364
+ const accountAuthorityRewardAta = getAssociatedTokenAddressSync(
365
+ info.emissionMint,
366
+ getMeta(kaminoReserve, this.programId),
367
+ true,
368
+ info.emissionTokenProgram,
369
+ )
370
+
371
+ const rewardsTreasuryVault = getKaminoFarmsRewardsTreasuryVault(
372
+ info.emissionMint,
373
+ info.farmsGlobalConfig,
374
+ this.kaminoFarmsProgramId,
375
+ )
376
+
377
+ const rewardsVault = getKaminoFarmsRewardsVault(
378
+ info.emissionMint,
379
+ info.farmsFarmState,
380
+ this.kaminoFarmsProgramId,
381
+ )
382
+
383
+ return [
384
+ {
385
+ pubkey: accountAuthorityRewardAta,
386
+ isSigner: false,
387
+ isWritable: true,
388
+ },
389
+ {
390
+ pubkey: info.emissionMint,
391
+ isSigner: false,
392
+ isWritable: false,
393
+ },
394
+ {
395
+ pubkey: rewardsTreasuryVault,
396
+ isSigner: false,
397
+ isWritable: true,
398
+ },
399
+ {
400
+ pubkey: rewardsVault,
401
+ isSigner: false,
402
+ isWritable: true,
403
+ },
404
+ {
405
+ pubkey: info.emissionTokenProgram,
406
+ isSigner: false,
407
+ isWritable: false,
408
+ },
409
+ ]
410
+ })
411
+ .flat()
412
+
413
+ return getPositionInstruction({
414
+ feePayer,
415
+ kaminoLendStandardProgram: this.program,
416
+ kaminoFarm,
417
+ kaminoFarmsProgramId: this.kaminoFarmsProgramId,
418
+ kaminoGlobalConfig: this.kaminoFarmsGlobalConfigId,
419
+ kaminoLendProgramId: this.kaminoLendProgramId,
420
+ lendingMarket: this.kaminoLendingMarketId,
421
+ remainingAccounts,
422
+ reserve: kaminoReserve,
423
+ reserveFarmState: kaminoFarm,
424
+ signer,
425
+ })
426
+ }
427
+
428
+ initializePosition({
429
+ signer,
430
+ feePayer,
431
+ reserve,
432
+ }: {
433
+ signer: web3.PublicKey
434
+ feePayer: web3.PublicKey
435
+ reserve: web3.PublicKey
436
+ }) {
437
+ return initializePositionInstruction({
438
+ feePayer,
439
+ kaminoLendStandardProgram: this.program,
440
+ reserve,
441
+ signer,
442
+ })
443
+ }
444
+
445
+ // createStandardToken({
446
+ // reserve,
447
+ // signer,
448
+ // feePayer,
449
+ // baseMint,
450
+ // baseTokenProgram,
451
+ // }: {
452
+ // reserve: web3.PublicKey
453
+ // signer: web3.PublicKey
454
+ // feePayer: web3.PublicKey
455
+ // baseMint: web3.PublicKey
456
+ // baseTokenProgram: web3.PublicKey
457
+ // }) {
458
+ // return createStandardTokenInstruction({
459
+ // kaminoLendStandardProgram: this.program,
460
+ // feePayer,
461
+ // reserve,
462
+ // signer,
463
+ // baseMint,
464
+ // baseTokenProgram,
465
+ // })
466
+ // }
467
+
468
+ addEmission({
469
+ signer,
470
+ feePayer,
471
+ reserve,
472
+ emissionMint,
473
+ emissionTokenAccount,
474
+ emissionTokenProgram,
475
+ }: {
476
+ signer: web3.PublicKey
477
+ feePayer: web3.PublicKey
478
+ reserve: web3.PublicKey
479
+ emissionMint: web3.PublicKey
480
+ emissionTokenAccount: web3.PublicKey
481
+ emissionTokenProgram: web3.PublicKey
482
+ }) {
483
+ return addEmissionInstruction({
484
+ emissionMint,
485
+ emissionTokenAccount,
486
+ emissionTokenProgram,
487
+ feePayer,
488
+ kaminoLendStandardProgram: this.program,
489
+ reserve,
490
+ signer,
491
+ })
492
+ }
493
+ }
494
+
495
+ export interface EmissionInfo {
496
+ emissionMint: web3.PublicKey
497
+ emissionTokenProgram: web3.PublicKey
498
+ farmsGlobalConfig: web3.PublicKey
499
+ farmsFarmState: web3.PublicKey
500
+ }
@@ -0,0 +1,39 @@
1
+ import * as anchor from "@coral-xyz/anchor"
2
+ import { KaminoLendStandard } from "../anchor/type"
3
+ import { getEmissionTracker, getMeta } from "../constants"
4
+ import { EXPONENT_ADMIN_PROGRAM_ID, ExponentAdminPda } from "@exponent-labs/exponent-admin-pda"
5
+
6
+ export const addEmissionInstruction = ({
7
+ kaminoLendStandardProgram,
8
+ reserve,
9
+ signer,
10
+ feePayer,
11
+ emissionMint,
12
+ emissionTokenAccount,
13
+ emissionTokenProgram,
14
+ }: {
15
+ kaminoLendStandardProgram: anchor.Program<KaminoLendStandard>
16
+ reserve: anchor.web3.PublicKey
17
+ signer: anchor.web3.PublicKey
18
+ feePayer: anchor.web3.PublicKey
19
+ emissionMint: anchor.web3.PublicKey
20
+ emissionTokenAccount: anchor.web3.PublicKey
21
+ emissionTokenProgram: anchor.web3.PublicKey
22
+ }) => {
23
+ const exponentAdmin = new ExponentAdminPda(EXPONENT_ADMIN_PROGRAM_ID)
24
+ const admin = exponentAdmin.exponentAdmin()
25
+ const instruction = kaminoLendStandardProgram.methods
26
+ .addEmission()
27
+ .accountsStrict({
28
+ adminState: admin,
29
+ signer,
30
+ feePayer,
31
+ emissionMint,
32
+ meta: getMeta(reserve, kaminoLendStandardProgram.programId),
33
+ emissionTokenAccount,
34
+ systemProgram: anchor.web3.SystemProgram.programId,
35
+ })
36
+ .instruction()
37
+
38
+ return instruction
39
+ }
@@ -0,0 +1,57 @@
1
+ // import * as anchor from "@coral-xyz/anchor"
2
+ // import { KaminoLendStandard } from "../anchor/type"
3
+ // import { TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID } from "@solana/spl-token"
4
+ // import {
5
+ // getAccountAuthority,
6
+ // getAccountAuthorityBaseTokenAccount,
7
+ // getEmissionTracker,
8
+ // getMeta,
9
+ // getMintAuthority,
10
+ // getStakedReceiptPool,
11
+ // getStakedReceiptPoolAuthority,
12
+ // getStandardTokenMint,
13
+ // } from "../constants"
14
+
15
+ // export const createStandardTokenInstruction = ({
16
+ // kaminoLendStandardProgram,
17
+ // reserve,
18
+ // signer,
19
+ // feePayer,
20
+ // baseMint,
21
+ // baseTokenProgram,
22
+ // }: {
23
+ // kaminoLendStandardProgram: anchor.Program<KaminoLendStandard>
24
+ // reserve: anchor.web3.PublicKey
25
+ // signer: anchor.web3.PublicKey
26
+ // feePayer: anchor.web3.PublicKey
27
+ // baseMint: anchor.web3.PublicKey
28
+ // baseTokenProgram: anchor.web3.PublicKey
29
+ // }) => {
30
+ // console.log("base mint in ix gen", baseMint.toBase58())
31
+ // const mintAuthority = getMintAuthority(reserve, kaminoLendStandardProgram.programId)
32
+ // const accountAuthorityBaseToken = getAccountAuthorityBaseTokenAccount(reserve, kaminoLendStandardProgram.programId)
33
+ // const accountAuthority = getAccountAuthority(reserve, kaminoLendStandardProgram.programId)
34
+ // const standardTokenMint = getStandardTokenMint(reserve, kaminoLendStandardProgram.programId)
35
+ // const emissionTracker = getEmissionTracker(reserve, kaminoLendStandardProgram.programId)
36
+ // const instruction = kaminoLendStandardProgram.methods
37
+ // .createStandardToken()
38
+ // .accountsStrict({
39
+ // feePayer,
40
+ // reserve,
41
+ // signer,
42
+ // mintAuthority,
43
+ // token22Program: TOKEN_2022_PROGRAM_ID,
44
+ // tokenMint: standardTokenMint,
45
+ // meta: getMeta(reserve, kaminoLendStandardProgram.programId),
46
+ // systemProgram: anchor.web3.SystemProgram.programId,
47
+ // authorityAccount: accountAuthority,
48
+ // authorityPool: getStakedReceiptPoolAuthority(reserve, kaminoLendStandardProgram.programId),
49
+ // tokenReceiptPool: getStakedReceiptPool(reserve, kaminoLendStandardProgram.programId),
50
+ // accountAuthorityBaseToken,
51
+ // baseMint,
52
+ // tokenProgramBase: baseTokenProgram,
53
+ // })
54
+ // .instruction()
55
+
56
+ // return instruction
57
+ // }