#mesh #mina #blockchain #specification #coinbase

bin+lib mina_mesh

A Rust Server Implementation of the Mesh Spec for Mina

2 releases

0.1.0-beta.5 Oct 4, 2024
0.1.0-beta.2 Nov 22, 2024
0.1.0-beta.1 Oct 7, 2024

#79 in Magic Beans

Download history 98/week @ 2024-09-30 146/week @ 2024-10-07 9/week @ 2024-10-14 86/week @ 2024-11-18

86 downloads per month

Apache-2.0

2.5MB
6K SLoC

Rust 2.5K SLoC // 0.0% comments GraphQL 2K SLoC // 0.0% comments SQL 1.5K SLoC // 0.0% comments TypeScript 118 SLoC // 0.0% comments JavaScript 16 SLoC // 0.6% comments Shell 3 SLoC // 0.6% comments

Mina Mesh

Mina Mesh is an implementation of the Coinbase Mesh specification for the Mina blockchain.

Note: Mina Mesh is WIP and should not yet be used in production.

Installation

Ensure you have the Rust toolchain installed. If you do not, see installation instructions here.

# Install
cargo install mina_mesh@0.1.0-beta.1

# Confirm installation
mina-mesh --help

Note: the version specifier is necessary when installing from the beta release channel. The latest version can be found on mina_mesh's crates.io page.

Environment

The server depends on several environment variables.

  • MINAMESH_PROXY_URL: a Mina proxy (GraphQL) endpoint. The default is https://mainnet.minaprotocol.network/graphql.

  • MINAMESH_ARCHIVE_DATABASE_URL: a connection string referencing a Mina archive database.

  • MINAMESH_GENESIS_BLOCK_IDENTIFIER_HEIGHT and MINAMESH_GENESIS_BLOCK_IDENTIFIER_STATE_HASH: we can retrieve these using the fetch-genesis-block-identifier command.

    mina-mesh fetch-genesis-block-identifier >> .env
    

Instantiate the Server

mina-mesh serve --playground

Note: the presence of the --playground flag enables the serving of an OpenAPI playground in response to GET /. To disable this endpoint, omit the --playground flag.

Visit http://0.0.0.0:3000 for an interactive playground with which you can explore and test endpoints.

Code of Conduct

Everyone interacting in this repo is expected to follow the code of conduct.

Contributing

Contributions are welcome and appreciated! Check out the contributing guide before you dive in.

License

Mina Mesh is Apache licensed.

Dependencies

~31–46MB
~687K SLoC