createTransaction method

Future<JSON> createTransaction({
  1. required String ownerAddress,
  2. required String toAddress,
  3. required Amount amount,
  4. bool visible = true,
})

Implementation

Future<JSON> createTransaction({
  required String ownerAddress,
  required String toAddress,
  required Amount amount,
  bool visible = true,
}) {
  return postCall<JSON>(
    "$baseURL/wallet/createtransaction",
    data: {
      "owner_address": ownerAddress,
      "to_address": toAddress,
      "amount": amount.value.toInt(),
      "visible": visible,
    },
  );
}