@orca-so/whirlpools-sdk
Version:
Typescript SDK to interact with Orca's Whirlpool program.
34 lines • 1.55 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.initializePoolWithAdaptiveFeeIx = initializePoolWithAdaptiveFeeIx;
const web3_js_1 = require("@solana/web3.js");
function initializePoolWithAdaptiveFeeIx(program, params) {
const { initSqrtPrice, tradeEnableTimestamp, tokenMintA, tokenMintB, tokenBadgeA, tokenBadgeB, tokenProgramA, tokenProgramB, whirlpoolsConfig, whirlpoolPda, oraclePda, adaptiveFeeTierKey, tokenVaultAKeypair, tokenVaultBKeypair, funder, initializePoolAuthority, } = params;
const optionTradeEnableTimestamp = tradeEnableTimestamp ?? null;
const ix = program.instruction.initializePoolWithAdaptiveFee(initSqrtPrice, optionTradeEnableTimestamp, {
accounts: {
whirlpoolsConfig,
tokenMintA,
tokenMintB,
tokenBadgeA,
tokenBadgeB,
funder,
initializePoolAuthority,
whirlpool: whirlpoolPda.publicKey,
oracle: oraclePda.publicKey,
tokenVaultA: tokenVaultAKeypair.publicKey,
tokenVaultB: tokenVaultBKeypair.publicKey,
adaptiveFeeTier: adaptiveFeeTierKey,
systemProgram: web3_js_1.SystemProgram.programId,
tokenProgramA,
tokenProgramB,
rent: web3_js_1.SYSVAR_RENT_PUBKEY,
},
});
return {
instructions: [ix],
cleanupInstructions: [],
signers: [tokenVaultAKeypair, tokenVaultBKeypair],
};
}
//# sourceMappingURL=initialize-pool-with-adaptive-fee-ix.js.map