Package convex.cli
Class Main
java.lang.Object
convex.cli.ACommand
convex.cli.Main
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddKeyPairToStore(AKeyPair keyPair, char[] keyPassword) Adds key pair to store.cli()Gets the current CLI main command instanceconnect()Connect as a client to the currently configured Convex networkgenerateKeyPairs(int count, char[] keyPassword) Generate key pairs and add to store.getEtchStore(String etchStoreFilename) char[]Keys the password for the current keyGets the current key storeGets the keystore file name currently used for the CLIchar[]Get the currently configured password for the keystore.voidvoidbooleanbooleanloadFileAsString(String fname) loadKeyFromStore(String publicKey) Loads a keypair from configured keystoreLoads the currently configured key StoreloadKeyStore(boolean isCreate, char[] password) Loads the currently configured key Storestatic voidJava main(...) entry point when run as a Java application.intmainExecute(String[] args) Command line execution entry point.voidvoidvoidvoidprintRecord(RecordOutput output) voidprintResult(Result result) booleanchar[]readPassword(String prompt) voidrun()voidvoidsaveKeyStore(char[] storePassword) void
-
Field Details
-
commandLine
public picocli.CommandLine commandLine
-
-
Constructor Details
-
Main
public Main()
-
-
Method Details
-
run
public void run() -
main
Java main(...) entry point when run as a Java application. Exits JVM process with specified exit code- Parameters:
args- Command line arguments
-
mainExecute
Command line execution entry point. Can be run from Java code without terminating the JVM.- Parameters:
args- Command line arguments- Returns:
- Process result value
-
getStorePassword
public char[] getStorePassword()Get the currently configured password for the keystore. Will emit warning and default to blank password if not provided- Returns:
- Password string
-
getKeyPassword
public char[] getKeyPassword()Keys the password for the current key- Returns:
-
getKeyStoreFile
Gets the keystore file name currently used for the CLI- Returns:
- File name, or null if not specified
-
getKeystore
Gets the current key store- Returns:
- KeyStore instance, or null if it does not exist
-
loadKeyStore
Loads the currently configured key Store- Parameters:
isCreate- Flag to indicate if keystore should be created if absent- Returns:
- KeyStore instance, or null if does not exist
-
loadKeyStore
Loads the currently configured key Store- Parameters:
isCreate- Flag to indicate if keystore should be created if absent- Returns:
- KeyStore instance, or null if does not exist
-
loadKeyFromStore
-
generateKeyPairs
-
addKeyPairToStore
Adds key pair to store. Does not save keystore!- Parameters:
keyPair- Keypair to add
-
connect
Connect as a client to the currently configured Convex network- Returns:
- Convex instance
-
saveKeyStore
public void saveKeyStore(char[] storePassword) -
saveKeyStore
public void saveKeyStore() -
isParanoid
public boolean isParanoid() -
println
-
printResult
-
printRecord
-
println
-
isInteractive
public boolean isInteractive() -
readPassword
-
loadFileAsString
-
inform
-
inform
-
paranoia
-
setOut
-
getEtchStore
-
prompt
-
cli
-