Klaytn
getKalytnSignedTransaction
The D'CENT Android SDK provides functions for signing transaction of coins.
This function for :
.KLAYTN
- klaytn (KLAY).KLAYTN_TESTNET
- kalytn baobab (KLAYt)
Parameters
coinType: klaytn networks coin type
kalytnTransaction: (KlaytnTransation)klaytn transaction parameter
class KlaytnTransaction
Name | Type | Description |
---|---|---|
addressPath |
| sign key path for klaytn transaction |
nonce |
| account nonce for klaytn transaction |
to |
| recipient's address of klaytn transaction |
amount |
| amount of ether to be sent. ( wei unit value ) |
gasLimit |
| gas limit value of klaytn transaction |
gasPrice |
| gas price for klaytn transaction |
data |
| transaction data of klaytn transaction |
chainId |
| chain id |
from |
| (optional) Signer's Address of klaytn transaction |
tx_type |
| (optional) Type of klaytn transaction
The default value is |
fee_ratio |
| (optional)Fee Ratio of klaytn transaction |
enum KlaytnType
Defines Transaction type of Klaytn (refer to klaytn doc)
LEGACY
VALUE_TRANSFER
FEE_DELEGATED_VALUE_TRANSFER
FEE_DELEGATED_VALUE_TRANSFER_WITH_RATIO
VALUE_TRANSFER_MEMO
FEE_DELEGATED_VALUE_TRANSFER_MEMO
FEE_DELEGATED_VALUE_TRANSFER_MEMO_WITH_RATIO
SMART_CONTRACT_DEPLOY
FEE_DELEGATED_SMART_CONTRACT_DEPLOY
FEE_DELEGATED_SMART_CONTRACT_DEPLOY_WITH_RATIO
SMART_CONTRACT_EXECUTION
FEE_DELEGATED_SMART_CONTRACT_EXECUTION
FEE_DELEGATED_SMART_CONTRACT_EXECUTION_WITH_RATIO
CANCEL
FEE_DELEGATED_CANCEL
FEE_DELEGATED_CANCEL_WITH_RATIO
FEE_PAYER
Returns
result: (Bool)
true
if successful,false
if error occurredtxData: signed transaction
Example
getKlaytnBasedTokenTransaction
This Function for:
.KLAYTN_ERC20
- klaytn erc20 token (krc20).KRC20_TESTNET
- kalytn testnet erc20 token
Parameters
coinType: ethereum networks coin type
tokenTransaction: (KlaytnTokenTransation)klaytn token transaction parameter
class KlaytnTokenTransaction
Name | Type | Description |
---|---|---|
addressPath |
| sign key path for klaytn transaction |
nonce |
| account nonce for klaytn transaction |
to |
| recipient's address of klaytn transaction |
amount |
| amount of ether to be sent. ( wei unit value ) |
gasLimit |
| gas limit value of klaytn transaction |
gasPrice |
| gas price for klaytn transaction |
data |
| transaction data of klaytn transaction |
chainId |
| chain id |
tokenName |
| token name of contract for |
decimals |
| decimals of contract for |
tokenSymbol |
| symbol of contract for |
from |
| (optional) Signer's Address of klaytn transaction |
tx_type |
| (optional) Type of klaytn transaction
The default value is |
fee_ratio |
| (optional)Fee Ratio of klaytn transaction |
Returns
result: (Bool)
true
if successful,false
if error occurredtxData: signed transaction
Example
Last updated