Client: manifest.json for the Aragon Package Manager

Created on 16 Aug 2017  路  13Comments  路  Source: aragon/client

The Aragon Package Manager will define and provide:

  • A standard Web App manifest with some new keys we will define here
  • A code package loadable by the Aragon app, which should be a browser-runnable web app which entry point is index.html

The new keys for _manifest.json_ will be:

  • _permissions_: It should be an array of call signatures that the app will use. We should inform the user before installing a new app, showing the permissions it requires
  • _contractsFactory_: An Ethereum address that can be used to deploy a new instance of the app's contracts
  • _dependencies_: An array of objects with properties _signature_ and _suggestions_, indicating which signatures the app needs in order to work and some suggestions for apps that provide them

I think that's it. Please send feedback if anything seems to be off

Most helpful comment

Everything related to contract metadata has been moved to another file called eth.json. manifest.json is a standard web manifest.

All 13 comments

Example simple manifest file:

{
  name: 'Donate Module',
  description: 'This app helps you donate to worthy causes.',
  icons: [{
    src: 'images/icon.png',
    sizes: '192x192'
  }],
  contractsFactory: '0x1234...',
  permissions: [{
    sig: '0x5678...', name: 'Some permission name'
  }],
  dependencies: [{
    signature: '0x9101...', suggestions: ['0xdeadbeef...', '0xfab...']
  }]
}

Alternatively manifest.permissions[].name could be a key for localization of modules later on.

We could probably also standardize some sort of README file that we could display in the module store, like Atom and VSCode does for extensions. That would be optional, of course. Thoughts?

@onbjerg that's a regular markdown file. yep, we can do that!

So, README.md (optional?!) and manifest.json in the root directory then.

@harshjv Yeah, README.md is optional but encouraged - I think we should try to not restrict developers too much, but shove them in the right direction.

For the overview in the module store we'll just use the icon, name and description of the module. The README is for a more detailed view.

And CHANGELOG.md. We can use it to show changes made since the last version. Such as a popup or something?

Yeah, sure. That would be optional too, but we can use a standard for changelogs like commitizen/cz-conventional-changelog.

OP mentions a custom property called permissions but this is already defined in the manifest spec. It should be renamed so it doesn't collide with the existing prop, which defines the browser APIs that the PWA should have granted in order to provide 100% of intended functionality.

:link: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/permissions

We've redone this totally, maybe @izqui can shed some light on the current manifest structure

Everything related to contract metadata has been moved to another file called eth.json. manifest.json is a standard web manifest.

Here's the total updated overview of the manifest.json and the metadata file (see aragon-core/metadata) since AragonOS.

Diff

{
  name: 'Donate Module',
  description: 'This app helps you donate to worthy causes.',
  icons: [{
    src: 'images/icon.png',
    sizes: '192x192'
+ }]
- }],
- contractsFactory: '0x1234...',
- permissions: [{
-   sig: '0x5678...', name: 'Some permission name'
- }],
- dependencies: [{
-   signature: '0x9101...', suggestions: ['0xdeadbeef...', '0xfab...']
- }]
}

Breakdown

  • Contract factories are no longer needed, since applications are now installed by deploying an AppProxy and setting permissions.
  • Permissions have been changed completely and no longer operate on function signatures. Furthermore, these have been moved to the artifacts generated from the metadata files in aragon-core (example artifact file).

Proposal

Since the only two things we now have in the manifest are icons, an application name and a description, I propose that we possibly merge these values with the existing metadata file (as seen in aragon-core).

Also, this issue should probably be moved to node-aragon (cc @harshjv)

I think the manifests should stay separate, since manifest.json is an existing standard (https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json) and separating the two helps us in separating the UI metadata side of things from the contract metadata.

Moved to specs repo

Was this page helpful?
0 / 5 - 0 ratings

Related issues

luisivan picture luisivan  路  4Comments

john-light picture john-light  路  3Comments

Ro5s picture Ro5s  路  4Comments

john-light picture john-light  路  3Comments

luisivan picture luisivan  路  4Comments