From 85a8c5f950d0e8ab84c8928280bc0a3a6e7309ae Mon Sep 17 00:00:00 2001 From: xiaying-peng Date: Wed, 12 Jun 2024 11:47:07 -0700 Subject: [PATCH] more mesh (#505) --- CONTRIBUTING.md | 22 ++++---- README.md | 112 +++++++++++++++++++------------------- asserter/README.md | 8 +-- client/README.md | 8 +-- constructor/README.md | 20 +++---- constructor/dsl/README.md | 22 ++++---- examples/README.md | 2 +- fetcher/README.md | 12 ++-- parser/README.md | 6 +- reconciler/README.md | 12 ++-- server/README.md | 6 +- syncer/README.md | 8 +-- templates/docs/client.md | 8 +-- templates/docs/types.md | 6 +- types/README.md | 6 +- 15 files changed, 129 insertions(+), 129 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 131f24ba2..e9367cafb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to rosetta-sdk-go +# Contributing to mesh-sdk-go ## Code of Conduct @@ -10,11 +10,11 @@ You can contribute to this repository by asking questions, providing feedback, a ### Asking Questions -Submit your questions via the [Rosetta Community boards][13]. +Submit your questions via the [Mesh Community boards][13]. ### Providing Feedback -You can also use the [Rosetta Community boards][13] to provide feedback. +You can also use the [Mesh Community boards][13] to provide feedback. ### Reporting Issues @@ -72,17 +72,17 @@ All support requests must be made via [our support team][3]. © 2022 Coinbase -[1]: https://github.com/coinbase/rosetta-sdk-go/issues +[1]: https://github.com/coinbase/mesh-sdk-go/issues [2]: https://chris.beams.io/posts/git-commit/#seven-rules [3]: https://support.coinbase.com/customer/en/portal/articles/2288496-how-can-i-contact-coinbase-support- -[5]: https://github.com/coinbase/rosetta-sdk-go/issues/new/choose -[6]: https://github.com/coinbase/rosetta-sdk-go/issues/new?assignees=&labels=bug&template=bug_report.md&title= -[7]: https://github.com/coinbase/rosetta-sdk-go/issues/new?assignees=&labels=enhancement&template=feature_request.md&title= -[8]: https://github.com/coinbase/rosetta-sdk-go/pulls -[9]: https://github.com/coinbase/rosetta-sdk-go/compare +[5]: https://github.com/coinbase/mesh-sdk-go/issues/new/choose +[6]: https://github.com/coinbase/mesh-sdk-go/issues/new?assignees=&labels=bug&template=bug_report.md&title= +[7]: https://github.com/coinbase/mesh-sdk-go/issues/new?assignees=&labels=enhancement&template=feature_request.md&title= +[8]: https://github.com/coinbase/mesh-sdk-go/pulls +[9]: https://github.com/coinbase/mesh-sdk-go/compare [10]: https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/creating-an-issue-or-pull-request#creating-an-issue [11]: https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/creating-an-issue-or-pull-request#creating-a-pull-request [12]: https://hackerone.com/coinbase -[13]: https://community.rosetta-api.org -[14]: https://github.com/coinbase/rosetta-sdk-go/security \ No newline at end of file +[13]: https://community.mesh-api.org +[14]: https://github.com/coinbase/mesh-sdk-go/security \ No newline at end of file diff --git a/README.md b/README.md index a287283e9..02efeb1dd 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,25 @@ - +

- - Rosetta + + Mesh

- Rosetta SDK + Mesh SDK

-Go SDK to create and interact with Rosetta API implementations +Go SDK to create and interact with Mesh API implementations

- - - - - + + + + +

- +

Build once. Integrate your blockchain everywhere. @@ -28,7 +28,7 @@ Integrate your blockchain everywhere. ## Overview -The `rosetta-sdk-go` provides a collection of packages used for interaction with the Rosetta API specification. Much of the code in this repository is generated from the [rosetta-specifications](https://github.com/coinbase/rosetta-specifications) repository. +The `mesh-sdk-go` provides a collection of packages used for interaction with the Mesh API specification. Much of the code in this repository is generated from the [mesh-specifications](https://github.com/coinbase/mesh-specifications) repository. Jump to: @@ -38,21 +38,21 @@ Jump to: * [Documentation](#Documentation) * [Related Projects](#Related-Projects) -If you have a blockchain based on go-ethereum, we recommend that you use our [rosetta-geth-sdk](https://github.com/coinbase/rosetta-geth-sdk) SDK. +If you have a blockchain based on go-ethereum, we recommend that you use our [mesh-geth-sdk](https://github.com/coinbase/mesh-geth-sdk) SDK. ## Getting Started - This Golang project provides a [server package](https://github.com/coinbase/rosetta-sdk-go/tree/master/server) that empowers a developer to write a full Rosetta Data API server by only implementing an interface. This package automatically validates client requests and calls the functions you implement with pre-parsed requests (instead of in raw JSON). + This Golang project provides a [server package](https://github.com/coinbase/mesh-sdk-go/tree/master/server) that empowers a developer to write a full Mesh Data API server by only implementing an interface. This package automatically validates client requests and calls the functions you implement with pre-parsed requests (instead of in raw JSON). - If you plan to use a language other than Golang, you will need to either codegen a server (using [Swagger Codegen](https://swagger.io/tools/swagger-codegen) or [OpenAPI Generator](https://openapi-generator.tech/)) or write one from scratch. If you choose to write an implementation in another language, we ask that you create a separate repository in an SDK-like format for all the code you generate so that other developers can use it. You can add your repository to the list in the [rosetta-ecosystem](https://github.com/coinbase/rosetta-ecosystem) repository, and in the [ecosystem category](https://community.rosetta-api.org/c/ecosystem) of our community site. Use this repository (rosetta-sdk-go) for an example of how to generate code from this specification. + If you plan to use a language other than Golang, you will need to either codegen a server (using [Swagger Codegen](https://swagger.io/tools/swagger-codegen) or [OpenAPI Generator](https://openapi-generator.tech/)) or write one from scratch. If you choose to write an implementation in another language, we ask that you create a separate repository in an SDK-like format for all the code you generate so that other developers can use it. You can add your repository to the list in the [mesh-ecosystem](https://github.com/coinbase/mesh-ecosystem) repository, and in the [ecosystem category](https://community.mesh-api.org/c/ecosystem) of our community site. Use this repository (mesh-sdk-go) for an example of how to generate code from this specification. ### Installation Guide This command installs the Server package. ```shell -go get github.com/coinbase/rosetta-sdk-go/server +go get github.com/coinbase/mesh-sdk-go/server ``` ### Components @@ -79,7 +79,7 @@ main.go ### Complete SDK Example -This is an [example](https://github.com/coinbase/rosetta-sdk-go/tree/master/examples/server) of how to write an implementation using the Server package in rosetta-sdk-go. +This is an [example](https://github.com/coinbase/mesh-sdk-go/tree/master/examples/server) of how to write an implementation using the Server package in mesh-sdk-go. ```Go package main @@ -89,10 +89,10 @@ import ( "log" "net/http" - "github.com/coinbase/rosetta-sdk-go/asserter" - "github.com/coinbase/rosetta-sdk-go/examples/server/services" - "github.com/coinbase/rosetta-sdk-go/server" - "github.com/coinbase/rosetta-sdk-go/types" + "github.com/coinbase/mesh-sdk-go/asserter" + "github.com/coinbase/mesh-sdk-go/examples/server/services" + "github.com/coinbase/mesh-sdk-go/server" + "github.com/coinbase/mesh-sdk-go/types" ) const ( @@ -122,7 +122,7 @@ func NewBlockchainRouter( func main() { network := &types.NetworkIdentifier{ - Blockchain: "Rosetta", + Blockchain: "Mesh", Network: "Testnet", } @@ -153,29 +153,29 @@ func main() { ## SDK Packages -* [Types](types): Auto-generated Rosetta types -* [Client](client): Low-level communication with any Rosetta server -* [Server](server): Simplified Rosetta API server development -* [Asserter](asserter): Validation of Rosetta types -* [Fetcher](fetcher): Simplified and validated communication with any Rosetta server -* [Parser](parser): Tool for parsing Rosetta blocks -* [Syncer](syncer): Sync Rosetta blocks with customizable handling +* [Types](types): Auto-generated Mesh types +* [Client](client): Low-level communication with any Mesh server +* [Server](server): Simplified Mesh API server development +* [Asserter](asserter): Validation of Mesh types +* [Fetcher](fetcher): Simplified and validated communication with any Mesh server +* [Parser](parser): Tool for parsing Mesh blocks +* [Syncer](syncer): Sync Mesh blocks with customizable handling * [Reconciler](reconciler): Compare derived balances with node balances -* [Keys](keys): Cryptographic operations for Rosetta-supported curves +* [Keys](keys): Cryptographic operations for Mesh-supported curves * [Constructor](constructor): Coordinate the construction and broadcast of transactions -These packages are demoed extensively in [examples](examples) and are utilized throughout the [rosetta-cli](https://github.com/coinbase/rosetta-cli) tool. +These packages are demoed extensively in [examples](examples) and are utilized throughout the [mesh-cli](https://github.com/coinbase/mesh-cli) tool. ### Syncer -The core of any integration is syncing blocks reliably. The [syncer](https://github.com/coinbase/rosetta-sdk-go/tree/master/syncer) serially processes blocks from a Data API implementation (automatically handling re-orgs) with user-defined handling logic and pluggable storage. After a block is processed, store it to a DB or send a push notification—the decision is up to you! +The core of any integration is syncing blocks reliably. The [syncer](https://github.com/coinbase/mesh-sdk-go/tree/master/syncer) serially processes blocks from a Data API implementation (automatically handling re-orgs) with user-defined handling logic and pluggable storage. After a block is processed, store it to a DB or send a push notification—the decision is up to you! ### Parser -When reading the operations in a block, it's helpful to apply higher-level groupings to related operations, or match operations in a transaction to some set of generic descriptions (i.e., ensure there are two operations of equal but opposite amounts). The [parser](https://github.com/coinbase/rosetta-sdk-go/tree/master/parser) empowers any integrator to build abstractions on top of the [building blocks](https://www.rosetta-api.org/docs/rosetta_principles.html#universal-transactions) that the Rosetta API exposes. +When reading the operations in a block, it's helpful to apply higher-level groupings to related operations, or match operations in a transaction to some set of generic descriptions (i.e., ensure there are two operations of equal but opposite amounts). The [parser](https://github.com/coinbase/mesh-sdk-go/tree/master/parser) empowers any integrator to build abstractions on top of the [building blocks](https://www.mesh-api.org/docs/mesh_principles.html#universal-transactions) that the Mesh API exposes. - + ## Development @@ -212,18 +212,18 @@ make release ## Testing -To validate `rosetta-sdk-go`, [install `rosetta-cli`](https://github.com/coinbase/rosetta-cli#install) and run one of the following commands: +To validate `mesh-sdk-go`, [install `mesh-cli`](https://github.com/coinbase/mesh-cli#install) and run one of the following commands: -* `rosetta-cli check:data --configuration-file rosetta-cli-conf/testnet/config.json` - This command validates that the Data API implementation is correct, using the bitcoin `testnet` node. It also ensures that the implementation does not miss any balance-changing operations. -* `rosetta-cli check:construction --configuration-file rosetta-cli-conf/testnet/config.json` - This command validates the Construction API implementation. It also verifies transaction construction, signing, and submissions to the `testnet` network. -* `rosetta-cli check:data --configuration-file rosetta-cli-conf/mainnet/config.json` - This command validates that the Data API implementation is correct, using the bitcoin `mainnet` node. It also ensures that the implementation does not miss any balance-changing operations. +* `mesh-cli check:data --configuration-file mesh-cli-conf/testnet/config.json` - This command validates that the Data API implementation is correct, using the bitcoin `testnet` node. It also ensures that the implementation does not miss any balance-changing operations. +* `mesh-cli check:construction --configuration-file mesh-cli-conf/testnet/config.json` - This command validates the Construction API implementation. It also verifies transaction construction, signing, and submissions to the `testnet` network. +* `mesh-cli check:data --configuration-file mesh-cli-conf/mainnet/config.json` - This command validates that the Data API implementation is correct, using the bitcoin `mainnet` node. It also ensures that the implementation does not miss any balance-changing operations. -Read the [How to Test your Rosetta Implementation](https://www.rosetta-api.org/docs/rosetta_test.html) documentation for additional details. +Read the [How to Test your Mesh Implementation](https://www.mesh-api.org/docs/mesh_test.html) documentation for additional details. ## Contributing -You may contribute to the `rosetta-sdk-go` project in various ways: +You may contribute to the `mesh-sdk-go` project in various ways: * [Asking Questions](CONTRIBUTING.md/#asking-questions) * [Providing Feedback](CONTRIBUTING.md/#providing-feedback) @@ -231,37 +231,37 @@ You may contribute to the `rosetta-sdk-go` project in various ways: Read our [Contributing](CONTRIBUTING.MD) documentation for more information. -When you've finished an implementation for a blockchain, share your work in the [ecosystem category of the community site](https://community.rosetta-api.org/c/ecosystem). Platforms looking for implementations for certain blockchains will be monitoring this section of the website for high-quality implementations they can use for integration. Make sure that your implementation meets the [expectations](https://www.rosetta-api.org/docs/node_deployment.html) of any implementation. +When you've finished an implementation for a blockchain, share your work in the [ecosystem category of the community site](https://community.mesh-api.org/c/ecosystem). Platforms looking for implementations for certain blockchains will be monitoring this section of the website for high-quality implementations they can use for integration. Make sure that your implementation meets the [expectations](https://www.mesh-api.org/docs/node_deployment.html) of any implementation. ## Documentation -You can find the Rosetta API documentation at [rosetta-api.org](https://www.rosetta-api.org/docs/welcome.html). +You can find the Mesh API documentation at [mesh-api.org](https://www.mesh-api.org/docs/welcome.html). -Check out the [Getting Started](https://www.rosetta-api.org/docs/getting_started.html) section to start diving into Rosetta. +Check out the [Getting Started](https://www.mesh-api.org/docs/getting_started.html) section to start diving into Mesh. Our documentation is divided into the following sections: - -* [Product Overview](https://www.rosetta-api.org/docs/welcome.html) -* [Getting Started](https://www.rosetta-api.org/docs/getting_started.html) -* [Rosetta API Spec](https://www.rosetta-api.org/docs/Reference.html) -* [Samples](https://www.rosetta-api.org/docs/reference-implementations.html) -* [Testing](https://www.rosetta-api.org/docs/rosetta_cli.html) -* [Best Practices](https://www.rosetta-api.org/docs/node_deployment.html) -* [Repositories](https://www.rosetta-api.org/docs/rosetta_specifications.html) + +* [Product Overview](https://www.mesh-api.org/docs/welcome.html) +* [Getting Started](https://www.mesh-api.org/docs/getting_started.html) +* [Mesh API Spec](https://www.mesh-api.org/docs/Reference.html) +* [Samples](https://www.mesh-api.org/docs/reference-implementations.html) +* [Testing](https://www.mesh-api.org/docs/mesh_cli.html) +* [Best Practices](https://www.mesh-api.org/docs/node_deployment.html) +* [Repositories](https://www.mesh-api.org/docs/mesh_specifications.html) ## Related Projects -* [rosetta-specifications](https://github.com/coinbase/rosetta-specifications) — The `rosetta-specifications` repository generates the SDK code in the `rosetta-sdk-go` repository. -* [rosetta-cli](https://github.com/coinbase/rosetta-cli) — Use the `rosetta-cli` tool to test your Rosetta API implementation. The tool also provides the ability to look up block contents and account balances. -* [rosetta-geth-sdk](https://github.com/coinbase/rosetta-geth-sdk) – The `rosetta-geth-sdk` repository provides a collection of packages used for interaction with the Rosetta API specification. The goal of this SDK is to help accelerate Rosetta API implementation on go-ethereum based chains. +* [mesh-specifications](https://github.com/coinbase/mesh-specifications) — The `mesh-specifications` repository generates the SDK code in the `mesh-sdk-go` repository. +* [mesh-cli](https://github.com/coinbase/mesh-cli) — Use the `mesh-cli` tool to test your Mesh API implementation. The tool also provides the ability to look up block contents and account balances. +* [mesh-geth-sdk](https://github.com/coinbase/mesh-geth-sdk) – The `mesh-geth-sdk` repository provides a collection of packages used for interaction with the Mesh API specification. The goal of this SDK is to help accelerate Mesh API implementation on go-ethereum based chains. ### Sample Implementations -To help you with examples, we developed complete Rosetta API sample implementations for [Bitcoin](https://github.com/coinbase/rosetta-bitcoin) and [Ethereum](https://github.com/coinbase/rosetta-ethereum). Developers of Bitcoin-like or Ethereum-like blockchains may find it easier to fork these implementation samples than to write an implementation from scratch. +To help you with examples, we developed complete Mesh API sample implementations for [Bitcoin](https://github.com/coinbase/mesh-bitcoin) and [Ethereum](https://github.com/coinbase/mesh-ethereum). Developers of Bitcoin-like or Ethereum-like blockchains may find it easier to fork these implementation samples than to write an implementation from scratch. -You can also find community implementations for a variety of blockchains in the [rosetta-ecosystem](https://github.com/coinbase/rosetta-ecosystem) repository, and in the [ecosystem category](https://community.rosetta-api.org/c/ecosystem) of our community site. +You can also find community implementations for a variety of blockchains in the [mesh-ecosystem](https://github.com/coinbase/mesh-ecosystem) repository, and in the [ecosystem category](https://community.mesh-api.org/c/ecosystem) of our community site. ## License This project is available open source under the terms of the [Apache 2.0 License](https://opensource.org/licenses/Apache-2.0). diff --git a/asserter/README.md b/asserter/README.md index 4f105c3f7..b95edd0a2 100644 --- a/asserter/README.md +++ b/asserter/README.md @@ -1,19 +1,19 @@ # Asserter -[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/rosetta-sdk-go/asserter?tab=doc) +[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/mesh-sdk-go/asserter?tab=doc) -The Asserter package is used to validate the correctness of Rosetta types. It is +The Asserter package is used to validate the correctness of Mesh types. It is important to note that this validation only ensures that required fields are populated, fields are in the correct format, and transaction operations only contain types and statuses specified in the /network/status endpoint. If you want more intensive validation, try running the -[Rosetta CLI](https://github.com/coinbase/rosetta-cli). +[Mesh CLI](https://github.com/coinbase/mesh-cli). ## Installation ```shell -go get github.com/coinbase/rosetta-sdk-go/asserter +go get github.com/coinbase/mesh-sdk-go/asserter ``` ## Validation file diff --git a/client/README.md b/client/README.md index 3c84b3986..34132dc37 100644 --- a/client/README.md +++ b/client/README.md @@ -1,8 +1,8 @@ # Client -[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/rosetta-sdk-go/client?tab=doc) +[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/mesh-sdk-go/client?tab=doc) -The Client package reduces the work required to communicate with a Rosetta server. +The Client package reduces the work required to communicate with a Mesh server. If you want a higher-level interface that automatically asserts that server responses are correct, check out the [Fetcher](/fetcher). @@ -10,9 +10,9 @@ are correct, check out the [Fetcher](/fetcher). ## Installation ```shell -go get github.com/coinbase/rosetta-sdk-go/client +go get github.com/coinbase/mesh-sdk-go/client ``` ## Examples Check out the [examples](/examples) to see how easy -it is to connect to a Rosetta server. +it is to connect to a Mesh server. diff --git a/constructor/README.md b/constructor/README.md index cbec447f5..dd97b17a5 100644 --- a/constructor/README.md +++ b/constructor/README.md @@ -1,12 +1,12 @@ # Constructor -[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/rosetta-sdk-go/constructor?tab=doc) +[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/mesh-sdk-go/constructor?tab=doc) The `constructor` package is used for coordinating the construction and broadcast of transactions on any blockchain that implements the -Rosetta API. It was designed to power automated Construction API -testing in the [`rosetta-cli (check:construction)`](https://github.com/coinbase/rosetta-cli#checkconstruction-1) -but could be useful for anyone building a Rosetta API wallet. +Mesh API. It was designed to power automated Construction API +testing in the [`mesh-cli (check:construction)`](https://github.com/coinbase/mesh-cli#checkconstruction-1) +but could be useful for anyone building a Mesh API wallet. ## Framework When first learning about a new topic, it is often useful to understand the @@ -31,10 +31,10 @@ in other `Scenarios`. The syntax for accessing this shared state can be found `Actions` are discrete operations that can be performed in the context of a `Scenario`. A full list of all `Actions` that can be performed can be found -[here](https://pkg.go.dev/github.com/coinbase/rosetta-sdk-go/constructor/job#ActionType). +[here](https://pkg.go.dev/github.com/coinbase/mesh-sdk-go/constructor/job#ActionType). If you have suggestions for more actions, please -[open an issue in `rosetta-sdk-go`](https://github.com/coinbase/rosetta-sdk-go/issues)! +[open an issue in `mesh-sdk-go`](https://github.com/coinbase/mesh-sdk-go/issues)! ### Broadcast Invocation If you'd like to broadcast a transaction at the end of a `Scenario`, @@ -59,12 +59,12 @@ a transaction broadcast if you set the follow field: The suggested fee will then be stored as `.suggested_fee` for use by other `Scenarios` in the same `Job`. You can find an example of this in the -[Ethereum configuration](https://github.com/coinbase/rosetta-ethereum/blob/master/rosetta-cli-conf/testnet/ethereum.ros). +[Ethereum configuration](https://github.com/coinbase/mesh-ethereum/blob/master/mesh-cli-conf/testnet/ethereum.ros). *If this field is not populated or set to `false`, the transaction will be constructed, signed, and broadcast.* -### Using with rosetta-cli +### Using with mesh-cli If you use the `constructor` for automated Construction API testing (without prefunded accounts), you MUST implement 2 required `Workflows`: * `create_account` @@ -76,7 +76,7 @@ Please note that `create_account` can contain a transaction broadcast if on-chain origination is required for new accounts on your blockchain. If you plan to run the `constructor` in CI, you may wish to -provide [`prefunded accounts`](https://pkg.go.dev/github.com/coinbase/rosetta-cli/configuration#ConstructionConfiguration) +provide [`prefunded accounts`](https://pkg.go.dev/github.com/coinbase/mesh-cli/configuration#ConstructionConfiguration) when running the tester (otherwise you would need to manually fund generated accounts). @@ -87,7 +87,7 @@ created during testing). ### Writing Workflows It is possible to write `Workflows` from scratch using JSON, however, it is -highly recommended to use the [Rosetta Constructor DSL](dsl/README.md). You can +highly recommended to use the [Mesh Constructor DSL](dsl/README.md). You can see an example of how these two approaches compare below: #### Without DSL diff --git a/constructor/dsl/README.md b/constructor/dsl/README.md index e1e3ded73..1fc03c6b2 100644 --- a/constructor/dsl/README.md +++ b/constructor/dsl/README.md @@ -1,16 +1,16 @@ -# Rosetta Constructor DSL -The Rosetta Constructor DSL ([domain-specific language](https://en.wikipedia.org/wiki/Domain-specific_language)) +# Mesh Constructor DSL +The Mesh Constructor DSL ([domain-specific language](https://en.wikipedia.org/wiki/Domain-specific_language)) makes it easy to write `Workflows` for the `constructor` package. This DSL is most commonly used for writing automated Construction API -tests for the [`rosetta-cli`](https://github.com/coinbase/rosetta-cli#writing-checkconstruction-tests). +tests for the [`mesh-cli`](https://github.com/coinbase/mesh-cli#writing-checkconstruction-tests). -_Before reading more about the Rosetta Constructor DSL, we recommend learning +_Before reading more about the Mesh Constructor DSL, we recommend learning about the frameworks used in the [`constructor`](/constructor/README.md) to coordinate the creation of transactions._ ## Syntax -At a basic level, the Rosetta Constructor DSL syntax looks like this: +At a basic level, the Mesh Constructor DSL syntax looks like this: ```text // line comment (){ @@ -147,7 +147,7 @@ would look like: ] ``` Note, if you plan to run the automated Construction API tester in CI for `create_account` workflow, you may wish to -provide [`prefunded accounts`](https://pkg.go.dev/github.com/coinbase/rosetta-cli/configuration#ConstructionConfiguration) +provide [`prefunded accounts`](https://pkg.go.dev/github.com/coinbase/mesh-cli/configuration#ConstructionConfiguration) when running the tester (otherwise you would need to manually fund generated accounts). @@ -189,7 +189,7 @@ It is also important to note that `Workflows` containing multiple ``` ### Functions -In the Rosetta Constructor DSL, it is possible to invoke functions (where +In the Mesh Constructor DSL, it is possible to invoke functions (where the function name is an `Action.Type`) but not possible to define your own functions (yet!). @@ -198,7 +198,7 @@ The input for all functions is a JSON blob that will be evaluated by the `Worker`. It is possible to reference other variables in an input using the syntax `{{var}}` where `var` must follow [this syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md). -The Rosetta Constructor DSL compiler will automatically check that referenced +The Mesh Constructor DSL compiler will automatically check that referenced variables are previously defined. #### End Line @@ -206,7 +206,7 @@ Function invocations can span multiple lines (if you "pretty print" the JSON blob) but each function call line must end with a semi-colon. #### Native Invocation -The Rosetta Constructor DSL provides optional "native invocation" support for 2 `Action.Types`: +The Mesh Constructor DSL provides optional "native invocation" support for 2 `Action.Types`: * `math` * `set_variable` @@ -262,7 +262,7 @@ It is possible to add new line comments of comments at the end of lines using a double slash (`//`). ## Status -The Rosetta Constructor DSL should be considered `ALPHA` and may +The Mesh Constructor DSL should be considered `ALPHA` and may include breaking changes in later releases. If you have any ideas on how to improve the language, please -[open an issue in `rosetta-sdk-go`](https://github.com/coinbase/rosetta-sdk-go/issues)! +[open an issue in `mesh-sdk-go`](https://github.com/coinbase/mesh-sdk-go/issues)! diff --git a/examples/README.md b/examples/README.md index aa967522f..b2919218e 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,6 +1,6 @@ # Examples -This folder demonstrates how to write a Rosetta server and how +This folder demonstrates how to write a Mesh server and how to use either the Client package or Fetcher package to communicate with that server. diff --git a/fetcher/README.md b/fetcher/README.md index 38c3461ab..0773e0b7e 100644 --- a/fetcher/README.md +++ b/fetcher/README.md @@ -1,22 +1,22 @@ # Fetcher -[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/rosetta-sdk-go/fetcher?tab=doc) +[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/mesh-sdk-go/fetcher?tab=doc) The Fetcher package provides a simplified client interface to communicate -with a Rosetta server. It also provides automatic retries and concurrent block +with a Mesh server. It also provides automatic retries and concurrent block fetches. -If you want a lower-level interface to communicate with a Rosetta server, +If you want a lower-level interface to communicate with a Mesh server, check out the [Client](/client). ## Installation ```shell -go get github.com/coinbase/rosetta-sdk-go/fetcher +go get github.com/coinbase/mesh-sdk-go/fetcher ``` ## Create a Fetcher -Creating a basic Fetcher is as easy as providing a context and Rosetta server URL: +Creating a basic Fetcher is as easy as providing a context and Mesh server URL: ```go fetcher := fetcher.New(ctx, serverURL) ``` @@ -30,4 +30,4 @@ fetcher := fetcher.New(ctx, serverURL, fetcher.WithBlockConcurrency(10)) ## More Examples Check out the [examples](/examples) to see how easy -it is to connect to a Rosetta server. +it is to connect to a Mesh server. diff --git a/parser/README.md b/parser/README.md index 3b2171cdd..54d7c3749 100644 --- a/parser/README.md +++ b/parser/README.md @@ -1,13 +1,13 @@ # Parser -[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/rosetta-sdk-go/parser?tab=doc) +[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/mesh-sdk-go/parser?tab=doc) -The Parser package provides support for parsing Rosetta blocks. This includes +The Parser package provides support for parsing Mesh blocks. This includes things like calculating all the balance changes that occurred in a block and grouping related operations. ## Installation ```shell -go get github.com/coinbase/rosetta-sdk-go/parser +go get github.com/coinbase/mesh-sdk-go/parser ``` diff --git a/reconciler/README.md b/reconciler/README.md index 4d8b416d0..15e8ebaf0 100644 --- a/reconciler/README.md +++ b/reconciler/README.md @@ -1,11 +1,11 @@ # Reconciler -[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/rosetta-sdk-go/reconciler?tab=doc) +[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/mesh-sdk-go/reconciler?tab=doc) The Reconciler package is used to ensure that balance changes derived from -parsing Rosetta blocks are equivalent to the balance changes computed by the +parsing Mesh blocks are equivalent to the balance changes computed by the node. If you want to see an example of how to use this package, take -a look at [rosetta-cli](https://github.com/coinbase/rosetta-cli). +a look at [mesh-cli](https://github.com/coinbase/mesh-cli). ## Features * Customizable `Helper` and `Handler` to define your own logic for retrieving @@ -18,7 +18,7 @@ debugging) ## Installation ```shell -go get github.com/coinbase/rosetta-sdk-go/reconciler +go get github.com/coinbase/mesh-sdk-go/reconciler ``` ## Reconciliation Strategies @@ -32,5 +32,5 @@ error. The reconciler randomly checks the balances of accounts that aren't involved in any transactions. The balances of accounts could change on the blockchain node without being included in an operation -returned by the Rosetta Data API. Recall that all balance-changing -operations must be returned by the Rosetta Data API. +returned by the Mesh Data API. Recall that all balance-changing +operations must be returned by the Mesh Data API. diff --git a/server/README.md b/server/README.md index 8f70e26bb..c3789b0aa 100644 --- a/server/README.md +++ b/server/README.md @@ -1,8 +1,8 @@ # Server -[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/rosetta-sdk-go/server?tab=doc) +[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/mesh-sdk-go/server?tab=doc) -The Server package reduces the work required to write your own Rosetta server. +The Server package reduces the work required to write your own Mesh server. In short, this package takes care of the basics (boilerplate server code and request validation) so that you can focus on code that is unique to your implementation. @@ -10,7 +10,7 @@ implementation. ## Installation ```shell -go get github.com/coinbase/rosetta-sdk-go/server +go get github.com/coinbase/mesh-sdk-go/server ``` ## Components diff --git a/syncer/README.md b/syncer/README.md index 514f9eff5..55595aa0c 100644 --- a/syncer/README.md +++ b/syncer/README.md @@ -1,10 +1,10 @@ # Syncer -[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/rosetta-sdk-go/syncer?tab=doc) +[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/mesh-sdk-go/syncer?tab=doc) -The Syncer package provides support for syncing blocks from any Rosetta Data API +The Syncer package provides support for syncing blocks from any Mesh Data API implementation. If you want to see an example of how to use this package, take -a look at [rosetta-cli](https://github.com/coinbase/rosetta-cli). +a look at [mesh-cli](https://github.com/coinbase/mesh-cli). ## Features * Automatic handling of block re-orgs @@ -15,7 +15,7 @@ processed blocks to a db or print our balance changes) ## Installation ```shell -go get github.com/coinbase/rosetta-sdk-go/syncer +go get github.com/coinbase/mesh-sdk-go/syncer ``` ## Future Work diff --git a/templates/docs/client.md b/templates/docs/client.md index 3c84b3986..34132dc37 100644 --- a/templates/docs/client.md +++ b/templates/docs/client.md @@ -1,8 +1,8 @@ # Client -[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/rosetta-sdk-go/client?tab=doc) +[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/mesh-sdk-go/client?tab=doc) -The Client package reduces the work required to communicate with a Rosetta server. +The Client package reduces the work required to communicate with a Mesh server. If you want a higher-level interface that automatically asserts that server responses are correct, check out the [Fetcher](/fetcher). @@ -10,9 +10,9 @@ are correct, check out the [Fetcher](/fetcher). ## Installation ```shell -go get github.com/coinbase/rosetta-sdk-go/client +go get github.com/coinbase/mesh-sdk-go/client ``` ## Examples Check out the [examples](/examples) to see how easy -it is to connect to a Rosetta server. +it is to connect to a Mesh server. diff --git a/templates/docs/types.md b/templates/docs/types.md index c3e92cdbb..2ff0d285f 100644 --- a/templates/docs/types.md +++ b/templates/docs/types.md @@ -1,13 +1,13 @@ # Types -[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/rosetta-sdk-go/types?tab=doc) +[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/mesh-sdk-go/types?tab=doc) -Types contains a collection of auto-generated Rosetta types. Using this +Types contains a collection of auto-generated Mesh types. Using this package ensures that you don't need to automatically generate code on your own. ## Installation ```shell -go get github.com/coinbase/rosetta-sdk-go/types +go get github.com/coinbase/mesh-sdk-go/types ``` diff --git a/types/README.md b/types/README.md index c3e92cdbb..2ff0d285f 100644 --- a/types/README.md +++ b/types/README.md @@ -1,13 +1,13 @@ # Types -[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/rosetta-sdk-go/types?tab=doc) +[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield)](https://pkg.go.dev/github.com/coinbase/mesh-sdk-go/types?tab=doc) -Types contains a collection of auto-generated Rosetta types. Using this +Types contains a collection of auto-generated Mesh types. Using this package ensures that you don't need to automatically generate code on your own. ## Installation ```shell -go get github.com/coinbase/rosetta-sdk-go/types +go get github.com/coinbase/mesh-sdk-go/types ```