Unable to instantiate EthrDID
See original GitHub issueI’m trying to instantiate EthrDID in the following way:
const providerConfig = { rpcUrl: 'https://rinkeby.infura.io/ethr-did' }
const issuer: Issuer = new EthrDID({
identifier: identity.did, // my did
privateKey: identity.privateKey, // my private key
providerConfig
})
I get this error:
error TS2351: This expression is not constructable.
Type 'typeof import("/app/node_modules/ethr-did/lib/index")' has no construct signatures.
I’m using “ethr-did”: “^2.1.4” on package.json
Maybe I’m misconfiguring the providerConfig parameter? Thanks and best regards
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Can NOT verify did:ether JWT token #22 - GitHub
I try to use Ether-DID library to create new jwt token and after that i can NOT verify it. Here is example code...
Read more >verifyJWT not working in Ethr-did nodejs? - Stack Overflow
I am trying to generate and register a DID using ethr-did library. I have created a did by const ethrDid = new EthrDID({provider,...
Read more >uport-project/Lobby - Gitter
I could solve it using a custom registry address. _. Sign in to start talking · Chat via Matrix.
Read more >ethr-did - npm
Start using ethr-did in your project by running `npm i ethr-did`. There are 34 other projects in the npm registry using ethr-did.
Read more >Decentralized Identifiers (DIDs) v1.0 - W3C
Since a key can't control itself, and the key controller cannot be inferred from the DID document, it is necessary to explicitly express...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I see what’s happening now, after you shared your project. the import statement should be
import { EthrDID } from "ethr-did";
instead ofimport EthrDID from "ethr-did";
You seem to have stumbled upon a bug in the docs that are somewhat outdated now.
Here’s a sample, based on your project, that works with
ts-node
:🎉 This issue has been resolved in version 2.1.5 🎉
The release is available on:
Your semantic-release bot 📦🚀