Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: add a easy way to fetch an app's artifact or manifest #416

Open
sembrestels opened this issue Dec 18, 2019 · 2 comments
Open

API: add a easy way to fetch an app's artifact or manifest #416

sembrestels opened this issue Dec 18, 2019 · 2 comments
Labels
component: api enhancement New feature or request

Comments

@sembrestels
Copy link
Contributor

In #371 the api.getApps() function is filtered and there isn't a direct way to get apps' manifest and artifact anymore. These are the only exposed details:

{
  appAddress: '0x...',  // currently running app's address (either proxy or full app contract)
  appId: '0x...',  // app's appId
  appImplementationAddress: '0x...',  // base implementation address (only available if running is a proxy contract)
  identifier: '...',  // self-declared app identifier
  isForwarder: bool,  // whether this app is a forwarder or not
  kernelAddress: '0x...',  // kernel the app is installed on
  name: '...',  // name of the app (if available)
}

I propose to include the manifest.json and the artifact.json URIs, so developers can still access them with a simple fetch(). For example, for the voting app it would look like:

{
  ...,
  artifact: '/ipfs/QmcgFogXwcHwHZFHJ2JUsVauFPXDWfGQ3aeYTjfayBKAYW/artifact.json',
  manifest: '/ipfs/QmcgFogXwcHwHZFHJ2JUsVauFPXDWfGQ3aeYTjfayBKAYW/manifest.json',
}

I find installed apps artifact.json info especially relevant because it exposes the ABI and the roles of the other apps, which can be useful. In the committees app, we use it to get the names of the other apps roles.

@sohkai sohkai added the enhancement New feature or request label Jan 31, 2020
@sohkai
Copy link
Contributor

sohkai commented Jan 31, 2020

Good to know @sembrestels, thanks for bringing this up!

I intentionally limited the amount of information passed back through getApps() to avoid creating a large API surface area that would be difficult to change or constrain in the future.

I do agree on having the abi and roles present to help other apps construct actions or know more about how to interact with the other apps. Giving the entire artifact / manifest is likely not something we'll do immediately as we've been meaning to make changes to the schema.

@sohkai sohkai added the good first issue an easy issue for a new dev or a bounty label Jan 31, 2020
@sohkai sohkai changed the title API: Include an easy way to recover apps info in getApps() API: add a easy way to fetch an app's artifact or manifest Feb 5, 2020
@sohkai
Copy link
Contributor

sohkai commented Feb 5, 2020

abi and roles have been made available in #425.

@sohkai sohkai removed the good first issue an easy issue for a new dev or a bounty label Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: api enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants