Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/hashgraph/hedera-sdk-go/v2

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/hashgraph/hedera-sdk-go/v2

  • v2.51.0
  • Source
  • Go
  • Socket score

Version published
Created
Source

Hiero Go SDK

The Go SDK for interacting with a Hiero based network. Hiero communicates using gRPC; the Protobufs definitions for the protocol are available in the hashgraph/hedera-protobuf repository (the repo will be migrated to Hiero in near future).

Usage

Install

$ go install github.com/hiero-ledger/hiero-sdk-go/v2@latest

[!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

$ env CONFIG_FILE="<your_config_file>" go test -v Integration -timeout 9999s

or

$ env CONFIG_FILE="<your_config_file>" OPERATOR_KEY="<key>" OPERATOR_ID="<id>" go test -v Integration -timeout 9999s

or

$ env OPERATOR_KEY="<key>" OPERATOR_ID="<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 and OPERATOR_KEY and OPERATOR_ID must be provided.

Example Config File

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:

scripts/install-hooks.sh

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 to see how you can get involved.

Code of Conduct

Hiero uses the Linux Foundation Decentralised Trust Code of Conduct.

License

Apache License 2.0

FAQs

Package last updated on 26 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc