UNPKG

kamino-sdk-beta

Version:

Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol

27 lines 1.36 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.collectFees = collectFees; const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars const programId_1 = require("../programId"); function collectFees(accounts, programId = programId_1.PROGRAM_ID) { const keys = [ { pubkey: accounts.whirlpool, isSigner: false, isWritable: false }, { pubkey: accounts.positionAuthority, isSigner: true, isWritable: false }, { pubkey: accounts.position, isSigner: false, isWritable: true }, { pubkey: accounts.positionTokenAccount, isSigner: false, isWritable: false, }, { pubkey: accounts.tokenOwnerAccountA, isSigner: false, isWritable: true }, { pubkey: accounts.tokenVaultA, isSigner: false, isWritable: true }, { pubkey: accounts.tokenOwnerAccountB, isSigner: false, isWritable: true }, { pubkey: accounts.tokenVaultB, isSigner: false, isWritable: true }, { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false }, ]; const identifier = Buffer.from([164, 152, 207, 99, 30, 186, 19, 182]); const data = identifier; const ix = new web3_js_1.TransactionInstruction({ keys, programId, data }); return ix; } //# sourceMappingURL=collectFees.js.map