@kamino-finance/klend-sdk
Version:
Typescript SDK for interacting with the Kamino Lending (klend) protocol
55 lines • 1.99 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.initReserve = initReserve;
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
const programId_1 = require("../programId");
function initReserve(accounts, programId = programId_1.PROGRAM_ID) {
const keys = [
{ pubkey: accounts.lendingMarketOwner, isSigner: true, isWritable: true },
{ pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },
{
pubkey: accounts.lendingMarketAuthority,
isSigner: false,
isWritable: false,
},
{ pubkey: accounts.reserve, isSigner: false, isWritable: true },
{
pubkey: accounts.reserveLiquidityMint,
isSigner: false,
isWritable: false,
},
{
pubkey: accounts.reserveLiquiditySupply,
isSigner: false,
isWritable: true,
},
{ pubkey: accounts.feeReceiver, isSigner: false, isWritable: true },
{
pubkey: accounts.reserveCollateralMint,
isSigner: false,
isWritable: true,
},
{
pubkey: accounts.reserveCollateralSupply,
isSigner: false,
isWritable: true,
},
{ pubkey: accounts.rent, isSigner: false, isWritable: false },
{
pubkey: accounts.liquidityTokenProgram,
isSigner: false,
isWritable: false,
},
{
pubkey: accounts.collateralTokenProgram,
isSigner: false,
isWritable: false,
},
{ pubkey: accounts.systemProgram, isSigner: false, isWritable: false },
];
const identifier = Buffer.from([138, 245, 71, 225, 153, 4, 3, 43]);
const data = identifier;
const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
return ix;
}
//# sourceMappingURL=initReserve.js.map