|
1 | | -# Flow Go SDK |
| 1 | +# flow-go-sdk — Flow SDK for Go |
2 | 2 |
|
3 | | -[](https://godoc.org/github.com/onflow/flow-go-sdk) |
| 3 | +[](https://github.com/onflow/flow-go-sdk/blob/master/LICENSE) |
| 4 | +[](https://github.com/onflow/flow-go-sdk/releases) |
| 5 | +[](https://discord.gg/flow) |
| 6 | +[](https://flow.com) |
| 7 | +[](https://pkg.go.dev/github.com/onflow/flow-go-sdk) |
| 8 | + |
| 9 | +## TL;DR |
| 10 | + |
| 11 | +- **What:** Go SDK for interacting with the Flow network — send transactions, listen to events, query accounts, and execute scripts from Go applications. |
| 12 | +- **Who it's for:** Go developers building backend services, indexers, bots, and tooling on Flow. |
| 13 | +- **Why use it:** Supports both gRPC and HTTP Access Node communication, includes crypto and transaction helpers, and is fully compatible with the Flow Emulator for local development. |
| 14 | +- **Status:** see [Releases](https://github.com/onflow/flow-go-sdk/releases) for the latest version. |
| 15 | +- **License:** Apache-2.0 |
| 16 | +- **Related repos:** [onflow/flow-cli](https://github.com/onflow/flow-cli), [onflow/flow-go](https://github.com/onflow/flow-go), [onflow/cadence](https://github.com/onflow/cadence) |
| 17 | +- The reference Go SDK for the Flow network, open-sourced since 2019. |
4 | 18 |
|
5 | 19 | The Flow Go SDK provides a set of packages for Go developers to build applications that interact with the Flow network. |
6 | 20 |
|
7 | | -*Note: This SDK is also fully compatible with the [Flow Emulator](https://docs.onflow.org/emulator/) and can be used for local development.* |
| 21 | +*Note: This SDK is also fully compatible with the [Flow Emulator](https://developers.flow.com/tools/emulator) and can be used for local development.* |
8 | 22 |
|
9 | 23 | ## [English](#) | [Chinese](/README_zh_CN.md) |
10 | 24 |
|
@@ -615,7 +629,7 @@ The event type to filter by. Event types are namespaced by the account and contr |
615 | 629 |
|
616 | 630 | For example, a `Transfer` event that was defined in the `Token` contract deployed at account `0x55555555555555555555` will have a type of `A.0x55555555555555555555.Token.Transfer`. |
617 | 631 |
|
618 | | -Read the [language documentation](https://docs.onflow.org/cadence/language/events/) for more information on how to define and emit events in Cadence. |
| 632 | +Read the [language documentation](https://cadence-lang.org/docs/language/events) for more information on how to define and emit events in Cadence. |
619 | 633 |
|
620 | 634 | **StartHeight, EndHeight** |
621 | 635 |
|
@@ -664,4 +678,39 @@ A `flow.Account` contains the following fields: |
664 | 678 |
|
665 | 679 | ## Examples |
666 | 680 |
|
667 | | -The [examples](/examples) directory contains code samples that use the SDK to interact with the [Flow Emulator](https://docs.onflow.org/devtools/emulator/). |
| 681 | +The [examples](/examples) directory contains code samples that use the SDK to interact with the [Flow Emulator](https://developers.flow.com/tools/emulator). |
| 682 | + |
| 683 | +## FAQ |
| 684 | + |
| 685 | +**Which Go versions are supported?** |
| 686 | +Go 1.13 or above is required, as noted in the Installing section. Building and testing with the SDK typically requires `CGO_ENABLED=1` because of the underlying cryptography library. |
| 687 | + |
| 688 | +**Should I use gRPC or HTTP to talk to an Access Node?** |
| 689 | +Both are supported. gRPC is recommended with the Go SDK for efficiency and performance, as noted in the Accessing The Flow Network section. |
| 690 | + |
| 691 | +**Which signature and hash algorithms are supported?** |
| 692 | +Flow supports ECDSA over the P-256 (secp256r1) and secp256k1 curves, paired with SHA2-256 or SHA3-256 hashing, as described in the Generating Keys section. |
| 693 | + |
| 694 | +**Can I use this SDK with the Flow Emulator?** |
| 695 | +Yes. The SDK is fully compatible with the Flow Emulator for local development, and the examples directory contains code samples that run against the emulator. |
| 696 | + |
| 697 | +**How do I query events or transaction results?** |
| 698 | +Use the Access API client methods described in the Querying Events and Querying Transaction Results sections, for example `GetEventsForHeightRange` and `GetTransactionResult`. |
| 699 | + |
| 700 | +**How do multi-party signatures work?** |
| 701 | +The How Signatures Work in Flow section covers single-party, multi-key, and multi-party transaction signing patterns with runnable example links. |
| 702 | + |
| 703 | +## Community |
| 704 | + |
| 705 | +- [Flow Discord](https://discord.gg/flow) |
| 706 | +- [Flow Forum](https://forum.flow.com) |
| 707 | +- [Flow Improvement Proposals (FLIPs)](https://github.com/onflow/flips) |
| 708 | + |
| 709 | +## About Flow |
| 710 | + |
| 711 | +This repo is part of the [Flow network](https://flow.com), a Layer 1 blockchain built for consumer applications, AI Agents, and DeFi at scale. |
| 712 | + |
| 713 | +- Developer docs: https://developers.flow.com |
| 714 | +- Cadence language: https://cadence-lang.org |
| 715 | +- Community: [Flow Discord](https://discord.gg/flow) · [Flow Forum](https://forum.flow.com) |
| 716 | +- Governance: [Flow Improvement Proposals](https://github.com/onflow/flips) |
0 commit comments