# [`Substreams`](https://substreams.streamingfast.io/) for [**Cosmos**](https://cosmos.network/) [github](https://github.com/pinax-network/substreams-cosmos) [crates.io](https://crates.io/crates/substreams-cosmos) [docs.rs](https://docs.rs/substreams-cosmos) [GitHub Workflow Status](https://github.com/pinax-network/substreams-cosmos/actions?query=branch%3Amain) > This library contains the generated Rust protobuf bindings for [Cosmos Block](https://buf.build/streamingfast/firehose-cosmos) as well as helper methods to extract and parse block data. ## 📖 Documentation ### ### Further resources - [Substreams documentation](https://substreams.streamingfast.io) ## Install ``` cargo add substreams-cosmos ``` ## Usage Refer to [Docs.rs](https://docs.rs/substreams-cosmos/latest/substreams_cosmos/struct.Block.html#implementations) for helper methods on `Block` that extract action and transaction iterators from the Cosmos block. **Cargo.toml** ```toml [dependencies] substreams = "0.5" substreams-cosmos = "0.1" ``` **src/lib.rs** ```rust use substreams::errors::Error; use substreams_cosmos::pb::{Block, Events}; #[substreams::handlers::map] fn map_events(block: Block) -> Result { let mut events = vec![]; for tx in block.tx_results { for event in tx.events { events.push(event); } } Ok(Events { events }) } ``` ## Release - Run `Make` if there were changes in protobufs - Bump up version in workspace `Cargo.toml` - Commit changes - Tag a release: - Publish packages in this order: `core`, `substreams-cosmos`.