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

DAF5 & DAF7 : There is no option for providing a web3provider in daf-resolve #205

Closed
devrajsinghrawat opened this issue Jun 29, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@devrajsinghrawat
Copy link
Contributor

Hi Team,

I am using DAF 5 But this issue is even applicable for DAF 7.

I was trying to create a didResolver without using a rcpUrl approach and creating by passing a web3 Provider

I can find that there is only hardcoded support for infura RPCUrl in current implementation when it comes to creating an instance using import { DafResolver } from 'daf-resolver'

which internally getting an rpcURL option in constructor and only have rpcUrl as an option,

constructor(options: Options) { this.didResolver = new Resolver({ ...ethrDidResolver({ networks: [ { name: 'mainnet', rpcUrl: 'https://mainnet.infura.io/v3/' + options.infuraProjectId }, { name: 'rinkeby', rpcUrl: 'https://rinkeby.infura.io/v3/' + options.infuraProjectId }, ], }), ...webDidResolver(), nacl: naclDidResolver, }) }

similar logic is even available in recent daf-resolve versions

Could you please expend the options interface with an option for web3provider object like we have in 'daf-ethr-did', this module has both the option while creating a IdentityProvider as mentioned below.

const identityProviders = [ new EthrDid.IdentityProvider({ identityStore: new IdentityStore('rinkeby-ethr', dbConnection), kms, //: new KeyManagementSystem(new KeyStore(dbConnection, new DafLocalStorage.KeyStore('localKeys'))), network: 'rinkeby', web3Provider: web3Provider, // rpcUrl: 'https://rinkeby.infura.io/v3/' + infuraProjectId, }), ]

so if we can get the similar support in daf-resolver then we can optionally use a web3 provider instead of a rpcUrl .

let didResolver: Daf.Resolver = new DafResolver({ provider: web3Provider})

@mirceanis mirceanis added the enhancement New feature or request label Jun 29, 2020
@devrajsinghrawat devrajsinghrawat mentioned this issue Jun 29, 2020
13 tasks
@devrajsinghrawat
Copy link
Contributor Author

Hi @mirceanis @simonas-notcat , Hope you are doing good..

Can we expect this enhancement to be part of DAF 7 release? If yes then when we can expect it to release ?

@mirceanis
Copy link
Member

I think it will be included in DAF 7; if not in the initial release, then perhaps in a smaller one immediately after since it won't be a breaking change, but an enhancement.
There is no deadline for the DAF7 release. We encourage you to try it out in beta phase and provide feedback if it affects you, since a lot of the actionHandler logic has now been redefined as direct methods callable on the agent.

We plan to have upgrade guides ready before merging it back into main but feedback is very welcome.

@devrajsinghrawat
Copy link
Contributor Author

I looks like I wont able to test this out in Beta release? Correct

@devrajsinghrawat
Copy link
Contributor Author

Hi Team,

Hope you are doing well. I am wondering if I can test this feature in beta release?

@mirceanis
Copy link
Member

It is not part of the daf7-beta yet.

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

No branches or pull requests

3 participants