Documentation Index
Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt
Use this file to discover all available pages before exploring further.
The dynamic-bonding-curve IDL exposes many instructions. Integrators can choose to either use the TypeScript SDK for transaction construction or build through CPI.
Partner Instructions
| Instruction | Args | SDK path | Purpose |
|---|
create_config | ConfigParameters | client.partner.createConfig | Create a partner config for fees, curve, token behavior, migration, pool creation fee, and graduated-pool settings. |
create_partner_metadata | CreatePartnerMetadataParameters | client.partner.createPartnerMetadata | Create optional metadata for the partner fee claimer. |
claim_trading_fee | max_amount_a, max_amount_b | client.partner.claimPartnerTradingFee, claimPartnerTradingFee2 | Claim partner trading fees from a virtual pool. |
claim_partner_pool_creation_fee | None | client.partner.claimPartnerPoolCreationFee | Claim the partner share of pool creation fees. |
partner_withdraw_surplus | None | client.partner.partnerWithdrawSurplus | Withdraw partner quote surplus after migration when allowed. |
Creator And Pool Instructions
| Instruction | Args | SDK path | Purpose |
|---|
initialize_virtual_pool_with_spl_token | InitializePoolParameters | client.pool.createPool | Create a DBC pool with an SPL Token base mint and Metaplex metadata. |
initialize_virtual_pool_with_token2022 | InitializePoolParameters | client.pool.createPool | Create a DBC pool with a Token-2022 base mint. |
create_virtual_pool_metadata | CreateVirtualPoolMetadataParameters | client.creator.createPoolMetadata | Create optional metadata for a virtual pool. |
claim_creator_trading_fee | max_base_amount, max_quote_amount | client.creator.claimCreatorTradingFee, claimCreatorTradingFee2 | Claim creator trading fees from a virtual pool. |
creator_withdraw_surplus | None | client.creator.creatorWithdrawSurplus | Withdraw creator surplus after migration when allowed. |
transfer_pool_creator | None | client.creator.transferPoolCreator | Transfer creator rights and creator fee claim authority to a new address. |
Swap Instructions
| Instruction | Args | Modes | Notes |
|---|
swap | SwapParameters | Exact in | Legacy exact-in swap path. It emits both EvtSwap and EvtSwap2. |
swap2 | SwapParameters2 | Exact in, partial fill, exact out | Preferred for trading integrations because the args map directly to SwapMode. |
SwapParameters2 uses these fields:
| Field | Meaning |
|---|
amount_0 | Input amount for exact-in and partial-fill, or requested output amount for exact-out. |
amount_1 | Minimum output for exact-in and partial-fill, or maximum input for exact-out. |
swap_mode | 0 exact in, 1 partial fill, 2 exact out. |
If the config uses rate limiter fees, or enable_first_swap_with_min_fee is enabled, swap instructions require the instructions sysvar in remaining accounts. The SDK adds SYSVAR_INSTRUCTIONS_PUBKEY when needed.
Migration Instructions
| Instruction | Destination | SDK path | Purpose |
|---|
create_locker | DAMM v1 or DAMM v2 support flow | client.migration.createLocker | Create the locker escrow when locked vesting is configured. |
withdraw_leftover | DAMM v1 or DAMM v2 | client.migration.withdrawLeftover | Withdraw leftover base tokens after migration. |
migration_meteora_damm_create_metadata | DAMM v1 | client.migration.createDammV1MigrationMetadata | Create metadata before DAMM v1 migration. |
migrate_meteora_damm | DAMM v1 | client.migration.migrateToDammV1 | Migrate a completed DBC pool to DAMM v1. |
migrate_meteora_damm_lock_lp_token | DAMM v1 | client.migration.lockDammV1LpToken | Lock permanent LP allocation for partner or creator. |
migrate_meteora_damm_claim_lp_token | DAMM v1 | client.migration.claimDammV1LpToken | Claim partner or creator LP allocation. |
migration_damm_v2_create_metadata | DAMM v2 | Deprecated | Deprecated since program 0.1.7; DAMM v2 migration no longer needs a separate metadata account. |
migration_damm_v2 | DAMM v2 | client.migration.migrateToDammV2 | Migrate a completed DBC pool to DAMM v2. |
withdraw_migration_fee | DAMM v1 or DAMM v2 | client.partner.partnerWithdrawMigrationFee, client.creator.creatorWithdrawMigrationFee | Withdraw partner or creator migration fee. Uses flag to select the fee side. |