> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usexfg.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Aliases API

> Resolve on-chain aliases to Fuego addresses and perform reverse lookups.

## POST /get\_alias

Resolves an alias to a Fuego address.

**Request:**

```json theme={null}
{
  "alias": "alice"
}
```

The `@` prefix is optional — both `"alice"` and `"@alice"` resolve the same way.

**Response (found):**

```json theme={null}
{
  "found": true,
  "alias": "alice",
  "address": "fireVHx639SLMhzmBoJ8drTXbVyv2eRG6A8aMLc1taTiRNwk8pnwXpBDUSjH1dT5fg7yVVZrKkvm31CmigAMdVDg7sgxJmAUNp",
  "status": "OK"
}
```

**Response (not found):**

```json theme={null}
{
  "found": false,
  "alias": "alice",
  "address": "",
  "status": "OK"
}
```

Check `found` before using `address`. A `found: false` response with `status: "OK"` means the alias does not exist on-chain — it is not an error.

***

## POST /get\_alias\_by\_address

Reverse lookup: find the alias registered for a given address.

**Request:**

```json theme={null}
{
  "address": "fireVHx639SLMhzmBoJ8drTXbVyv2eRG6A8aMLc1taTiRNwk8pnwXpBDUSjH1dT5fg7yVVZrKkvm31CmigAMdVDg7sgxJmAUNp"
}
```

**Response (found):**

```json theme={null}
{
  "found": true,
  "alias": "alice",
  "address": "fireVHx...",
  "status": "OK"
}
```

***

## GET /get\_all\_aliases

Returns all registered aliases. Use sparingly — on a large network this can be a large response.

**Request:** `{}`

**Response:**

```json theme={null}
{
  "aliases": [
    {
      "alias": "alice",
      "address": "fireVHx..."
    }
  ],
  "status": "OK"
}
```

***

## Privacy note

Aliases are stored on-chain with the full address in the registration transaction extra. The AliasIndex also stores the address hash (`cn_fast_hash(spendKey||viewKey)`) for ownership verification.

* `/get_all_aliases` returns alias names, types, and registration blocks — no addresses.
* `/get_alias` returns the full address (targeted, single-alias lookup).
* `/get_alias_by_address` returns the alias name for a given address.

This design blocks mass surveillance while enabling targeted alias resolution for swaps and transfers. An observer must know the alias name to retrieve its address — one at a time, not in bulk.
