sodax-dapp-kit-auxiliary-services
Installation
SKILL.md
Auxiliary services (dapp-kit granular skill)
Granular skill for the smaller @sodax/dapp-kit v2 surfaces grouped together: partner (queryKey partner), recovery (recovery), backend queries (backend, read-only — no wallet), and shared utilities (shared). React-only — backend/Node uses @sodax/sdk directly.
Step 1 — Clarify with user before coding
- New code or v1 → v2 port?
- Which surface?
- Partner fees:
useIsTokenApproved→useApproveToken→useSetSwapPreference→useFeeClaimSwap(returnsIntentAutoSwapResult, NOTSwapResponse);useGetAutoSwapPreferences,useFetchAssetsBalancesfor reads. - Recovery:
useHubAssetBalances(list stuck hub assets) →useWithdrawHubAsset(withdraw one back to a spoke). Follows a known failed cross-chain op — investigate the failure first. - Backend reads (no wallet): intent tracking (
useBackendIntentByTxHashpolls 1s,useBackendIntentByHash,useBackendUserIntents), orderbook (useBackendOrderbook—paginationnests underparams), MM data (useBackendMoneyMarketPositionetc.), swap submission (useBackendSubmitSwapTxmutation +useBackendSubmitSwapTxStatus). - Shared utilities:
useSodaxContext,useHubProvider,useXBalances(needsxServicefrom wallet-sdk-react),useDeriveUserWalletAddress/useGetUserHubWalletAddress,useEstimateGas,useStellarTrustlineCheck/useRequestTrustline.
- Partner fees: