resolve Forward
Performs a forward query for payment routing.
Forward queries allow routing payments through the federation server using custom parameters. The exact parameters depend on the federation server's implementation (e.g., bank account details, routing numbers, etc.).
Note: This method does NOT include the q parameter - only type=forward and the provided forward parameters.
Return
The federation response containing the routing destination account
Parameters
forward Params
Map of forward-specific parameters required by the federation server (e.g., "forward_type", "swift", "acct")
Throws
If the federation server returns an invalid response or the forward query cannot be resolved
Example:
val service = FederationService.fromDomain("stellar.org")
val response = service.resolveForward(
mapOf(
"forward_type" to "bank_account",
"swift" to "BOPBPHMM",
"acct" to "2382376"
)
)
println("Route payment to: ${response.accountId}")
if (response.memo != null) {
println("With memo (${response.memoType}): ${response.memo}")
}Content copied to clipboard