sodax-dapp-kit-bridge
Installation
SKILL.md
Bridge (dapp-kit granular skill)
Granular skill for the bridge hooks of @sodax/dapp-kit v2. queryKey/mutationKey first segment: bridge. React-only — backend uses @sodax/sdk directly.
Step 1 — Clarify with user before coding
- New code or v1 → v2 port?
- Need a bridgeable precheck?
useGetBridgeableAmount(vault deposit/withdrawal cap, returns aBridgeLimit) anduseGetBridgeableTokens(enumerate compatible destinations). - Allowance gating?
useBridgeAllowance+useBridgeApprovebeforeuseBridge. - Source/destination chains + recipient format — confirm both are supported spokes and the
recipientmatches the destination chain encoding.
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/bridge.md— full hook surface,CreateBridgeIntentParamsshape,useBridgeAllowancenesting,BridgeLimitreturn.../integration/knowledge/recipes/bridge.md— full worked example.- Call-shape choice →
../integration/knowledge/recipes/mutation-error-handling.md.