utxorpc: A gRPC interface for UTxO Blockchains

[ apache, blockchain, cardano, grpc, library, network ] [ Propose Tags ]

UTxO RPC (u5c for short) is an interface tailored for interactions with UTxO-based blockchains, prioritizing performance and developer experience. By providing a common contract, a range of SDKs, and thorough documentation, UTxO RPC aims to facilitate:

  • Reusability: Enabling shared components that can be reused across different projects to simplify the integration effort.

  • Interoperability: A common interface to simplify integrations between different parties and avoid the common pitfall of vendor lock-in.

  • Performance: A serialized binary format which is compact and efficient, resulting in smaller message sizes and reduced network overhead compared to its JSON counterpart

Please note that UTxO RPC is just a specification of an interface between agents and the blockchain, it doesn't provide any concrete client / provider implementations. The primary purpose of u5c is to define a set of standardized methods, data structures, and communication patterns.

[Skip to Readme]


  • Proto
    • Utxorpc
      • V1alpha
        • Build
          • Proto.Utxorpc.V1alpha.Build.Build
          • Proto.Utxorpc.V1alpha.Build.Build_Fields
        • Cardano
          • Proto.Utxorpc.V1alpha.Cardano.Cardano
          • Proto.Utxorpc.V1alpha.Cardano.Cardano_Fields
        • Submit
          • Proto.Utxorpc.V1alpha.Submit.Submit
          • Proto.Utxorpc.V1alpha.Submit.Submit_Fields
        • Sync
          • Proto.Utxorpc.V1alpha.Sync.Sync
          • Proto.Utxorpc.V1alpha.Sync.Sync_Fields
        • Watch
          • Proto.Utxorpc.V1alpha.Watch.Watch
          • Proto.Utxorpc.V1alpha.Watch.Watch_Fields


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS],,,,,
Dependencies base (>=4.7 && <5), proto-lens (>=0.7.1 && <0.8), proto-lens-protobuf-types (>=0.7.2 && <0.8), proto-lens-runtime (>=0.7.0 && <0.8) [details]
License Apache-2.0
Author TxPipe <registrant@txpipe.io>
Maintainer TxPipe <registrant@txpipe.io> Dominic Mayhew <dominic.j.mayhew@gmail.com>
Category Network, GRPC, Blockchain, Cardano
Home page https://github.com/utxorpc/spec#readme
Bug tracker https://github.com/utxorpc/spec/issues
Uploaded by txpipe at 2024-03-17T16:27:16Z
Distributions NixOS:
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 111 total (52 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2024-03-17 [all 2 reports]

Readme for utxorpc-

[back to package description]


This package is generated by proto-lens-protoc from the u5c specification and contains Data.ProtoLens.Message.Message instances useful for serde. It is designed to be used with the client or server SDK. Build a message with the lens library by importing the relevant utxorpc modules and calling Data.ProtoLens.Message.defMessage:

import Control.Lens.Operators ((&), (.~))
import Data.ProtoLens.Message (Message (defMessage))
import qualified Data.Text.Encoding as T
import Proto.Utxorpc.V1.Sync.Sync (FetchBlockRequest)
import Proto.Utxorpc.V1.Sync.Sync_Fields (hash, index)

fetchBlockRequest :: FetchBlockRequest
fetchBlockRequest =
    & ref .~
    [ defMessage 
        & index .~ 116541970
        & hash .~ T.encodeUtf8 "9d5abce5b1a7d94b141a597fd621a1ff9dcd46579ff1939664364311cd1be338"

The easieset way to send requests or run a service is through the SDKs: utxorpc-client and utxorpc-server.

Generating this package from the spec

Please see the u5c project README for information on how this package was generated. To generate this code yourself, please see proto-lens.

NOTE: proto-lens-protobuf-types version >= 0.7.2 is required to build this package, as it includes support of the FieldMask well-known type.


See the UTxO spec repo README.

[!NOTE] proto-lens-protobuf-types version >= 0.7.2 is required to build this package as it contains support for the FieldMask well-known type.