Aliases
An alias is a short, human-readable name — like john_doe — that resolves to
a wallet address, the same way a person’s name in your phone’s contacts
resolves to a phone number. Aliases are globally unique across the whole
system (not per-domain), case-insensitive (John_Doe and john_doe are the
same alias), and are lowercased and stripped of any domain suffix at creation.
See Addresses for how aliases fit into the address system
as a whole.
Note: creating a mailbox automatically registers your wallet’s own address string as an alias for you, so most users never need to create one by hand. Use the commands in this section to register additional, friendlier aliases, look one up, or transfer one to a new address.
Listing all aliases (the alias indexer)
Alias names are not recoverable from chain state: an alias account stores
only the holder’s address, and the name itself exists on-chain only as a
blake3 hash inside the PDA seed. “Which aliases point at wallet X?” is
therefore answered by the gRPC gateway (mail-grpc), which maintains an
off-chain index of the alias program’s transaction history — every
Create/Transfer/Close instruction carries the plaintext name — and serves
it through the ListAliases RPC.
- Names are returned in their canonical (lowercased) form, sorted.
- The index lives in a local SQLite file (
ALIAS_INDEX_DB, defaultalias_index.db; set it empty to disable the indexer) and is fed by polling the chain everyALIAS_INDEX_POLL_SECONDS(default 5). - On first start the gateway backfills the program’s full history;
ListAliasesanswersUNAVAILABLEuntil that backfill completes, and restarts resume from a stored cursor instead of re-scanning. - The index reads at finalized commitment, so a freshly created alias appears after finalization plus one poll interval.