Protobuf specification and definitions representing blockchain data types and communication channels.
|
|
|
|
|
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.
Protobuf specs is built using Protobuf and uses different protocol buffer compiler tools to target specific languages, Scala, Dart, TS.
These are the step to update the specs
cd build/scalasbt +publishLocal- Check out target folder if you need to inspect generated code.
- plasma-protobuf-specs/build/scala/protobuf-fs2/target/scala-2.13/src_managed/main
- plasma-protobuf-specs/build/scala/protobuf-fs2/target/scala-3.4.1/src_managed/main
Build process generates Scala 2.x and Scala 3.x artifacts
Both of them are published on Maven Central repository.
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 += "org.plasmalabs" %% "protobuf-fs2" % "x.z.y"- Install Dart protoc_plugin
cd build/dartsh compile_protos.shdart run tool/generate_export_files.dart- Reference the
protobuf-specs/build/dartdirectory as a pubspec file dependencydependencies: topl_protobuf: path: /path/to/protobuf-specs/build/dart
We use Protobuf-es V1 for generation as it's the most compliant protobuf compiler available for ts
cd build/tssh build.sh
See related projects