ethr-did icon indicating copy to clipboard operation
ethr-did copied to clipboard

Web3.js interaction

Open tnkhanh opened this issue 2 years ago • 4 comments

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

tnkhanh avatar May 31 '22 04:05 tnkhanh

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?

mirceanis avatar May 31 '22 07:05 mirceanis

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

tnkhanh avatar May 31 '22 09:05 tnkhanh

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

mirceanis avatar May 31 '22 09:05 mirceanis

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

mirceanis avatar May 31 '22 11:05 mirceanis