getwayBalance method

Future<Map<String, dynamic>> getwayBalance(
  1. String account, {
  2. bool strict = false,
  3. dynamic hotwallet,
  4. String? ledgerHash,
  5. XRPLLedgerIndex? ledgerIndex = XRPLLedgerIndex.validated,
})

This request calculates the total balances issued by a given account, optionally excluding amounts held by operational addresses.

Implementation

Future<Map<String, dynamic>> getwayBalance(
  String account, {
  bool strict = false,
  dynamic hotwallet,
  String? ledgerHash,
  XRPLLedgerIndex? ledgerIndex = XRPLLedgerIndex.validated,
}) async {
  final Map<String, dynamic> configParams = {};
  _createRpcConfig(configParams, "account", account);
  _createRpcConfig(configParams, "strict", strict);
  _createRpcConfig(configParams, "hotwallet", hotwallet);
  _createRpcConfig(configParams, "ledger_index", ledgerIndex?.value);
  _createRpcConfig(configParams, "ledger_hash", ledgerHash);
  final response = await makeCustomCall<Map<String, dynamic>>(
      "gateway_balances", [configParams]);
  return response;
}