How To Use Klaytn API Service Baobab And How To Receive KLAY For Testing
On July 9, 2020, Klaytn provided free KLAY to customers who use the Klaytn API Service (hereafter
KAS) through Klaytn's 1st anniversary payment policy. Through this policy, customers were able to use
the Klaytn API Service Cypress (mainnet) even if they did not own KLAY directly through the Global
Fee Payer provided by the Klaytn API Service.
As Klaytn terminated its 1st-anniversary payment policy on July 31, 2021, Klaytn no longer provides
KLAY for free. Therefore, customers who use Klaytn API Service and continue to use the Klaytn
network can choose the following options;
- Switch their free plan to paid Klaytn API Service plans and then register for Global Fee Payer.
- Set up for Klaytn API Service User Fee Payer.
- Acquire a fee payer account.
You can find a more detailed setting guideline and related information in the link below.
(https://www.klaytnapi.com/en/landing/notice)
However, if you are a customer who uses Klaytn API Service via a free plan and desire to test Klaytn
and Klaytn API Service before switching to a paid plan, you can experience Klaytn Baobab and Klaytn
API Service as much as you want by receiving free KLAY by switching a network to Baobab.
Please refer to the below instructions on how to use Klaytn API Service Baobab and how to receive
free KLAY for using Baobab network.
[Setting up Baobab network in Klaytn API Service]
To use Klaytn API Service on Baobab, three settings are required.
1. Set Network from Cypress to Baobab in Console
The network needs to be converted from Cypress (Mainnet) to Baobab (Testnet) in the Klaytn API
Service Console page. This is to check 10,000 API usages provided daily and Wallet Key usage
provided up to 200 per account for free.
2. Changing HTTP headers required for API calls
Those who used Cypress (Mainnet) in KAS need to change the HTTP header to call Baobab (Testnet)
API. The Klaytn network can be selected via x-chain-id, and currently supported networks are Baobab
(1001) and Cypress (8217). Therefore, you are required to set x-chain-id to 1001 to use the KAS
Baobab network.
Additionally, if you are curious about the basic concepts and settings of Klaytn API Service, please
refer to the Klaytn API Service Guide.
[Receiving Test KLAY To Use Klaytn API Service On Baobab Network]
In Klaytn API service, KLAY is required to use Baobab network like Cypress.
However, Klaytn API service is designed to enhance users to easily set their Account pool and create
their account to receive test KLAY. (Please note that KLAY used in Baobab is completely different
from KLAY commercially distributed.)
1. When you click Service and then Wallet in the console menu, you can check Account Pools. Click
Create Account Pool.
2. To create an Account Pool, please create a name first. There are no conditions to create it, so feel
free to create the title for your Account Pool to your own preference. However, you cannot change the
name afterward, so please consider naming it as something which is easy to remember.
3. When you click the account pool you created, the Account Pool Information page will appear. Click
the +Create Account button. When you click on it, the account will be created immediately and you
will see the message ‘Account creation was successful.’
4. The account you created will be immediately shown on the Account Pool Information page. Click the
yellow battery button next to Address to receive test KLAY. When you click on it, you will see the
message 'Are you sure you want to recharge KLAY in Account?' Click on the Yes button. When you
click on it, the test KLAY will be charged to that account immediately.
5. When you click the account again, you’ll see that five KLAYs are charged. Customers who want to
use the Klaytn API Service Baobab network can receive free 5 test KLAYs every day and with these
KLAYs, they can test the blockchain service they are currently developing.
[For Setting Own User Fee Payer Through Fee-payer Creation in Klaytn API Service Baobab Network]
If you have created your own account in Klaytn API Service, then now you need to send the test KLAY
in the account to a User Fee Payer account that can be created on Klaytn API Service console page.
1. When you click Service and then Wallet in the Console menu, you can check Account Pools. Click
the + Fee payer Pool Creation button.
2. To create a Fee-Payer Pool, please create a name. There are no conditions to create a name, so feel
free to create the title for your Account Pool to your own preference. However, you can’t change the
name afterward, so please consider naming it as something which is easy to remember.
3. Click on the Fee-payer Pool you created and click the + Create Account button. When you click,
the notice of the account creation message will appear immediately, and then you’ll see the message
saying ‘Fee only accounts cannot use KLAY for any purpose other than payment of fees, and
cannot withdraw KLAY once deposited. When creating an account dedicated to payment of
fees, a transaction fee for account update will be charged.’ Click on the Yes button afterward, then
the account will be created.
4. The created account will appear on the Fee-payer Pool Information page. Check and copy the
account address. Then, go back to the Account Pools menu and click the account you created before.
You’ll see a Transfer KLAY button above the Account Pool Information. Click the button.
5. When you click the Transfer KLAY button, you will see a page called Transaction. On this page, fill
in the from address with the account address you created in the Fee-payer Pool. Then, fill in the
amount of KLAY as much as you want, and click the Next button.
6. You’ll see the next transaction page that shows you a sending address, receiving address, a
balance of sending address, and quantity of transaction, which are all for sending KLAY. Be sure to
check everything is correct, then click on the Agree and Transfer button.
(CAUTION: To generate the transaction, KLAY must be owned by the account of the address you
send as much as the gas price is required.)
7. After you click the button, you'll see that KLAY has been sent successfully. You can check the result
of the transfer on Klaytnscope.
(CAUTION: In Klaytnscope, you also need to set the network as Baobab, not Cypress.)
To conclude, we learned how to use Baobab and how to receive test Klay for Baobab utilization to test
not only Klaytn, a blockchain platform but also Blockchain as a Service. Like this, Klaytn and Klaytn API
Service provide customers a test environment for pre-launch services. This test environment allows
you to utilize and test all APIs provided by the Klaytn API Service.
For any additional questions, please contact us through Klaytn API Service Help center.
Thank you.
Klaytn API Service team.