Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create account from private key #286

Closed
macrauder opened this issue Nov 19, 2019 · 1 comment
Closed

Create account from private key #286

macrauder opened this issue Nov 19, 2019 · 1 comment

Comments

@macrauder
Copy link

Hi,

is there a method to create an account based on an existing private key, similiar to
https://web3js.readthedocs.io/en/v1.2.0/web3-eth-accounts.html#privatekeytoaccount so that is possible to us HDWallet keys or simple local keys as an starting point?

thx

@tomusdrw
Copy link
Owner

There is a parity-specific method if you want to create a private key on the node:
https://docs.rs/web3/0.8.0/web3/api/struct.ParityAccounts.html#method.new_account_from_secret

Local signing got just merged recently (#279) and you can use SecretKey from ethsign crate, which should support arbitrary key (although it doesn't support derivation).

@tomusdrw tomusdrw closed this as completed Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants