Function useRoute

  • React hook to get the Skip Route Quote for an amount, a source token/chain and destination token/chain pair

    Parameters

    Returns {
        amountOut: string;
        isLoadingRoute: boolean;
        isValidatingRoute: boolean;
        refresh: (() => Promise<any>);
        routeError: any;
        routeKey: null | string;
        routeResponse: undefined | {
            amountIn: string;
            amountOut: string;
            destinationAsset: SkipSupportedAsset;
            destinationAssetChain: SkipSupportedChainData;
            operations: any[];
            response: RouteResponse;
            sourceAsset: SkipSupportedAsset;
            sourceAssetChain: SkipSupportedChainData;
            transactionCount: number;
        };
    }

    • amountOut: string
    • isLoadingRoute: boolean
    • isValidatingRoute: boolean
    • Readonly refresh: (() => Promise<any>)
        • (): Promise<any>
        • Returns Promise<any>

    • routeError: any
    • Readonly routeKey: null | string
    • routeResponse: undefined | {
          amountIn: string;
          amountOut: string;
          destinationAsset: SkipSupportedAsset;
          destinationAssetChain: SkipSupportedChainData;
          operations: any[];
          response: RouteResponse;
          sourceAsset: SkipSupportedAsset;
          sourceAssetChain: SkipSupportedChainData;
          transactionCount: number;
      }