Skip to main content
These examples show the SDK flow shape. They return unsigned transactions that your app should sign, simulate, submit, and confirm through its own wallet or backend signer flow.

Create A Non-PDA Fee Vault

Use this flow when the vault address can be generated and stored by your integration.

Create A PDA Fee Vault

Use this flow when the vault must be recoverable from (base, tokenMint) or must sign source-program fee claim instructions.

Fund A Fee Vault Directly

The SDK creates the funder’s associated token account if needed. For native SOL, it wraps SOL before funding.

Claim User Fees

Use claimUserFee2 when the claimant signs but receives into another receiver’s associated token account:

Read Vault State

Fund From DAMM v2

PDA fee vaults can receive DAMM v2 position fees or rewards through fund_by_claiming_fee. The fee vault must own the DAMM v2 position NFT account before claiming.
If the position NFT account still belongs to another owner, use setTokenAccountOwnerTx to transfer its token-account authority to the fee vault before using these claim helpers.

Fund From DBC

PDA fee vaults can receive DBC creator fees, partner fees, surplus withdrawals, and migration fees through source-program funding wrappers.
The SDK fetches PoolConfig and VirtualPool state when you do not provide cached state.