The Hypercycle Manager Mode is designed to enhance interaction and utilization within the Hypercycle ecosystem. It enables two key functionalities:
- License Delegation - A license owner can delegate usage rights to a third party.
- Node Assignment - A Hypercycle Node owner can allow another user to assign their license to the node.
This model fosters greater ecosystem activity by facilitating collaboration between hardware and license owners:
- If a user owns a Hypercycle Node (hardware) but lacks a license, they can obtain one from another party.
- If a user has a License (or ANFE) but lacks the hardware to run a node, they can assign it to someone else's node.
- Additionally, license owners who prefer not to manage node assignments can delegate control to a trusted user.
This script simplifies the process of assigning a License/ANFE to a known Hypercycle Node, streamlining management for both node and license owners.
It is recommended to use a virtual environment to manage dependencies for this project. A virtual environment ensures isolation and avoids conflicts with global Python packages. You will need Python installed to create and run the environment.
You can use one of the following Python modules to create a virtual environment:
python -m venv .venvpython -m virtualenv .venvBoth commands create a virtual environment in a folder named .venv. While the folder can have a different name, .venv is a widely accepted convention.
To activate the virtual environment:
source .venv/bin/activateNOTE: If you used a folder name other than .venv, adjust the path accordingly.
To ensure you are using the correct virtual environment, run the following command:
which pythonThe output should point to this project's virtual environment, for example:
/home/user/projects/manager-mode-script/.venv/bin/pythonUpgrading pip before installing packages can prevent potential errors:
python -m pip install --upgrade pipNOTE: This will only upgrade pip within the virtual environment.
Once the virtual environment is activated, install the required dependencies from requirements.txt:
pip install -r requirements.txtAfter completing these steps, the environment is ready to run the script
This script facilitates the assignment of a License/ANFE to a Hypercycle Node in Manager Mode.
| Argument | Required | Description |
|---|---|---|
--license-anfe |
Yes | License or ANFE to assign. |
--node-url |
Yes | Hypercycle Node's HTTP endpoint. |
--private-key |
Yes | 0x-prefixed hex private key of the license owner or delegated account. |
--testnet |
No | Flag to indicate testnet usage (omit for mainnet). |
python script.py \
--license-anfe 4649559795958260 \
--node-url http://hypercycle-node.example:8080 \
--private-key 0x1a2b3c...privatekeypython script.py \
--license-anfe 1125968626330429 \
--node-url http://testnet-node.example:8080 \
--private-key 0x4d5e6f...privatekey \
--testnet- Ensure the provided private key has permissions to manage the License/ANFE.
- The node URL must be accessible and correctly configured.
- Use
--testnetonly for testnet environments; omit for mainnet.