# REST API

### Delegations by wallet <a href="#delegations-by-wallet" id="delegations-by-wallet"></a>

**Get a list of incoming and outgoing delegations for a specific taproot wallet.**

`GET` `https://ordinalproxy.xyz/api/v1/wallet`

**Query Parameters**

| Name     | Type   | Description                       |
| -------- | ------ | --------------------------------- |
| wallet\* | string | The wallet to get delegations for |

200: OK Delegation\[]

```
type Delegation = {
    from: string;
    to: string;
};

// returns Delegation[]
```

**Delegations by wallet Example**

```
curl https://ordinalproxy.xyz/api/v1/wallet?wallet=00000000000000000000000000
```

### Delegation Checks <a href="#delegation-checks" id="delegation-checks"></a>

**Returns true if the&#x20;*****to*****&#x20;address is delegated to act on the&#x20;*****from*****&#x20;wallets behalf.**

`GET` `https://ordinalproxy.xyz/api/v1/check`

**Query Parameters**

| Name   | Type   | Description                                      |
| ------ | ------ | ------------------------------------------------ |
| to\*   | string | The hot wallet to act on the cold wallets behalf |
| from\* | string | The cold wallet who issued the delegation        |

200: OK Boolean

**Check All Example**

```
curl https://ordinalproxy.xyz/api/v1/check/?to=00000000000000000000000000&from=00000000000000000000000000
```

### Verify Signature <a href="#delegation-checks" id="delegation-checks"></a>

**Returns true if the inscription signature ("s") is valid.**

`POST` `https://ordinalproxy.xyz/api/v1/verify/signature`

**Body Parameters**

| Name        | Type   | Description           |
| ----------- | ------ | --------------------- |
| signature\* | string | The signature.        |
| message\*   | string | The original message. |

200: OK Boolean

**Check All Example**

```
curl --request POST \
  --url https://ordinalproxy.xyz/api/v1/verify/signature \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: insomnia/8.6.1' \
  --data '{
    "message": "xxx",
    "signature": "xxx"
}'
```
