PDAs
Use createPdas when you need deterministic addresses without creating the client first. This is useful in backends, indexers, migration scripts, and tests where you already know the target program id.
Setup
import { createPdas } from '@bonkit/airdrop-sdk'
const pdas = createPdas(programId)Common Builders
draftIndex(creator)— the draft index PDA for a creatorairdrop(creator, draftIndex)— the airdrop account PDA- Claim status PDA builders — one derives the PDA from a merkle leaf hash (for
merkleclaims), the other from an on-chain entry index (foronchainclaims). ThecreatePdasreturn object exposes both under clearly named properties - List-related PDA builders — exposed on the
createPdasreturn object for deriving per-airdrop list chunk accounts and the overall list root PDA
Why Use createPdas Instead of the Client
The client requires a Connection and is suited to runtime read or write paths. createPdas is pure address derivation — no network IO, no async, no Solana RPC.
This makes it the right choice for:
- Migration scripts that need to compute addresses before any RPC is available
- Indexers that decode account data and want to verify addresses match expected derivations
- Test fixtures and snapshots
- Backend code that pre-derives addresses for queueing or storage
See Also
- Client for the full client surface
- On-chain List for parsing the list accounts those PDAs point to
Next Step
See Examples for end-to-end snippets that combine the client, merkle helpers, and transaction submission.
Last updated on