nexus-sdk-hooks-events
Installation
SKILL.md
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
});