Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hashgraph/hedera-sdk-go
Hedera™ Hashgraph SDK for Go
https://github.com/hashgraph/hedera-sdk-go
distributed-ledger-technology go hacktoberfest hashgraph hedera hedera-sdk sdk sdk-go
Last synced: 4 days ago
JSON representation
Hedera™ Hashgraph SDK for Go
- Host: GitHub
- URL: https://github.com/hashgraph/hedera-sdk-go
- Owner: hashgraph
- License: apache-2.0
- Created: 2020-01-03T20:01:12.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T12:41:50.000Z (11 days ago)
- Last Synced: 2024-10-29T15:11:42.579Z (10 days ago)
- Topics: distributed-ledger-technology, go, hacktoberfest, hashgraph, hedera, hedera-sdk, sdk, sdk-go
- Language: Go
- Homepage: https://docs.hedera.com/docs/hedera-sdks
- Size: 13.9 MB
- Stars: 103
- Watchers: 13
- Forks: 65
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-ccamel - hashgraph/hedera-sdk-go - Hedera™ Hashgraph SDK for Go (Go)
README
![](https://img.shields.io/github/v/tag/hiero-project/hiero-sdk-go)
![](https://img.shields.io/github/go-mod/go-version/hiero-project/hiero-sdk-go)
[![](https://godoc.org/github.com/hiero-project/hiero-sdk-go/v2?status.svg)](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
### Install
```sh
$ go get github.com/hiero-project/hiero-sdk-go/v2
```> [!NOTE]
> `google.golang.org/protobuf` v1.27.1 Breaks the SDK as it contains multiple protobuf files
with the same name. Make sure to use v1.26.1 instead. The follow snippet can be used in
`go.mod` to force the project to use v1.26.1
>
```
replace (
google.golang.org/protobuf v1.27.1 => google.golang.org/protobuf v1.26.1-0.20210525005349-febffdd88e85
)
```### Running Integration Tests
```bash
$ env CONFIG_FILE="" go test -v Integration -timeout 9999s
```or
```bash
$ env CONFIG_FILE="" OPERATOR_KEY="" OPERATOR_ID="" go test -v Integration -timeout 9999s
```or
```bash
$ env OPERATOR_KEY="" OPERATOR_ID="" go test -v Integration -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 [Hedera 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
```## License
[Apache License 2.0](LICENSE)