Skip to content

Commit 6015eea

Browse files
authored
Merge pull request #8395 from ethereum/jc-account-update
accounts: remove example using deprecated namespace
2 parents 509e948 + 14ba983 commit 6015eea

File tree

1 file changed

+12
-9
lines changed
  • src/content/developers/docs/accounts

1 file changed

+12
-9
lines changed

src/content/developers/docs/accounts/index.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,22 @@ Example:
7070

7171
The public key is generated from the private key using the [Elliptic Curve Digital Signature Algorithm](https://wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm). You get a public address for your account by taking the last 20 bytes of the Keccak-256 hash of the public key and adding `0x` to the beginning.
7272

73-
Here's an example of creating an account in the console using GETH's `personal_newAccount`
73+
The following example shows how to use a signing tool called [Clef](https://geth.ethereum.org/docs/clef/introduction) to generate a new account. Clef is an account management and signing tool that comes bundled with the Ethereum client, [Geth](https://geth.ethereum.org). The `clef newaccount` command creates a new key pair and saves them in an encrypted keystore.
7474

75-
```go
76-
> personal.newAccount()
77-
Passphrase:
78-
Repeat passphrase:
79-
"0x5e97870f263700f46aa00d967821199b9bc5a120"
75+
```
76+
> clef newaccount --keystore <path>
77+
78+
Please enter a password for the new account to be created:
79+
> <password>
8080
81-
> personal.newAccount("h4ck3r")
82-
"0x3d80b31a78c30fc628f20b2c89d7ddbf6e53cedc"
81+
------------
82+
INFO [10-28|16:19:09.156] Your new key was generated address=0x5e97870f263700f46aa00d967821199b9bc5a120
83+
WARN [10-28|16:19:09.306] Please backup your key file path=/home/user/go-ethereum/data/keystore/UTC--2022-10-28T15-19-08.000825927Z--5e97870f263700f46aa00d967821199b9bc5a120
84+
WARN [10-28|16:19:09.306] Please remember your password!
85+
Generated account 0x5e97870f263700f46aa00d967821199b9bc5a120
8386
```
8487

85-
[GETH documentation](https://geth.ethereum.org/docs)
88+
[Geth documentation](https://geth.ethereum.org/docs)
8689

8790
It is possible to derive new public keys from your private key but you cannot derive a private key from public keys. This means it's vital to keep a private key safe and, as the name suggests, **PRIVATE**.
8891

0 commit comments

Comments
 (0)