Official Java SDK for Bytom
Revision | 6e094e08bd4adfbb1a91cdde9b19da24ede91851 (tree) |
---|---|
Time | 2019-07-25 19:17:48 |
Author | Poseidon <shenao.78@163....> |
Commiter | GitHub |
Merge pull request #14 from Bytom/fix_block
fix block
@@ -36,7 +36,7 @@ public class Block { | ||
36 | 36 | @SerializedName("transaction_status_hash") |
37 | 37 | public String transactionStatusHash; |
38 | 38 | |
39 | - public List<BlockTx> transactions; | |
39 | + public List<Transaction> transactions; | |
40 | 40 | |
41 | 41 | |
42 | 42 | private static Logger logger = Logger.getLogger(Block.class); |
@@ -169,121 +169,6 @@ public class Block { | ||
169 | 169 | |
170 | 170 | } |
171 | 171 | |
172 | - public static class BlockTx { | |
173 | - /** | |
174 | - * Unique identifier, or transaction hash, of a transaction. | |
175 | - */ | |
176 | - private String id; | |
177 | - | |
178 | - /** | |
179 | - * version | |
180 | - */ | |
181 | - private Integer version; | |
182 | - | |
183 | - /** | |
184 | - * size | |
185 | - */ | |
186 | - private Integer size; | |
187 | - /** | |
188 | - * time_range | |
189 | - */ | |
190 | - @SerializedName("time_range") | |
191 | - private Integer timeRange; | |
192 | - | |
193 | - /** | |
194 | - * status | |
195 | - */ | |
196 | - @SerializedName("status_fail") | |
197 | - private boolean statusFail; | |
198 | - | |
199 | - /** | |
200 | - * List of specified inputs for a transaction. | |
201 | - */ | |
202 | - @SerializedName("inputs") | |
203 | - private List<AnnotatedInput> inputs; | |
204 | - | |
205 | - /** | |
206 | - * List of specified outputs for a transaction. | |
207 | - */ | |
208 | - @SerializedName("outputs") | |
209 | - private List<AnnotatedOutput> outputs; | |
210 | - } | |
211 | - | |
212 | - public static class AnnotatedInput { | |
213 | - | |
214 | - /** | |
215 | - * The number of units of the asset being issued or spent. | |
216 | - */ | |
217 | - private Integer amount; | |
218 | - | |
219 | - /** | |
220 | - * inputs param | |
221 | - */ | |
222 | - private String arbitrary; | |
223 | - | |
224 | - /** | |
225 | - * The definition of the asset being issued or spent (possibly null). | |
226 | - */ | |
227 | - @SerializedName("asset_definition") | |
228 | - private Map<String, Object> assetDefinition; | |
229 | - | |
230 | - /** | |
231 | - * The id of the asset being issued or spent. | |
232 | - */ | |
233 | - @SerializedName("asset_id") | |
234 | - private String assetId; | |
235 | - | |
236 | - /** | |
237 | - * The type of the input.<br> | |
238 | - * Possible values are "issue" and "spend". | |
239 | - */ | |
240 | - private String type; | |
241 | - } | |
242 | - | |
243 | - public static class AnnotatedOutput { | |
244 | - | |
245 | - /** | |
246 | - * The number of units of the asset being controlled. | |
247 | - */ | |
248 | - private long amount; | |
249 | - | |
250 | - /** | |
251 | - * The definition of the asset being controlled (possibly null). | |
252 | - */ | |
253 | - @SerializedName("asset_definition") | |
254 | - private Map<String, Object> assetDefinition; | |
255 | - | |
256 | - /** | |
257 | - * The id of the asset being controlled. | |
258 | - */ | |
259 | - @SerializedName("asset_id") | |
260 | - public String assetId; | |
261 | - | |
262 | - /** | |
263 | - * The control program which must be satisfied to transfer this output. | |
264 | - */ | |
265 | - @SerializedName("control_program") | |
266 | - private String controlProgram; | |
267 | - | |
268 | - /** | |
269 | - * The id of the output. | |
270 | - */ | |
271 | - @SerializedName("id") | |
272 | - private String id; | |
273 | - | |
274 | - /** | |
275 | - * The output's position in a transaction's list of outputs. | |
276 | - */ | |
277 | - private Integer position; | |
278 | - | |
279 | - /** | |
280 | - * The type the output.<br> | |
281 | - * Possible values are "control" and "retire". | |
282 | - */ | |
283 | - private String type; | |
284 | - | |
285 | - } | |
286 | - | |
287 | 172 | public static class BlockHeader { |
288 | 173 | |
289 | 174 | @SerializedName("block_header") |