List batches

Retrieve a paginated list of transaction batches processed by the sequencer. This endpoint provides access to batch information including status, signatures, and associated actions. Batches can be filtered by various criteria including action ID, batch ID, hash, status, signer, and creation timestamps.

GET

Parameters

Query Parameters

Id
Filter resources by their unique identifier
Org_id
Filter resources by the organization they belong to
Limit
How many items to return at one time (max 100)
Next
Pagination token for retrieving the next page of results
Order
Sort order for the results (ascending or descending)
SortBy
Field name to sort the results by
Action_id
Filter batches by action ID
Batch_id
Filter batches by batch ID
Hash
Filter batches by transaction hash
Status
Filter batches by processing status
Signer
Filter batches by signer address
When_created[$gt]
Filter batches created after this date and time
When_created[$lt]
Filter batches created before this date and time
When_created[$gte]
Filter batches created on or after this date and time
When_created[$lte]
Filter batches created on or before this date and time
Status codeDescription
200List of batches
400Bad request error - the request contains invalid parameters or malformed data
500Internal server error - an unexpected error occurred on the server
cURL
curl -L \
"https://blockv-labs.io/batches?id={id}&org_id={org_id}&limit={limit}&next={next}&order={order}&sortBy={sortBy}&action_id={action_id}&batch_id={batch_id}&hash={hash}&status={status}&signer={signer}&when_created[$gt]={when_created[$gt]}&when_created[$lt]={when_created[$lt]}&when_created[$gte]={when_created[$gte]}&when_created[$lte]={when_created[$lte]}" \
-H 'Accept: application/json'
Response
{
"batches": [
{
"id": "string",
"hash": "string",
"prev_hash": "string",
"sender": "SP318Q55DEKHRXJK696033DQN5C54D9K2EE6DHRWP",
"l1_tx_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"l1_block_num": 144000,
"commitment": "string",
"affected_actions": [
{
"id": "string",
"hash": "string"
}
],
"actions_count": 1,
"version": 0,
"signatures": [
{
"id": "string",
"type": "zkproof",
"signer": "string",
"signature": "string",
"tx_hash": "string",
"when_created": "2024-01-01T00:00:00Z"
}
],
"status": "pending",
"error": "Error message",
"when_completed": "2024-01-01T00:00:00Z",
"when_modified": "2024-01-01T00:00:00Z",
"when_created": "2024-01-01T00:00:00Z"
}
],
"next": "string"
}
json
{
"type": "object",
"required": [
"batches"
],
"properties": {
"batches": {
"type": "array",
"items": {
"type": "object",
"description": "Batch entity representing a collection of blockchain transactions processed together",
"required": [
"id",
"hash",
"sender",
"l1_tx_hash",
"l1_block_num",
"commitment",
"affected_actions",
"actions_count",
"version",
"status",
"when_created"
],
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the batch",
"x-oapi-codegen-extra-tags": {
"bson": "_id",
"json": "id"
},
"x-go-type": "id.ID",
"x-go-type-import": {
"path": "github.com/vlabsio/smarttoken/pkg/types/id"
},
"x-go-type-skip-optional-pointer": true
},
"hash": {
"type": "string",
"description": "Cryptographic hash of the batch content",
"x-oapi-codegen-extra-tags": {
"bson": "hash"
}
},
"prev_hash": {
"type": "string",
"description": "Hash of the previous batch in the sequence",
"x-oapi-codegen-extra-tags": {
"bson": "prev_hash"
},
"x-go-type-skip-optional-pointer": true
},
"sender": {
"type": "string",
"description": "Blockchain address that submitted the batch",
"x-oapi-codegen-extra-tags": {
"bson": "sender"
}
},
"l1_tx_hash": {
"type": "string",
"description": "Transaction hash of the batch on the blockchain",
"x-oapi-codegen-extra-tags": {
"bson": "l1_tx_hash"
}
},
"l1_block_num": {
"type": "integer",
"description": "Block number where the batch was included",
"x-oapi-codegen-extra-tags": {
"bson": "l1_block_num"
}
},
"commitment": {
"type": "string",
"description": "Commitment hash for the batch",
"x-oapi-codegen-extra-tags": {
"bson": "commitment"
},
"x-go-type-skip-optional-pointer": true
},
"affected_actions": {
"type": "array",
"description": "List of action identifiers included in this batch",
"items": {
"type": "object",
"required": [
"id",
"hash"
],
"properties": {
"id": {
"type": "string",
"x-go-type": "id.ID",
"x-go-type-import": {
"path": "github.com/vlabsio/smarttoken/pkg/types/id"
},
"x-oapi-codegen-extra-tags": {
"bson": "id"
}
},
"hash": {
"type": "string",
"x-oapi-codegen-extra-tags": {
"bson": "hash"
}
}
}
},
"x-oapi-codegen-extra-tags": {
"bson": "affected_actions"
},
"x-go-type-skip-optional-pointer": true
},
"actions_count": {
"type": "integer",
"description": "Total number of actions processed in this batch",
"x-oapi-codegen-extra-tags": {
"bson": "actions_count"
}
},
"version": {
"type": "integer",
"description": "Version number of the batch format",
"x-oapi-codegen-extra-tags": {
"bson": "version"
}
},
"signatures": {
"type": "array",
"description": "Digital signatures validating the batch",
"items": {
"type": "object",
"required": [
"id",
"type",
"signer",
"signature",
"state_root",
"when_created"
],
"properties": {
"id": {
"type": "string",
"x-oapi-codegen-extra-tags": {
"json": "id"
},
"x-go-type": "id.ID",
"x-go-type-import": {
"path": "github.com/vlabsio/smarttoken/pkg/types/id"
},
"x-go-type-skip-optional-pointer": true
},
"type": {
"type": "string",
"enum": [
"zkproof",
"validator"
],
"x-oapi-codegen-extra-tags": {
"bson": "type"
}
},
"signer": {
"type": "string",
"x-oapi-codegen-extra-tags": {
"bson": "signer"
}
},
"signature": {
"type": "string",
"x-oapi-codegen-extra-tags": {
"bson": "signature"
}
},
"tx_hash": {
"type": "string",
"x-oapi-codegen-extra-tags": {
"bson": "tx_hash"
}
},
"when_created": {
"type": "string",
"format": "date-time",
"x-oapi-codegen-extra-tags": {
"bson": "when_created"
}
}
}
},
"x-oapi-codegen-extra-tags": {
"bson": "signatures"
},
"x-go-type-skip-optional-pointer": true
},
"status": {
"description": "Current processing status of the batch",
"type": "string",
"enum": [
"pending",
"processing",
"completed",
"failed"
],
"x-oapi-codegen-extra-tags": {
"bson": "status",
"json": "status"
}
},
"error": {
"type": "string",
"description": "Error message if batch processing failed",
"x-oapi-codegen-extra-tags": {
"bson": "error"
}
},
"when_completed": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the batch processing was completed",
"x-oapi-codegen-extra-tags": {
"bson": "when_completed"
}
},
"when_modified": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the batch was last modified",
"x-oapi-codegen-extra-tags": {
"bson": "when_modified"
}
},
"when_created": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the batch was created",
"x-oapi-codegen-extra-tags": {
"bson": "when_created"
}
}
}
}
},
"next": {
"type": "string",
"description": "The next page token. This will be empty if there are no more pages."
}
}
}