To use henesis-cli, Node v10 or higher must be installed.
$ npm install -g @haechi-labs/henesis-cli $ henesis help VERSION @haechi-labs/henesis-cli/1.0.0-beta.33 darwin-x64 node-v10.16.0 USAGE $ henesis [COMMAND] COMMANDS changepw change password help display help for henesis init create the folder structure required for your project integration manage integrations login perform a login logout perform a logout
How to Setup Henesis AutoComplete
$ henesis autocomplete
Enter the following script according to your shell type.
$ printf "$(henesis autocomplete:script zsh)" >> ~/.zshrc; source ~/.zshrc
$ printf "$(henesis autocomplete:script bash)" >> ~/.bashrc; source ~/.bashrc
You must be logged in to use this features.
manage your account USAGE $ henesis account:COMMAND COMMANDS account:changepw change account password account:describe describe account information
$ henesis account:changepw Password: ****** New Password: ****** Again New Password: ****** 🦄 Password changed!
$ henesis account:describe Email: email@example.com Name: haechi Organization: haechi-labs clientId: 49e77d0be585ef71c337f758e61e1f16
Use help as:
$ henesis help [COMMAND]
For example, you can call
integration:delete command like:
$ henesis help integration:delete delete a integration USAGE $ henesis integration:delete [INTEGRATIONID] EXAMPLE $ henesis integration:delete my-integration-id
The directory in which the init command is run must be empty.
$ henesis init -n sample-project sample-project directory has been created.
After this, the following folder structure is created.
sample_project ├── contracts │ └── example.sol └── henesis.yaml
You can use command where the henesis.yaml file exists.
$ henesis integration manage integrations USAGE $ cli integration:COMMAND COMMANDS integration:delete delete a integration integration:deploy deploy a integration integration:describe describe a integration integration:status get integrations
There are tasks to be done before the deploy command.
- Place the contract file distributed in Blockchain inside the contract directory.
- Modify the henesis.yaml file to match the event you want to subscribe to and place the file with logic in the handler directory.
- You can run the deploy command and check the status of the distribution through the status command.
$ henesis integration:delete <integrationId>
$ henesis integration:deploy
--force: Erase existing deployed content and deploy current configuration.
--path: Specify where henesis.yaml is located.
henesis integration:describe <integrationId>
$ henesis login Allow Henesis to collect anonymous CLI usage and error reporting information yes(y) or no(n): y email: firstname.lastname@example.org password: *********** 🎉 Login Success from email@example.com 🎉
$ henesis logout 🤗 Logout Success 👍
version: v1 name: sample blockchain: platform: ethereum network: mainnet threshold: 12 # optional. # Ethereum: (default: 12, min: 6) # Klaytn: (default: 0, min: 0) filters: contracts: - address: '0x' name: example files: # The events of the contracts listed below can be combined together at this address. - path: ./contracts/example.sol contractName: example compilerVersion: 0.5.8 provider: type: webSocket
version: v1 name: sample blockchain: platform: ethereum network: mainnet threshold: 12 # optional. # Ethereum: (default: 12, min: 6) # Klaytn: (default: 0, min: 0) filters: contracts: - address: '0x' name: example files: # The events of the contracts listed below can be combined together at this address. - path: ./contracts/example.sol contractName: example compilerVersion: 0.5.8 provider: type: webhook url: https://localhost:8080 method: POST headers: Authorization: 'Bearer YOUR-OWN-TOKEN'
The following are detailed explanations for parameters used to
version & name
name are used as delimiters to identify the project. The
name must consist only of lowercase letters, numbers, '-' and '.', the maximum length is 253 characters.
The blockchain part is an area that describes the platform and network name of the blockchain in which the smart contract to e subscribed is deployed.
The blockchain platform you want to use.
We support now
The blockchain network you want to use.
We support now below chains.
Minimum confirmation thresohld which you want to received.
Caution : when receiving data, we wait for a threshold of block confirmation.
The filters part is about information for the smart contracts you want to subscribe through Henesis.
You can subscribe to more than one contract.
An address of the deployed smart contract
A name of the contract filter
A file path of the smart contract source code
A name of the contract to subscribe in the source code
A solidity compiler version. Must be identical to the compiler version at the time of deployment.
The provider is where you choose how to receive events from Henesis. We support
WebSocket doesn't need any settings like url, method, headers.
URL which you want to hook
HTTP method like a
If you want to set authorization (like a
JWT), you can set authorization
We also support tutorial.