MCPcopy Index your code
hub / github.com/chain/Core / submitBatch

Method submitBatch

sdk/java/src/main/java/com/chain/api/Transaction.java:496–502  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 6

payMethod · 0.95
testBatchTransactionMethod · 0.95
mainMethod · 0.95
callbacks.jsFile · 0.80
promises.jsFile · 0.80
batchOperations.jsFile · 0.80

Calls 1

batchRequestMethod · 0.80

Tested by 1

testBatchTransactionMethod · 0.76