UNPKG

@marinade.finance/kamino-sdk

Version:
29 lines 1.22 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.closePosition = void 0; const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars const programId_1 = require("../programId"); /** * Close a position, the nft mint and nft account * * # Arguments * * * `ctx` - The context of accounts * */ function closePosition(accounts) { const keys = [ { pubkey: accounts.nftOwner, isSigner: true, isWritable: true }, { pubkey: accounts.positionNftMint, isSigner: false, isWritable: true }, { pubkey: accounts.positionNftAccount, isSigner: false, isWritable: true }, { pubkey: accounts.personalPosition, isSigner: false, isWritable: true }, { pubkey: accounts.systemProgram, isSigner: false, isWritable: false }, { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false }, ]; const identifier = Buffer.from([123, 134, 81, 0, 49, 68, 98, 98]); const data = identifier; const ix = new web3_js_1.TransactionInstruction({ keys, programId: programId_1.PROGRAM_ID, data }); return ix; } exports.closePosition = closePosition; //# sourceMappingURL=closePosition.js.map