Develop Your First DApp Using the Public Chain Node Service Provided by BSN
The Public Chain Node Service on the Blockchain Service Network (BSN) is one of the most powerful tools for developing a DApp. Let’s take a look at how to fully take advantage of this feature in DApp development.
Getting Started
Developing a DApp has never been easier with the help of the BSN platform. Here are the instructions on how to get started:
1. Visit global.bsnbase.com on your web browser.
2. Click on [Register] on the top-right corner and fill out the necessary information.
3. After your account has been successfully created, login and navigate to the [Permissionless Services] tab.
4. For this demo, let’s create a free node under HongKong PCN: click on [Buy] under HongKong PCN and select the [Free Plan] (If you would like to get more daily requests and a higher TPS, you can also consider upgrading your plan).
5. Now you are able to create new projects: click on [Create New Project] under HongKong PCN.
6. Fill in your project name; for the chain selection, let’s use Irisnet-Mainnet and ETH-Mainnet as our examples.
7. After clicking on [Create Project], you should be able to view your project by clicking [Project List].
8. Your newly created project will be under project list.
a. If you selected Irisnet-Mainnet as your chain, the system will provide you with three different access addresses (RPC, REST and WSS) along with a project key.
b. if you selected ETH-Mainnet as your chain, the system will provide you with one access address and a project key.
Those information will be crucial to DApp construction.
Making a Request to Your Node
Now that the node has been successfully set up, you can start developing a DApp through basic actions, such as making requests to the node.
For this demo, let’s make requests on the Postman app, which you can download here.
1. Open Postman and click on the [+] next to [Launchpad].
2. In the field that reads [Enter request URL], paste the Irisnet-Mainnet node [Access Address] that ends with [/rest] (should be highlighted in green on the BSN project list).
3. Click on the subpage [Headers]; enter [x-api-key] and [x-api-sub-path] into the [KEY] column (the syntax is described here).
4. In the cell after [x-api-key] (under the [VALUE] column), input the [Project Key] displayed on the BSN project list.
5. Visit https://www.irisnet.org/docs/light-client/intro.html#basic-functionalities for a list of APIs that you can use. For this demo, let’s select [GET /blocks/latest].
6. As indicated by the IRISnet documentation, [GET] is the request and [blocks/latest] is the subpath. Select [GET] as your request, and enter [blocks/latest] in the cell after [x-api-sub-path] (under the [VALUE] column).
7. Finally, press [Send] to view the node’s latest block on the window below.
If everything works fine, you can now make requests to and get responses from the BSN public node. Without the need of running a node individually or searching for public nodes, an IRISnet developer can very easily build a DApp through BSN services. Cannot wait to see what you will develop on IRISnet. Happy BUIDLing!
💌 Community Channels
•Email: contact@irisnet.org
•Website
•Forum
•Twitter
•Facebook
•LinkedIn
•Medium
•YouTube
•English Telegram
•Chinese Telegram
•Korean Telegram
•Korean KakaoTalk
•Philippines Telegram
•Italian Telegram
•French Telegram
•Hispanic Telegram
•WeChat subscription: irisnetwork
•WeChat group: irisnetwork2018