Socket
Socket
Sign inDemoInstall

@joystream/content-metadata-protobuf

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @joystream/content-metadata-protobuf

Joystream Content Metadata Protobuf Library


Version published
Maintainers
1
Install size
942 kB
Created

Readme

Source

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:

yarn && yarn build

Generating docs

yarn generate-docs

Tests

yarn test

FAQs

Last updated on 17 Mar 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc