symbol / symbol-cli

Command-line tool for Symbol
https://docs.symbolplatform.com/cli.html
Apache License 2.0
36 stars 24 forks source link

Add vanity address generation #355

Open segfaultxavi opened 3 years ago

segfaultxavi commented 3 years ago

Currently new accounts can be generated with symbol-cli account generate.

Recently catapult-server added the catapult.tools.addressgen tool which allows specifying a string to search for when generating new addressess.

It would be very helpful to have the same functionality in symbol-cli, for instance, as an optional parameter:

symbol-cli account generate --network TEST_NET --vanity HOMER
√ Do you want to save the account? ... no
√ Select an import type: » PrivateKey

Account
┌───────────────┬──────────────────────────────────────────────────────────────────────┐
│ Property      │ Value                                                                │
├───────────────┼──────────────────────────────────────────────────────────────────────┤
│ Address       │ THOMER-KMEGPC-NDXZYO-DQE3UD-LWLVGP-QEGRDE-JOQ                        │
├───────────────┼──────────────────────────────────────────────────────────────────────┤
│ Public Key    │ E0E323BD936C4CB83771E8EA27C06E0F1627FD5B33F68CF4AE1B379D4250E8A3     │
├───────────────┼──────────────────────────────────────────────────────────────────────┤
│ Private Key   │ 795940D3C31E938AD0FD2207A91E9EB3A69D3D7208FFF5C9C0736894AE8E5B83     │
└───────────────┴──────────────────────────────────────────────────────────────────────┘