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

Clarify that 0x prefix is needed for imported private keys #3422

Merged
merged 1 commit into from
Mar 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/web3-eth-accounts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,18 @@ privateKeyToAccount

Creates an account object from a private key.

For more advanced hierarchial address derivation, see
[truffle-hd-awallet-provider](https://github.com/trufflesuite/truffle/tree/develop/packages/hdwallet-provider)
package.

----------
Parameters
----------

1. ``privateKey`` - ``String``: The private key to convert.
1. ``ignoreLength`` - ``Boolean``: If set to true does the ``privateKey`` length not get validated.
1. ``privateKey`` - ``String``: The private key to import. This is 32 bytes of random data.
If you are supplying a hexadecimal number, it must have `0x` prefix in order to be in line
with other Ethereum libraries.
2. ``ignoreLength`` - ``Boolean``: If set to true does the ``privateKey`` length not get validated.

-------
Returns
Expand Down