Leszek Wiesner 0335189f43 Merge branch 'storage_v2' into giza-protobuf-and-query-node hace 3 años
..
compiled b7313942df @joystream/content-metadata-protobuf -> @joystream/metadata-protobuf hace 3 años
doc b7313942df @joystream/content-metadata-protobuf -> @joystream/metadata-protobuf hace 3 años
proto b7313942df @joystream/content-metadata-protobuf -> @joystream/metadata-protobuf hace 3 años
scripts 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards hace 3 años
src 3b57c37879 Fixes for isEmptyObject and FeaturedVideosSet handler hace 3 años
test b7313942df @joystream/content-metadata-protobuf -> @joystream/metadata-protobuf hace 3 años
.eslintignore 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards hace 3 años
.eslintrc.js 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards hace 3 años
.gitignore b7313942df @joystream/content-metadata-protobuf -> @joystream/metadata-protobuf hace 3 años
.prettierignore 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards hace 3 años
README.md b7313942df @joystream/content-metadata-protobuf -> @joystream/metadata-protobuf hace 3 años
compile.sh 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards hace 3 años
doc-appendix.md b7313942df @joystream/content-metadata-protobuf -> @joystream/metadata-protobuf hace 3 años
generate-md-doc.sh b7313942df @joystream/content-metadata-protobuf -> @joystream/metadata-protobuf hace 3 años
package.json 0335189f43 Merge branch 'storage_v2' into giza-protobuf-and-query-node hace 3 años
tsconfig.json 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards hace 3 años

README.md

Joystream Metadata Library

This package contains protobuf message definitions compiled to Javascript/Typescript used for creating and updating various metadata blobs in Joystream.

Message Specs

Documented in doc folder

Choice of protobuf protocol v2

For our usecase we wish to re-use same message to create and update subset of fields. For this reason we need the explicit information about wether a field has been set or not and this is only possible with proto v2.

Background: required/optional feilds are deprecated in proto v3

Helper methods

The custom Joystream types such as License have helper methods to construct pre-defined well known values.

Example code:

Best place to look at are the tests specs

Opaque types

We use simple ISO_639-1 code representation for Language. useful npm package https://www.npmjs.com/package/iso-639-1

Building the package

Building will compile the protofiles using protobufjs and build the library from source.

Generating docs

yarn generate-docs

Tests

yarn test