This repository contains Rust libraries generated from the protobuf definitions of various Noble Chain modules. These libraries enable Rust applications to interact with the Noble Chain ecosystem.
- noble-aura-proto: Protobuf definitions for the Noble Aura module
- noble-dollar-proto: Protobuf definitions for the Noble Dollar module
- noble-fiattokenfactory-proto: Protobuf definitions for the Fiat Token Factory module
- noble-forwarding-proto: Protobuf definitions for the Forwarding module
- noble-halo-proto: Protobuf definitions for the Noble Halo module
- noble-cctp-proto: Protobuf definitions for the Cross-Chain Transfer Protocol module
Add the desired proto crate to your Cargo.toml
:
[dependencies]
noble-cctp-proto = "0.1.0"
Then import and use the generated types in your Rust code:
use noble_cctp_proto::prost::noble::cctp::v1::SendMessageRequest;
// Use the generated protobuf types
let message = SendMessageRequest {
// ...
};
The proto definitions are built using a custom build script that:
- Updates git submodules to fetch the latest protocol definitions
- Compiles the
.proto
files to Rust usingprost-build
andtonic-build
- Applies necessary patches to the generated code
- Formats the output with
rustfmt
To rebuild the proto files:
cd proto-build
cargo run
This project depends on:
cosmos-sdk-proto
: For Cosmos SDK related protobuf definitionsprost
: For Protocol Buffer supporttonic
: For gRPC servicestendermint-proto
: For Tendermint related protobuf definitions
Apache-2.0
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request