uport-project / ethr-did

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

On ethDid.createSigningDelegate return Transaction Hash #6

Closed kamescg closed 6 years ago

kamescg commented 6 years ago

Using the await ethrDid.createSigningDelegate() method in the documentation I'm able to succesfully assign a new delegate to my Rinkeby MetaMask account.

const provider = window.web3.currentProvider // MetaMask Web3 injection
const defaultAccount = window.web3.eth.defaultAccount // MetaMask Web3 injection
const ethrDid = new EthrDID({provider: provider, address: defaultAccount})

In addition to returning the kp (keypair) it might be nice to also return the transaction hash?

Developers may want to log transactions responsible for creating signing delegates?

localredhead commented 6 years ago

This seems very useful. @oed what do you think?

hsnhrn commented 5 years ago

I am getting this error

(node:3004) UnhandledPromiseRejectionWarning: Error: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32602,"message":"Invalid params: invalid length 0, expected a 0x-prefixed hex string with length of 40."}}'

any idea whats happening here?