Low-level TypeScript client for the Kamino Lending and Farms programs on Solana.
bun add @macalinao/clients-kamino-lending
Or with npm:
npm install @macalinao/clients-kamino-lending
KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjDimport {
getInitLendingMarketInstruction,
fetchLendingMarket,
// ... other exports
} from "@macalinao/clients-kamino-lending";
import { createSolanaRpc } from "@solana/web3.js";
// Connect to Solana
const rpc = createSolanaRpc("https://api.mainnet-beta.solana.com");
// Fetch account data
const lendingMarket = await fetchLendingMarket(rpc, marketAddress);
// Create instructions
const instruction = getInitLendingMarketInstruction({
// ... instruction parameters
});
This client is automatically generated from the Kamino Lending IDL using Coda. The generated code includes:
To regenerate the client code after IDL updates:
bun run codegen
bun run build
bun run clean
Copyright © 2025 Ian Macalinao
Licensed under the Apache License, Version 2.0