Mokhtar Naamani f4cb727dec bump types and metadata npm package version há 2 anos atrás
..
doc 8cd0d2d850 Merge branch 'giza_feature_NewContentFeaturesAndNFT' into olympia há 2 anos atrás
proto 08d8408796 Add `WorkingGroupOpeningMetadata.title` há 2 anos atrás
scripts 65f45025c0 Fix protobuf compilation script há 3 anos atrás
src 8cd0d2d850 Merge branch 'giza_feature_NewContentFeaturesAndNFT' into olympia há 2 anos atrás
test 270d494841 Forum mappings&tests: runtime changes adjustments and tags functionality há 3 anos atrás
.eslintignore 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards há 3 anos atrás
.eslintrc.js 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards há 3 anos atrás
.gitignore b7313942df @joystream/content-metadata-protobuf -> @joystream/metadata-protobuf há 3 anos atrás
.prettierignore 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards há 3 anos atrás
README.md b7313942df @joystream/content-metadata-protobuf -> @joystream/metadata-protobuf há 3 anos atrás
compile.sh 1bfe24ed72 Move to protobufjs, more tests, add LeaderUnset event há 3 anos atrás
doc-appendix.md b7313942df @joystream/content-metadata-protobuf -> @joystream/metadata-protobuf há 3 anos atrás
generate-md-doc.sh b7313942df @joystream/content-metadata-protobuf -> @joystream/metadata-protobuf há 3 anos atrás
package.json f4cb727dec bump types and metadata npm package version há 2 anos atrás
tsconfig.json bb2b87a98a Types and metadata-protobuf: Patch to target es2017 há 2 anos atrás

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