https://github.com/hashgraph/hedera-protobufs
Authoritative source of Hedera protobufs
https://github.com/hashgraph/hedera-protobufs
hacktoberfest
Last synced: 9 days ago
JSON representation
Authoritative source of Hedera protobufs
- Host: GitHub
- URL: https://github.com/hashgraph/hedera-protobufs
- Owner: hashgraph
- License: apache-2.0
- Created: 2021-02-01T22:27:18.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-11-06T21:56:10.000Z (7 months ago)
- Last Synced: 2025-11-10T15:33:39.473Z (7 months ago)
- Topics: hacktoberfest
- Language: Shell
- Homepage:
- Size: 2.12 MB
- Stars: 45
- Watchers: 24
- Forks: 28
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-hedera - Hedera Protobufs - Authoritative source of Hedera protobufs which represent the core of the Hedera Services API and enables developers to build libraries and SDKs in a multitude of development languages. (**Open Source Developer Assets** / **References and Resources**)
README
# Hedera protobufs
The authoritative repository of [protocol buffers](https://developers.google.com/protocol-buffers)
used by the Hedera Hashgraph public network, especially to define its gRPC API. Other repositories
are used to deploy language-specific libraries generated
from the _*.proto_ files in the following repositories:
- [Java](https://github.com/hashgraph/hedera-protobufs-java)
- [Go](https://github.com/hashgraph/hedera-protobufs-go)
- [JS & Typescript](https://github.com/hashgraph/protobuf.js)
- [C++](https://github.com/hashgraph/hedera-protobufs-cpp)
- [Swift](https://github.com/hashgraph/hedera-protobufs-swift)
## Overview of services
There are five primary service families, which inter-operate on entities
controlled by one (or more) Ed25519 or ECDSA(secp256k1) keypairs:
1. The [cryptocurrency service](services/crypto_service.proto),
for cryptocurrency accounts with transfers denominated
in [hbar (ℏ)](https://help.hedera.com/hc/en-us/articles/360000674317-What-are-the-official-HBAR-cryptocurrency-denominations-).
2. The [consensus service](services/consensus_service.proto), for
fast and unbiased ordering of opaque binary messages exchanged on
arbitrary topics.
3. The [smart contract service](services/smart_contract_service.proto), for
execution of Solidity contract creations and calls; contract may both possess
ℏ themselves and exchange it with non-contract accounts.
4. The [file service](services/file_service.proto), for storage and
retrieval of opaque binary data.
5. The [token service](services/token_service.proto), for token related operations such as create, update, mint, burn, transfer etc.
There are also four secondary service families:
1. The [network service](services/network_service.proto), for operations scoped
to the network or its constituent nodes rather user-controlled entities as above.
2. The [scheduling service](services/schedule_service.proto), for scheduling a transaction to
be executed when the ledger has received enough prequisite signatures.
3. The [freeze service](services/freeze_service.proto), for use by
privileged accounts to suspend network operations during a maintenance window.
4. The [util service](services/util_service.proto), for utility operations on the network.
It is important to note that most network services are gated by fees which
must be paid in ℏ from a cryptocurrency account. The payer authorizes a
fee by signing an appropriate transaction with a sufficient subset of the
cryptographic key(s) associated to their account.
## Overview of state
State directory and its subdirectories contain the protobuf files that define the state of the network.
The state is divided into the following subdirectories, based on the service modules:
1. [Token](services/state/token) - The state of the Token service.
2. [Consensus](services/state/consensus) - The state of the Consensus service.
The state directory and its subdirectories are in preview and are subject to change.
# For Developers
## Branching
This repository uses a simple branching model with only one distinguished branch;
`main` points to the latest protobufs intended for the next deployment to mainnet.
Tags such as `v0.12.0` mark commits used for testnet and mainnet deploys.
## PBJ Package Support
Proto files in this repo are generated into two kinds of Java files, one using **protoc** and other using
[PBJ](https://github.com/hashgraph/pbj) a custom java code generation library for Hedera. To support PBJ all proto files
need to have an option of the form:
```
// <<>> This comment is special code for setting PBJ Compiler java package
```
To specify the Java package for PBJ generated model objects. This option is ignored by **protoc**. PBJ ignores the default
option `option java_package = "com.hederahashgraph.api.proto.java";` which is used by **protoc** to generate Java files.