cake_wallet/cw_monero/lib/api/structs/transaction_info_row.dart

42 lines
741 B
Dart
Raw Normal View History

import 'dart:ffi';
import 'package:ffi/ffi.dart';
class TransactionInfoRow extends Struct {
@Uint64()
2022-10-12 17:09:57 +00:00
external int amount;
@Uint64()
2022-10-12 17:09:57 +00:00
external int fee;
@Uint64()
2022-10-12 17:09:57 +00:00
external int blockHeight;
@Uint64()
2022-10-12 17:09:57 +00:00
external int confirmations;
@Uint32()
2022-10-12 17:09:57 +00:00
external int subaddrAccount;
@Int8()
2022-10-12 17:09:57 +00:00
external int direction;
@Int8()
2022-10-12 17:09:57 +00:00
external int isPending;
@Uint32()
2022-10-12 17:09:57 +00:00
external int subaddrIndex;
2022-10-12 17:09:57 +00:00
external Pointer<Utf8> hash;
2022-10-12 17:09:57 +00:00
external Pointer<Utf8> paymentId;
@Int64()
2022-10-12 17:09:57 +00:00
external int datetime;
int getDatetime() => datetime;
int getAmount() => amount >= 0 ? amount : amount * -1;
bool getIsPending() => isPending != 0;
2022-10-12 17:09:57 +00:00
String getHash() => hash.toDartString();
String getPaymentId() => paymentId.toDartString();
}