# Private Delegation Node

Unlike public delegation nodes, such as those utilized by the Zuzalu community for community-wide communication, the Private Delegation Node is dedicated to individual users. It runs exclusively on a personal server, enabling continuous and secure messaging.

For delegation node deployment, please refer to the[ ](https://sending-network.gitbook.io/sending.network/delegation-node/delegation-node-deployment-tutorial)[Delegation Node Deployment Tutorial](https://sending-network.gitbook.io/sending.network/delegation-node/delegation-node-deployment-tutorial). You may configure the access whitelist to limit the access to specific wallet address(es).

### Whitelist Configuration

By default, wallet whitelisting is disabled. You can enable it with the following flag:

```bash
-whiteLisbashtEnable=false
```

If set to `true`, only wallet addresses on the whitelist will be permitted to connect to your node.

### API Endpoints

#### 1. Retrieve Whitelist, Blacklist, or Developer Key List

**GET** `/admin/_api/admin/authority/{blacklist|whitelist|developer_key}`

**Request Headers:**

```json
Content-Type: application/json
```

**Query Parameters:**

| Parameter | Type | Description                            |
| --------- | ---- | -------------------------------------- |
| limit     | int  | Limit the number of results (optional) |
| offset    | int  | Offset for pagination (optional)       |

**Successful Response:**

**Status Code:** `200 OK`

```json
{
  "code": 200,
  "msg": "Get lists successfully.",
  "data": [
    { "walletaddress": "xxxxxxxxxx", "time": "xxxxxxxxxx" },
    { "walletaddress": "xxxxxxxxxx", "time": "xxxxxxxxxx" }
  ]
}
```

***

#### 2. Retrieve Information for a Specific Wallet Address

**GET** `/admin/_api/admin/authority/{blacklist|whitelist|developer_key}/{walletaddress}`

**Request Headers:**

```json
Content-Type: application/json
```

**Successful Response:**

**Status Code:** `200 OK`

```json
{
  "code": 200,
  "msg": "Get info successfully.",
  "data": { "walletaddress": "xxxxxxxxxx", "time": "xxxxxxxxxx" }
}
```

***

#### 3. Add to Whitelist, Blacklist, or Developer Key List

**POST** `/admin/_api/admin/authority/{blacklist|whitelist|developer_key}`

**Request Headers:**

```json
Content-Type: application/json
```

**Request Body:**

| Parameter      | Type   | Description                               |
| -------------- | ------ | ----------------------------------------- |
| walletaddress  | string | User wallet address                       |
| developer\_key | string | Developer Key (optional for whitelisting) |
| time           | string | Expiration time                           |

**Successful Response:**

**Status Code:** `200 OK`

```json
{
  "code": 200,
  "msg": "Add list successfully.",
  "data": { "walletaddress": "xxxxxxxxxx", "time": "xxxxxxxxxx" }
}
```

***

#### 4. Batch Add to Whitelist, Blacklist, or Developer Key List

**POST** `/admin/_api/admin/authority/{blacklist|whitelist|developer_key}/batch`

**Request Headers:**

```json
Content-Type: text/csv
```

**Successful Response:**

**Status Code:** `200 OK`

```json
{
  "code": 200,
  "msg": "Add lists successfully.",
  "data": [
    { "walletaddress": "xxxxxxxxxx", "time": "xxxxxxxxxx" },
    { "walletaddress": "xxxxxxxxxx", "time": "xxxxxxxxxx" }
  ]
}
```

***

#### 5. Update Whitelist, Blacklist, or Developer Key List

**PUT** `/admin/_api/admin/authority/{blacklist|whitelist|developer_key}`

**Request Headers:**

```json
Content-Type: application/json
```

**Request Body:**

| Parameter      | Type   | Description                               |
| -------------- | ------ | ----------------------------------------- |
| walletaddress  | string | User wallet address                       |
| developer\_key | string | Developer Key (optional for whitelisting) |
| time           | string | Updated expiration time                   |

**Successful Response:**

**Status Code:** `200 OK`

```json
{
  "code": 200,
  "msg": "Change lists successfully.",
  "data": { "walletaddress": "xxxxxxxxxx", "time": "xxxxxxxxxx" }
}
```

***

#### 6. Remove from Whitelist, Blacklist, or Developer Key List

**DELETE** `/admin/_api/admin/authority/{blacklist|whitelist|developer_key}`

**Request Headers:**

```json
Content-Type: application/json
```

**Request Body:**

| Parameter      | Type   | Description              |
| -------------- | ------ | ------------------------ |
| walletaddress  | string | User wallet address      |
| developer\_key | string | Developer Key (optional) |

**Successful Response:**

**Status Code:** `200 OK`

```json
{
  "code": 200,
  "msg": "Delete lists successfully.",
  "data": { "walletaddress": "xxxxxxxxxx", "time": "xxxxxxxxxx" }
}
```


---

# 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://sending-network.gitbook.io/sending.network/private-delegation-node.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.
