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

# Addresses

> The address format used across the network.

An address is the prefix `rx` followed by 40 lowercase hexadecimal characters.

```text theme={null}
rx000000000000000000000000000000000000dead
```

| Part | Length | Notes |
| - | - | - |
| Prefix | 2 characters | Always `rx` |
| Body | 40 characters | Lowercase hexadecimal, 20 bytes |

## Derivation

An address is derived from an Ed25519 public key: take the Keccak-256 hash of the 32-byte public key, keep the last 20 bytes, and add the `rx` prefix.

```python theme={null}
address = "rx" + keccak256(public_key)[-20:].hex()
```

See [Transactions](https://docs.lenarchain.xyz/concepts/transactions.md#hashing-and-signing-libraries) for the `keccak256` helper.

## Using addresses in a transaction

In a transaction body, the `to` field holds the 20 bytes of the address, which you get by decoding the 40 hex characters after the `rx` prefix.

> [!NOTE]
>
> Other values use the same `rx` prefix, including transaction hashes (`rx` + 64 hex characters), public keys, block hashes, and signatures. To use one of them as raw bytes, remove the `rx` prefix and decode the hex.

An address that does not match this format is rejected by the RPC with the error `invalid address, must be rx + 40 hex`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.