How To Perform Transaction Using Stratis Cirrus Core Private Net Wallet

Background of Blockchain Development on Stratis Platform

A blockchain offers different protocol networks so the development of blockchain and its transactions do not interfere with live transactions. These networks are used to develop, test, and deploy your smart contracts and other transactions. A typical blockchain implements three common types of networks – private net, testnet, and mainnet.

Private Net

A Private Net or privatenet or private network is a network that is not connected to public networks, testnet, and mainnet.

A private net is used for development and other limited purposes only and runs on a user’s machine or on a local network. This creates a simulation of blockchain where multiple local nodes can interact and see transactions stored on the blockchain.

A blockchain can have many private networks. Each individual developer or a group of developers can create their own private network or networks.

Testnet

A testnet is a testing network protocol that developers used to deploy their transactions or smart contracts to be tested by the public. Many protocol enthusiasts and developers participate in testing on testnets. You can think of testnets as staging servers in traditional software development infrastructure.

Once the project is tested on a testnet, then it is moved to the mainnet. Most testnets use a proof-of-authority consensus mechanism. That means only a smaller and selected number of nodes are chosen to validate transactions.

On the Stratis blockchain, all master nodes that use a proof-of-authority (PoA) consensus mechanism can participate in testnet validation and approval process.

Mainnet

Mainnet is the primary public network that is where all true transactions and smart contracts are stored on a blockchain. The Mainnet is run by several nodes that manage a write-only distributed ledger. On Mainnet, there is a fee for executing transactions and smart contracts. On Stratis blockchain that runs on a proof-of-stake (PoS) consensus mechanism for transaction validation, all nodes that participate in staking are involved in the validation process. If you are new to blockchain, you can start from here: what is Blockchain.

What is Cirrus Core Private Net Wallet?

Cirrus Core Private Net wallet runs with an instance of the Stratis Full Node; ‘Stratis.CirrusMinerD’ project in devmode=miner. It provides a graphical user interface for developers to get familiar with cirrus wallet and provides simplicity for development.

This wallet is designed to launch the node for a local development environment to deploy, call the contract, and ease of use for developers to build the solutions without external interference. This wallet is a private instance of the Cirrus Wallet.

In this article we will learn the following things:

  • Installing Cirrus Core Private Net Wallet
  • Getting Familiar with the Wallet
  • Creating a new Wallet
  • Perform Transaction using Cirrus Core private Net wallet

Downloading and Installing Cirrus Core Private Net Wallet

You can download the Cirrus Core Wallet from the Cirrus repository which is available for all major operating systems. Download it according to your System and install it. Installation is just a simple click. You can download the wallet from the official Stratis.

Double-click on the installation file.

Click on the License agreement as shown below.

Then Click on Install.

Installation may take a few minutes.

Once installation is completed you can open the wallet.

Get Familiar with Cirrus Core Private Net Wallet

Open the wallet from the shortcut created on the desktop.

Click on allow access if you get the below message: Firewall has blocked some features.

Then, Wallet will ask you for the wallet name and password. Select the wallet name: cirrusdev and provide the password:password and click on Decrypt as illustrated in the picture below.

Once you decrypt the wallet, you will see an address list containing 20 addresses. Select the first address, i.e. Address[0], and click Use Address.

Then, it will be loaded with a dashboard reflecting the balance of 100000000 TCRS. TCRS is a test CRS token (coins) that you can use for development and testing. Cirrus Core wallet’s token is known as TCR. This wallet runs on a Cirrus chain that is called a side chain and is used to deploy and interact with the contract. The side chain is the supporting chain for the main chain. It runs parallel to the main chain.

In addition to the GUI interface, you might have noticed DevTools on the right-hand side. DevTools provides you insights into what calls are being made to the respective API endpoint when using the Cirrus Core Wallet. Simply, you can inspect and check the API call through it.

Creating New Wallet

Open Wallet from the desktop shortcut and click on Create or restore option.

You will get an option to Restore or Create as depicted below. Here we are going to Create a new wallet so click on Create Button as depicted below.

Then provide the Name, Password, and password Phrase and click on Create a new wallet as depicted below.

After that, you will get 12 secrete words (mnemonic). Copy these words and keep them in a safe place. Mnemonic is needed in case you need to restore the wallet to another device in the future. As this is in a private network and this wallet is for development and testing purposes, keeping the secret words in a safe place is not much important; however, this is very important when you create a wallet in the main net.

The next step is to confirm that you have kept the mnemonic safely, provide the secret words and click on Confirm.

The wallet will be created, and you will get a message as shown below.

Then you can log in to the wallet using your new Wallet name and password. In the below image you can see the newly created wallet in the dropdown.

Obtain the Address of the New Wallet

Login to the wallet using a new wallet name and password.

In this demo, we have created a wallet with the name: Test1

As this wallet is a newly created wallet here you can see there is 0 balance in all the addresses. Select the address first from the list and click on the Use Address option.

Click on the Receive button as depicted below. This will give you the receiving address of this wallet.

Then copy the address and keep it somewhere. This is the address where you will send a transaction from the default wallet with the wallet name cirrusdev where you have TCRS available.

In this example copied address is: “PUe7fmEGMk1PsquB7HTVryMPkiS2GcFsuf”

Performing Transaction

Now, we will perform a Transaction from the default wallet: cirrusdev to the newly created wallet: Test1.

Login to the Wallet using wallet name:cirrusdev and password:password. Select Address[0] and click on Use Address.

Then, click on Send button as shown below.

You will then see the below screen where you need to select Sidechain and provide the destination address (the address where you want to send the TCRS), amount, and password of wallet and click Send as illustrated below.

Note: The mainchain option is for transferring the CRS to the mainchain network. As we are performing the transaction in Private Network and Cirrus chain, we will select Sidechain. A Cirrus chain is known as a sidechain. It is used to deploy, interact with the Smart contract, and support the main chain.

Then, you will get the below message.

Close the above message. Then you can see the sent amount will be deducted from the current wallet address.

The next step is to check whether the sent amount is received by the destination address.

Verify Balance in Receiver Wallet

Log out from this wallet.

Then login with a wallet where you have sent the TCRS (here, my case wallet name: Test1)

You can see in Address[0] the sent amount is available. This is the address where we have sent the amount.

Click on Use Address, then you can see the amount in the dashboard with the latest transaction history.

Cheers!!

Hence, we have performed the transaction using Cirrus Core Privat Net Wallet.

Other Features of Private Net Wallet

Address Switching

When we are developing, testing, or interacting in blockchain, at some point we may need a different address. So, you can get different addresses without opening Swagger using Wallet itself.

To switch and get another address from Cirrus Core Wallet. Go to the wallet name in the top right corner as depicted below image.

Then you will be redirected to the Address Selection screen as shown below. Where you can select any address from the address list and click on the copy as highlighted below and keep this address somewhere in notepad or wherever you want. This address, you can use for testing and development.

Summary

In this article, we learned the difference between private net, testnet, and mainnet and various networks available on Stratis blockchain. We also learned how to set up a Stratis private net using the Cirrus Core Private Net wallet, which is a private network for blockchain development on a local machine as well as performed transactions.

In the next article series, we will perform a transaction using Stratis Full node APIs with Swagger and also deploy and interact with Smart contract using Cirrus Core Private Net Wallet.

Additionally, to learn and get started with Stratis Blockchain in .NET, you can get enough resources, materials, and articles following the below links: Stratis Academy and C# Corner

You can refer to the next part of the article series by following the below links.

Reference

  1. https://academy.stratisplatform.com/index.html


Similar Articles