> Setup
Preparation
There is minimal preparation needed to utilize TezPay, assuming that you have a functioning public baker running.
Preparation Summary
- Create a directory (folder) on your desktop (or appropriate location) to store the application files and required config files
- Download the Tezpay software, sample configuration, and payout wallet files from github
- Create a ‘pay-out’ wallet and store the private key (not baker or hot wallet)
Preparation: Step 1 Create TezPay Directory
Create a new folder on the desktop or in a location that you want to store the necessary files for Tezpay.
This folder will eventually contain 3 files:
- TezPay Application File
- Configuration File
- Private-Key File
The TezPay Application File will execute the commands that will run TezPay, the Configuration File will essentially tell the application file how to run and will be edited by the baker (we will cover this later), and the Private-Key File will contain the private key for a wallet you have designated to pay your delegators (we will explain an easy way to get this later as well). A note on the Private-key file - it is not recommended to use an existing wallet that may house important assets (including NFT’s or crypto tokens) but to create a new wallet that contains only enough Tezos to pay out delegates.
Preparation: Step 2 Download Files
Download the software from Github using the link: https://github.com/alis-is/tezpay/releases. In this repository, select the correct operating system and system architecture (arm64 or amd64). For this example we will be using arm64
Note: If you do not know the system architecture you can find out by
opening a Terminal and executing the command uname -m
, and this will
return the system architecturearm64
or amd64
.
The example below displays arm64
If you would rather utilize CLI to download the application you will need
to change directory (cd) to the TezPay directory created in step 1 in
the terminal, then use command wget -q https://raw.githubusercontent.com/alis-is/tezpay/main/install.sh -O /tmp/install.sh && sh /tmp/install.sh
See example code below (note: input begins after last ‘%’ character):
The above example is an alternative to downloading from the GitHub repository
Next, you will download the sample configuration file & payout_wallet_private.sample.key file from : https://github.com/alis-is/tezpay/blob/main/docs/configuration/ - or you can open file in GitHub and copy text to a text editor.
Note, there are two choices for the configuration files:
- Simple Config file : config.default.hjson (basic arguments to run Tezpay)
- Full Config: config.sample.hjson (advanced arguements to run Tezpay)
Preparation: Step 3 - Payout Wallet (optional)
Lastly, you will need to download the create a new wallet and retrieve the private key. We will be using the Temple Wallet extension to create a new wallet and to get the private key. If you already have a payout wallet, or know how, skip this section.
- First, open Temple Wallet and select the icon in upper right
- Next, select ’new account’, and input a new (ie Tezpay1)
- Then, click the icon in the upper right again
- Then, go to Settings
- Then, go to Reveal Private Key
- Then, you will be prompt to input your password for the account
Your private key will be displayed here:
Setup
The next section will review the setup needed for Tezpay. We will review the Configuration File and Payout Wallet files. In this section we will review:
- Configuration File (simple)
- Configuration File (advanced)
- Private-Key File
Setup: Step 1a: Configuration File (simple)
This section will review how to setup the configuration file (simple-version) to be used by the TezPay application.
*Note: must have file name config.hjson, case-sensitive *
If you’ve used json before but now hjson, you can read more about it here: https://hjson.github.io/
Yellow is areas you will input data/edit fields
Blue are comments about Configuration File objects
- Paste your Baker wallet in between the quotes
- Set your Baker fee (ie 0.05 = 5% fee)
- Input minimum payout for delegators (ie. 1 = 1 XTZ)
- This section allows you to split payments for baking (Bonds) and fees from delegators (Fees) if you want - input Baker wallet address and percentage to split. This example does not split, where 1=100% to baker wallet.
- This section refers to network parameters to fetch information about the baker in order to compile rewards and payouts - Do not edit unless you are an experienced user
- Over delegation projection prohibits you from over paying beyond your delegation limit - Do not edit unless you are an experience user
This is as basic configuration file for running the TezPay application. The next section will review the advanced configuration file, giving more options and customization to the TezPay application. A user may splice sections from the advanced file to the simple to build a custom file as well - but should be done by experienced users.
Setup: Step 1b: Configuration File (advanced)
This section will review how to setup the configuration file (advanced-version) to be used by the TezPay application.
*Note: must have file name config.hjson, case-sensitive *
Yellow is areas you will input data/edit fields Blue are comments about Configuration File objects
The example below is a more advanced configuration file that showcases several of the features that can be used to customize the TezPay application. To get a simple configuration file, you can remove the sections that are not needed. Here is a sample configuration that will work for 90% of bakers: (TezPay Starter Configuration)[https://docs.tez.capital/tezpay/configuration/examples/starter/]
- Paste your Baker wallet in between the quotes
- Set your Baker fee (ie 5% = 0.05)
- Input minimum payout for delegators (ie. 1 = 1 XTZ)
- Input minimum staking balance for delegators
- Input delegators wallets that you wish to ignore completely (not often used)
- Overrides: These will override global settings for delegators - you
may delete/remove specific fields where you want to ignore
- Input wallet address for specific delegator you wish to apply overrides for
- Input a delegator-specific custom fee (ie 0.5% = 0.005)
- Input either true or false where true removes the fee from delegator, and false applies the fee specified in the line above
- Input minimum balance override for specified wallet\
- If you wish to add multiple wallets for over rides, add another
wallet following same format keeping the
{ }
to contain the wallet attribute as shown.
- This section allows you to split payments for baking (Bonds), input wallet address and percentage to allocate (see example above for structure of more than 1 wallet. 100%=1.00
- This section allows you to split payments for fees collected (Fees), input wallet address and percentage to allocate (see example above for structure of more than 1 wallet. 100%=1.00
- Donations refer to donating a specific amount of XTZ to wallets
every payout
- Input a donation amount in donate field as a percentage (ie 2.5% = 0.025)
- Input wallets that you wish to donate to and percentage for each (ie 100% = 1.0)
- This section refers to network parameters to fetch information about the baker in order to compile rewards and payouts Do not edit unless you are an experienced user
- Over delegation projection prohibits you from over paying beyond your delegation limit Do not edit unless you are an experience user
- This section allows for automatic notifications/messages to be sent to specific platforms in order to broadcast messages (ie ‘Bakery has paid 100XTZ in rewards for latest cycle’ We will cover this in a separate section see appendix X and platforms supported are Twitter, Discord, and E-mail
Setup: Step 2: Private-Key File
The Private Key file is used to sign the transaction(s) that will payout the rewards. From a security perspective, it is recommended NOT to use the Baker private key due to security concerns with the private key being displayed in plain-text in a file. This section will use the new account and private-key that was acquired in Step 3 - Payout Wallet.
- Retrieve the private-key of the wallet you wish to use from the payout wallet of your choice
- Paste into a text file (or replace the example that was downloaded from the GitHub repository
- Save the file with exact file name and extension payout_wallet_private.key - note: the .key is required in this instance (see below)
Setup: Summary
At this point there should be 3 files in the directory tezpay. These three files will be used to run the application and payouts.
Any questions/comments/concerns? Please contact the Tez Capital team on Discord or Telegram