src/app/_models/transaction.ts
Conversion object interface
Properties |
destinationToken |
destinationToken:
|
Type : TxToken
|
Final transaction token information. |
fromValue |
fromValue:
|
Type : number
|
Initial transaction token amount. |
sourceToken |
sourceToken:
|
Type : TxToken
|
Initial transaction token information. |
toValue |
toValue:
|
Type : number
|
Final transaction token amount. |
trader |
trader:
|
Type : string
|
Address of the initiator of the conversion. |
tx |
tx:
|
Type : Tx
|
Conversion mining information. |
user |
user:
|
Type : AccountDetails
|
Account information of the initiator of the conversion. |
import { AccountDetails } from '@app/_models/account';
/** Conversion object interface */
interface Conversion {
/** Final transaction token information. */
destinationToken: TxToken;
/** Initial transaction token amount. */
fromValue: number;
/** Initial transaction token information. */
sourceToken: TxToken;
/** Final transaction token amount. */
toValue: number;
/** Address of the initiator of the conversion. */
trader: string;
/** Account information of the initiator of the conversion. */
user: AccountDetails;
/** Conversion mining information. */
tx: Tx;
}
/** Transaction object interface */
interface Transaction {
/** Address of the transaction sender. */
from: string;
/** Account information of the transaction sender. */
sender: AccountDetails;
/** Address of the transaction recipient. */
to: string;
/** Account information of the transaction recipient. */
recipient: AccountDetails;
/** Transaction token information. */
token: TxToken;
/** Transaction mining information. */
tx: Tx;
/** Amount of tokens transacted. */
value: number;
/** Type of transaction. */
type?: string;
}
/** Transaction data interface */
interface Tx {
/** Transaction block number. */
block: number;
/** Transaction mining status. */
success: boolean;
/** Time transaction was mined. */
timestamp: number;
/** Hash generated by transaction. */
txHash: string;
/** Index of transaction in block. */
txIndex: number;
}
/** Transaction token object interface */
interface TxToken {
/** Address of the deployed token contract. */
address: string;
/** Name of the token. */
name: string;
/** The unique token symbol. */
symbol: string;
}
/** @exports */
export { Conversion, Transaction, Tx, TxToken };