Skip to main content
The SDK supports Token 2022 transfer-hook DBC pools through dedicated config, pool, swap, and fee-claim builders. Use this page for the TypeScript integration surface. For product behavior, see DBC Transfer Hook Pools.

Method Map

In SDK 1.5.8+, claimPartnerTradingFee2 and claimCreatorTradingFee2 are transfer-hook fee claim builders. For standard pools with explicit receivers, use claimPartnerTradingFeeToReceiver and claimCreatorTradingFeeToReceiver.

State Reads

SDK 1.5.9 fetches both standard and transfer-hook account variants through the same state methods.
Raw Anchor account fetchers still use different account names: poolConfig versus configWithTransferHook, and virtualPool versus transferHookPool.

Create A Transfer-Hook Config

Transfer-hook configs require TokenType.Token2022 and a valid executable transfer-hook program.
CreatorUpdateAndMintAuthority and PartnerUpdateAndMintAuthority are only valid for transfer-hook configs. Standard configs reject mint-authority options.

Create A Transfer-Hook Pool

The SDK derives the pool and vault accounts inside the transaction builder. If you need the pool address, use deriveDbcPoolAddress(quoteMint, baseMint, config). Transfer-hook first-buy builders also use the transfer-hook swap path. They attempt to resolve the base mint’s hook remaining accounts automatically. If the hook cannot be resolved while bundling pool initialization with the first buy, pass transferHookAccountsInfo and transferHookAccounts on the first-buy params.

Swap A Transfer-Hook Pool

swap2WithTransferHook uses the same SwapMode variants as swap2. The SDK resolves transfer-hook extra accounts from the base mint and passes TransferHookAccountsInfo for you.
When a referral account is present and the referral fee is paid in base tokens, the SDK includes both AccountsType.TransferHookBase and AccountsType.TransferHookBaseReferral slices.

Claim Trading Fees

For standard pools, use the non-transfer-hook claim methods:

Completion

When the transfer-hook pool completes its bonding curve, DBC revokes the base mint’s transfer-hook program id and transfer-hook authority. After completion, use the normal DAMM v2 migration methods: