TzGo - Tezos Go SDK
TzGo is Blockwatch's officially supported and maintained Tezos Golang SDK for Tezos, funded by grants from the Tezos Foundation. It is fully compatible with the Tezos Node RPC and free to use in commercial and non-commercial projects with a permissive license.
TzGo supports binary and JSON encodings for all Tezos types including the Micheline smart contract data and all transaction formats. TzGo is easy to get started with and particularly suited for high-performance applications that read and write data to the Tezos blockchain.
TzGo contains a full set of features to query, monitor, decode, translate, and debug data from the Tezos blockchain, in particular from Tezos smart contracts. It further enables encoding, signing, and broadcasting transactions to the Tezos network. TzGo works in a decentralized way by interacting directly with the Tezos node RPC without the need for third party APIs.
TzGo is structured into packages that provide multiple layers of composable building blocks for maximum freedom of choice and composability. Application programmers can use more convenient high-level functionality which hides details and RPC calls or directly use low-level types for greater control of details. The current version of TzGo contains 5 core packages:
tzgo/tezoslow-level types for hashes, addresses, keys, signatures other types found on-chain
tzgo/michelineto decode and translate data found in smart contract calls, storage, and bigmaps
tzgo/rpcfor accessing the Tezos Node RPC
tzgo/codecto construct and serialize all operation types
tzgo/signerfor transaction, message and block signing
tzgo/contractfor smart contract deployment, sending calls and working with tokens
helperslike an efficient base58 en/decoder, hash maps, etc
TzGo uses standard semantic versioning
major.minor.patchwith the notable exception that the minor version is kept in sync with the release of Tezos protocol updates. The current major version is v1.x, the previous stable variant of TzGo that only supported read-only calls was v0.x.
The latest Tezos protocol version supported by TzGo is Lima (v15) which activated on December 19, 2022 (see election).
Blockwatch keeps TzGo up-to-date with the most recent Tezos protocol that is currently live on mainnet. We aim for stable types and interfaces as many use-cases for TzGo require seamless access to data from previous protocol iterations. So far, our design strategy has been to extend type definitions in the RPC, Tezos and Micheline packages to become mixed/multi-version types.
Since Tezos core updates are notorious for breaking RPC compatibility, we typically add new accessor methods which transparently switch between previous and current type attributes. This strategy results in the smallest amount of downstream adjustments. For operation codec, however, we only officially support two most recent protocols. This means TzGo is compatible with Mainnet and the two active testnets, i.e., Ghostnet as well as the current protocol-specific testnet such as Limanet.
- Lima v015
- Kathmandu v014
- Jakarta v013
- Ithaca v012
- Hangzhou v011
- Granada v010
- Florence v009
- Edo v008
- Delphi v007
- Carthage v006
- Babylon v005
- Athens v004
- Alpha v001-v003