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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev-docs.dcentwallet.com/dcent-biometric-wallet-for-pc/dcent-cli-connector/address-and-xpub.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
