v5 (LATEST)
Devnet
Testnet
🚧 Development Version Notice
You are currently viewing documentation for the version that is under active development.
🔹 This version has not been deployed to mainnet yet
🔹 Features and APIs may change before final release
Coreum TS Protobuf
This repository contains the instructions on how to generate the typescript protobuf files used to interact with the Coreum blockchain using gRPC.
How it works
What the tool does is:
- Clones the repository of the Cosmos-SDK and Coreum.
- Extracts the protos of the modules that we want to generate.
- Generates the protobuf files using
buf generate
.
Prerequisites
Install the code generator, the runtime library, and the Buf CLI:
npm install @bufbuild/protobuf @bufbuild/protoc-gen-es @bufbuild/buf
How to use
- Clone the Coreum repository with the branch that you want, in this case we are going to clone the
master
branch.
git clone [email protected]:CoreumFoundation/coreum.git
- Clone the Cosmos SDK repository with the branch that you want, in this case we are going to clone the
v0.47.5
branch, but you can use any branch you want.
git clone --branch v0.47.5 [email protected]:cosmos/cosmos-sdk.git
- Copy all the proto files in the current directory.
cp -r ./cosmos-sdk/proto/ ./coreum/proto/ .
- Run the
buf generate
command with the template provided in this repository.
npx buf generate ./proto/ --template buf.gen.yaml -o ./ts-protos
This will generate all the typescript protobuf files in the ts-protos
directory.