AIOZ DePIN
DePIN App
CLI

AIOZ DePIN CLI

Official DePIN CLI implementation of the AIOZ Network.

What is AIOZ DePIN CLI?

AIOZ DePIN CLI is a command-line appilcation that connects your machine to the AIOZ DePIN network, contribute storage, bandwidth, and compute, and be rewarded in AIOZ tokens for that contribution.

Requirements

  • Windows 10 version 22H2 64-bit or above
  • Ubuntu 14.04 64-bit or above
  • macOS Catalina version 10.15 or above

Getting started

Windows

Download and extract the latest AIOZ DePIN CLI. The scripts below are written for Windows PowerShell.

curl.exe -LO https://github.com/AIOZNetwork/aioz-depin-cli/releases/download/v1.2.6/aioz-depin-windows-amd64-1.2.6.zip
Expand-Archive -Path aioz-depin-windows-amd64-1.2.6.zip -DestinationPath .
ren aioz-depin-cli-windows-amd64.exe aioz-depin-cli.exe

Verify the installation

.\aioz-depin-cli.exe version

The output should be the version of AIOZ DePIN CLI.

Generate a new mnemonic phrase and private key

.\aioz-depin-cli.exe keytool new --save-priv-key privkey.json

--save-priv-key writes the private key to file

Response

{
  "address": "aioz1k28nzwgrwgzrwfuwsfcqjyvd0r4lfprql2c4uf",
  "address_hex": "0xB28F313903720437278E827009118d78eBf48460",
  "pub_key": "{\"@type\":\"/ethermint.crypto.v1.ethsecp256k1.PubKey\",\"key\":\"AxSwg94OuvFIn...CqFunK3pMjV0I\"}",
  "priv_key": "{\"@type\":\"/ethermint.crypto.v1.ethsecp256k1.PrivKey\",\"key\":\"rdWGOtJ/Uio4SD...BCCOfegAI9OGMIbE=\"}",
  "mnemonic": "rain wing olive skate effort present long myself combine ... glide absent spider effort attitude enemy mouse"
}

Run the node

.\aioz-depin-cli.exe start --home depin-data --priv-key-file privkey.json

--home data folder of the node

--priv-key-file the private key file which the node starts with. If you do not specify the private key file, the node will ask for it from the standard input stream.

--auto-update enables automatic self-updating while the DePIN is running.
When enabled, the application periodically checks for new releases and applies updates without requiring a restart. (This feature is experimental and may not be fully stable. It is recommended for testing environments only)

Note: Because AIOZ DePIN CLI automatically updates itself by downloading and replacing the executable file, make sure to set file permission to writable. AIOZ DePIN CLI has to stop to perform auto update, it should be run as Windows Service to start again after update and at system boot.

IMPORTANT NOTE

  • Treat your priv_key JSON and mnemonic phrase as wallet secrets. Anyone who has them can control your node rewards.
  • Use a dedicated key for each node; do not reuse the key from your main wallet, exchange account, or other nodes.
  • Store backups in an offline, encrypted location such as encrypted USB drives, air-gapped devices, or hardware security modules (HSM).
  • Never paste your mnemonic or priv_key into websites, chats, or support tickets.

macOS and Linux

Download the latest AIOZ DePIN CLI

For macOS - ARM64

curl -LO https://github.com/AIOZNetwork/aioz-depin-cli/releases/download/v1.2.6/aioz-depin-darwin-arm64-1.2.6.tar.gz
tar -xzf aioz-depin-darwin-arm64-1.2.6.tar.gz
mv aioz-depin-cli-darwin-arm64 aioz-depin-cli

For macOS - x86_64

curl -LO https://github.com/AIOZNetwork/aioz-depin-cli/releases/download/v1.2.6/aioz-depin-darwin-x86_64-1.2.6.tar.gz
tar -xzf aioz-depin-darwin-x86_64-1.2.6.tar.gz
mv aioz-depin-cli-darwin-amd64 aioz-depin-cli

For Linux

curl -LO https://github.com/AIOZNetwork/aioz-depin-cli/releases/download/v1.2.6/aioz-depin-linux-amd64-1.2.6.tar.gz
tar -xzf aioz-depin-linux-amd64-1.2.6.tar.gz
mv aioz-depin-cli-linux-amd64 aioz-depin-cli

Verify the installation

./aioz-depin-cli version

The output should be the version of AIOZ DePIN CLI.

Generate a new mnemonic phrase and private key

./aioz-depin-cli keytool new --save-priv-key privkey.json

--save-priv-key writes the private key to file

Response

{
  "address": "aioz1k28nzwgrwgzrwfuwsfcqjyvd0r4lfprql2c4uf",
  "address_hex": "0xB28F313903720437278E827009118d78eBf48460",
  "pub_key": "{\"@type\":\"/ethermint.crypto.v1.ethsecp256k1.PubKey\",\"key\":\"AxSwg94OuvFIn...CqFunK3pMjV0I\"}",
  "priv_key": "{\"@type\":\"/ethermint.crypto.v1.ethsecp256k1.PrivKey\",\"key\":\"rdWGOtJ/Uio4SD...BCCOfegAI9OGMIbE=\"}",
  "mnemonic": "rain wing olive skate effort present long myself combine ... glide absent spider effort attitude enemy mouse"
}

IMPORTANT NOTE

  • Treat your priv_key JSON and mnemonic phrase as wallet secrets. Anyone who has them can control your node rewards.
  • Use a dedicated key for each node; do not reuse the key from your main wallet, exchange account, or other nodes.
  • Store backups in an offline, encrypted location such as encrypted USB drives, air-gapped devices, or hardware security modules (HSM).
  • Never paste your mnemonic or priv_key into websites, chats, or support tickets.

Run the node

./aioz-depin-cli start --home depin-data --priv-key-file privkey.json

--home data folder of the node

--priv-key-file the private key file which the node starts with. If you do not specify the private key file, the node will ask for it from the standard input stream.

--auto-update enables automatic self-updating while the DePIN is running.
When enabled, the application periodically checks for new releases and applies updates without requiring a restart. (This feature is experimental and may not be fully stable. It is recommended for testing environments only)

Usage

View node status

For Windows

.\aioz-depin-cli.exe stats

For macOS and Linux

./aioz-depin-cli stats

Response

{
  "storage": {
    "total_count": 4864,
    "total_size": 149967615893
  },
  "delivery": {
    "upstream_speed": 0
  },
  "transcoding": {
    "status": "Standby"
  },
  "ai_task": ["task_id","task_id"],
  "ai_status": "online"
}

Set storage limit

For Windows

.\aioz-depin-cli.exe limit 1000 --priv-key-file privkey.json

For macOS and Linux

./aioz-depin-cli limit 1000 --priv-key-file privkey.json

Note: This command allow you to adjust the total storage limit in GB. (You can not set storage limit lower the storage size that has already been used)

View reward

For Windows

.\aioz-depin-cli.exe reward balance --priv-key-file privkey.json

For macOS and Linux

./aioz-depin-cli reward balance --priv-key-file privkey.json

Response

{
  "balance": [
    {
      "denom": "attoaioz",
      "amount": "7761729917265715262"
    }
  ],
  "storage_earned": [
    {
      "denom": "attoaioz",
      "amount": "810423534750216148"
    }
  ],
  "delivery_earned": [
    {
      "denom": "attoaioz",
      "amount": "7525653191257749557"
    }
  ],
  "transcoding_earned": [
    {
      "denom": "attoaioz",
      "amount": "525653191257749557"
    }
  ],
  "withdraw": [
    {
      "denom": "attoaioz",
      "amount": "1100000000000000000"
    }
  ],
  "delivery_counter": 16521,
  "ai_earned": {
    "denom": "attoaioz",
    "amount": "800000000000000000"
  },
  "ai_earned_counter": 42
}

balance is the amount of reward that is available for withdrawal.

storage_earned, delivery_earned, transcoding_earned, ai_earned are the total amount of reward for storage, delivery, transcode and AI tasks since the beginning.

withdraw is the total amount of reward that has been withdrawn since the beginning.

delivery_counter is the counter that counts the number of delivery since the beginning. ai_earned_counter is the counter that counts the number of AI tasks since the beginning.

Withdraw reward

For Windows

.\aioz-depin-cli.exe reward withdraw --address 0x9A20600a143745404f1AA1C69Bd280f4bD5B4408 --amount 1aioz --priv-key-file privkey.json

For macOS and Linux

./aioz-depin-cli reward withdraw --address 0x9A20600a143745404f1AA1C69Bd280f4bD5B4408 --amount 1aioz --priv-key-file privkey.json

This command requires a running node. If your node is not on default port 1317, you need to specify it with the flag --endpoint.

--address the address to withdraw the reward to. The reward is transferred on the AIOZ Chain.

--amount the amount of reward to withdraw. The unit can be aioz or attoaioz. 1 AIOZ equals 10¹⁸ attoaioz. Minimum withdrawal is 1 AIOZ. Example values: 1aioz, 1.1aioz, 1100000000000000000attoaioz.

--priv-key-file the private key file that the node started with. If you do not specify the private key file, the node will ask for it from the standard input stream.

Response

{
  "txid": "2604F553B62B70136967811B14BA8DB5706A2FA86EF7FD1A6899ECB3EF944D59"
}

Note: Withdrawal requests are rate-limited to one request per hour. Please plan your withdrawals accordingly.

Recover private key from mnemonic phrase

For Windows

.\aioz-depin-cli.exe keytool recover "rain wing olive skate effort present long myself combine ... glide absent spider effort attitude enemy mouse" --save-priv-key privkey.json

For macOS and Linux

./aioz-depin-cli keytool recover "rain wing olive skate effort present long myself combine ... glide absent spider effort attitude enemy mouse" --save-priv-key privkey.json

--save-priv-key writes the private key to file.

Response

{
  "address": "aioz1k28nzwgrwgzrwfuwsfcqjyvd0r4lfprql2c4uf",
  "address_hex": "0xB28F313903720437278E827009118d78eBf48460",
  "pub_key": "{\"@type\":\"/ethermint.crypto.v1.ethsecp256k1.PubKey\",\"key\":\"AxSwg94OuvFIn...CqFunK3pMjV0I\"}",
  "priv_key": "{\"@type\":\"/ethermint.crypto.v1.ethsecp256k1.PrivKey\",\"key\":\"rdWGOtJ/Uio4SD...BCCOfegAI9OGMIbE=\"}"
}