Get Strict Send Paths
Fetch strict send payment paths using the Blux core SDK.
The getStrictSendPaths function returns available payment paths for a strict send operation. When destination 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 directlybuilder— exposesnext()andprev()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: [
// sourceAsset: AssetArg,
// sourceAmount: string,
// destination: string | AssetArg[], // account address/name, or destination assets
// ]
const result = await core.getStrictSendPaths(
[sourceAsset, sourceAmount, "alice.xlm"],
options,
);