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.
| Parameter | Type | Required | Description |
|---|---|---|---|
operations | Operation[] | Yes | Array of operations (max 10) |
idempotency_key | string | Yes | Unique key to prevent duplicates |
Each operation:
| Field | Type | Description |
|---|---|---|
method | string | mint, transfer, burn, approve, pause, unpause |
token_id | string | Target token ID |
params | object | Method-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
- Batch API — full endpoint reference
- Batch Operations Guide — usage patterns and examples