Skip to main content

Module ids

Module ids 

Source
Expand description

Identifiers (specification §2).

Ids are opaque byte strings, base64url in JSON. CommunityId and HostId are derived from public keys by the crypto module; the 16-byte ids are random and host-assigned (except RequestId, which the client assigns).

Structs§

AttachmentId
An attachment.
AuditId
An audit-log entry.
BanId
A ban record.
BotId
An installed bot (specification §8.13).
Challenge
A host-issued challenge that a signed proof must echo.
ChannelId
A channel or category.
CommandId
An application command of a bot (specification §8.14).
CommunityId
SHA3-256("zaun/community-id/v1" ‖ 0x00 ‖ genesis root public key).
DescriptorHash
SHA3-256 of a signed descriptor’s bytes (§3.2). The descriptor names its delegation’s hash, so this identifies the descriptor/delegation pair.
HostId
SHA3-256("zaun/host-id/v1" ‖ 0x00 ‖ host public key).
InteractionId
An interaction: one use of a command, component or modal (specification §8.14).
InviteId
An invitation (public handle; the secret is InviteSecret).
InviteSecret
An invitation secret: 32 random bytes, shown once. Never logged: Debug is redacted and it has no Display. Zeroized on drop.
LockdownId
An emergency lockdown.
MemberId
A community-scoped member identity, host-assigned.
MessageId
A message.
Nonce
A single-use value in signed objects.
PublisherId
SHA3-256("zaun/publisher-id/v1" ‖ 0x00 ‖ publisher public key) (specification §4.9).
ReportId
A member report.
RequestId
Correlates a command with its response; client-assigned.
RngError
The operating system’s CSPRNG failed.
RoleId
A role. RoleId::EVERYONE is the reserved all-zero id.
VoiceSessionId
One stay of a member in a voice channel, host-assigned at voice.join.

Functions§

fill_random
Fills buf from the operating system CSPRNG.