[Feature Request] Add hexseed-derived account address generator to `aptos` CLI
Per recent discussion with @gregnazario , the aptos CLI does not offer the ability to generate an account address from a hexseed. Since account addresses are required for workflows such as on-chain publication, it is suggested that the CLI incorporate an account address generator. This could take several forms:
- Generate an additional file, with the account address corresponding to the generated hexseed, when running
aptos key generate - Add a command that returns (prints to terminal, outputs to file, etc.) the account address corresponding to a private key file or string input
- Add a command that, when building, if
Move.tomlhas an address set to a generic_, only requires a private key file/string input, then derives an account address and substitutes it appropriately into the--accountfield (this could be complimented by a publication command that similarly only required a private key as an input, thus relieving the user of the burden of tracking two values instead of just one)
Something similar to you want I believe is being worked on here https://github.com/aptos-labs/aptos-core/pull/3438
There is now a command that will print the account address corresponding to a public key see aptos account lookup-address.
What kind of derivation were you looking for in the generated hex seed?
The CLI does support replacing the _ with --named-addresses using profiles. So if you add the key via aptos init you should be able to just say --named-addresses NamedAddress=profile-name and it will fill it in for you
Got it, I'll be on the lookout for the official release so I can try out the new command.
If I am understanding your question about derivation correctly, I have been creating hex seeds via aptos key generate, so whatever the standard options are there.
I have been using the _, but as for the aptos init I've been shying away from that just to not get in the habit of storing a key in plain text in a config file.
This issue is stale because it has been open 45 days with no activity. Remove the stale label or comment - otherwise this will be closed in 15 days.
This issue is stale because it has been open 45 days with no activity. Remove the stale label or comment - otherwise this will be closed in 15 days.