Expand description
Inbox handles on the client.
A handle is a short public name that an inbox claims in its identity log
(xmtp_id::associations::handle). Only the backend answers which inbox
holds a handle or an account, so every path from a handle or an account
to an inbox goes through one resolver. It looks the target up, loads the
answered inbox’s identity updates, and keeps the answer only when the
newest state the client derived holds the target. The client reports a
changed display handle with the
handle.changed event (identity_updates::store_association_state), and
group members carry the handles of the newest state the client holds.
The client applies no handle policy. The backend alone refuses reserved, short, taken, or too frequent claims, and the client never applies the published minimum name length.
Enums§
- Handle
Error - A handle operation that the client refuses.
- Identity
Target - Someone a caller wants to reach: an account identifier or a handle. Either resolves to an inbox only through the verified resolver.
Constants§
- HANDLE_
SEARCH_ CODES - How many random codes
xmtp_mls::Client::available_handleschecks for a name without a code. With the name itself, one lookup holds 101 handles.
Functions§
- account_
targets accountsas targets, in order.- available_
handles - The handles for
inputthat no inbox holds.inputis a handle as a user typed it; its ASCII capitals become lowercase. Input with a code checks only that handle. A name without a code checks the name andHANDLE_SEARCH_CODESdistinct random codes in one lookup, and the name comes first in the result. Text outside the handle grammar fails before any request. No policy applies here, so a returned handle can still be refused when it is claimed. - claim_
handle - Claim
handlefor this client’s inbox, signed by this installation’s key. A claim of a handle the inbox already holds makes it the display handle again. The backend refuses a taken, reserved, short, or too frequent claim withApiError::HandleRejected. After the publish, the client has stored the inbox’s new identity update. - ensure_
claim_ allowed - Fail with
HandleError::LimitReachedwhenstatehas made as many claims as one identity log can hold. A validator rejects one more, so the client does not sign it. - handle_
targets handlesas targets, in order.- handles_
have_ owner - Whether the backend names an inbox for each handle, in order. This checks no association state: use it only where a wrong answer costs a candidate, never to reach an inbox.
- resolve_
targets - The inbox of each target, in order, from one call. Fails when any
target has no inbox: an account as
find_or_create_dm_by_identitydoes, and a handle withHandleError::NotFound. - resolve_
targets_ in - The inbox of each target, in order, from one verified lookup. A handle
that no inbox holds fails with
HandleError::NotFound. An account with no inbox isNone, so each route treats it as its account-only path does. - resolve_
verified_ in - The verified resolver, the only reader of a
GetInboxIdsanswer that picks an inbox: look the targets up in one request, load the identity updates of every answered inbox in one incremental batch, derive each inbox’s newest state, at mostIDENTITY_DEPENDENCY_CONCURRENCYat once, and drop any answer whose state does not hold its target. - resolve_
verified_ with_ verifier - The verified resolver for a caller with no client, such as an SDK static helper. It stores the states it derives, with no event.