github.com/hashgraph/hedera-sdk-go/v2@v2.48.0/README.md (about)

     1  ![](https://img.shields.io/github/v/tag/hashgraph/hedera-sdk-go)
     2  [![Actions Status](https://github.com/hashgraph/hedera-sdk-go/v2/workflows/Go/badge.svg)](https://github.com/hashgraph/hedera-sdk-Go/actions?query=workflow%3AGo)
     3  ![](https://img.shields.io/github/go-mod/go-version/hashgraph/hedera-sdk-go)
     4  [![](https://godoc.org/github.com/hashgraph/hedera-sdk-go/v2?status.svg)](http://godoc.org/github.com/hashgraph/hedera-sdk-go/v2)
     5  
     6  # Hederaâ„¢ Hashgraph Go SDK
     7  
     8  > The Go SDK for interacting with [Hedera Hashgraph]: the official distributed consensus
     9  > platform built using the hashgraph consensus algorithm for fast, fair and secure
    10  > transactions. Hedera enables and empowers developers to build an entirely new
    11  > class of decentralized applications.
    12  
    13  [Hedera Hashgraph]: https://hedera.com/
    14  
    15  Hedera Hashgraph communicates using [gRPC]; the Protobufs definitions for the protocol are
    16  available in the [hashgraph/hedera-protobuf] repository.
    17  
    18  [gRPC]: https://grpc.io
    19  [hashgraph/hedera-protobuf]: https://github.com/hashgraph/hedera-protobuf
    20  
    21  ## Install
    22  
    23  ```sh
    24  $ go get github.com/hashgraph/hedera-sdk-go/v2
    25  ```
    26  
    27  #### Note
    28  
    29  google.golang.org/protobuf v1.27.1 Breaks the SDK as it contains multiple protobuf files
    30  with the same name. Make sure to use v1.26.1 instead. The follow snippet can be used in 
    31  `go.mod` to force the project to use v1.26.1
    32  
    33  ```
    34  replace (
    35  	google.golang.org/protobuf v1.27.1 => google.golang.org/protobuf v1.26.1-0.20210525005349-febffdd88e85
    36  )
    37  ```
    38  
    39  ## Running Integration Tests
    40  ```bash
    41  $ env CONFIG_FILE="<your_config_file>" go test -v Integration -timeout 9999s ```
    42  
    43  or
    44  
    45  ```bash
    46  $ env CONFIG_FILE="<your_config_file>" OPERATOR_KEY="<key>" OPERATOR_ID="<id>" go test -v Integration -timeout 9999s
    47  ```
    48  
    49  or
    50  
    51  ```bash
    52  $ env OPERATOR_KEY="<key>" OPERATOR_ID="<id>" go test -v Integration -timeout 9999s
    53  ```
    54  
    55  The config file _can_ contain both the network and the operator, but you can also
    56  use environment variables `OPERATOR_KEY` and `OPERATOR_ID`. If both are provided
    57  the network is used from the config file, but for the operator the environment variables
    58  take precedence. If the config file is not provided then the network will default to testnet
    59  and `OPERATOR_KEY` and `OPERATOR_ID` **must** be provided.
    60  
    61  [Example Config File](./client-config-with-operator.json)
    62  
    63  ## Linting
    64  
    65  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:
    66  
    67  ```sh
    68  scripts/install-hooks.sh
    69  ```
    70  
    71  ## Support
    72  
    73  If you have a question on how to use the product, please see our
    74  [support guide](https://github.com/hashgraph/.github/blob/main/SUPPORT.md).
    75  
    76  ## Contributing
    77  
    78  Contributions are welcome. Please see the
    79  [contributing guide](https://github.com/hashgraph/.github/blob/main/CONTRIBUTING.md)
    80  to see how you can get involved.
    81  
    82  ## Code of Conduct
    83  
    84  This project is governed by the
    85  [Contributor Covenant Code of Conduct](https://github.com/hashgraph/.github/blob/main/CODE_OF_CONDUCT.md). By
    86  participating, you are expected to uphold this code of conduct. Please report unacceptable behavior
    87  to [oss@hedera.com](mailto:oss@hedera.com).
    88  
    89  ## License
    90  
    91  [Apache License 2.0](LICENSE)