CLI: Install Privatix Agent Node

Prepare a virtual machine

Minimum system requirements:
    2GB of RAM
    2 vCPU
    OS: Ubuntu 18.04 LTS

Install Privatix Agent on a virtual machine

Unpack a deb-package

    1.
    Go to the Privatix's releases page: https://github.com/Privatix/privatix/releases
    2.
    Choose the latest release (in this example the latest release is 1.0.1)
    3.
    Execute the following script
1
wget https://github.com/Privatix/privatix/releases/download/1.0.1/privatix_ubuntu_x64_1.0.1_cli.deb &&
2
sudo dpkg -i privatix_ubuntu_x64_1.0.1_cli.deb
Copied!
This script will download and unpack the Privatix Network installer to the /opt/privatix_installer folder.

Install the application

To install the application, execute the following script:
1
cd /opt/privatix_installer
2
./install.sh
3
4
sudo apt-get install python
5
./cli/install_dependencies.sh
Copied!

Create an offering

After the application has been installed, you can create an offering:

Create an account

1
export DAPP_PASSWORD=your_password
2
3
cd /opt/privatix_installer/cli &&
4
python create_account.py
Copied!

Save your account backup

Backup location: /opt/privatix_installer/autooffer/mainnet/private_key.json
You can use the following script to download the backup:
1
scp [email protected]:/opt/privatix_installer/autooffer/mainnet/private_key.json ~
Copied!

Transfer to your account ETH and PRIX

Check that funds have been delivered:
1
python update_balance.py
2
python get_accounts.py
Copied!

Transfer all PRIX from the Account to the Marketplace

1
python transfer_all_to_marketplace.py
Copied!
Ensure that PRIX has been transferred to the Marketplace (usually it takes 5-10 min):
1
python get_transactions.py
2
python get_accounts.py
Copied!

Prepare the offering

1
nano ./offering.json
Copied!

Publish the offering

1
python publish_offering.py ./offering.json
Copied!
Ensure that the offering has been published (usually it takes 5-10 min):
1
python get_offerings.py
Copied!
Output example (expected status: registered):
1
Get agent offerings (product_id: 9234b192-e291-4116-a7d5-3c449c15167a, status: ['empty', 'registering', 'registered', 'popping_up', 'popped_up', 'removing', 'removed'], offset: 0, limit: 100)
2
Ok: <Response [200]>
3
--------------------------------------------------------------------------------
4
5
name:
6
Hash: 0xda414c689c40b2369840d63755a0b2120252e4a8681851d0398e295c3cd64001
7
Status: registered
8
Supply: 30
9
Current supply: 30
10
Id: 96a65e42-9828-40f6-b1b9-52cc0424896b
Copied!
More information about the offer publication at https://github.com/Privatix/dappctrl/tree/release/1.0.1/scripts/cli

In case of an error

In case of errors, you can see errors output by executing the following command:
1
python get_errors.py 60
Copied!
Where 60 means "Give me all the errors in the last 60 minutes".

Get your earnings

Transfer all tokens from the Marketplace to the Account
1
export DAPP_PASSWORD=your_password
2
3
cd /opt/privatix_installer/cli &&
4
python transfer_all_to_account.py
Copied!
Wait about 10-15 min and make sure the tokens have been transferred:
1
python get_transactions.py
2
python check_account.py
Copied!
Restore your account in any Ethereum wallet (eg MyEtherWallet or Metamask)

How to remove the application

Make sure you have a backup or you have already withdrawn all funds.
To remove the application, execute the following script:
1
cd /opt/privatix_installer &&
2
./remove.sh &&
3
sudo apt-get remove privatix
Copied!
Last modified 2yr ago