topl / protobuf-specs   2.0.0-beta3

Mozilla Public License 2.0 GitHub

Protobuf specifications and definitions representing blockchain data types and communication channels

Scala versions: 3.x 2.13

protobuf-specs

Protobuf specification and definitions representing blockchain data types and communication channels.

Topl logo Code of Conduct License @topl_protocol on Twitter @topl_protocol release

Required tools

Run

  • Windows:

    TODO

  • Linux:

    sh ./run_protocol_compilers.sh

Developers

When testing changes, it helps to verify their behavior in the libraries that consume these protobuf specs. You can publish the compiled protobuf as a "local" library and consume it in a different project.

Scala

  1. cd build/scala
  2. sbt publishLocal
  3. Check the logs to see the org/package/version that was published, and use as a normal SBT dependency in a different project
  • i.e. "co.topl" %% "protobuf-fs2" % "b56d2815"

JitPack

This repo can be consumed using jitpack. Here is how:

  • Each time a commit is pushed, it produces an artifact JitPack

Add jitpack to the resolvers list in build.sbt. It should look like this:

  resolvers ++= Seq("jitpack" at "https://jitpack.io")

  libraryDependencies += "com.github.Topl.protobuf-specs" %% "protobuf-fs2" % "e03a093"

Maven Release

This repo can be consumed using Sonatype s01 releases. Here is how:

  • Each time a tag is pushed, it produces an artifact: releases: releases
  • Each time a commit is pushed, it produces a snapshot artifact: snapshots

Add Sonatype to the resolvers list in build.sbt. It should look like this:

  resolvers ++= Seq(
    "Sonatype Staging" at "https://s01.oss.sonatype.org/content/repositories/staging",
    "Sonatype Snapshots" at "https://s01.oss.sonatype.org/content/repositories/snapshots/",
    "Sonatype Releases" at "https://s01.oss.sonatype.org/content/repositories/releases/"
  )

 libraryDependencies +=  "co.topl" %% "protobuf-fs2" % "2.0.0-alpha2"

Dart

  1. Install Dart protoc_plugin
  2. cd build/dart
  3. sh compile_protos.sh
  4. Reference the protobuf-specs/build/dart directory as a pubspec file dependency
    dependencies:
      topl_protobuf:
        path: /path/to/protobuf-specs/build/dart
    

Usages

See related projects