nexus-sdk-hooks-events
Hooks and Events
Set up hooks once after SDK init
- Call
sdk.setOnIntentHook(callback). - Call
sdk.setOnAllowanceHook(callback). - Call
sdk.setOnSwapIntentHook(callback). - If a hook is not set, the SDK auto-approves and continues.
- If a hook is set, always call
allow(...)ordeny()or the flow will stall. - Optionally auto-deny after a timeout to avoid hanging UX.
Handle intent hook (bridge / bridgeAndTransfer / bridgeAndExecute)
Signature
sdk.setOnIntentHook((data) => {
// data: OnIntentHookData
});
More from availproject/nexus-sdk
nexus-sdk-setup
Set up and initialize Nexus SDK in any JS/TS frontend project. Use when configuring wallet provider, SDK instance lifecycle, network selection, or adding a minimal wallet connection path.
18nexus-sdk-bridge-flows
Implement bridge, bridgeAndTransfer, bridgeAndExecute, and execute flows with Nexus SDK. Use when wiring cross-chain bridge and execution operations, simulations, or max-amount checks.
18nexus-sdk-balances-metadata-utils
Fetch balances, supported chains/tokens, intent history, and use Nexus SDK formatter utilities. Use when building token/chain selectors, showing balances, or formatting UI values.
18nexus-sdk-integration
End-to-end integration guidance for Avail Nexus SDK in any JS/TS frontend project (React/Next/Vite/etc). Use when asked to integrate, initialize, or wire Nexus SDK flows (bridge, transfer, execute, swap), hooks, events, balances, supported chains/tokens, or formatter utilities.
17nexus-sdk-swap-flows
Implement swapWithExactIn, swapWithExactOut, and swapAndExecute flows with Nexus SDK. Use when wiring swap operations, swap intent hooks, or swap event progress updates.
17