@macalinao/clients-orca-whirlpools
v0.5.0
Published
TypeScript client for Orca Whirlpools program
Maintainers
Readme
@macalinao/clients-orca-whirlpools
TypeScript client for the Orca Whirlpools program, generated using Coda CLI with full ESM support.
Installation
bun add @macalinao/clients-orca-whirlpoolsAbout 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.
Development
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 buildConfiguration
The coda.config.mjs file can be customized to add PDAs and other Codama visitors for enhanced client functionality.
Usage
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
});License
Copyright © 2025 Ian Macalinao
Licensed under the Apache License, Version 2.0
