Add models for mapping transaction data.

This commit is contained in:
Spencer Ofwiti 2020-11-04 15:34:37 +03:00
parent 7ec4a45579
commit a4c287f9f7
2 changed files with 39 additions and 0 deletions

1
src/app/_models/index.ts Normal file
View File

@ -0,0 +1 @@
export * from './transaction';

View File

@ -0,0 +1,38 @@
export class BlocksBloom {
low: number;
blockFilter: string;
blocktxFilter: string;
alg: string;
filterRounds: number;
}
export class Token {
address: string;
name: string;
symbol: string;
}
export class Tx {
block: number;
success: boolean;
timestamp: number;
txHash: string;
txIndex: number;
}
export class Transaction {
from: string;
to: string;
token: Token;
tx: Tx;
value: number;
}
export class Conversion {
destinationToken: Token;
fromValue: number;
sourceToken: Token;
toValue: number;
trader: string;
tx: Tx;
}