How To Mint A Token on the SafeCoin Network
These instructions will help you to set up a token on the SafeCoin Network. If you already have the SafeCoin Client running, you will need to create two new wallet.json files, “Token-Wallet” and “Mint-Authority”.
Part 1 – VPS Set Up & Log In
*For At-Home Set Up, skip to Part 2.
Ubuntu 20.04 is recommended.
Choose your VPS provider. Once you have your VPS installed, we will now SSH in and begin to build.
Download Putty (or any other SSH program) to log into your VPS.
Once we have Putty downloaded, open the program. You will see a screen like this:
Copy the IP Address of your VPS, and Paste into “Host Name (or IP address), then click Open. This will open a Terminal connected to your VPS. You may get a security alert due to this being the first time logging into your newly created VPS.
Once connected, use the log in credentials from your VPS provider.
Username – root
Password – xxxxxxxxxxxx
Part 2 – VPS Configuration
Next we will create a new user with the following command, replacing <username> with a username of your choice:
You will be prompted for a password. Enter and confirm using a new password (different to your root password) and store it in a safe place. You will also see prompts for user information, but this can be left blank. Once the user has been created, we will add them to the sudo group so they can perform commands as root. Replace <username> with your chosen username.
Now, while still as root, we will update the system from the Ubuntu package repository:
Part 3 – Dependencies and SafeCoin Files
Open Putty again, and SSH into the VPS. This time log in with your username and password you created in Part 2.
Download all dependencies and programs we will need.
We are now ready to start building the SafeCoin Program.
First, lets download the necessary files from the SafeCoin GitHub.
Next, lets move into the SAFE directory.
Now in SAFE, lets compile the SafeCoin Program. This may take 5-45 mins, depending on your machine.
Once finished, lets download a few more files.
Now let’s back out of the SAFE directory.
Part 4 – Wallet Files and Seed Backup
Now we will build our ledger.
In the next few steps, we will be creating our wallet address. Open a text file (or somewhere to save seed words).
Save your PubKey and your 24 Seed Words for your token-wallet.
Save your PubKey and your 24 Seed Words for your mint-authority.
Next, we will set the configuration for the SafeCoin Program.
Now it is time to add SAFE to your Token Wallet with the funding to create a token. Let’s create a SafeCoin address from our already created wallets.
Copy the SafeCoin address, and send 1 SAFE to it. The transaction should confirm in a few seconds.
Use this command to check the SafeCoin balance on your Token Wallet.
Part 5 – Building the SafeCoin Program Library
Make sure you are in your Home directory, and git clone the SafeCoin Program Library.
Next, lets move into the SafeCoin-Program-Library directory.
Now in Safecoin-Program-Library, lets compile the Token Program. This may take 5-10 mins, depending on your machine.
Once built, you can see all available commands available.
Part 6 – Building a Token
Now lets create a Token Account where we will hold the minted tokens.
Time to mint some Tokens!
If successful, it will return Amount Minted, Token Address, Recipient Address, and a Signature.