1010# -------
1111#
1212# * Robinhuett <https://github.com/Robinhuett>
13- # * Auxten <auxtenwpc#gmail.com >
13+ # * Auxten <auxten@covenantsql.io >
1414#
1515# ------------------------------------------------------------------------------
1616
@@ -21,135 +21,156 @@ _cql_dsn() {
2121_cql_args() {
2222 case $words[1] in
2323 (help)
24- _arguments '*:help:(generate console create drop wallet transfer grant mirror explorer adapter idminer rpc
25- )'
24+ _arguments '*:help:(generate console create drop wallet transfer grant mirror explorer adapter idminer rpc)'
2625 ;;
2726 (generate)
28- _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml]:CONF file:_files' \
29- '-bypass-signature[Disable signature sign and verify, for testing]' \
27+ _arguments '-bypass-signature[Disable signature sign and verify, for testing]' \
3028 '-help[Show help message]' \
31- '-no -password[Use empty password for master key]' \
32- '-password=-[Master key]:name: ' \
29+ '-with -password[Enter the passphrase for private. key]' \
30+ '-password=-[Passphrase for encrypting private. key]:name: ' \
3331 '-log-level=-[Console log level]:log_level:(trace debug info warning error fatal panic)' \
32+ '-private=-[Generate config using an existing private key]:name: ' \
33+ '-source=-[Generate config using the specified config template]:name: ' \
34+ '-miner=-[Generate miner config with specified miner address]:name: ' \
3435 '*:arguments:(config public)'
3536 ;;
3637 (console)
37- _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml]:CONF file:_files' \
38+ _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml" ]:CONF file:_files' \
3839 '-bypass-signature[Disable signature sign and verify, for testing]' \
3940 '-help[Show help message]' \
40- '-no -password[Use empty password for master key]' \
41- '-password=-[Master key]:name: ' \
41+ '-with -password[Enter the passphrase for private. key]' \
42+ '-password=-[Passphrase for encrypting private. key]:name: ' \
4243 '-log-level=-[Console log level]:log_level:(trace debug info warning error fatal panic)' \
4344 '-adapter=-[Address to serve a database chain adapter]:adapter_addr: ' \
4445 '-command=-[Run only single command and exit]:cmd: ' \
45- '-dsn=-[Database url]:dsn:_cql_dsn' \
4646 '-explorer=-[Address serve a database chain explorer]:explorer_addr: ' \
4747 '-file=-[Execute commands from file and exit]:_files' \
4848 '-no-rc[Do not read start up file]' \
4949 '-out=-[Record stdout to file]:out_file:_files' \
5050 '-single-transaction[Execute as a single transaction (if non-interactive)]' \
51- '-variable=-[Set variable]:var: '
51+ '-variable=-[Set variable]:var: ' \
52+ '1:Database ID:_cql_dsn '
5253 ;;
5354 (create)
54- _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml]:CONF file:_files' \
55+ _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml" ]:CONF file:_files' \
5556 '-bypass-signature[Disable signature sign and verify, for testing]' \
5657 '-help[Show help message]' \
57- '-no -password[Use empty password for master key]' \
58- '-password=-[Master key]:name: ' \
58+ '-with -password[Enter the passphrase for private. key]' \
59+ '-password=-[Passphrase for encrypting private. key]:name: ' \
5960 '-log-level=-[Console log level]:log_level:(trace debug info warning error fatal panic)' \
60- '-wait-tx-confirm[Wait for transaction confirmation]'
61+ '-wait-tx-confirm[Wait for transaction confirmation]' \
62+ '-db-advance-payment=-[Customized advance payment]:var: ' \
63+ '-db-consistency-level=-[Consistency level, node*consistency_level is the node count to perform strong consistency]:var: ' \
64+ '-db-encrypt-key=-[Encryption key for persistence data]:var: ' \
65+ '-db-eventual-consistency=-[Use eventual consistency to sync among miner nodes]:var: ' \
66+ '-db-gas-price=-[Customized gas price]:var: ' \
67+ '-db-isolation-level=-[Isolation level in a single node]:var: ' \
68+ '-db-load-avg-per-cpu=-[Minimum idle CPU requirement, 0 for none]:var: ' \
69+ '-db-memory=-[Minimum memory requirement, 0 for none]:var: ' \
70+ '-db-node=-[Target node count]:var: ' \
71+ '-db-space=-[Minimum disk space requirement, 0 for none]:var: ' \
72+ '-db-target-miners=-[List of target miner addresses(separated by ',')]:var: '
6173 ;;
6274 (drop)
63- _arguments -C '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml]:CONF file:_files' \
75+ _arguments -C '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml" ]:CONF file:_files' \
6476 '-bypass-signature[Disable signature sign and verify, for testing]' \
6577 '-help[Show help message]' \
66- '-no -password[Use empty password for master key]' \
67- '-password=-[Master key]:name: ' \
78+ '-with -password[Enter the passphrase for private. key]' \
79+ '-password=-[Passphrase for encrypting private. key]:name: ' \
6880 '-log-level=-[Console log level]:log_level:(trace debug info warning error fatal panic)' \
6981 '-wait-tx-confirm[Wait for transaction confirmation]' \
7082 '1:Database ID:_cql_dsn '
7183 ;;
7284 (wallet)
73- _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml]:CONF file:_files' \
85+ _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml" ]:CONF file:_files' \
7486 '-bypass-signature[Disable signature sign and verify, for testing]' \
7587 '-help[Show help message]' \
76- '-no -password[Use empty password for master key]' \
77- '-password=-[Master key]:name: ' \
88+ '-with -password[Enter the passphrase for private. key]' \
89+ '-password=-[Passphrase for encrypting private. key]:name: ' \
7890 '-log-level=-[Console log level]:log_level:(trace debug info warning error fatal panic)' \
79- '-balance=-[Get specific token balance of current account]:token_type:(Particle Wave All)'
91+ '-dsn=-[Database url]:dsn:_cql_dsn' \
92+ '-token=-[Get specific token balance of current account, e.g. Particle, Wave, All]:token_type:(Particle Wave All)'
8093 ;;
8194 (transfer)
82- _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml]:CONF file:_files' \
95+ _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml" ]:CONF file:_files' \
8396 '-bypass-signature[Disable signature sign and verify, for testing]' \
8497 '-help[Show help message]' \
85- '-no -password[Use empty password for master key]' \
86- '-password=-[Master key]:name: ' \
98+ '-with -password[Enter the passphrase for private. key]' \
99+ '-password=-[Passphrase for encrypting private. key]:name: ' \
87100 '-log-level=-[Console log level]:log_level:(trace debug info warning error fatal panic)' \
88- '-wait-tx-confirm[Wait for transaction confirmation]'
101+ '-wait-tx-confirm[Wait for transaction confirmation]' \
102+ '-amount=-[Token account to transfer]:var: ' \
103+ '-to-dsn=-[Target database dsn to transfer token]:dsn:_cql_dsn' \
104+ '-to-user=-[Target address of an user account to transfer token]:var: ' \
105+ '-token=-[Token type to transfer, e.g. Particle, Wave]:token_type:(Particle Wave)'
89106 ;;
90107 (grant)
91- _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml]:CONF file:_files' \
108+ _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml" ]:CONF file:_files' \
92109 '-bypass-signature[Disable signature sign and verify, for testing]' \
93110 '-help[Show help message]' \
94- '-no -password[Use empty password for master key]' \
95- '-password=-[Master key]:name: ' \
111+ '-with -password[Enter the passphrase for private. key]' \
112+ '-password=-[Passphrase for encrypting private. key]:name: ' \
96113 '-log-level=-[Console log level]:log_level:(trace debug info warning error fatal panic)' \
97- '-wait-tx-confirm[Wait for transaction confirmation]'
114+ '-to-dsn=-[Target database dsn to transfer token]:dsn:_cql_dsn' \
115+ '-to-user=-[Target address of an user account to transfer token]:var: ' \
116+ '-wait-tx-confirm[Wait for transaction confirmation]' \
117+ '-perm=-[Permission type struct for grant]:name: '
98118 ;;
99119 (mirror)
100- _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml]:CONF file:_files' \
120+ _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml" ]:CONF file:_files' \
101121 '-bypass-signature[Disable signature sign and verify, for testing]' \
102122 '-help[Show help message]' \
103- '-no -password[Use empty password for master key]' \
104- '-password=-[Master key]:name: ' \
123+ '-with -password[Enter the passphrase for private. key]' \
124+ '-password=-[Passphrase for encrypting private. key]:name: ' \
105125 '-log-level=-[Console log level]:log_level:(trace debug info warning error fatal panic)' \
106126 '-bg-log-level=-[Background log level]:bg_log_level:(trace debug info warning error fatal panic)' \
107127 '-tmp-path=-[Background service temp file path, use os.TempDir for default]:tmp_path:_files' \
108128 '1:Database ID:_cql_dsn ' \
109129 '2:Listen Addr:'
110130 ;;
111131 (explorer)
112- _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml]:CONF file:_files' \
132+ _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml" ]:CONF file:_files' \
113133 '-bypass-signature[Disable signature sign and verify, for testing]' \
114134 '-help[Show help message]' \
115- '-no -password[Use empty password for master key]' \
116- '-password=-[Master key]:name: ' \
135+ '-with -password[Enter the passphrase for private. key]' \
136+ '-password=-[Passphrase for encrypting private. key]:name: ' \
117137 '-log-level=-[Console log level]:log_level:(trace debug info warning error fatal panic)' \
118138 '-bg-log-level=-[Background log level]:bg_log_level:(trace debug info warning error fatal panic)' \
119139 '-tmp-path=-[Background service temp file path, use os.TempDir for default]:tmp_path:_files' \
120140 '1:Listen Addr:'
121141 ;;
122142 (adapter)
123- _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml]:CONF file:_files' \
143+ _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml" ]:CONF file:_files' \
124144 '-bypass-signature[Disable signature sign and verify, for testing]' \
125145 '-help[Show help message]' \
126- '-no -password[Use empty password for master key]' \
127- '-password=-[Master key]:name: ' \
146+ '-with -password[Enter the passphrase for private. key]' \
147+ '-password=-[Passphrase for encrypting private. key]:name: ' \
128148 '-log-level=-[Console log level]:log_level:(trace debug info warning error fatal panic)' \
129149 '-bg-log-level=-[Background log level]:bg_log_level:(trace debug info warning error fatal panic)' \
130150 '-tmp-path=-[Background service temp file path, use os.TempDir for default]:tmp_path:_files' \
131151 '-mirror=-[Mirror server for adapter to query]:' \
132152 '1:Listen Addr:'
133153 ;;
134154 (idminer)
135- _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml]:CONF file:_files' \
155+ _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml" ]:CONF file:_files' \
136156 '-bypass-signature[Disable signature sign and verify, for testing]' \
137157 '-help[Show help message]' \
138- '-no -password[Use empty password for master key]' \
139- '-password=-[Master key]:name: ' \
158+ '-with -password[Enter the passphrase for private. key]' \
159+ '-password=-[Passphrase for encrypting private. key]:name: ' \
140160 '-log-level=-[Console log level]:log_level:(trace debug info warning error fatal panic)' \
141161 '-difficulty=-[Difficulty for miner to mine nodes and generating nonce (default 24)]:difficulty: ' \
142162 '-loop[Keep mining until interrupted]'
143163 ;;
144164 (rpc)
145- _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml]:CONF file:_files' \
165+ _arguments '-config=-[Config file for CovenantSQL, default "~/.cql/config.yaml" ]:CONF file:_files' \
146166 '-bypass-signature[Disable signature sign and verify, for testing]' \
147167 '-help[Show help message]' \
148- '-no -password[Use empty password for master key]' \
149- '-password=-[Master key]:name: ' \
168+ '-with -password[Enter the passphrase for private. key]' \
169+ '-password=-[Passphrase for encrypting private. key]:name: ' \
150170 '-log-level=-[Console log level]:log_level:(trace debug info warning error fatal panic)' \
151- '-wait-tx-confirm[Wait for transaction confirmation ]' \
171+ '-bp[Call block producer node ]' \
152172 '-endpoint=-[RPC endpoint Node ID to do test call]:' \
173+ '-wait-tx-confirm[Wait for transaction confirmation]' \
153174 '-name=-[RPC name to do test call]:' \
154175 '-req=-[RPC request to do test call, in json format]:'
155176 ;;
0 commit comments