Finalize documentation on models.
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
/** Account data interface */
|
||||
interface AccountDetails {
|
||||
/** Account registration day */
|
||||
date_registered: number;
|
||||
/** User's gender */
|
||||
gender: string;
|
||||
/** Age of user */
|
||||
age?: string;
|
||||
/** Type of account */
|
||||
type?: string;
|
||||
/** Token balance on account */
|
||||
balance?: number;
|
||||
/** Account identifiers */
|
||||
identities: {
|
||||
evm: {
|
||||
'bloxberg:8996': string[];
|
||||
@@ -13,13 +19,17 @@ interface AccountDetails {
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
};
|
||||
/** User's location */
|
||||
location: {
|
||||
area?: string;
|
||||
area_name: string;
|
||||
area_type?: string;
|
||||
};
|
||||
/** Products or services provided by user. */
|
||||
products: string[];
|
||||
/** Business category of user. */
|
||||
category?: string;
|
||||
/** Personal identifying information of user */
|
||||
vcard: {
|
||||
email: [
|
||||
{
|
||||
@@ -54,22 +64,31 @@ interface AccountDetails {
|
||||
|
||||
/** Meta signature interface */
|
||||
interface Signature {
|
||||
/** Algorithm used */
|
||||
algo: string;
|
||||
/** Data that was signed. */
|
||||
data: string;
|
||||
/** Message digest */
|
||||
digest: string;
|
||||
/** Encryption engine used. */
|
||||
engine: string;
|
||||
}
|
||||
|
||||
/** Meta object interface */
|
||||
interface Meta {
|
||||
/** Account details */
|
||||
data: AccountDetails;
|
||||
/** Meta store id */
|
||||
id: string;
|
||||
/** Signature used during write. */
|
||||
signature: Signature;
|
||||
}
|
||||
|
||||
/** Meta response interface */
|
||||
interface MetaResponse {
|
||||
/** Meta store id */
|
||||
id: string;
|
||||
/** Meta object */
|
||||
m: Meta;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,27 +1,38 @@
|
||||
/** Action object interface */
|
||||
interface Action {
|
||||
/** Action ID */
|
||||
id: number;
|
||||
/** Admin who initialized the action. */
|
||||
user: string;
|
||||
/** Admin's role in the system */
|
||||
role: string;
|
||||
/** Action performed */
|
||||
action: string;
|
||||
/** Action approval status. */
|
||||
approval: boolean;
|
||||
}
|
||||
|
||||
/** Area name object interface */
|
||||
interface AreaName {
|
||||
/** Name of area */
|
||||
name: string;
|
||||
/** Locations that map to that area name. */
|
||||
locations: Array<string>;
|
||||
}
|
||||
|
||||
/** Area type object interface */
|
||||
interface AreaType {
|
||||
/** Type of area */
|
||||
name: string;
|
||||
/** Areas that map to that area type. */
|
||||
area: Array<string>;
|
||||
}
|
||||
|
||||
/** Category object interface */
|
||||
interface Category {
|
||||
/** Business category */
|
||||
name: string;
|
||||
/** Products that map to that category. */
|
||||
products: Array<string>;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,22 @@
|
||||
/** Settings class */
|
||||
class Settings {
|
||||
/** Web3 Object */
|
||||
w3: W3 = {
|
||||
engine: undefined,
|
||||
provider: undefined,
|
||||
};
|
||||
/** A resource for searching through blocks on the blockchain network. */
|
||||
scanFilter: any;
|
||||
/** CIC Registry instance */
|
||||
registry: any;
|
||||
/** Transaction Helper instance */
|
||||
txHelper: any;
|
||||
|
||||
/**
|
||||
* Initialize the settings.
|
||||
*
|
||||
* @param scanFilter - A resource for searching through blocks on the blockchain network.
|
||||
*/
|
||||
constructor(scanFilter: any) {
|
||||
this.scanFilter = scanFilter;
|
||||
}
|
||||
@@ -15,7 +24,9 @@ class Settings {
|
||||
|
||||
/** Web3 object interface */
|
||||
interface W3 {
|
||||
/** An active web3 instance connected to the blockchain network. */
|
||||
engine: any;
|
||||
/** The connection socket to the blockchain network. */
|
||||
provider: any;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
/** Staff object interface */
|
||||
interface Staff {
|
||||
/** Comment made on the public key. */
|
||||
comment: string;
|
||||
/** Email used to create the public key. */
|
||||
email: string;
|
||||
/** Name of the owner of the public key */
|
||||
name: string;
|
||||
/** Tags added to the public key. */
|
||||
tag: number;
|
||||
/** User ID of the owner of the public key. */
|
||||
userid: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
/** Token object interface */
|
||||
interface Token {
|
||||
/** Name of the token. */
|
||||
name: string;
|
||||
/** The unique token symbol. */
|
||||
symbol: string;
|
||||
/** Address of the deployed token contract. */
|
||||
address: string;
|
||||
/** Total token supply. */
|
||||
supply: string;
|
||||
/** Number of decimals to convert to smallest denomination of the token. */
|
||||
decimals: string;
|
||||
/** Token reserve information */
|
||||
reserves: {
|
||||
'0xa686005CE37Dce7738436256982C3903f2E4ea8E'?: {
|
||||
weight: string;
|
||||
balance: string;
|
||||
};
|
||||
};
|
||||
/** Token reserve to token minting ratio. */
|
||||
reserveRatio?: string;
|
||||
/** Address of account that deployed token. */
|
||||
owner?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,53 +1,67 @@
|
||||
// Application imports
|
||||
import { AccountDetails } from '@app/_models/account';
|
||||
|
||||
/** BlocksBloom object interface */
|
||||
interface BlocksBloom {
|
||||
low: number;
|
||||
blockFilter: string;
|
||||
blocktxFilter: string;
|
||||
alg: string;
|
||||
filterRounds: number;
|
||||
}
|
||||
|
||||
/** 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 { BlocksBloom, Conversion, Transaction, Tx, TxToken };
|
||||
export { Conversion, Transaction, Tx, TxToken };
|
||||
|
||||
Reference in New Issue
Block a user