Skip to content
Warning:Contents are available for feedback and preview; practices and lexicons can still change. Implement at your own risk!

Lexicon design: HappyView Plugin

Lexicon design: HappyView Plugin

HappyView plugins are distributed as two blobs: a WASM file and a JSON manifest. This example lexicon, at.happyproto.plugin#package, could be shipped as a release artifact in the software.release.manifest#artifacts array:

{
  "lexicon": 1,
  "id": "at.happyproto.plugin",
  "defs": {
    "package": {
      "type": "object",
      "description": "A packaged HappyView plugin",
      "required": [
        "wasm",
        "manifest"
      ],
      "properties": {
        "wasm": {
          "type": "blob",
          "accept": [
            "application/wasm"
          ],
          "maxSize": 16777216,
          "description": "The module, stored as a blob in the publisher's PDS."
        },
        "manifest": {
          "type": "blob",
          "accept": [
            "application/wasm"
          ],
          "maxSize": 16777216,
          "description": "The module, stored as a blob in the publisher's PDS."
        },
      }
    }
  }
}

The associated manifest record would look like so:

{
  "$type": "software.release.manifest",
  "project": "at://did:plc:example/software.release.project/happyview-plugin-example",
  "artifacts": [
    {
      "$type": "at.happyproto.plugin#package",
      "wasm": { "$type": "blob", ... },
      "manifest": ...
    }
  ]
}

And the publisher creates a version and updates a channel as would be expected.