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

Method submit

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

Submits signed transaction template for inclusion into a block. @param client client object which makes server requests @param template transaction template @return submit responses @throws APIException This exception is raised if the api returns errors while submitting a transaction. @throws BadURL

(Client client, Template template)

Source from the content-addressed store, hash-verified

534 * @throws JSONException This exception is raised due to malformed json requests or responses.
535 */
536 public static SubmitResponse submit(Client client, Template template) throws ChainException {
537 HashMap<String, Object> body = new HashMap<>();
538 body.put("transactions", Arrays.asList(template));
539 return client.singletonBatchRequest(
540 "submit-transaction", body, SubmitResponse.class, APIException.class);
541 }
542
543 /**
544 * Submits signed transaction template for inclusion into a block.

Callers 15

mainMethod · 0.95
setupMethod · 0.95
payMethod · 0.95
testTransactionQueryMethod · 0.95
testBalanceQueryMethod · 0.95
testSubmitTransactionMethod · 0.95
setupMethod · 0.95
testSubmitUnbalancedMethod · 0.95

Calls 1

singletonBatchRequestMethod · 0.80

Tested by 15

testTransactionQueryMethod · 0.76
testBalanceQueryMethod · 0.76
testSubmitTransactionMethod · 0.76
setupMethod · 0.76
testSubmitUnbalancedMethod · 0.76
testBasicTransactionMethod · 0.76