2021-12-24 12:52:08 +00:00
|
|
|
import 'dart:ffi';
|
|
|
|
import 'package:ffi/ffi.dart';
|
|
|
|
|
|
|
|
class TransactionInfoRow extends Struct {
|
|
|
|
@Uint64()
|
2022-10-12 17:09:57 +00:00
|
|
|
external int amount;
|
2021-12-24 12:52:08 +00:00
|
|
|
|
|
|
|
@Uint64()
|
2022-10-12 17:09:57 +00:00
|
|
|
external int fee;
|
2021-12-24 12:52:08 +00:00
|
|
|
|
|
|
|
@Uint64()
|
2022-10-12 17:09:57 +00:00
|
|
|
external int blockHeight;
|
2021-12-24 12:52:08 +00:00
|
|
|
|
|
|
|
@Uint64()
|
2022-10-12 17:09:57 +00:00
|
|
|
external int confirmations;
|
2021-12-24 12:52:08 +00:00
|
|
|
|
|
|
|
@Uint32()
|
2022-10-12 17:09:57 +00:00
|
|
|
external int subaddrAccount;
|
2021-12-24 12:52:08 +00:00
|
|
|
|
|
|
|
@Int8()
|
2022-10-12 17:09:57 +00:00
|
|
|
external int direction;
|
2021-12-24 12:52:08 +00:00
|
|
|
|
|
|
|
@Int8()
|
2022-10-12 17:09:57 +00:00
|
|
|
external int isPending;
|
2021-12-24 12:52:08 +00:00
|
|
|
|
|
|
|
@Uint32()
|
2022-10-12 17:09:57 +00:00
|
|
|
external int subaddrIndex;
|
2021-12-24 12:52:08 +00:00
|
|
|
|
2022-10-12 17:09:57 +00:00
|
|
|
external Pointer<Utf8> hash;
|
2021-12-24 12:52:08 +00:00
|
|
|
|
2022-10-12 17:09:57 +00:00
|
|
|
external Pointer<Utf8> paymentId;
|
2021-12-24 12:52:08 +00:00
|
|
|
|
|
|
|
@Int64()
|
2022-10-12 17:09:57 +00:00
|
|
|
external int datetime;
|
2021-12-24 12:52:08 +00:00
|
|
|
|
|
|
|
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();
|
2021-12-24 12:52:08 +00:00
|
|
|
}
|