#cosmos #proto #protobuf #blockchain #tendermint

cosmos-sdk-proto-althea

Protobuf stuct defintions for interacting with Cosmos SDK powered blockchains

20 releases

0.16.1 Mar 18, 2024
0.16.0 Sep 8, 2023
0.15.0 Aug 28, 2023
0.14.2 Jun 7, 2023
0.9.1 Nov 23, 2021

#475 in Magic Beans

Download history 86/week @ 2024-01-22 121/week @ 2024-01-29 52/week @ 2024-02-05 117/week @ 2024-02-12 138/week @ 2024-02-19 243/week @ 2024-02-26 144/week @ 2024-03-04 533/week @ 2024-03-11 363/week @ 2024-03-18 196/week @ 2024-03-25 159/week @ 2024-04-01 212/week @ 2024-04-08 247/week @ 2024-04-15 359/week @ 2024-04-22 131/week @ 2024-04-29 280/week @ 2024-05-06

1,025 downloads per month
Used in 13 crates (3 directly)

Apache-2.0

770KB
15K SLoC

cosmos-sdk-proto

Crate Docs Build Status Apache 2.0 Licensed MSRV

Rust crate for interacting with Protobufs defined by the Cosmos SDK.

The goal of this crate is to provide complete proto struct definitions for interacting with a Cosmos SDK blockchain.

Currently, this crate only provides a subset of the many total structs exported by Cosmos SDK proto files.

Pull requests to expand coverage are welcome.

Documentation

Minimum Supported Rust Version

This crate is supported on Rust 1.56 or newer.

Issues with the Cosmos Staking module prost file

Unfortunately (the upstream source for the CosmosSDK staking module proto definitions)https://github.com/cosmos/cosmos-sdk/blob/v0.45.16/proto/cosmos/staking/v1beta1/authz.proto#L20-L30 causes a namespace conflict when using prost. Particularly there is a oneof named validators which becomes a Rust enum named Validators and a message named Validators which becomes a Rust struct named Validators, which causes a failure to compile.

Whenever this file is updated it has been manually fixed to rename the enum to ValidatorsEnum and the relative disuse of the StakingAuthorization types means that is OK for now. If you run proto_build and see the src/prost/cosmos.staking.v1beta1.rs file has changed in insignificant ways, it is fine to ignore that file.

Dependencies

~0.4–1.7MB
~31K SLoC