@renec-foundation/redex-sdk
Version:
Typescript SDK to interact with Orca's Whirlpool program.
30 lines (29 loc) • 1.12 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.setPoolCreatorAuthorityIx = void 0;
/**
* Sets the fee authority for a WhirlpoolsConfig.
* The fee authority can set the fee & protocol fee rate for individual pools or set the default fee rate for newly minted pools.
* Only the current fee authority has permission to invoke this instruction.
*
* @category Instructions
* @param context - Context object containing services required to generate the instruction
* @param params - SetPoolCreatorAuthorityParams object
* @returns - Instruction to perform the action.
*/
function setPoolCreatorAuthorityIx(program, params) {
const { whirlpoolsConfig, poolCreatorAuthority, newPoolCreatorAuthority } = params;
const ix = program.instruction.setPoolCreatorAuthority({
accounts: {
whirlpoolsConfig,
poolCreatorAuthority,
newPoolCreatorAuthority,
},
});
return {
instructions: [ix],
cleanupInstructions: [],
signers: [],
};
}
exports.setPoolCreatorAuthorityIx = setPoolCreatorAuthorityIx;