TheDocumentation Index
Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt
Use this file to discover all available pages before exploring further.
dbc-go SDK provides Go helpers for backend services, indexers, and scripts that need to read DBC state or build common DBC transactions.
Go SDK
Meteora DBC Go SDK source and examples.
Installation
Clone the repository and install dependencies. The localgo.mod uses github.com/gagliardetto/solana-go.
Repository Map
| Path | Use |
|---|---|
instructions | Transaction builders and readers for partner, pool, creator, and state-related flows. |
math | Curve and safe math helpers. |
common | Program IDs, shared constants, and account types. |
helpers | Account deserialization, PDA helpers, and common utilities. |
examples | Runnable examples for pool creation, swaps, reads, fee claims, and creator transfer. |
Run Examples
Before running examples, configure the keypairs, RPC endpoint, and public keys required by the file.Examples
| Example | Use |
|---|---|
examples/create_pool_and_swap_sol.go | Create a pool and perform a SOL swap. |
examples/create_pool_and_swap_usdc.go | Create a pool and perform a USDC swap. |
examples/get_pool.go | Fetch virtual pool state. |
examples/get_pool_config.go | Fetch config settings and curve parameters. |
examples/get_bonding_curve_progress.go | Monitor quote reserve progress toward migration. |
examples/get_pool_fee_metrics.go | Read pool fee metrics. |
examples/claim_creator_trading_fee.go | Claim accumulated creator trading fees. |
examples/claim_partner_trading_fee.go | Claim accumulated partner trading fees. |
examples/transfer_pool_creator.go | Transfer pool creator rights to a new address. |
Helper Surface
| Helper | Use |
|---|---|
helpers.DeserializePoolConfig | Decode a PoolConfig account. |
helpers.DeserializePool | Decode a VirtualPool account. |
helpers.DeriveDbcPoolPDA | Derive a DBC pool PDA. |
helpers.DeriveTokenVaultPDA | Derive DBC token vault PDAs. |
helpers.DeriveEventAuthorityPDA | Derive the DBC event authority PDA. |
helpers.DerivePoolAuthorityPDA | Derive the DBC pool authority PDA. |
instructions.GetPoolConfig | Fetch and decode a pool config. |
instructions.GetPool | Fetch and decode a pool. |
instructions.GetPoolFeeMetrics | Fetch pool fee metrics. |

