Submits a batch of signed transaction templates for inclusion into a block. @param client client object which makes server requests @param templates list of transaction templates @return a list of submit responses (individual objects can hold transaction ids or error info) @throws APIException This
(Client client, List<Template> templates)
| 494 | * @throws JSONException This exception is raised due to malformed json requests or responses. |
| 495 | */ |
| 496 | public static BatchResponse<SubmitResponse> submitBatch(Client client, List<Template> templates) |
| 497 | throws ChainException { |
| 498 | HashMap<String, Object> body = new HashMap<>(); |
| 499 | body.put("transactions", templates); |
| 500 | return client.batchRequest( |
| 501 | "submit-transaction", body, SubmitResponse.class, APIException.class); |
| 502 | } |
| 503 | |
| 504 | /** |
| 505 | * Submits a batch of signed transaction templates for inclusion into a block. |