Skip to main content

Module relay

Module relay 

Source
Expand description

Relay configuration for FROST shares.

Structs§

PeerPolicyEntry
Per-peer send/receive policy entry, stored alongside relay configuration.
RelayConfig
Relay configuration for a FROST share, keyed by group public key.
StoredBunkerPermission
Persisted permission state for a connected bunker (NIP-46) client.
StoredTimedKindGrant
A single timed per-kind auto-approve grant persisted for a bunker client. Survives restart; pruned on restore once expires_at has passed.

Enums§

StoredPermissionDuration
Duration for stored bunker client permissions.

Constants§

ALLOW_INTERNAL_HOSTS
Whether the allow-internal Cargo feature is active.
GLOBAL_RELAY_KEY
Sentinel key for global (non-group-specific) relay configuration.
MAX_AUTO_KINDS
Maximum number of auto-approve kinds per app or globally.
MAX_BUNKER_APPS
Maximum number of persisted bunker app permissions per config.
MAX_BUNKER_NAME_LEN
Maximum length of a stored bunker app name.
MAX_RELAYS
Maximum number of relays per category per share.
MAX_RELAY_CONFIG_SIZE
Maximum size of a decrypted relay-config blob.
MAX_RELAY_URL_LENGTH
Maximum length of a relay URL.
TIMESTAMP_TWEAK_RANGE
Range of seconds to randomly tweak event timestamps for privacy.
VALID_PERMISSION_MASK
Valid bunker permission bitflags mask (matches keep_nip46::Permission).

Functions§

decode_relay_config
Decrypt and deserialize a relay config blob produced by encode_relay_config.
default_frost_relays
Default FROST coordination relays.
encode_relay_config
Serialize and encrypt a relay config for at-rest storage.
is_internal_ip
Check if a resolved IP address is internal/private/reserved.
normalize_relay_url
Normalize a relay URL: trim whitespace, lowercase scheme+host, ensure trailing slash.
validate_relay_url
Validate a relay URL is a valid wss:// URL pointing to a public host.
validate_relay_url_allow_internal
Like validate_relay_url but permits internal/private addresses.