Address & XPUB

Get Address

You can get address of account using getAddress() function.

var coinType = DcentCLIConnector.coinType.ETHEREUM
var keyPath = "m/44'/60'/0'/0/0" // key path of the account

var result
try{
    // Get Ethereum Address corresponding to keyPath
    result = await DcentCLIConnector.getAddress(coinType, keyPath)
}catch(e){
    result = e
}

Get XPUB

You can get xpub using getXPUB() function. The BIP32 key pass must be at least 2 depth or more.

var keyPath = "m/44'/0'" // key path of the account

var result
try{
    // Get extended public key corresponding to keyPath
    result = await DcentCLIConnector.getXPUB(keyPath)
}catch(e){
    result = e
}

Last updated