Skip to content

The protobuf message files defining the Hedera Hashgraph API

License

Notifications You must be signed in to change notification settings

cody-littley/hedera-protobuf

 
 

Repository files navigation

Hedera Hashgraph Protocol Buffer API Message Definitions

The Hedera Hashgraph API is implemented with protocol buffers, Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data. This repository contains the current version of the files used to define the API.

Structure

The protobuf files are organised in folders representing the domain they pertain to, the folders are:

  • Common - messages that form part of the core API and are used within other messages
  • Contract - messages related to the Hedera Hashgraph Smart Contract service
  • Crypto - messages related to the Hedera Hashgraph Crypto Currency service
  • File - messages related to the Hedera Hashgraph File service
  • Query - messages related to querying the Hedera Hashgraph network
  • Services - the gRPC definitions which detail which responses should be expected as a result of a request

Documentation

The protobuf files themselves contain detailed comments which help understand not only the message itself but also some of the features and capabilities of the Hedera Hashgraph network.

Also available is a HAPI.html document which is a HTML version of the protocol buffers file with hyperlinks to help navigate through the message definitions. It is also nested such that you can follow a complete message structure.

Note: the HAPI.html document is a large document and may take a few seconds to load in a browser.

Examples

Example messages can be found in the Transaction-Query-Examples.md file. These were generated with the Hedera Hashgraph Java SDK and may serve as a useful reference when checking if your own messages are correct.

Note: The examples show keys and signatures. Keys shown in the examples are not the keys that were used to generate the signatures.

Additional resources

If you are unfamiliar with protocol buffers (or need a refresher), you may consult the following web resources:

Deploy to Maven

You will need the appropriate credentials to do so

  • Update the version number in the pom.xml (ensure pom.xml has x.x.x-SNAPSHOT for version)
  • Build the project with mvn install
  • Re-generate the documentation
cd docgenerator
java -jar proto2html.jar "HAPI Documentation" ../src/main/proto/ ../docs/NotNestedDoc N
java -jar proto2html.jar "HAPI Documentation" ../src/main/proto/ ../docs/NestedDoc Y

Commit all changes to github

mvn release:clean release:prepare (you will be prompted for github user and password (or access token if 2FA) and version numbers)

mvn release:perform

navigate to Nexus Repository Manager https://oss.sonatype.org/index.html#stagingRepositories and release the newly created repository.

About

The protobuf message files defining the Hedera Hashgraph API

Resources

License

Stars

Watchers

Forks

Packages

No packages published