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

Add Parent Permission to discovery results #16

Open
traylewin opened this issue Apr 12, 2019 · 1 comment
Open

Add Parent Permission to discovery results #16

traylewin opened this issue Apr 12, 2019 · 1 comment

Comments

@traylewin
Copy link

traylewin commented Apr 12, 2019

The discovery feature is very helpful. But it would be ideal if the discover results also included the parent permission of each discovered permission/authority. This could enable other use cases like keeping a cache of the permissions and keys stored across different wallets. This data could be discovered by querying the public chain - it is public info after all, but it would be great if it could be returned with the results of discover.

@traylewin traylewin changed the title Add PublicKey and ParentPermission to discovery results Add Parent Permission to discovery results Apr 12, 2019
@WarrickFitz
Copy link
Member

The structure returned today looks as follows:

{
  keyToAccountMap: [{
    index: 0,
    key: XXXX,
    accounts: [{
        account: ‘eosio’,
        authorization: ‘owner’
    }]
  },{
    index: 1,
    key: YYYY,
    accounts: [{
        account: ‘anotherAccount’,
        authorization: ‘active’
    },{
        account: ‘anotherAccount’,
        authorization: ‘owner’
    }]
  }]
}

Where Key: XXX or Key: YYY is the Public key for all accounts in the accounts[] for that node.

Getting parent information probably would not be that hard. I'd just need to think about how to add ti to the structure in a nice way and then also make the fetching of that info optional as there are users that don't need the data and are concerned about the extra time it would take to fetch. Good suggestion though, I can see that being helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants