> For the complete documentation index, see [llms.txt](https://leather.gitbook.io/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://leather.gitbook.io/developers/stacks-methods/stx_getaddresses.md).

# stx\_getAddresses

Request the Bitcoin and Stacks addresses for the active account of the user's wallet, using the SIP-030 method name.

## Method name

`stx_getAddresses`

`stx_getAddresses` is the [SIP-030](https://github.com/stacksgov/sips/blob/main/sips/sip-030/sip-030-wallet-interface.md) name for [`getAddresses`](/developers/methods/getaddresses.md). Leather runs both through the same connection flow and returns the same response shape, so the guidance on the `getAddresses` page applies here too: every call opens a connection prompt, and addresses must be read by `symbol` and `type`, never by index.

Unlike `getAddresses`, it takes no `chains` parameter. It always requests both Bitcoin and Stacks addresses.

## **Parameters**

| Parameter             | Description                                                                                                                                              | Required | Type      |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | --------- |
| `network`             | Network identifier                                                                                                                                       | ❌        | `string`  |
| `allowPolicyAccounts` | Currently has no effect: Leather offers multisig vaults on every request. See [Multisig accounts](/developers/methods/getaddresses.md#multisig-accounts) | ❌        | `boolean` |

## **Example request**

```typescript
try {
  const response = await window.LeatherProvider.request("stx_getAddresses");

  const stxAddress = response.result.addresses.find(
    (address) => address.symbol === "STX"
  );

  console.log("Stacks address:", stxAddress?.address);
} catch (error) {
  console.log("Request error:", error);
}
```

## Example Response

```json
{
    "jsonrpc": "2.0",
    "id": "288a4a32-899b-47da-ac43-b6adbb8caec2",
    "result": {
        "addresses": [
            {
                "symbol": "BTC",
                "type": "p2wpkh",
                "address": "bc1qetcn9fdtzq3wez6vrljjyry225ml7j52h3kwgl",
                "publicKey": "0328e268de2bd09f703b379d20b8a53fdc9c599a09a8c2fcd9c35e7b3cc48d0ece",
                "derivationPath": "m/84'/0'/1'/0/0",
                "descriptor": "wpkh(xpub...)",
                "fingerprint": "..."
            },
            {
                "symbol": "BTC",
                "type": "p2tr",
                "address": "bc1ph65ywff65f0nl84xaxwdxgc2rc2gpr70tptllffktt3qzyx859zsp3zvwl",
                "publicKey": "03482aa14965b71358082b110a30b91ef8dfbe6fbae3b18f5b841323f599b954f8",
                "tweakedPublicKey": "482aa14965b71358082b110a30b91ef8dfbe6fbae3b18f5b841323f599b954f8",
                "derivationPath": "m/86'/0'/1'/0/0",
                "descriptor": "tr(xpub...)",
                "fingerprint": "..."
            },
            {
                "symbol": "STX",
                "kind": "single-sig",
                "address": "SPY0682ZM7VGPMVGQP99Z05J3QWMVV83RA6N42SA",
                "publicKey": "..."
            }
        ]
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://leather.gitbook.io/developers/stacks-methods/stx_getaddresses.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
