| 1 | import 'package:cw_core/amount/money.dart'; |
| 2 | |
| 3 | class SolanaTransactionModel { |
| 4 | final String id; |
| 5 | |
| 6 | final String from; |
| 7 | |
| 8 | final String to; |
| 9 | |
| 10 | final Money amount; |
| 11 | |
| 12 | final bool isOutgoingTx; |
| 13 | |
| 14 | // The Program ID of this transaction, e.g, System Program, Token Program... |
| 15 | final String programId; |
| 16 | |
| 17 | final DateTime blockTime; |
| 18 | |
| 19 | final Money fee; |
| 20 | |
| 21 | SolanaTransactionModel({ |
| 22 | required this.id, |
| 23 | required this.to, |
| 24 | required this.from, |
| 25 | required this.amount, |
| 26 | required this.programId, |
| 27 | required int blockTimeInInt, |
| 28 | this.isOutgoingTx = false, |
| 29 | required this.fee, |
| 30 | }) : blockTime = DateTime.fromMillisecondsSinceEpoch(blockTimeInInt * 1000); |
| 31 | } |