Skip to main content

Massa gRPC API

The gRPC API allows you to communicate with the Massa blockchain.

The Massa gRPC API is splitted in two parts:


To enable events (blocks, endorsements, operations...) brodcast via gRPC streams in your Massa node, add or edit the file massa-node/config/config.toml with the following content:

# whether to broadcast for blocks, endorsement and operations
enable_broadcast = true



  • Postman: You can find our Massa Postman collections on our official workspace.
  • Massa proto rs: is a Rust library which contains generated code from Massa protobuf files. See massa-proto-rs.

Code generation

Step 1: Clone massa-proto repository

git clone -b MASSA_PROTO_TAG --depth 1

If you are using an older version of the Massa node, please use the tag version or commit hash corresponding to your node version. Find all massa-proto tags here.

Step 2: Install Buf CLI

  1. Download the latest version of Buf CLI from the official website.
  2. Extract the downloaded file to a folder on your computer.
  3. Add the buf binary to your system PATH environment variable.

Step 3: Set up Buf

  1. Add the following content to
version: v1
- proto/apis
- proto/commons
- proto/third_party

By specifying the directories in the configuration file, Buf knows which [.proto]{.title-ref} files to include in the build process.

  1. Create a file called buf.gen.yml and add the following content:
version: v1
enabled: true
- remote:
out: gen/ts

The configuration uses the official timostamm-protobuf-ts plugin to generate gRPC client and classes in TypeScript.


For other languages check the complete list of official Buf plugins.

Step 4: Generate gRPC client/classes in TypeScript

  1. Launch the code generation:
buf generate
  1. Install the required dependencies for the generated code to your project:
npm install @protobuf-ts/runtime@^2.9.0 @protobuf-ts/runtime-rpc@^2.9.0