paritytech / substrate

Substrate: The platform for blockchain innovators
Apache License 2.0
8.39k stars 2.65k forks source link

UnsupportedKeyType with 'aura' key type #3489

Closed drewstone closed 5 years ago

drewstone commented 5 years ago

I'm running the following command from the README:

root@testnet2:/edgeware-node# curl -H 'Content-Type: application/json' --data '{ "jsonrpc":"2.0", "method":"author_insertKey", "params":["aura", "<mnemonic>//<derivation_path"],"id":1 }' localhost:9933
{"jsonrpc":"2.0","error":{"code":-32603,"message":"Unknown error occured","data":"UnsupportedKeyType"},"id":1}

Though when I run with 'gran' and my grandpa combo, it returns the public key result. How else can I input the 'aura' type?

bkchr commented 5 years ago

Yeah, you need to provide the public key as well. The problem is that aura could either be ed25519 or sr25519 and we don't know which you have configured. I will open a pr to improve the error message.

drewstone commented 5 years ago

@bkchr is there an example of how to provide both pieces of data?

bkchr commented 5 years ago

Just put the public key as hex encoded third parameter.