D'CENT developer guide
Official siteUser GuideBlogTwitter
  • Introduction
  • How to Connect Your DApp to D’CENT Mobile App
  • In-app browser (dapp browser)
    • Getting Started
    • EVM compatible networks
    • Klaytn network
    • Tron network
  • Dynamic Link
    • Dynamic Link to In-app Browser
    • EIP-681 : Transaction/Payment Request
  • D'CENT WalletConnect (DWC)
    • Introduction
    • Packages
    • D'CENT WalletConnect
    • Test Environment
    • WalletConnect monorepo
  • Collectibles
    • NFT list on Collectibles tab
  • D'CENT biometric wallet for PC
    • D'CENT SDK for PC Environment
    • dcent-web-connector
      • Configurations
      • Device & Accounts Info.
      • Address & XPUB
      • Ethereum & EVM compatible
      • Klaytn
      • Bitcoin
      • XRPL (XRP Ledger)
      • Hedera (HBAR & HTS)
      • Tron (TRX & TRC20)
      • Stellar
      • Tezos (XTZ & XTZ_FA)
      • Vechain
      • Near (NEAR & Near Token)
      • Havah
      • Polkadot
      • Polkadot Parachain
      • Cosmos & Cosmos compatible network
      • Algorand
    • dcent-cli-connector
      • Configurations
      • Device & Accounts Info.
      • Address & XPUB
      • Ethereum & EVM compatible
      • Hedera (HBAR & HTS)
    • dcent-provider
  • D'CENT BIOMETRIC WALLET FOR Mobile
    • D'CENT SDK for Mobile Environment
    • dcent-biometric-sdk-android
      • Setup
      • Initialize
      • Device & Accrouts Info
      • Address & XPUB
      • Bitcoin
      • Ethereum & EVM compatible
      • Klaytn
      • XRPL
      • Binance
      • Stellar
      • Tron
      • Cardano
      • Hedera
      • Stacks
      • Solana
      • Conflux
      • Polkadot
      • Cosmos
      • Tezos
      • Vechain
      • Near
      • Havah
      • Algorand
    • dcent-biometric-sdk-ios
      • Setup
      • Initialize
      • Device & Accrouts Info
      • Address & XPUB
      • Bitcoin
      • Ethereum & EVM compatible
      • Klaytn
      • XRPL
      • Binance
      • Stellar
      • Tron
      • Cardano
      • Hedera
      • Stacks
      • Solana
      • Conflux
      • Polkadot
      • Cosmos
      • Tezos
      • Vechain
      • Near
      • Havah
      • Algorand
  • D'CENT Integrated Packages
    • Web3Modal
    • web3-onboard
  • Misc.
    • Logo & Brand Guideline
Powered by GitBook
On this page
  • getEthereumSignedTransaction
  • Parameters
  • Returns
  • Requirements
  • getTokenSignedTransaction
  • Parameters
  • Returns
  • Requirements
  • getEthereumMessageSigned
  • Parameters
  • Returns
  • Requirements

Was this helpful?

  1. D'CENT BIOMETRIC WALLET FOR Mobile
  2. dcent-biometric-sdk-android

Ethereum & EVM compatible

getEthereumSignedTransaction

The D'CENT Android SDK provides functions for signing transaction of coins.

This function for :

  • ETHEREUM (ETH) - ethereum

  • ETH_CLASSIC (ETC) - ethereum classic

  • ETHEREUM_GOERLI (ETHt) - etheruem goerli

  • FLARE_COSTON (CFLR) - flare network coston

  • RSK (RBTC)- rsk smart bitcoin

  • RSK_TESTNET (RBTCt) - rsk smart bitcoin testnet

  • XDC (XDC) - xdc network

  • XDC_APOTHEM (XDCt) - xdc apothem

  • BSC (BNB) - binance smart chain

  • BSC_TESTNET (BNBt) - binance smart chain testnet

  • POLYGON (MATIC) - polygon

  • POLYGON_TESTNET (MATICt) - polygon testnet

  • ETH_CHAIN - other evm networks

Parameters

Parameter
Type
Description

coinType

CoinType

ethereum coin type.

transaction

ethereum transaction parameters.

class EthereumTransaction

Name
Type
Description

hdKeyPath

Bip44KeyPath

sign key path for ethereum transaction

nonce

String

account nonce for ethereum transaction

toAddr

String

recipient's address of ethereum transaction

amount

String

amount of ether to be sent. ( WEI unit value )

gasLimit

String

gas limit value of ethereum transaction

gasPrice

String

gas price for ethereum transaction

data

String

transaction data of ethereum transaction

chainId

int

chain id

symbol

String

symbol of contract for ethereum transaction

tx_type

byte

(optional)Type of ethereum transaction

max_priority_fpg

String

(optional)max_priority_fpg of ethereum transaction

max_fee_per_gas

String

(optional)max_fee_per gas of ethereum transaction

access_list

String

(optional)access_list of ethereum transaction

Returns

String - signed transaction.

Requirements

Example

EthereumTransanction ethereumTransanction;
ethereumTransanction = new EthereumTransanction.Builder()
                .keyPath(Bip44KeyPath.valueOf("m/44'/60'/0'/0/0"))
                .nonce("14")
                .toAddr("0xe5c23dAa6480e45141647E5AeB321832150a28D4")
                .amount("500000000000000")
                .gasLimit("21000")
                .gasPrice("6000000000")
                .data("0x")
                .chainId("1")
                .symbol("ETH")
                .build();
String response = mDcentmanager.getEthereumSignedTransaction(CoinType.ETHEREUM, ethereumTransanction);

getTokenSignedTransaction

This function for :

  • ERC20 - ethereum erc20 token

  • ETC_ERC20 - ethereum classic erc20 token

  • ERC20_KOVAN - etheruem kovan erc20 token

  • ERC20_ROPSTEN - etheruem ropsten erc20 token

  • ERC20_GOERLI - etheruem goerli erc20 token

  • ERC20_RINKEBY - etheruem rinkeby erc20 token

  • FRC20_COSTON - flare network coston token

  • RRC20 - rsk smart bitcoin token

  • RRC20_TESTNET - rsk smart bitcoin testnet token

  • XRC20 - xdc xrc20 token

  • XRC20_APOTHEM - xdc apothem xrc20 token

  • BSC_BEP20 - binance smart chain bep20 token

  • BSC_BEP20_TESTNET - binance smart chain bep20 testnet token

  • POLYGON_ERC20 - polygon erc20 token

  • POLYGON_ERC20_TESTNET - polygon erc20 testnet token

  • ECH_ERC20 - other evm erc20 token

Parameters

Parameter
Type
Description

coinType

CoinType

erc20 type.

transaction

token transaction parameters.

class TokenTransaction

Name
Type
Description

hdKeyPath

Bip44KeyPath

sign key path for ethereum transaction

nonce

String

account nonce for ethereum transaction

toAddr

String

address to send

amount

String

amount of ETH to send

gasLimit

String

gas limit value

gasPrice

String

gas price for ethereum transaction

tokenName

String

token name of contract for ERC20 transaction

contractAddress

String

address of contract for ERC20 transaction

decimals

String

decimals of contract for ERC20 transaction

symbol

String

symbol of contract for ERC20 transaction

chainId

String

chain id

feeSymbol

String

symbol of fee Account for ERC20 transaction

Returns

String - signed transaction.

Requirements

Example

TokenTransaction erc20transaction;
erc20transaction = new TokenTransaction.Builder()
                .keyPath(Bip44KeyPath.valueOf("m/44'/60'/0'/0/0"))
                .nonce("14")
                .toAddr("0xe5c23dAa6480e45141647E5AeB321832150a28D4")
                .amount("60000000000000000")
                .gasLimit("70000")
                .gasPrice("3000000000")
                .tokenName("OmiseGO")
                .contractAddress("0xd26114cd6ee289accf82350c8d8487fedb8a0c07")
                .decimals("18")
                .symbol("OMG")
                .chainId("1")
                .feeSymbol("ETH")
                .build();

String response = mDcentmanager.getTokenSignedTransaction(CoinType.ERC20, erc20transaction)

getEthereumMessageSigned

Get the sign value of "EVM" message sign(personal_sign & signTypedData).

This function for :

  • ETHEREUM (ETH) - ethereum

  • ETHEREUM_GOERLI (ETHt) - etheruem goerli

  • RSK (RBTC)- rsk smart bitcoin

  • RSK_TESTNET (RBTCt) - rsk smart bitcoin testnet

  • XDC (XDC) - xdc network

  • XDC_APOTHEM (XDCt) - xdc apothem

  • BSC (BNB) - binance smart chain

  • BSC_TESTNET (BNBt) - binance smart chain testnet

  • POLYGON (MATIC) - polygon

  • POLYGON_TESTNET (MATICt) - polygon testnet

  • ETH_CHAIN - other evm networks

  • KLAYTN (KLAY) - klaytn

  • KLAY_BAOBAB (KLAYt) - klaytn baobab

Parameters

Parameter
Type
Description

coinType

CoinType

coin type.

transaction

ethereum message sign data parameters.

command

String

data sign command.("msg_sign" | "sign_data") - "msg_sign" for personal_sign or 'eth_sign' of EVM - "sign_data" for signTypedData(EIP-721) of EVM

class EthMessageSignData

Name
Type
Description

hdKeyPath

Bip44KeyPath

sign key path for ethereum sign data transaction

data

String

message for signing

Returns

HashMap<String, String> - signedData{address,sign}

Requirements

  • D'CENT Biometric Wallet version 1.3.0. or higher is required.

    • (for EIP-721) version 2.11.1. or higher is required.

Example(ethereum personal_sign)

EthMesageSignData ethMesageSignData;
ethMesageSignData = new EthMesageSignData.Builder()
                    	.keyPath(Bip44KeyPath.valueOf("m/44'/60'/0'/0/0"))
                    	.data("Message Sign TEST")
                    	.build();
HashMap<String, String> response = mDcentmanager.getEthereumMessageSigned(CoinType.ETHEREUM, ethMesageSignData, "msg_sign");
String address = response.get("address");
String sign = response.get("sign");
PreviousBitcoinNextKlaytn

Last updated 1 year ago

Was this helpful?

Refer to "" to determine which D'CENT Biometric Wallet versions are supported on each network.

Refer to "" to determine which D'CENT Biometric Wallet versions are supported on each network.

D`CENT Firmware Update History
D`CENT Firmware Update History
EtheruemTransaction
TokenTransaction
EthMesageSignData