@umbra-privacy/indexer-proto-gen
v2.0.1
Published
Generated TypeScript protobuf types for the Umbra Indexer services
Readme
@umbra-privacy/indexer-proto-gen
Generated TypeScript protobuf types for the Umbra Indexer services. Provides typed schemas and serialization helpers used by @umbra-privacy/indexer-read-service-client.
Installation
pnpm add @umbra-privacy/indexer-proto-genOverview
This package contains protobuf message schemas generated from the Umbra indexer .proto definitions using @bufbuild/protoc-gen-es. It is consumed internally by the indexer client packages and the SDK. You typically don't need to install it directly.
What's Included
- Health schemas —
BasicHealthResponseSchema,DetailedHealthResponseSchema,LivenessResponseSchema,ReadinessResponseSchema - UTXO schemas —
UtxoResponseSchema,UtxoColumnarResponseSchema,UtxoDataItemSchema,SingleUtxoResponseSchema - Proof schemas —
ProofResponseSchema - Tree schemas —
TreeInfoResponseSchema - Stats schemas —
StatsResponseSchema - Admin schemas —
ChallengeResponseSchema,ListAdminsResponseSchema,AddAdminResponseSchema,RemoveAdminResponseSchema - Utility re-exports —
fromBinary,toBinaryfrom@bufbuild/protobuf
Usage
import { fromBinary, UtxoResponseSchema } from "@umbra-privacy/indexer-proto-gen";
const response = await fetch("https://indexer.example.com/v1/utxos", {
headers: { Accept: "application/protobuf" },
});
const bytes = new Uint8Array(await response.arrayBuffer());
const data = fromBinary(UtxoResponseSchema, bytes);Regeneration
To regenerate after a .proto file change:
pnpm run generate # runs buf generate
pnpm run build # generate + bundleRequires @bufbuild/buf CLI.
Dependencies
@bufbuild/protobuf^2.0.0
License
MIT
