Theophile Sandoz 044be7360c Fix the discussionThread id type 3 سال پیش
..
compiled ed663cccf7 Define Image uri in the Bounty Metadata protobuf 3 سال پیش
doc 270d494841 Forum mappings&tests: runtime changes adjustments and tags functionality 3 سال پیش
proto 044be7360c Fix the discussionThread id type 3 سال پیش
scripts b236ceb0ee metadata-protobuf: Prettier format 3 سال پیش
src 270d494841 Forum mappings&tests: runtime changes adjustments and tags functionality 3 سال پیش
test 270d494841 Forum mappings&tests: runtime changes adjustments and tags functionality 3 سال پیش
.eslintignore bfdace306f Introduce protobuffs 3 سال پیش
.eslintrc.js bfdace306f Introduce protobuffs 3 سال پیش
.gitignore bfdace306f Introduce protobuffs 3 سال پیش
.prettierignore bfdace306f Introduce protobuffs 3 سال پیش
README.md bfdace306f Introduce protobuffs 3 سال پیش
compile.sh 1bfe24ed72 Move to protobufjs, more tests, add LeaderUnset event 3 سال پیش
doc-appendix.md bfdace306f Introduce protobuffs 3 سال پیش
generate-md-doc.sh bfdace306f Introduce protobuffs 3 سال پیش
package.json fcd1ad162e Update @polkadot/api, @joystream/types, query-node, integration-tests, remove BTree(Set|Map) workarounds 3 سال پیش
tsconfig.json bfdace306f Introduce protobuffs 3 سال پیش

README.md

Joystream Content Directory Metadata Library

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

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 and build the library from source.

  • pre-requisists for compiling protofiles:

  • pre-requisists for generating documentation:

Generating docs

yarn generate-docs

Tests

yarn test