UNPKG

5.51 kBMarkdownView Raw
1### Usage
2npm install --save secjs-tx
3
4### Tokenchain transaction model
5
6* [_TokenTxModelHandler](#_TokenTxModelHandler)
7 * [.getModel()](#_TokenTxModelHandler+getModel)
8 * [.getHeight()](#_TokenTxModelHandler+getHeight)
9 * [.getTimeStamp()](#_TokenTxModelHandler+getTimeStamp)
10 * [.setTimeStamp(timestamp)](#_TokenTxModelHandler+setTimeStamp)
11 * [.setGasLimit(gaslimit)](#_TokenTxModelHandler+setGasLimit)
12 * [.getGasPrice()](#_TokenTxModelHandler+getGasPrice)
13 * [.setGasPrice(gasprice)](#_TokenTxModelHandler+setGasPrice)
14
15<a name="_TokenTxModelHandler+getModel"></a>
16
17### _TokenTxModelHandler.getModel()
18get complete model
19
20**Kind**: instance method of [<code>_TokenTxModelHandler</code>](#_TokenTxModelHandler)
21<a name="_TokenTxModelHandler+getHeight"></a>
22
23### _TokenTxModelHandler.getHeight()
24get height of block
25
26**Kind**: instance method of [<code>_TokenTxModelHandler</code>](#_TokenTxModelHandler)
27<a name="_TokenTxModelHandler+getTimeStamp"></a>
28
29### _TokenTxModelHandler.getTimeStamp()
30get Timestamp of model
31
32**Kind**: instance method of [<code>_TokenTxModelHandler</code>](#_TokenTxModelHandler)
33<a name="_TokenTxModelHandler+setTimeStamp"></a>
34
35### _TokenTxModelHandler.setTimeStamp(timestamp)
36set Timestamp for block model
37
38**Kind**: instance method of [<code>_TokenTxModelHandler</code>](#_TokenTxModelHandler)
39
40| Param | Type |
41| --- | --- |
42| timestamp | <code>string</code> |
43
44<a name="_TokenTxModelHandler+setGasLimit"></a>
45
46### _TokenTxModelHandler.setGasLimit(gaslimit)
47set gas limit
48
49**Kind**: instance method of [<code>_TokenTxModelHandler</code>](#_TokenTxModelHandler)
50
51| Param | Type |
52| --- | --- |
53| gaslimit | <code>string</code> |
54
55<a name="_TokenTxModelHandler+getGasPrice"></a>
56
57### _TokenTxModelHandler.getGasPrice()
58get block gas price
59
60**Kind**: instance method of [<code>_TokenTxModelHandler</code>](#_TokenTxModelHandler)
61<a name="_TokenTxModelHandler+setGasPrice"></a>
62
63### _TokenTxModelHandler.setGasPrice(gasprice)
64set gas price
65
66**Kind**: instance method of [<code>_TokenTxModelHandler</code>](#_TokenTxModelHandler)
67
68| Param | Type |
69| --- | --- |
70| gasprice | <code>string</code> |
71
72<a name="_TxBlockModelHandler"></a>
73
74## _TxBlockModelHandler
75Transaction chain block model
76
77**Kind**: global class
78
79* [_TxBlockModelHandler](#_TxBlockModelHandler)
80 * [.getModel()](#_TxBlockModelHandler+getModel)
81 * [.getHeight()](#_TxBlockModelHandler+getHeight)
82 * [.setHeight(height)](#_TxBlockModelHandler+setHeight)
83 * [.setStatus(status)](#_TxBlockModelHandler+setStatus)
84
85<a name="_TxBlockModelHandler+getModel"></a>
86
87### _TxBlockModelHandler.getModel()
88get complete model
89
90**Kind**: instance method of [<code>_TxBlockModelHandler</code>](#_TxBlockModelHandler)
91<a name="_TxBlockModelHandler+getHeight"></a>
92
93### _TxBlockModelHandler.getHeight()
94get height of block
95
96**Kind**: instance method of [<code>_TxBlockModelHandler</code>](#_TxBlockModelHandler)
97<a name="_TxBlockModelHandler+setHeight"></a>
98
99### _TxBlockModelHandler.setHeight(height)
100set Height of block
101
102**Kind**: instance method of [<code>_TxBlockModelHandler</code>](#_TxBlockModelHandler)
103
104| Param | Type |
105| --- | --- |
106| height | <code>string</code> |
107
108<a name="_TxBlockModelHandler+setStatus"></a>
109
110### _TxBlockModelHandler.setStatus(status)
111set status of transaction chain
112
113**Kind**: instance method of [<code>_TxBlockModelHandler</code>](#_TxBlockModelHandler)
114
115| Param | Type |
116| --- | --- |
117| status | <code>string</code> |
118
119<a name="_TxTransModelHandler"></a>
120
121## _TxTransModelHandler
122transaction chain transaction model
123
124**Kind**: global class
125
126* [_TxTransModelHandler](#_TxTransModelHandler)
127 * [.getModel()](#_TxTransModelHandler+getModel)
128 * [.setProductInfo(product)](#_TxTransModelHandler+setProductInfo)
129 * [.getProductInfo()](#_TxTransModelHandler+getProductInfo)
130
131<a name="_TxTransModelHandler+getModel"></a>
132
133### _TxTransModelHandler.getModel()
134transaction chain transation information model
135
136**Kind**: instance method of [<code>_TxTransModelHandler</code>](#_TxTransModelHandler)
137<a name="_TxTransModelHandler+setProductInfo"></a>
138
139### _TxTransModelHandler.setProductInfo(product)
140set product information
141
142**Kind**: instance method of [<code>_TxTransModelHandler</code>](#_TxTransModelHandler)
143
144| Param | Type |
145| --- | --- |
146| product | <code>object</code> |
147
148<a name="_TxTransModelHandler+getProductInfo"></a>
149
150### _TxTransModelHandler.getProductInfo()
151get product information
152
153**Kind**: instance method of [<code>_TxTransModelHandler</code>](#_TxTransModelHandler)
154<a name="SECModelHandler"></a>
155
156## SECModelHandler
157SEC Model handler: factory function to create for different model
158
159**Kind**: global class
160
161* [SECModelHandler](#SECModelHandler)
162 * [new SECModelHandler(params)](#new_SECModelHandler_new)
163 * [.getInstance()](#SECModelHandler+getInstance)
164
165<a name="new_SECModelHandler_new"></a>
166
167### new SECModelHandler(params)
168create instance for model handler
169params.type: 'tokenchain-block' 'tokenchain-trans' 'transactionchain-block' 'transactionchain-trans'
170
171
172| Param | Type |
173| --- | --- |
174| params | <code>object</code> |
175
176<a name="SECModelHandler+getInstance"></a>
177
178### secModelHandler.getInstance()
179get the instance of model handler
180
181**Kind**: instance method of [<code>SECModelHandler</code>](#SECModelHandler)
\No newline at end of file