Skip to content

michelson encoder as a js/wasm package

Developers that originate smart contracts onto the Tezos blockchain are required to convert Michelson to the JSON representation accepted by the Tezos node's RPC method.

The canonical Michelson encoder is written in OCaml and maintained by the Nomadic team. Library developers who use other languages (think javascript or anything supporting wasm) are faced with implementing their own parsers, which often miss edge cases, have bugs, or generally need to play catch up with the main version. This wastes a lot of developer effort.

Compiling and publishing the encoder lib as js/wasm package (perhaps to https://www.npmjs.com/org/nomadic-labs) would save developers a lot of effort.

Arguably, another solution could be to update the RPC's to accept the injection of Michelson in native (not JSON) form, but I suspect that change would have bigger implications.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information