TypeScript client for the Orca Whirlpools program, generated using Coda CLI with full ESM support.
bun add @macalinao/clients-orca-whirlpools
Orca Whirlpools is a concentrated liquidity AMM (CLMM) protocol on Solana that enables efficient token swaps with capital-efficient liquidity provision. The protocol allows liquidity providers to concentrate their capital within custom price ranges.
This client is generated from the Orca Whirlpools IDL using Coda CLI:
# Generate the client from idls/
bun run codegen
# Build the TypeScript
bun run build
The coda.config.mjs file can be customized to add PDAs and other Codama visitors for enhanced client functionality.
import {
getSwapInstruction,
fetchWhirlpool,
} from "@macalinao/clients-orca-whirlpools";
// Fetch whirlpool account
const whirlpool = await fetchWhirlpool(rpc, whirlpoolAddress);
// Create swap instruction
const instruction = getSwapInstruction({
// ... instruction parameters
});
Copyright © 2025 Ian Macalinao
Licensed under the Apache License, Version 2.0