@kamino-finance/klend-sdk
Version:
Typescript SDK for interacting with the Kamino Lending (klend) protocol
19 lines • 991 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.initGlobalConfig = initGlobalConfig;
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
const programId_1 = require("../programId");
function initGlobalConfig(accounts, programId = programId_1.PROGRAM_ID) {
const keys = [
{ pubkey: accounts.payer, isSigner: true, isWritable: true },
{ pubkey: accounts.globalConfig, isSigner: false, isWritable: true },
{ pubkey: accounts.programData, isSigner: false, isWritable: false },
{ pubkey: accounts.systemProgram, isSigner: false, isWritable: false },
{ pubkey: accounts.rent, isSigner: false, isWritable: false },
];
const identifier = Buffer.from([140, 136, 214, 48, 87, 0, 120, 255]);
const data = identifier;
const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
return ix;
}
//# sourceMappingURL=initGlobalConfig.js.map