damm-v1-sdk/ts-client/src/examples files and public SDK methods. They focus on transaction construction patterns. For the full method catalog, see the SDK Reference.
Setup
Fetch Pool State
AmmImpl.create reads the pool, both Dynamic Vault accounts, vault token accounts, vault LP mints, pool-held vault LP token accounts, clock, and depeg accounts when required.
Quote And Swap
The recommended swap flow is:- Load the pool.
- Quote with
getSwapQuote. - Build the swap transaction with
minSwapOutAmount. - Sign, simulate when appropriate, and send.
referralOwner as the optional fifth pool.swap argument when routing a host fee account for referral flows.
Deposit Liquidity
For a balanced deposit, provide one token-side amount togetDepositQuote with balance = true; the SDK computes the other side from pool state.
getDepositQuote(tokenAAmount, tokenBAmount, false, slippagePercent).
Withdraw Liquidity
getWithdrawQuote argument to quote a single-sided withdrawal.
Create A Config-Based Pool
createPermissionlessConstantProductPoolWithConfig returns an array of transactions because vault creation, pool creation, optional locking, and optional initial swap can require multiple transactions.
createPermissionlessConstantProductPoolWithConfig2 when you need to pass an activationPoint accepted by the selected config.
Find Authorized Configs
pool_creator_authority set to the default pubkey. Private configs require the configured creator signer.
Lock LP And Claim Fees
claimLockFee2 is the newer claim helper. Use claimLockFee only when you need the older wrapped-SOL receiver behavior.
