UNPKG

kamino-sdk-beta

Version:

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

26 lines 1.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.collectProtocolFees = collectProtocolFees; const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars const programId_1 = require("../programId"); function collectProtocolFees(accounts, programId = programId_1.PROGRAM_ID) { const keys = [ { pubkey: accounts.whirlpoolsConfig, isSigner: false, isWritable: false }, { pubkey: accounts.whirlpool, isSigner: false, isWritable: true }, { pubkey: accounts.collectProtocolFeesAuthority, isSigner: true, isWritable: false, }, { pubkey: accounts.tokenVaultA, isSigner: false, isWritable: true }, { pubkey: accounts.tokenVaultB, isSigner: false, isWritable: true }, { pubkey: accounts.tokenDestinationA, isSigner: false, isWritable: true }, { pubkey: accounts.tokenDestinationB, isSigner: false, isWritable: true }, { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false }, ]; const identifier = Buffer.from([22, 67, 23, 98, 150, 178, 70, 220]); const data = identifier; const ix = new web3_js_1.TransactionInstruction({ keys, programId, data }); return ix; } //# sourceMappingURL=collectProtocolFees.js.map