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

Method createBatch

sdk/java/src/main/java/com/chain/api/Asset.java:78–84  ·  view source on GitHub ↗

Creates a batch of asset 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 asset builders @return a list of asset and/

(Client client, List<Builder> builders)

Source from the content-addressed store, hash-verified

76 * @throws JSONException This exception is raised due to malformed json requests or responses.
77 */
78 public static BatchResponse<Asset> createBatch(Client client, List<Builder> builders)
79 throws ChainException {
80 for (Builder asset : builders) {
81 asset.clientToken = UUID.randomUUID().toString();
82 }
83 return client.batchRequest("create-asset", builders, Asset.class, APIException.class);
84 }
85
86 /**
87 * Updates tags for multiple assets in a single API call.

Callers 8

testAssetCreateBatchMethod · 0.95
mainMethod · 0.95
callbacks.jsFile · 0.45
promises.jsFile · 0.45
accountsAPIFunction · 0.45
assetsAPIFunction · 0.45
transactionsAPIFunction · 0.45
batchOperations.jsFile · 0.45

Calls 2

batchRequestMethod · 0.80
toStringMethod · 0.65

Tested by 1

testAssetCreateBatchMethod · 0.76