cic-staff-client/src/app/_models/transaction.ts

54 lines
1003 B
TypeScript
Raw Normal View History

2021-05-12 08:40:21 +02:00
// Application imports
2021-05-10 18:15:25 +02:00
import { AccountDetails } from '@app/_models/account';
2020-11-25 08:17:37 +01:00
2021-05-12 08:40:21 +02:00
/** BlocksBloom object interface */
interface BlocksBloom {
low: number;
blockFilter: string;
blocktxFilter: string;
alg: string;
filterRounds: number;
}
2021-05-12 08:40:21 +02:00
/** Conversion object interface */
interface Conversion {
destinationToken: TxToken;
fromValue: number;
sourceToken: TxToken;
toValue: number;
trader: string;
user: AccountDetails;
tx: Tx;
}
2021-05-12 08:40:21 +02:00
/** Transaction object interface */
interface Transaction {
from: string;
sender: AccountDetails;
to: string;
recipient: AccountDetails;
token: TxToken;
tx: Tx;
value: number;
2021-04-30 14:50:16 +02:00
type?: string;
}
2021-05-12 08:40:21 +02:00
/** Transaction data interface */
interface Tx {
block: number;
success: boolean;
timestamp: number;
txHash: string;
txIndex: number;
}
/** Transaction token object interface */
interface TxToken {
address: string;
name: string;
symbol: string;
}
2021-05-12 08:40:21 +02:00
/** @exports */
export { BlocksBloom, Conversion, Transaction, Tx, TxToken };