> For the complete documentation index, see [llms.txt](https://dev-docs.dcentwallet.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev-docs.dcentwallet.com/dcent-biometric-wallet-for-pc/dcent-cli-connector/address-and-xpub.md).

# Address & XPUB

## Get Address

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

```javascript
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.

```javascript
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
}
```
