sourceAssets method

StrictReceivePathsRequestBuilder sourceAssets(
  1. List<Asset> sourceAssets
)

Sets the source assets. For this search, Horizon loads a list of assets available to the sender (based on source_account or source_assets) and displays the possible paths from the different source assets to the destination asset. See: List Strict Receive Payment Paths

Implementation

StrictReceivePathsRequestBuilder sourceAssets(List<Asset> sourceAssets) {
  if (queryParameters.containsKey("source_account")) {
    throw Exception("cannot set both source_assets and source_account");
  }
  queryParameters.addAll({"source_assets": encodeAssets(sourceAssets)});
  return this;
}