PDA Derivation
Canonical PDA helpers for Dumpster and DumpsterSwap so you do not need to rewrite seeds by hand.
SDK
Start with the grouped helpers first
Most apps do not need every individual PDA helper. The grouped helpers are the safest way to derive the full address set for a curve, pool, or migration path.
Derive all curve-side PDAs
Start with the grouped curve helper when you need the bonding-curve PDA and, optionally, the creator vault.
const pdas = client.pda.getAllCurvePdas(mint, creator);
pdas.bondingCurve;
pdas.creatorVault;Derive the canonical migration path
Reach for the grouped migration helper when you need the canonical pool path created by migration.
const migration = client.pda.getMigrationPdas(mint);
migration.poolAuthority;
migration.canonicalPool;
migration.lpMint;
migration.baseVault;
migration.quoteVault;This is the cleanest way to work with migrated pools because it bakes in the real canonical path:
poolAuthorityPda(mint)- canonical pool at index
0 - base mint = token mint
- quote mint =
WGOR_MINT
Derive arbitrary pool PDAs
Start with the grouped pool helper when you need a specific DumpsterSwap pool, not just the canonical migrated one.
const poolPdas = client.pda.getAllPoolPdas(
creator,
baseMint,
quoteMint,
0
);Raw PDA helpers
Drop to the individual helpers only when the grouped helpers are not specific enough.
Shared constants
GLOBAL_PDA
FEE_CONFIG_PDA
SWAP_GLOBAL_CONFIG_PDA
MINT_AUTHORITY_PDA
LAST_WITHDRAW_PDA
WGOR_MINTDumpster PDAs
bondingCurvePda(mint)creatorVaultPda(creator)poolAuthorityPda(mint)
DumpsterSwap PDAs
poolPda(index, creator, baseMint, quoteMint)canonicalPoolPda(creator, baseMint, quoteMint)poolLpMintPda(pool)poolBaseAccountPda(pool)poolQuoteAccountPda(pool)swapCreatorVaultPda(creator)swapEventAuthorityPda()
Do not re-encode seeds in each client
If different parts of your stack derive PDAs differently, they will eventually drift. Import the SDK helpers once and reuse them everywhere.