@hubbleprotocol/farms-sdk
Version:
22 lines • 1.2 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.initializeUser = initializeUser;
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
const programId_1 = require("../programId");
function initializeUser(accounts, programId = programId_1.PROGRAM_ID) {
const keys = [
{ pubkey: accounts.authority, isSigner: true, isWritable: true },
{ pubkey: accounts.payer, isSigner: true, isWritable: true },
{ pubkey: accounts.owner, isSigner: false, isWritable: false },
{ pubkey: accounts.delegatee, isSigner: false, isWritable: false },
{ pubkey: accounts.userState, isSigner: false, isWritable: true },
{ pubkey: accounts.farmState, isSigner: false, isWritable: true },
{ pubkey: accounts.systemProgram, isSigner: false, isWritable: false },
{ pubkey: accounts.rent, isSigner: false, isWritable: false },
];
const identifier = Buffer.from([111, 17, 185, 250, 60, 122, 38, 254]);
const data = identifier;
const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
return ix;
}
//# sourceMappingURL=initializeUser.js.map
;