Loading...
Loading...
Integrate the Transfer element (registry name `transfer`) for bridge-to-recipient flows in React/TypeScript apps. Use when installing or debugging cross-chain recipient transfers, allowance/intent approvals, source-selection constraints, and `sdk.bridgeAndTransfer` step execution.
npx skill4agent add availproject/nexus-elements nexus-elements-transfernpx shadcn@latest add @nexus-elements/transferNexusProvideruseNexus().nexusSDKbridgableBalanceuseNexus().handleInit(provider)useNexus().nexusSDK"use client";
import FastTransfer from "@/components/transfer/transfer";
import { SUPPORTED_CHAINS } from "@avail-project/nexus-core";
export function TransferPanel() {
return (
<FastTransfer
prefill={{
token: "USDC",
chainId: SUPPORTED_CHAINS.BASE,
recipient: "0x000000000000000000000000000000000000dead",
}}
onStart={() => {
// pending
}}
onComplete={() => {
// success
}}
onError={(message) => {
console.error(message);
}}
/>
);
}prefill?tokenchainIdamountrecipientmaxAmount?onStart?onComplete?onError?(message)sdk.bridgeAndTransfer({ token, amount, toChainId, recipient, sourceChains }, { onEvent })sdk.calculateMaxForBridge(...)intent.currentallowance.currentNEXUS_EVENTS.STEPS_LISTNEXUS_EVENTS.STEP_COMPLETEViewHistoryonError