interchaintest icon indicating copy to clipboard operation
interchaintest copied to clipboard

Expose user private keys

Open DavidNix opened this issue 2 years ago • 3 comments

Feedback from ibc-go team:

I'm trying to add a test which creates an signs a transaction using a grpc client. In order to do this I need the private key of a user. Can you think of a relatively straight forward way of doing this?

I see that the generated private keys go into some db somewhere? But maybe we could use a preset fixture of a mnemonic/public/private key for certain tests that need access to this. What do you think?

DavidNix avatar Jun 24 '22 14:06 DavidNix

To add some specifics, I was following these docs and was unable to sign the transaction on behalf of a created user as we cannot access the private keys (priv).

chatton avatar Jun 24 '22 16:06 chatton

It looks like we should be able to derive the private key from a mnemonic.

Maybe if we instead --restore users when adding them (by generating a mnemonic), we could return the private key as a new field on this struct

chatton avatar Jun 27 '22 13:06 chatton

I like the idea of extending ibc.User with it.

Given my forthcoming OOO starting tomorrow, I will ask @boojamya (our PM) to consider prioritizing this one.

DavidNix avatar Jun 27 '22 14:06 DavidNix

Closing as stale.

jonathanpberger avatar Mar 17 '23 16:03 jonathanpberger