Currently, our library lacks the feature to decode POLO (Protocol Object Notation) encoded manifests into their JSON equivalent. This functionality is crucial for developers working with our manifest system.
Objective
Implement a new method decodeManifest in the ManifestCoder class that can decode POLO encoded manifests into JSON format.
Requirements
Add a new method decodeManifest to the ManifestCoder class.
The method should accept both hex string and Uint8Array as input for the manifest.
Implement input validation to ensure the manifest is in a valid format.
Create an enum ManifestFormat to support various manifest formats (initially just JSON, but extensible for future formats).
Return the decoded manifest as a LogicManifest.Manifest object.
Implement error handling for invalid manifests or unsupported formats.
Update the necessary imports/exports in js-moi-manifest.
Expected Behavior
When given a POLO encoded manifest, the decodeManifest method should return a properly structured JSON object representing the manifest.
Add
decodeManifest
method toManifestCoder
Background
Currently, our library lacks the feature to decode POLO (Protocol Object Notation) encoded manifests into their JSON equivalent. This functionality is crucial for developers working with our manifest system.
Objective
Implement a new method
decodeManifest
in theManifestCoder
class that can decode POLO encoded manifests into JSON format.Requirements
decodeManifest
to theManifestCoder
class.ManifestFormat
to support various manifest formats (initially just JSON, but extensible for future formats).LogicManifest.Manifest
object.js-moi-manifest
.Expected Behavior
When given a POLO encoded manifest, the
decodeManifest
method should return a properly structured JSON object representing the manifest.Example Usage