UNPKG

@renec-foundation/redex-sdk

Version:

Typescript SDK to interact with Orca's Whirlpool program.

29 lines (28 loc) 951 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setEnableFlagIx = void 0; /** * Sets `enable` flag of the pool to enable or disable this pool. * Only the current pool creator authority has permission to invoke this instruction. * * @category Instructions * @param context - Context object containing services required to generate the instruction * @param params - SetEnableFlagParams object * @returns - Instruction to perform the action. */ function setEnableFlagIx(program, params) { const { whirlpoolsConfig, whirlpool, poolCreatorAuthority, isEnabled } = params; const ix = program.instruction.setEnableFlag(isEnabled, { accounts: { whirlpoolsConfig, whirlpool, poolCreatorAuthority, }, }); return { instructions: [ix], cleanupInstructions: [], signers: [], }; } exports.setEnableFlagIx = setEnableFlagIx;