rosetta-sdk-go generates a Golang server and client package for the Rosetta Data API using the OpenAPI 3.0 Rosetta API Spec. To get started with the SDK, we recommend taking a look at the rosetta-cli repository, which provides extensive usage examples.
rosetta-sdk-go contains a lot of additional functionality that Coinbase built to make interacting with Rosetta Data API implementations easier. If you have ideas for other packages, please open an issue!
Types contains all generated Rosetta Data API types.
Client is the standard generated client for the Rosetta Data API. The
fetcher package builds on the low-level client to provide automatic retries and multi-threaded block fetching.
Server makes implementation of the Rosetta Data API as easy as implementing an interface. All boilerplate code to validate and route requests is provided out-of-the-box.
Simplified and validated communication with any Rosetta server
Asserter is used by the
fetcher packages to validate that requests and responses, respectively, are well-formed.
Parser provides a collection of helpers to make block parsing easier. The
parser can calculate all balance changes in a block, group related operations, and match an operation description with an operation in a transaction.
Syncer is a blockchain-agnostic tool used to serially sync blocks from a Rosetta Data API implementation (automatically handles re-orgs). For example, you could use the
syncer to build a block explorer for any blockchain and not need to write any of your own logic to fetch blocks from a Rosetta Data API implementation. The
syncer is not tightly coupled to a storage backend or block-handling logic so it is possible for any developer to bring their own database for syncing and write their own logic to handle synced blocks.
Reconciler is used (often in conjunction with
syncer) to compare the balance computed exclusively from transaction operations with the balance returned by a Data API implementation at various heights (erroring if the "computed" and "live" balance differ).
Keys provides an implementation of cryptographic operations for Rosetta-supported curves.
Currently, we support the Golang SDK.
Updated 6 months ago