Support use a standalone executable binary as a plugin of ckb-cli, just like what git do.
For example:
ckb-cli light-client transfer --help
This will call a executable binary named ckb-cli-light-client and use transfer --help as it's arguments.
When call a plugin like above, ckb-cli will passing the ckb-cli home directory (default is $HOME/.ckb-cli) as CKB_CLI_HOME environment variable. And passing ckb rpc url as CKB_CLI_CKB_RPC environment variable.
So, we should add some functions into plugin-protocol help plugin use keystore from CKB_CLI_HOME or read ckb rpc url from CKB_CLI_CKB_RPC or other environment variables like this.
Support use a standalone executable binary as a plugin of
ckb-cli
, just like whatgit
do.For example:
This will call a executable binary named
ckb-cli-light-client
and usetransfer --help
as it's arguments.When call a plugin like above,
ckb-cli
will passing the ckb-cli home directory (default is$HOME/.ckb-cli
) asCKB_CLI_HOME
environment variable. And passing ckb rpc url asCKB_CLI_CKB_RPC
environment variable.So, we should add some functions into
plugin-protocol
help plugin use keystore fromCKB_CLI_HOME
or read ckb rpc url fromCKB_CLI_CKB_RPC
or other environment variables like this.