Klaytn Endpoint Node comes with JavaScript console. From the console command line, you can initiate part of Klaytn API calls to your EN. To attach to the JavaScript console, execute the following command.
NOTE: You must wait until it downloads all the blocks. Enter klay.blockNumber in a console and check whether it matches the current block number here
NOTE: Type klay or personal to get the list of available functions.
Creating a New Klaytn Account
To create a new Klaytn account from the JavaScript console, execute the following command. Your private key will be encrypted with the passphrase you enter.
>personal.newAccount()Passphrase: # enter your passphraseRepeat passphrase:"0x75a59b94889a05c03c66c3c84e9d2f8308ca4abd" # created account address
Keystore file will be created under keystore folder in the EN data directory, DATA_DIR set in the kend.conf. If you follows the quick start default guideline, it must be ~/kend_home/keystore/.
Unlocking the Klaytn Account
To unlock the created account, execute the following command. It unlocks the account for 300 seconds. Note: If you want to manually set the unlock duration, refer to this link. WARNING: Unlocking an account could be very dangerous if not done carefully. There are chances that your tokens will be taken away by hackers if your EN is hacked by a hacker. To use safer method, refer to this deployment guide using private key