@marinade.finance/kamino-sdk
Version:
28 lines • 1.39 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.collectFees = void 0;
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
const programId_1 = require("../programId");
function collectFees(accounts) {
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: programId_1.WHIRLPOOL_PROGRAM_ID, data });
return ix;
}
exports.collectFees = collectFees;
//# sourceMappingURL=collectFees.js.map