Catalyst milestone 2: Javascript/Typescript support

While the milestone technically requires Javascript support, we implemented Typescript support which is a typed superset of Javascript. This was done to better interpolate with existing Javascript/Typescript libraries on Cardano such as lucid, cardano-js-sdk, cardano-serialization-lib, etc. With Typescript support, we get Javascript support for free as the compilation from Typescript to Javascript is a well established practise.

Outputs

  • A LambdaBuffers code generation module that outputs type constructors and derived implementations in the Javascript programming language given a LambdaBuffers schema.

  • A Javascript library that implements the LambdaBuffers Prelude runtime. This module would include standardised JSON encoding and equality implementations for all declared type class instances in the schema.

  • A Javascript test suite that assures the manually implemented and automatically generated implementations are consistent with the predefined LambdaBuffers Prelude golden data set of JSON files and perform correct implementation derivation.

  • A Javascript library that implements the LambdaBuffers Plutus runtime. This module would include standardised PlutusData encoding implementations for all declared type class instances in the Plutus schema.

  • A Javascript test suite that assures the manually implemented and automatically generated implementations are consistent with the predefined LambdaBuffers Plutus golden data set of PlutusData encoded files and perform correct implementation derivation.

  • Nix devops modules (Nix API) for streamlining the LambdaBuffers code generation pipeline to Javascript.

  • Documentation on LambdaBuffers usage patterns for Javascript.

Acceptance Criteria

  • LambdaBuffers schemas that are based on the LambdaBuffers Prelude module can be used in Javascript projects to specify application types.
  • LambdaBuffers schemas that are based on the LambdaBuffers Plutus module can be used in Javascript projects to specify application types.
  • The documentation and devops tooling is available to facilitate easy adoption.

Evidence of Milestone Completion

Demo files