Skip to content

massalabs/massa-proto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Massa proto

This repository contains Protobuf files for Massa blockchain.

Using Docker

Build image

docker build -t massaprotobuild:latest .

Run image

docker run --rm --name protobuild -v ./:/opt massaprotobuild

OR

Requirements

Make sure you have the following latest versions of the required tools:

Please ensure that you have the required versions or newer to guarantee compatibility and access to the latest features.

Project build

You can lint, format and update the generated documentation from protobuf files by running:

./build.sh

For Windows users run:

./build.bat

If you encounter issues with the format command on Windows, please refer to this issue on the buf GitHub repository for potential solutions and workarounds.

Postman integration

You can easily import APIs collections from Massa's Postman workspace and start testing and exploring the provided functionalities by Massa API's.

VSCode settings

1- Install vscode-proto3 extension.

2- The following settings contain a protoc configuration block with Java generation output:

{
    "protoc": {  // Specifies the configuration for the protoc plugin.
        "path": "/PATH/TO/PROTOC",  // Sets the path to the protoc binary that will be used to compile the protobuf files.
        "compile_on_save": true,  // Enables automatic compilation of protobuf files when they are saved.
        "options": [  // Specifies the command line options that will be passed to protoc.
            "{workspaceRoot}/proto/**/*.proto",  // Specifies the path to the protobuf files that should be compiled.
            "--proto_path=${workspaceRoot}/proto/",  // Specifies the directory to search for imported protobuf files.
            "--proto_path=${workspaceRoot}/proto/commons",  // Specifies the directory to search for imported common protobuf files.
            "--proto_path=${workspaceRoot}/proto/third_party",  // Specifies the directory to search for imported third_party protobuf files.
            "--java_out=${workspaceRoot}/gen/",  // Generates Java code from the protobuf files.
        ]
    }
}

3- Add the snippet above to .vscode/settings.json.