protected override bool Parse(ArgumentsParser arguments) { keytype = arguments.String(nameof(keytype), null); keypassword = arguments.String(nameof(keypassword), null); accountid = arguments.Long(nameof(accountid), -1); chainid = arguments.Integer(nameof(chainid), -1); keyindex = arguments.Integer(nameof(keyindex), -1); return((keytype == "coreaccount" || keytype == "serviceaccount" || keytype == "chainkey") && WalletApp.IsValidPassword(keypassword)); }
protected override bool Parse(ArgumentsParser arguments) { chainid = arguments.Integer(nameof(chainid), 0); accountpassword = arguments.String(nameof(accountpassword), null); chainkeyname = arguments.String(nameof(chainkeyname), null); chainkeypassword = arguments.String(nameof(chainkeypassword), null); if (chainid <= Protocol.CoreChainId || !WalletApp.IsValidPassword(accountpassword) || string.IsNullOrEmpty(chainkeyname) || !WalletApp.IsValidPassword(chainkeypassword)) { return(false); } return(true); }