Skip to main content

BatchResource

Access via urblock.batch.

Submit multiple operations in a single API call. Each operation creates an independent transaction processed in parallel.

Methods

create(params)

Submit a batch of operations.

ParameterTypeRequiredDescription
operationsOperation[]YesArray of operations (max 10)
idempotency_keystringYesUnique key to prevent duplicates

Each operation:

FieldTypeDescription
methodstringmint, transfer, burn, approve, pause, unpause
token_idstringTarget token ID
paramsobjectMethod-specific parameters
const batch = await urblock.batch.create({
operations: [
{ method: "mint", token_id: "tok_abc123", params: { to: "0xAAA...", amount: "1000000000000000000" } },
{ method: "mint", token_id: "tok_abc123", params: { to: "0xBBB...", amount: "2000000000000000000" } },
{ method: "transfer", token_id: "tok_abc123", params: { from: "0x...", to: "0xCCC...", amount: "500000000000000000" } },
],
idempotency_key: "batch-001",
});

Returns: BatchResponse

See Also