Package org.stellar.sdk.federation
Class Federation
java.lang.Object
org.stellar.sdk.federation.Federation
Helper class for resolving Stellar addresses.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic FederationResponseThis method is a helper method for handling user inputs that contain `destination` value.
-
Method Details
-
resolve
This method is a helper method for handling user inputs that contain `destination` value. It accepts two types of values:- For Stellar address (ex.
bob*stellar.org`) it splits Stellar address and then tries to find information about federation server instellar.tomlfile for a given domain. - For account ID (ex.
GB5XVAABEQMY63WTHDQ5RXADGYF345VWMNPTN2GFUDZT57D57ZQTJ7PS) it simply returns the given Account ID.
- Parameters:
value- Stellar address or account id- Returns:
- FederationResponse
- Throws:
MalformedAddressException- Address is malformedConnectionErrorException- Connection problemsNoFederationServerException- Stellar.toml does not contain federation server infoFederationServerInvalidException- Federation server is invalid (malformed URL, not HTTPS, etc.)StellarTomlNotFoundInvalidException- Stellar.toml file was not found or was malformed.NotFoundException- Stellar address not found by federation serverServerErrorException- Federation server responded with error
- For Stellar address (ex.
-