BluxBlux

Get Strict Receive Paths

Fetch strict receive payment paths using the Blux core SDK.

The getStrictReceivePaths function returns available payment paths for a strict receive operation. When source is an account string, it accepts G…, M…, SEP-2 federation, or .xlm; see address resolution.

The return value contains two properties:

  • response — the records you can use directly
  • builder — exposes next() and prev() to paginate through results

Type

export type CallBuilderOptions = {
  cursor?: string;
  limit?: number;
  network?: string;
  order?: "asc" | "desc";
};

type GetPaymentPathResult = {
  builder: PathCallBuilder;
  response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.PaymentPathRecord>;
};

Usage

import { core } from "@bluxcc/core";

// args: [
//   source: string | AssetArg[], // account address/name, or source assets
//   destinationAsset: AssetArg,
//   destinationAmount: string,
// ]
const result = await core.getStrictReceivePaths(
  ["alice.xlm", destinationAsset, destinationAmount],
  options,
);

On this page