sodax-dapp-kit-bitcoin
Installation
SKILL.md
Bitcoin / Radfi (dapp-kit granular skill)
Granular skill for the Bitcoin trading hooks of @sodax/dapp-kit v2 — authenticate (BIP322), fund a trading wallet, withdraw, manage UTXOs via the Radfi protocol. queryKey/mutationKey first segment: bitcoin. Dapp-kit-unique — no @sodax/sdk equivalent.
Step 1 — Clarify with user before coding
- New code or v1 → v2 port?
- Which stage? Session/auth (
useRadfiAuth,useRadfiSession,useTradingWallet), balances (useBitcoinBalance,useTradingWalletBalance), operations (useFundTradingWallet,useRadfiWithdraw), UTXO maintenance (useExpiredUtxos,useRenewUtxos). - Session lifecycle handled?
useRadfiSession(walletProvider)manages login/refresh/auto-refresh + localStorage persistence; gate trading buttons onisAuthed.
Integration workflow (new v2 code)
../integration/knowledge/ai-rules.md— DO / DO NOT (read first).../integration/knowledge/architecture.md— hook shapes,mutateAsyncSafe,unwrapResult, queryKey conventions.../integration/knowledge/features/bitcoin.md— full hook surface, session flow, mutation TVars, return shapes, polling notes.../integration/knowledge/recipes/bitcoin.md— full worked examples (session, fund, withdraw, UTXO management).- Call-shape choice →
../integration/knowledge/recipes/mutation-error-handling.md.