This is a simple demo to show how to create a token on the Nexus Tritium Testnet. I can assure you anyone can do this and it’s not hard to learn.

In this demo i will show you how to : Create a signature chain account, create a token, create a token address to receive those tokens, how to send tokens to that newly created address, how to view token and account information.

First you will need to download the alpha wallet from the Nexus github https://github.com/Nexusoft/NexusInterface/releases/tag/v2.0.0-alpha.2

Keep an eye out for updates to the wallet during the testnet phase!

Once you have installed the wallet you can login by creating a new user. You will be greeted with the login page and you can click on “Create new user”.

Enter a username, password and pin (password must be at least 8 characters and pin must be at least 4 digits)

Now you have your very own signature chain account. This means you do not need a wallet.dat file as your login details are correlated to your genesis (beginning) of your signature chain. Every transaction that occurs on your account creates a chain of signatures which all stem from your genesis and is accessed by your login details. Pretty cool huh!?

This also means you can log into your account from anywhere at anytime as its all stored on the blockchain.

You can see the wallet is logged in as john….

You will need some Nexus testnet coins to play around with! join the Nexus Slack if you havn’t already, and then join the #tritium-testnet channel. You only need to give your new username to receive payments so no need to copy and paste lengthy address text anymore!

Now lets click on console which i have circled in green…

You should see this tab pop up…

That “?” button holds all the information for the API commands. If you ever need more instructions on how to API on Nexus just click on there. Alternatively you can go straight to the github source and view the documents online here:

https://github.com/Nexusoft/LLL-TAO/tree/merging/docs/API

This holds all the same information and sometimes its easier to have this up in the browser while using the console side by side. For reference when you click on the “?” this is what you will see…

Click on “Tokens” while your here, and scroll down to where it says “create/token”…..

To access the “create/token” function all you need to do is type in the console “tokens/create/token” circled in green. The “Parameters” (unlined in red) show what inputs are needed to fulfill the create/token function. Lets just go over them real quick

pin : This allows access for your signature chain to perform the necessary task such as create a token. Its the same pin as when you created your account on the login page.

sessions : This is optional if you are running multiple users at one time on your account. Since we are not we can leave this one out

name : This is the name of the token you would like to create.

supply : This is the amount of tokens that will exist once created. The higher the supply the higher the network fee. I recommend creating between 100 to 10000 tokens while using the testnet.

decimals : This is optional but also adds to the fees when creating tokens as it makes them more divisible. For now we will leave it out as well.

So the parameters we are going to enter are pin, name and supply. So lets get to it!

When entering in the API command all you need to do is leave a “space” separating each parameter. We always start with calling the API we want to use. In this case its the “tokens” API and the “create/token” function. Just type:

tokens/create/token

space

pin=1234 (or whatever your login signature chain pin is when you created your account)

space

name=enter your token name here (i have put “token” you can put whatever you like)

space

supply=10000 (or your choice of supply)

then press enter

Congrats you have just created your very own token. Now you can start your own ICO! :D

The output shows the transaction ID (txid) and also the address where the tokens are held.

All the other API functions work the same as this one in terms of method. You access the API you want (token), pick a function (create/token), then you enter the parameters required (pin, name, supply), and you get an output. Simple right?

Lets do a few more things to wrap this up.

Setting up a token account:

tokens/create/account

space

pin=1234 (your pin)

space

name= token-account

(this is the name of the account you want to store the token. It can be whatever you like. Optional you can leave this part out and just receive an address that can be used to accept the payments of that token)

space

token_name=john:token

(this is where you identify the token that you want to create the account for. The same as you cannot send NXS to a BTC account we need to create a specific account to send the tokens to. Since the token was created by username john then it will be correlated to that username on the blockchain.

The sequence is username:token_name and can be referenced in the API documents as well if you scroll down to create/account function in the token API.

Alternatively you can create a token on a global name that does not require it to be part of a username which can be part of another tutorial)

press enter

The output has given a transaction id (txid) and an address

Now we can send to this account by typing the following

tokens/debit/token

space

pin=1234 (yourpin)

space

name=john:token (enter your username and the token name you created)

space

name_to=john:token-account (enter your username and token account name you created. Alternatively you can put address_to= and paste the raw address instead of the username:token account name)

space

amount=5000 (enter the amount you want to send)

press enter

The transaction has been broadcasted to the network and has received a transaction id (txid)

Lets check the blockchain to see what is happening with the token. First we will look at information about the token.

tokens/get/token

space

name=john:token (your username and your token name)

enter

The results show the details about the token. It shows the creator of the token as owner: and followed by a signature of that persons account. It shows the max supply when created was 10000 and current supply is 5000. This is because when they were created they are held in the creation account and not in circulation. Once the tokens are sent to an addresses they go into the current supply which is now 5000.

we can also see information about token accounts by the following

tokens/get/account

space

name=john:token-account (your username and your token account name)

enter

We can now see information about the account john:token-account and you can see the current balance is 5000 from when the tokens were sent from the address that created the token.

Lets do another debit. Add spaces between your parameters.

tokens/debit/token

pin=1234

name=john:token

name_to=john:token:account

amount=1000

enter

returns another txid that can be checked on the blockchain. Now lets check token information again…

tokens/get/token

name=john:token

enter

results now show there is an extra 1000 tokens in the currentsupply and the balance is now at 4000 left in the token creation account. maxsupply is still 10000.

You can also check your accounts and see where the tokens have transferred

I hope you got through all of that and learned something new. There are many more tools in the Nexus API to explore and there are too many to list but some included creating assets, creating supply chain items, creating namespaces and global names, tokenizing assets for split dividend payments (STOs) and much more. So feel free to explore and if you get stuck you can always jump on the slack #tritium-testnet channel and ask one of the team.

Cheers