- Complete implementation of Klaytn’s JSON-RPC client API over HTTP and Websocket
- Support of Klaytn transaction, account, and account key types
- In-memory wallet for managing Klaytn accounts
- Support of fee-delegation
- Support of the Klaytn wallet key format
- Encoding/decoding of a transaction object in RLP
- Signing of a transaction object
- Easy to port web3-js application to caver-js
Below are packages provided in
The error messages from Ethereum via web3.js are hardly figuring out where the error occurs.
caver-jsimproves the interface to catch error messages from Klaytn.
More details can be found in the value of
txErrorof the transaction receipt like the below:
Error: runtime error occurred in interpreter
Klaytn uses a fixed gas price (25 ston = 25 * 10^9). A transaction with a different price submitted to the Klaytn network will be rejected. For more information about the gas price, see Gas and Unit Price Overview The price of gas used in the network can be obtained by using caver.klay.getGasPrice.
gasPriceis not defined when you sign or submit a transaction, caver-js uses the caver.klay.getGasPrice RPC call to set the gas price of the transaction.