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 {
|
2020-11-04 13:34:37 +01:00
|
|
|
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;
|
2020-11-04 13:34:37 +01:00
|
|
|
}
|
|
|
|
|
2021-05-12 08:40:21 +02:00
|
|
|
/** Transaction object interface */
|
|
|
|
interface Transaction {
|
2020-11-04 13:34:37 +01:00
|
|
|
from: string;
|
2021-04-29 19:10:39 +02:00
|
|
|
sender: AccountDetails;
|
2020-11-04 13:34:37 +01:00
|
|
|
to: string;
|
2021-04-29 19:10:39 +02:00
|
|
|
recipient: AccountDetails;
|
|
|
|
token: TxToken;
|
2020-11-04 13:34:37 +01:00
|
|
|
tx: Tx;
|
|
|
|
value: number;
|
2021-04-30 14:50:16 +02:00
|
|
|
type?: string;
|
2020-11-04 13:34:37 +01:00
|
|
|
}
|
|
|
|
|
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;
|
2020-11-04 13:34:37 +01:00
|
|
|
}
|
2021-04-29 19:10:39 +02:00
|
|
|
|
2021-05-12 08:40:21 +02:00
|
|
|
/** @exports */
|
|
|
|
export { BlocksBloom, Conversion, Transaction, Tx, TxToken };
|