Use shared Nexus Elements hooks, transaction-step helpers, and constants to build custom Nexus UX. Use when extending widgets or implementing custom bridge/transfer/swap/deposit flows that need debouncing, polling, step orchestration, or Nexus error normalization.
common is not a standalone widget.NexusProvider + SDK initialization path.nexus-provider before using common hooks.useNexus().nexusSDK is initialized before calling SDK-dependent helpers.useNexus().handleInit(provider).useNexus().nexusSDK before invoking SDK-backed flow helpers.commonregistry/nexus-elements/common/*import {
usePolling,
useStopwatch,
useDebouncedValue,
useDebouncedCallback,
useTransactionSteps,
useNexusError,
SHORT_CHAIN_NAME,
SWAP_EXPECTED_STEPS,
WidgetErrorBoundary,
} from "@/components/common";
useTransactionSteps to seed expected steps and mark completions from SDK events.usePolling for intent/simulation refresh loops.useDebouncedValue/useDebouncedCallback before simulation calls.useNexusError to normalize SDK exceptions into user-facing messages.NEXUS_EVENTS.STEPS_LISTNEXUS_EVENTS.STEP_COMPLETENEXUS_EVENTS.SWAP_STEP_COMPLETE