Skip to main content

Module sdk

Module sdk 

Source
Expand description

Off-chain instruction builders. Fixed account order mirrors on-chain process_* comments.

Functions§

associated_usdc_ata
buy_ticket
Purchase gaming credits (tickets) with USDC.
fee_collector_usdc_ata_with_token_program
initialize
One-time treasury initialization.
payout
Pay amount µUSDC from the treasury to recipient_ata.
place_bet
Spend 1 ticket (TICKET_PRICE_MICROS) on a prediction for the given period. One bet per round — the on-chain User.last_bet_period guard prevents double-betting. User signs; User.balance is debited on-chain. The indexer reads the BetPlaced event to record the bet and update market pools.
program_id
route_fees
Route amount µUSDC of claimed DBC / DAMM v2 fees into the treasury.
route_fees_default_executor
Convenience: route_fees signed by the canonical EXECUTOR_ADDRESS.
treasury_usdc_ata
treasury_usdc_ata_with_token_program
usdc_ata