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

Allow to select ledger when writing an object to the ledger #1008

Closed
TimoGlastra opened this issue Sep 2, 2022 · 3 comments
Closed

Allow to select ledger when writing an object to the ledger #1008

TimoGlastra opened this issue Sep 2, 2022 · 3 comments
Assignees

Comments

@TimoGlastra
Copy link
Contributor

TimoGlastra commented Sep 2, 2022

Currently the first ledger will always be used when writing an object to the ledger. It would be nice to select the ledger to use when writing objects to the ledger

This could be as simple as passing the pool id to the method, however a better approach would probably be to pass the did to use. This will remove the need for the publicDid property that we currently use (because you always pass it), and we could just require the dids to be did indy formatted dids so we can extract the ledger to write to from it. #965 adds the indyNamespace property to the pool configs. We could then match that against the namespace form the provided did and use that ledger.

E.g. agent.ledger.registerSchema() could take a publisherDid property of value did:indy:sovrin:xxx so we know it needs to be registered on mainnet. The advantage of this approach is that it will also work when we add support for other ledgers with anoncreds. You just pass e.g. did:cheqd:mainnet and we would write it to cheqd mainnet instead

@berendsliedrecht
Copy link
Contributor

A good addition! 100% in favour of the second method with the proper way. Once full support for did:indy this would be a nice addition as well :).

Artemkaaas pushed a commit to sicpa-dlab/aries-framework-javascript that referenced this issue Sep 29, 2022
Artemkaaas added a commit to sicpa-dlab/aries-framework-javascript that referenced this issue Sep 29, 2022
@jimezesinachi
Copy link
Contributor

@TimoGlastra someone seems to already be working on this. How do I proceed?

@TimoGlastra
Copy link
Contributor Author

I don't think so, these messages are unrelated to this issue.

But this reminds me I still need to add some extra info to this issue 😁

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

3 participants