DID method creates new Ethr-DID without passing singer or private key
See original GitHub issueDescription In the documentation, it is mentioned that ‘either signer or privateKey’ is required to create a new Ethr-DID. However, a new Ethr-Did can be created just passing the Ethereum address.
To Reproduce
- init
npm
project - paste the following code into
inde.js
- configure the
provider
- install the dependencies
ethjs-provider-http@0.1.6
andethr-did@1.1.0
- run
node index.js
Sample Code
const HttpProvider = require('ethjs-provider-http')
const provider = new HttpProvider('http://127.0.0.1:8545')
const EthrDID = require('ethr-did');
let createDid = async () => {
const address = '0xCF402F0891f9551eA0e2cEE7A7e491C4e83Fc079';
const ethrDid = new EthrDID({ address });
console.log(ethrDid);
}
createDid()
Expected behavior It should throw an error stating ‘either signer or private key is required’.
Actual behavior It successfully creates a new did.
Screenshots
Dependencies:
- Node.js:
10.16.3
- ethjs-provider-http:
^0.1.6
- ethr-did:
^1.1.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Getting Started | uPort Developer Portal
We provide a convenient method to easily create one EthrDID.createKeyPair() which returns an object containing an Ethereum address and private key. const ...
Read more >bigchaindb/js-bigchaindb-driver - Gitter
I was trying out the tutorial here: https://www.bigchaindb.com/developers/guide/tutorial-piece-of-art/. After creating a painting asset, I got an id.
Read more >ethr-did - npm
Create, manage and use did:ethr identifiers. Latest version: 2.2.4, last published: 18 days ago. Start using ethr-did in your project by ...
Read more >Analysis and Evaluation of Blockchain-based Self-Sovereign ...
and implemented systems based on the DID methods to create a decentralized ... Further, the concepts of a decentralized public key infrastructure (DPKI)...
Read more >Blockchain 101 - Part 2 - Public / Private Keys and Signing
The details of how public keys relate to private keys are hard to ... the private key ) to decipher the original number...
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
Thank you very much for your explanation.
It was at the time of writing the resolver. However, the W3C spec regarding the public keys has changed. The
owner
is no longer a recognized property of a public key. The spec describes acontroller
property but that may have slightly different semantics.I suggest not using the owner property of the resolved document at this time/version. If your use case requires that you find the owner as you expect, it is probably safer to call the registry contract directly instead of relying on the property that may disappear in a future version.
Thanks for spotting this