info method

Future<InfoResponse> info({
  1. String? language,
  2. String? jwt,
})

Get basic info from the anchor about what their TRANSFER_SERVER supports. language (optional) Defaults to en if not specified or if the specified language is not supported. Language code specified using RFC 4646. Error fields and other human readable messages in the response should be in this language. jwt token previously received from the anchor via the SEP-10 authentication flow

Implementation

Future<InfoResponse> info({String? language, String? jwt}) async {
  Uri serverURI = Util.appendEndpointToUrl(_transferServiceAddress, 'info');

  _InfoRequestBuilder requestBuilder =
      _InfoRequestBuilder(httpClient, serverURI);

  final Map<String, String> queryParams = {};

  if (language != null) {
    queryParams["lang"] = language;
  }

  InfoResponse response =
      await requestBuilder.forQueryParameters(queryParams).execute(jwt);

  return response;
}