sodax-wallet-sdk-react-connect
Installation
SKILL.md
Connect (wallet-sdk-react granular skill)
Granular skill for the everyday connect / disconnect + account-state + connector-discovery hooks of @sodax/wallet-sdk-react v2. React-only — backend wallets use @sodax/wallet-sdk-core directly. Source-of-truth reference lives in the parent broad skill's knowledge tree; this file is the focused workflow only.
Step 1 — Clarify with user before coding
- New code or v1 → v2 port? New → § Integration. Port v1 → § Migration.
- Which task? A connect/disconnect button (
useXConnect/useXDisconnect), reading the account (useXAccount/useXAccounts), connection metadata (useXConnection/useXConnections), or listing wallets (useXConnectors/useIsWalletInstalled). Advanced: per-chain service access +getXConnectorByIdviauseXService/useXServices. - Single chain or per-family?
useXAccounttakes eitherxChainId(chain key, narrowest typing) orxChainType(family) — never both.
Integration workflow (new v2 code)
../integration/knowledge/ai-rules.md— DO / DON'T (read first).../integration/knowledge/recipes/setup.md— prerequisite: mountSodaxWalletProvider, declare chain-type slots, wire React Query.../integration/knowledge/architecture.md— provider mount tree, frozen config,xChainTypevsxChainId, persist hydration.../integration/knowledge/recipes/connect-button.mdand../integration/knowledge/recipes/chain-detection.md.- Lookups →
../integration/knowledge/reference/hooks.md(incl. the service-leveluseXService/useXServices),connectors.md,wallet-brands.md.