CLI
Access to the Bloq CLI is through bcl.
Jump to:
Usage: bcl <COMMAND>
The following commands are available:
Client Keys
Client Keys are required to access Bloq services and generate Access and Refresh tokens.
The following operations are supported within bcl client-keys <OPERATION>
Create Client Keys
The bcl client-keys create
operation enables users to create a Client Key ID and Client Key Secret pair.
A user must create a client-key in order to use Bloq services.
WARNING
Make sure to save your Client Key Secret in a secure location. Secrets are not viewable in the future. Upon Client Key Secret generation, the secret is automatically copied to the clipboard for easy storage.
List Client Keys
The bcl client-keys list
operation enables users to list existing keys by Client Key ID. Client Key Secret are not viewable.
Remove Client Keys
The bcl client-keys remove
operation enables users to remove a Client Key ID and Client Key Secret pair.
Client Token
The bcl client-token
command creates a clientAccessToken and refreshToken for use with Bloq services.
TIP
A client-key pair must be created prior to creating a clientAccessToken or refreshToken. Use the bcl client-keys
command if client-keys
do not currently exist.
A clientAccessToken is a short-lived (1 hr) token that is required by applications to access Bloq services (Connect, Nodes, etc).
A refreshToken is a longer term (1 year) token that enables your application to request a new clientAccessToken to the authentication server. When the clientAccessToken expires, the refreshToken will let you obtain a new clientAccessToken. The refreshToken is renewed every time a new clientAccessToken is requested.
WARNING
Make sure to save your clientAccessToken and refreshToken in a secure location. Upon token generation, the they will no longer be possible to access again.
Clusters
The bcl clusters <METHOD> <OPTIONAL FLAGS>
command enables the user to interact with and manage their registered Bloq clusters. The <METHOD>
is the clusters method that can be invoked.
Valid <METHOD>
options are:
chains
info
list
remove
services
Optional Flags
The following are the list of optional flags for the bcl clusters
command:
TIP
bcl clusters
methods do not require any additional flags. If more input is required, the client will prompt you for that information upon command execution.
Conf
Set Client Keys
In order to reload your previous Client Keys to the CLI, use the following commands:
bcl conf --key clientId --value <Previous_clientId>
bcl conf --key clientSecret --value <Previous_clientSecret>
Retrieve Account Access Token
To retrieve the Account Access Token
that is generated upon bcl login
, use the following command:
bcl conf accessToken
Connect
The bcl connect <METHOD> <OPTIONAL FLAGS>
command provides a subset of the full Connect service functionality through the bcl
interface. The <METHOD>
is the Connect service method that can be invoked.
Valid <METHOD>
options are:
block
blocks
block-hash
raw-block
transaction
tx
raw-tx
Most of these methods require an additional input value to be specified as part of the -a
flag:
The block
and raw-block
methods require a block hash:
The transaction
, tx
, and raw-tx
methods require a transaction id:
The block-hash
method requires a block height:
The blocks
method accepts no additional arguments.
Optional Flags
The following are the list of optional flags for the bcl connect
command:
Events
The bcl events
command provides a history of the most recent events.
Use the -s=<service>
flag to filter events by services.
Valid options for <service>
are:
accounts
connect
nodes
Help
The bcl help
command provides the help screen.
Login
The bcl login -u <Account ID>
command authenticates and logs the user into the CLI.
The Account ID is contained within the user signup confirmation email.
Logout
The bcl logout
command logs the user out of the CLI and removes any local user data from the CLI.
Nodes
The bcl nodes <METHOD> <OPTIONAL FLAGS>
command enables the user to access Bloq Nodes services and manage their registered Bloq Nodes. The <METHOD>
is the Nodes service method that can be invoked.
Valid <METHOD>
options are:
chains
info
list
remove
services
Optional Flags
The following are the list of optional flags for the bcl nodes
command:
TIP
bcl nodes
methods do not require any additional flags. If more input is required, the client will prompt you for that information upon command execution.
Profile
The bcl profile
command provides information about the user including:
Account ID
Display Name
Email Address
Verification Status
Status
The bcl status
command provides the online status of Bloq services.
Update-Password
The bcl update-password
command provides the ability for the user to change their existing password associated with their Bloq account.
Last updated