send method

Future send({
  1. required Map<String, dynamic> transaction,
  2. bool test = false,
})

Implementation

Future<dynamic> send(
    {required Map<String, dynamic> transaction, bool test = false}) async {
  try {
    var response = await client
        .post(api('transaction/send'), {"test": test, ...transaction});
    if (response.containsKey('error')) {
      throw ExplorerException(code: -3, message: response['error']);
    }
    return response;
  } catch (e) {
    rethrow;
  }
}