https://github.com/hiero-ledger/hiero-sdk-go
Go SDK for Hiero
https://github.com/hiero-ledger/hiero-sdk-go
distributed-ledger-technology go hacktoberfest hashgraph hedera hedera-sdk hiero sdk sdk-go
Last synced: 25 days ago
JSON representation
Go SDK for Hiero
- Host: GitHub
- URL: https://github.com/hiero-ledger/hiero-sdk-go
- Owner: hiero-ledger
- License: apache-2.0
- Created: 2020-01-03T20:01:12.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-30T08:44:12.000Z (4 months ago)
- Last Synced: 2024-12-30T09:55:52.633Z (4 months ago)
- Topics: distributed-ledger-technology, go, hacktoberfest, hashgraph, hedera, hedera-sdk, hiero, sdk, sdk-go
- Language: Go
- Homepage: https://docs.hedera.com/docs/hedera-sdks
- Size: 14.6 MB
- Stars: 111
- Watchers: 14
- Forks: 67
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-ccamel - hiero-ledger/hiero-sdk-go - Go SDK for Hiero (Go)
README


[](http://godoc.org/github.com/hiero-project/hiero-sdk-go/v2)# Hiero Go SDK
The Go SDK for interacting with a Hiero based network.
Hiero communicates using [gRPC](https://grpc.io);
the Protobufs definitions for the protocol are available in the [hashgraph/hedera-protobuf](https://github.com/hashgraph/hedera-protobuf) repository (the repo will be migrated to Hiero in near future).## Usage
### Installation
```sh
$ go get github.com/hiero-ledger/hiero-sdk-go/v2@latest
```### Running Tests
# Integration
```bash
$ env CONFIG_FILE="" go test ./sdk -tags="e2e" -v -timeout 9999s
```or
```bash
$ env OPERATOR_KEY="" OPERATOR_ID="" go test ./sdk -tags="e2e" -timeout 9999s
```# Unit
```bash
$ go test ./sdk -tags="unit" -v -timeout 9999s
```The config file _can_ contain both the network and the operator, but you can also
use environment variables `OPERATOR_KEY` and `OPERATOR_ID`. If both are provided
the network is used from the config file, but for the operator the environment variables
take precedence. If the config file is not provided then the network will default to [Hiero testnet](https://docs.hedera.com/hedera/getting-started/introduction)
and `OPERATOR_KEY` and `OPERATOR_ID` **must** be provided.[Example Config File](./client-config-with-operator.json)
### Linting
This repository uses golangci-lint for linting. You can install a pre-commit git hook that runs golangci-lint before each commit by running the following command:
```sh
scripts/install-hooks.sh
```## Protobuf Generation Script
This script automates the process of moving and compiling `.proto` files using `protoc`. It supports multiple source directories for `proto` definitions and allows for configurable destination directory for the generation output.
### Usage
Run the script with the following command:
```sh
go run generate_proto.go -source -dest
```### Arguments
- -source (required): A comma-separated list of directories containing .proto files.
- -dest (required): The destination directory where all .proto files will be moved before compilation.
### Example
```sh
go run generate_proto.go -source ../services/hapi/hedera-protobufs/services/state,../services/hapi/hedera-protobufs/services/auxiliary -dest ../services/hapi/hedera-protobufs/services
```### Note
- If proto file definitions are located in the `services` submodule make sure it is initialised.
- Keep in mind that the script does not still support protobuf import altering. If errors related to
the `proto` import paths occur we resolve them manually.## Contributing
Whether you’re fixing bugs, enhancing features, or improving documentation, your contributions are important — let’s build something great together!
Please read our [contributing guide](https://github.com/hiero-ledger/.github/blob/main/CONTRIBUTING.md) to see how you can get involved.
## Code of Conduct
Hiero uses the Linux Foundation Decentralised Trust [Code of Conduct](https://www.lfdecentralizedtrust.org/code-of-conduct).
## License
[Apache License 2.0](LICENSE)