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

Method createBatch

sdk/java/src/main/java/com/chain/api/Account.java:73–79  ·  view source on GitHub ↗

Creates a batch of account objects. Note: this method will not throw an exception APIException. Each builder's response object must be checked for error. @param client client object that makes requests to the core @param builders list of account builders @return a list of account an

(Client client, List<Builder> builders)

Source from the content-addressed store, hash-verified

71 * @throws JSONException This exception is raised due to malformed json requests or responses.
72 */
73 public static BatchResponse<Account> createBatch(Client client, List<Builder> builders)
74 throws ChainException {
75 for (Builder builder : builders) {
76 builder.clientToken = UUID.randomUUID().toString();
77 }
78 return client.batchRequest("create-account", builders, Account.class, APIException.class);
79 }
80
81 /**
82 * Updates tags for multiple accounts in a single API call.

Callers 1

Calls 2

batchRequestMethod · 0.80
toStringMethod · 0.65

Tested by 1