# TSS RPC

TSS (Threshold Signature Scheme) related RPC methods for MAP Protocol v2.

## tss\_getVault

Retrieves vault information for a specific epoch or the latest epoch.

### Parameters

| Parameter | Type                   | Description                                            |
| --------- | ---------------------- | ------------------------------------------------------ |
| `epoch`   | `QUANTITY` or `String` | Epoch ID (hexadecimal) or `"latest"` for current epoch |

### Returns

`Array` - Array of vault objects:

| Field        | Type       | Description                               |
| ------------ | ---------- | ----------------------------------------- |
| `epoch`      | `QUANTITY` | The epoch number                          |
| `public_key` | `String`   | TSS public key for this epoch             |
| `status`     | `String`   | Vault status (`active`, `inactive`, etc.) |
| `chains`     | `Array`    | List of supported chain names             |
| `addresses`  | `Array`    | Chain-specific vault addresses            |

**addresses object:**

| Field     | Type     | Description                      |
| --------- | -------- | -------------------------------- |
| `chain`   | `String` | Chain name (e.g., `BTC`, `DOGE`) |
| `address` | `String` | Vault address on the chain       |

### Example

**Request (by epoch ID):**

```shell
curl -X POST -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"tss_getVault","params":["0x1"],"id":1}' \
  http://localhost:8545
```

**Request (latest):**

```shell
curl -X POST -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"tss_getVault","params":["latest"],"id":1}' \
  http://localhost:8545
```

**Response:**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "epoch": 1,
      "public_key": "0xdddc5378e96320f465f1bf8ab228c8d88ec4cff6a32f76ac066a9fd28cd614433f16b5fc49053ecd6d46a13948896f397fdc15cbb50a3a2092eda3379b536c8f",
      "status": "active",
      "chains": [
        "BTC",
        "DOGE"
      ],
      "addresses": [
        {
          "chain": "BTC",
          "address": "bc1q86m6d8fmlvan8r9pypd4p592xtcpfkn6ezxj3t"
        }
      ]
    }
  ]
}
```


---

# 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://docs.mapprotocol.io/api-and-sdk/json-rpc/tss-rpc.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.
