from this SE issue: https://solana.stackexchange.com/questions/22459/how-to-get-codama-with-the-create-solana-program-tool-to-generate-find-pda-funct
When using create-solana-program with an anchor IDL, I do not get the PDA helper function for finding PDAs e.g, a pdas directory isn't created that I can easily use for my PDAs as observed here https://github.com/solana-program/token-2022/tree/main/clients/js/src/generated/pdas
reproducibility
create a new solana project with anchor using the default counter template
pnpm create solana-program
Update the counter to be a PDA instead of an on-curve account in anchor
#[derive(Accounts)]
pub struct Create<'info> {
#[account(init, payer = payer, seeds = [b"counter"], bump, space = 8 + 40)]
pub counter: Account<'info, Counter>,
#[account(mut)]
pub payer: Signer<'info>,
pub system_program: Program<'info, System>,
}
Build the program
Generate the clients
Screenshot below shows the generated folders

env
anchor 0.31.1
from this SE issue: https://solana.stackexchange.com/questions/22459/how-to-get-codama-with-the-create-solana-program-tool-to-generate-find-pda-funct
When using
create-solana-programwith an anchor IDL, I do not get the PDA helper function for finding PDAs e.g, apdasdirectory isn't created that I can easily use for my PDAs as observed here https://github.com/solana-program/token-2022/tree/main/clients/js/src/generated/pdasreproducibility
create a new solana project with anchor using the default counter template
Update the
counterto be a PDA instead of an on-curve account in anchorBuild the program
Generate the clients
Screenshot below shows the generated folders
env
anchor 0.31.1