@@ -26,9 +26,9 @@ def setup_parser(args: List[str], subparsers: Any) -> Any:
2626 "new" ,
2727 "Create a new wallet"
2828 )
29- sub .add_argument ("--with- json" ,
29+ sub .add_argument ("--json" ,
3030 help = "whether to create a json key file" , action = "store_true" , default = False )
31- sub .add_argument ("--with- pem" ,
31+ sub .add_argument ("--pem" ,
3232 help = "whether to create a pem key file" , action = "store_true" , default = False )
3333 sub .add_argument ("--output-path" ,
3434 help = "the output path and base file name for the generated wallet files (default: %(default)s)" , type = str , default = "./wallet" )
@@ -91,12 +91,12 @@ def new_wallet(args: Any):
9191 mnemonic = generate_mnemonic ()
9292 print (f"Mnemonic: { mnemonic } " )
9393 secret_key , pubkey = wallet .derive_keys (mnemonic )
94- if args .with_pem :
94+ if args .pem :
9595 pem_file = prepare_file (args .output_path , ".pem" )
9696 address = Address (pubkey )
9797 pem .write (pem_file , secret_key , pubkey , name = address .bech32 ())
9898 logger .info (f"Pem wallet generated: { pem_file } " )
99- if args .with_json :
99+ if args .json :
100100 json_file = prepare_file (args .output_path , ".json" )
101101 password = getpass .getpass ("Enter a new password:" )
102102 save_to_key_file (json_file , secret_key , pubkey , password )
0 commit comments