Aliases
Human-readable names for contexts, applications, and identities · src/client.rs
Overview
Aliases let you attach a stable, human-readable string to a context ID, application ID, or identity public key. Instead of passing raw hex IDs around, you can resolve a name like "my-app" to its underlying ID on demand.
There are three alias types, each with separate create / delete / list / lookup / resolve operations:
Context alias
Maps a name → ContextId. Global scope (not tied to a specific context).
Application alias
Maps a name → ApplicationId. Global scope.
Identity alias
Maps a name → PublicKey. Scoped to a specific context ID.
Context Aliases
create_context_alias(alias, context_id)
Registers a new name pointing to a context ID.
delete_context_alias(alias)
Removes a context alias by name.
list_context_aliases()
Returns all registered context aliases.
lookup_context_alias(alias)
Returns the alias record for a given name, including the associated context ID and metadata.
resolve_context_alias(alias)
Returns only the ContextId for a given alias name — a lighter call than lookup when you only need the ID.
Application Aliases
create_application_alias(alias, application_id)
Registers a new name pointing to an application ID.
delete_application_alias(alias)
Removes an application alias by name.
list_application_aliases()
Returns all registered application aliases.
lookup_application_alias(alias)
Returns the alias record for a given application alias name.
resolve_application_alias(alias)
Returns only the ApplicationId for a given alias.
Identity Aliases
Identity aliases are context-scoped — the same alias name can exist in multiple contexts pointing to different public keys.
create_context_identity_alias(context_id, alias, public_key)
Registers a name pointing to a public key within a specific context.
"ctx-id", "alice", "pubkey…"
)
delete_context_identity_alias(alias, context_id)
Removes an identity alias within a specific context.
list_context_identity_aliases(context_id)
Returns all identity aliases registered within a context.
lookup_context_identity_alias(alias, context_id)
Returns the alias record for a given identity alias within a context.
resolve_context_identity_alias(alias, context_id)
Returns only the public key for a given identity alias within a context.
lookup vs resolve
Returns the full alias record
Includes the alias name, the value it points to, any scope metadata, and creation info. Use this when you need full context about the registration.
Returns just the target ID
Returns only the raw ID (context, application, or public key). Prefer this when you only need the underlying ID to pass to another API call.