TypeScript client for the SPL Stake Pool program, generated using Coda with full ESM support.
bun add @macalinao/clients-spl-stake-pool
This client is generated from the SPL Stake Pool IDL using Coda CLI:
# Generate the client from idls/spl_stake_pool.json
bun run codegen
# Build the TypeScript
bun run build
The coda.config.mjs file defines custom PDAs for the SPL Stake Pool program, including:
import {
findWithdrawAuthorityPda,
findStakePda
} from "@macalinao/clients-spl-stake-pool";
// Get withdraw authority PDA
const withdrawAuthorityPda = await findWithdrawAuthorityPda({
stakePool: stakePoolPublicKey
});
// Get stake account PDA
const stakePda = await findStakePda({
voteAccount: validatorVoteAccount,
stakePool: stakePoolPublicKey
});
// Use the generated client functions
Copyright © 2025 Ian Macalinao
Licensed under the Apache License, Version 2.0