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

# btc\_addAccount

Ask the user to verify a Bitcoin multisig address derived from a wsh() descriptor.

## Method name

`btc_addAccount`

Leather derives the multisig address from a `wsh(multi(...))` or `wsh(sortedmulti(...))` descriptor and shows it to the user with the descriptor and the account name. For your app this is a verification request: the user confirms the address, and nothing is added to the wallet. Only Leather's own web app can add the multisig account to the extension. Available in the Leather browser extension from [6.105.0](https://github.com/leather-io/mono/releases/tag/%40leather.io%2Fextension-v6.105.0).

The method needs no prior connection. The confirm button is enabled only when the user's active account holds one of the descriptor's keys. On a Ledger wallet, the user also confirms the address on the device.

## Parameters

| Parameter    | Description                                                              | Required | Type     |
| ------------ | ------------------------------------------------------------------------ | -------- | -------- |
| `descriptor` | Multisig output descriptor, `wsh(multi(...))` or `wsh(sortedmulti(...))` | ✅        | `string` |
| `name`       | Account name shown to the user                                           | ✅        | `string` |
| `network`    | Network identifier                                                       | ❌        | `string` |

## Example request

```typescript
try {
  const response = await window.LeatherProvider.request("btc_addAccount", {
    descriptor, // wsh(sortedmulti(2,...)) with the user's key among the keys
    name: "Treasury 2-of-3",
  });

  console.log("Verified address:", response.result.address);
} catch (error) {
  console.log("Request error:", error.error.code, error.error.message);
}
```

## Example response

```json
{
    "jsonrpc": "2.0",
    "id": "6a1f0d2c-3b4e-4c5d-8e7f-9a0b1c2d3e4f",
    "result": {
        "added": false,
        "address": "bc1q...",
        "descriptor": "wsh(sortedmulti(2,...))",
        "role": "signer"
    }
}
```

`added` is `false` for every origin except Leather's web app, where the result is `{ added: true, accountId, address, descriptor, role }`.

## Errors

| Code     | Message                                         | When                                                               |
| -------- | ----------------------------------------------- | ------------------------------------------------------------------ |
| `-32602` | Parameter validation details                    | A parameter fails validation                                       |
| `-32602` | `Only multisig wsh() descriptors are supported` | The descriptor is not `wsh(multi(...))` or `wsh(sortedmulti(...))` |
| `4001`   | `User rejected request`                         | The user selects Deny or closes the window                         |
