API reference
BlockDB exposes a set of gRPC services. All services are pure gRPC (no REST gateway), and gRPC server reflection is enabled, so you can inspect and call every method withgrpcurl without preparing proto files yourself. The default service address is localhost:19002.
JSON mapping conventions
Before writing requests, it helps to know how proto3 messages map to JSON:-
Valueis aoneof: in JSON only the set field appears, using its camelCase name —"stringValue","intValue","doubleValue","boolValue". NULL is represented by omittingkind(an empty{}). -
int64fields are encoded as JSON strings (per proto3). For exampleheight,limit, andaffected_rowsappear as strings. -
Field names: proto3 JSON emits lowerCamelCase (
tableId, nottable_id), but accepts both camelCase and the original snake_case on input. -
Read responses use a schema + positional array shape:
ResultSet { columns: ColumnMeta[], rows: Row[] }, where eachRow.valuesis a positionalValue[]aligned withcolumns. -
Write requests use a self-describing map:
WriteRow.fieldsis amap<string, Value>.
proto/blockdb/v1/ (common.proto, table.proto, block.proto, time.proto, batch.proto).
Regular table services
TableReadService
GetRow
Read a single row. ProtoBatchGetRows
Read several primary keys in one call. ProtoFilterRows
Filter by a condition string, with sorting and pagination. ProtoTableWriteService
UpsertRows
The request uses self-describingWriteRow maps, so only the columns present are updated (partial update). The optional condition supports UPDATE_IF_SMALLER / UPDATE_IF_LARGER.
Proto
DeleteRows
CallTableScanService
Scan (server-streaming)
ProtoBlock table services
BlockReadService
GetState
Read a state snapshot at a block.current_block injects height ≤ target height; if omitted it reads the latest.
Proto
BlockWriteService
UpsertBlock
ProtoBlockSubscribeService
Subscribe (server-streaming)
ProtoTime table services
TimeReadService — GetValue
Proto
TimeWriteService — UpsertTimeRows
Proto
17:04:35 up to the 17:05:00 bucket) is done on the SDK side, so a raw gRPC call receives whatever time_at you pass.
Batch write service — BatchWriteService
InitWriteJob