Skip to main content

Klaytn

Sign Transaction​

The DCENT Web SDK provides functions for signing transaction of coins.

getKlaytnSignedTransaction()​

To broadcast the signed value, you must encode the parameter values using RLP. Klaytn provides 'caver-js' library. You can make raw transaction for broadcasting using 'caver-js'. (https://docs.klaytn.com/bapp/sdk/caver-js/api-references)

Supported Coin Type​

  • KLAYTN
  • KLAYTN_KCT

Parameters​

  • coinType

  • nonce

  • gasPrice

  • gasLimit

  • to (address)

  • value

  • data

  • key path for signing

  • chain ID

  • Transaction type

  • from (address)

  • fee ratio

  • contract information example :

    {
    name: 'COSM',
    decimals: 18,
    symbol: 'COSM'
    }

Returned response object:​

{
"header": {
"version": "1.0",
"response_from": "klaytn",
"status": "success"
},
"body": {
"command": "transaction",
"parameter": {
"sign_v": "0x4055",
"sign_r": "0x5b1a8134......697ce449",
"sign_s": "0x6aea20f1......9eb816fb"
}
}
}