Open EclesioMeloJunior opened 3 years ago
you won't be able to get the mnemonic seed from subkey inspect
, the inspect element only provides the public information of the key. You would have to generate a key and then keep the seed in a safe place.
@decentration thanks for clarifying that!
I've tryied to call this RPC call using the https://polkadot.js.org/apps on polkadot and kusama networks and to both nets the RPC call author.insertKey
outputs:
1: author.insertKey
-32601: Method not found
And I look at smoldot implemented rpc calls and I noticed that author_insertKey
is not implemented yet
@timwu20 @danforbes fyi
@EclesioMeloJunior does this documentation help clarify the format that the Substrate implementation expects? https://github.com/substrate-developer-hub/substrate-docs/blob/e537cc2de3618d283e58e308c30ae6c436d0569e/v3/tutorials/05-private-network/e-launch-custom-chain/index.mdx#option-1-use-the-polkadot-js-apps-ui
@danforbes yes, helps a lot! Thanks!
Issue summary
insertKey
RPC method the polkadot ui are sending thesuri
(aka Substrate URI, aka//Allice
,//Bob
...) but our RPC method is expecting a hexadecimal seed (if you typesubkey inspect //Allice
you will get the hex seed for the suri//Allice
), the error the ui got is:api.rpc.author.insertKey
polkadot js API is expecting asuri
as paramater as well:Screenshots
1) Sending a
suri
but got error response the log what gossamer node are receiving:2) Trying to send a hex seed, got the same error response: the log what gossamer node are receiving:
Other information and links
insertKey
RPC method: https://github.com/paritytech/substrate/blob/1d5abf01abafdb6c15bcd0172f5de09fd87c5fbf/client/rpc/src/author/mod.rs#L94insert_unknow
implementation: https://github.com/paritytech/substrate/blob/7dcc77b982f59eaf6cec19499d981164b04a255d/client/keystore/src/local.rs#L291insertKey
RPC spec is not updated with this info, there saysseed
and the example shows a seed being passed as request parameter