skills/nexus-sdk-bridge-flows/SKILL.md
Implement bridge, bridgeAndTransfer, bridgeAndExecute, and execute flows with Nexus SDK. Use when wiring cross-chain bridge and execution operations, simulations, or max-amount checks.
npx skillsauth add availproject/nexus-sdk nexus-sdk-bridge-flowsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
sdk.bridge(params, { onEvent? })BridgeParams):
token: string — token symbol (e.g., "ETH", "USDC")amount: bigint — smallest unitstoChainId: number — destination chain idrecipient?: Hex — defaults to connected user addressgas?: bigint — optional native gas to deliver on destinationsourceChains?: number[] — restrict source chainsBridgeResult):
explorerUrl: stringsourceTxs: { chain, hash, explorerUrl }[]intent: ReadableIntentsdk.bridgeAndTransfer(params, { onEvent? })TransferParams):
token: stringamount: biginttoChainId: numberrecipient: HexsourceChains?: number[]TransferResult):
transactionHash: stringexplorerUrl: stringsdk.bridgeAndExecute(params, { onEvent?, beforeExecute? })BridgeAndExecuteParams):
token: string, amount: bigint, toChainId: numberexecute: Omit<ExecuteParams, "toChainId">waitForReceipt, requiredConfirmations, timeoutsbeforeExecute hook (optional):
beforeExecute?: () => Promise<{ value?: bigint; data?: Hex; gas?: bigint }>BridgeAndExecuteResult):
executeTransactionHash: stringexecuteExplorerUrl: stringbridgeExplorerUrl?: string (undefined if bridge skipped)bridgeSkipped: booleanintent?: ReadableIntentsdk.execute(params, { onEvent? })ExecuteParams):
toChainId: numberto: Hex (contract address)data?: Hexvalue?: bigintgas?: bigint (optional but recommended for deterministic behavior)gasPrice?: 'low' | 'medium' | 'high'waitForReceipt, receiptTimeout, requiredConfirmationstokenApproval?: { token: string; amount: bigint; spender: Hex }ExecuteResult):
transactionHash, explorerUrl, chainIdsdk.simulateBridge(params) → SimulationResult.sdk.simulateBridgeAndTransfer(params) → BridgeAndExecuteSimulationResult.sdk.simulateBridgeAndExecute(params) → BridgeAndExecuteSimulationResult.BridgeAndExecuteSimulationResult.bridgeSimulation to be null if bridge is skipped.sdk.calculateMaxForBridge({ token, toChainId, recipient?, sourceChains? }).BridgeMaxResult to set “max” or validate input.sdk.convertTokenReadableAmountToBigInt(amountString, tokenSymbol, chainId).sdk.utils.parseUnits(value, decimals) if decimals are known.NEXUS_EVENTS.STEPS_LIST and NEXUS_EVENTS.STEP_COMPLETE for progress UI.deny() on the active hook and abort.development
Implement swapWithExactIn, swapWithExactOut, and swapAndExecute flows with Nexus SDK. Use when wiring swap operations, swap intent hooks, or swap event progress updates.
development
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.
development
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.
development
Configure Nexus SDK intent/allowance/swap intent hooks and event streaming. Use when integrating approval flows, intent previews, or real-time progress events (NEXUS_EVENTS).