uport-project / ethr-did

Create ethr DIDs
Apache License 2.0
263 stars 54 forks source link

Web3.js interaction #95

Open tnkhanh opened 2 years ago

tnkhanh commented 2 years ago

Hi, I'm just curious. Does ethr-did work with web3.js without Ethers.js? Is there a working example? Thanks.

mirceanis commented 2 years ago

It uses ethers.js internally, so it's not possible to eliminate it. But, it should work with a web3.js provider since ethers has wrappers for them.

I don't have an example. Would you like to add one?

tnkhanh commented 2 years ago

Thanks. Because I somehow cannot make it work with web3.js but it works with ethers. I will stick with ethers for now.

mirceanis commented 2 years ago

What did you try so far and didn't work?

mirceanis commented 2 years ago

This is what I meant by wrapping: https://docs.ethers.io/v5/api/providers/other/#Web3Provider