Skip to content

hydra_client integration — code map (Dice & Snake)

Direct links to where the hydra_client package is used in the demo app, for the workshop walkthrough. Repo: https://github.com/dextrlabs-dev/hydra-mobile-sdk (branch main).

One-liner: the dice/snake services build + sign a tiny L2 transaction, call HydraHttpClient.postTransaction(...), and the head confirms it back on HydraHeadFacade.messages as a typed HydraTxValid at a new seq.

The library being integrated

Dice

Snake

Connection / live message stream (high-level facade)


Note: line anchors are exact for the services/*.dart files (unchanged on main). For connection_tab.dart / snake_game_tab.dart they may be off by a few lines — the workshop fixes (web int fix, board sizing, default :4021, hidden commit) are local and not yet pushed to main.