Versions in this module Expand all Collapse all v0 v0.0.1 Nov 28, 2026 v0.0.0 Nov 28, 2026 Changes in this version + const BroadcastAddr + const DefaultAppChannel + const DefaultAppDistRoomID + const DefaultAppID + const DefaultChunkSize + const FormatBundleV1 + const FormatSingleHTMLV1 + const MaxAttachmentChunks + const MaxAttachmentSize + const MaxTreeLeaves + const RoomKeySize + const SFrameCipherAES128GCM + var ErrSFrameAuthFailed = errors.New("sframe: AEAD authentication failed") + var ErrSFrameInvalidHeader = errors.New("sframe: malformed RFC 9605 header") + var ErrSFrameMissingKey = errors.New("sframe: missing key for KID") + var ErrSFrameReplay = errors.New("sframe: replayed or stale counter") + var ErrSFrameUnadmitted = errors.New("sframe: unadmitted member cannot derive SFrame keys") + var ErrTreeKEMDecryptionFailed = errors.New("treekem: unable to decrypt path secret in direct path") + var ErrTreeKEMEpochMismatch = errors.New("treekem: epoch mismatch") + var ErrTreeKEMEvictedMember = errors.New("treekem: member is evicted from ratchet tree") + var ErrTreeKEMInvalidCommit = errors.New("treekem: invalid commit signature, transcript hash, or confirmation tag") + var ErrTreeKEMLeafNotFound = errors.New("treekem: leaf index not found") + func CanonicalAppManifest(m *AppManifest) []byte + func CanonicalAttachMeta(roomID, fileID, hash, name, mime, author string, size int64, totalChunks int, ...) []byte + func CanonicalCallControl(scopeID, authorPub, nonceHex, ciphertextHex string, epochID, timestamp int64, ...) []byte + func CanonicalCallControlAAD(scopeID, authorPub string, epochID, timestamp int64, isDM bool) []byte + func CanonicalCallSignal(fromSignPub, fromEncPub, toSignPub, ePubHex, nonceHex, ciphertextHex string, ...) []byte + func CanonicalCallSignalAAD(fromSignPub, toSignPub string, timestamp int64) []byte + func CanonicalChannelAnswer(channelID, sessionToken, targetPub, responderPub, sdpAnswer string, ...) []byte + func CanonicalChannelInvite(roomID, inviterPub, roomKey string, epochID, expiresAt int64) []byte + func CanonicalChannelInviteWithInvitee(roomID, inviterPub, inviteePub, roomKey string, epochID, expiresAt int64) []byte + func CanonicalChannelOffer(queryID, channelID, sessionToken, responderPub, sdpOffer string, ...) []byte + func CanonicalChannelQuery(queryID, channelID, sessionToken, senderPub string, timestamp int64) []byte + func CanonicalDirectInvite(...) []byte + func CanonicalEnvelopePayload(roomID, authorPubKey, nonce, ciphertext string, epochID, timestamp int64) []byte + func CanonicalEpochCommit(epochID int64, ...) []byte + func CanonicalEpochCommitFromCommit(c *EpochCommit) []byte + func CanonicalInviteResponse(inviteID, fromSignPub, toSignPub string, accepted bool, timestamp int64) []byte + func CanonicalLeave(peer string, timestamp int64) []byte + func CanonicalPacket(p *Packet) []byte + func CanonicalPeerInfo(signPub, encPub string, timestamp int64) []byte + func CanonicalPeerSignal(signalID, kind, from, target, sdp string, timestamp int64) []byte + func CanonicalRelayFrame(from, target, relayType string, payload []byte, timestamp int64) []byte + func CanonicalSignalingMsg(msgType, peer, target, sdp string, timestamp int64) []byte + func ComputeChannelHash(name string, psk RoomKey) uint32 + func ComputeMLSCommitDigest(c *EpochCommit) string + func DecodeSFrameHeader(frame []byte) (kid, ctr uint64, headerLen int, err error) + func DecryptDirectInvite(recipient *Identity, senderEncPub [32]byte, ePub [32]byte, ...) ([]byte, error) + func DecryptRoomPayload(key RoomKey, nonce []byte, ciphertext []byte, aad []byte) ([]byte, error) + func DeriveNoiseIKInviteKey(ePriv [32]byte, staticPriv [32]byte, peerEncPub [32]byte) ([]byte, error) + func DeriveNoiseIKInviteKeyRecipient(recipientPriv [32]byte, ePub [32]byte, senderEncPub [32]byte) ([]byte, error) + func EncodeCanonical(tag string, fields ...string) []byte + func EncodeSFrameHeader(kid, ctr uint64) []byte + func EncryptDirectInvite(sender *Identity, recipientEncPub [32]byte, payloadBytes []byte, aad []byte) (ePub [32]byte, nonce []byte, ciphertext []byte, err error) + func EncryptRoomPayload(key RoomKey, plaintext []byte, aad []byte) (nonce []byte, ciphertext []byte, err error) + func GeneratePublisherKeypair() (pubHex, privHex string, err error) + func InviteKeyCommitment(roomKey string) string + func MakeOpenSFrameKID(addr string) uint64 + func MakeSFrameKID(epoch uint64, leafIndex int) (uint64, error) + func MarshalPacket(p *Packet) ([]byte, error) + func OpenGroupPayload(key RoomKey, sealed, aad []byte) ([]byte, error) + func OpenUnicast(recipient *Identity, senderEncHex string, sealed, aad []byte) ([]byte, error) + func PacketAAD(p *Packet) []byte + func ParseEncPub(hexStr string) ([32]byte, error) + func RandomID() string + func SFrameEncryptFrame(entry SFrameKeyEntry, ctr uint64, plaintext []byte) ([]byte, error) + func SealGroupPayload(key RoomKey, plaintext, aad []byte) ([]byte, error) + func SealUnicast(sender *Identity, recipientEncHex string, plaintext, aad []byte) ([]byte, error) + func SignAppManifest(privHex string, m *AppManifest) error + func SignPacket(id *Identity, p *Packet) + func SplitSFrameKID(kid uint64) (epoch uint64, leafIndex int) + func Verify(pubHex string, msg []byte, sigHex string) bool + func VerifyAppBundle(m *AppManifest, bundleBytes []byte, ...) error + func VerifyAppBundleWithKeys(m *AppManifest, bundleBytes []byte, validPubKeys []string, ...) error + func VerifyAppManifest(m *AppManifest, pinnedPubHex, expectedAppID, expectedChannel string, ...) error + func VerifyAppManifestWithKeys(m *AppManifest, validPubKeys []string, ...) error + func VerifyPacket(p *Packet, maxHop int, replayWindow time.Duration) error + type ActivePeer struct + ChannelHashes map[uint32]bool + EncPub string + IsAnchor bool + IsGateway bool + JoinedAt time.Time + LastSeen time.Time + SignPub string + type AnchorSolicitFrame struct + Exclude []string + Needed int + QueryID string + Sender string + type AppBootstrapConfig struct + AppName string + MinSeq uint64 + SeederGroup SeederGroupConfig + ValidSignatures []string + Version string + type AppManifest struct + AppID string + Channel string + EntryMIME string + ExpiresAt int64 + FileID string + Format string + PubKey string + PublishedAt int64 + SHA256 string + Seq uint64 + Signature string + Size int64 + TotalChunks int + Version string + func SignAppBundle(privHex, appID, channel, version string, seq uint64, bundleData []byte, ...) (*AppManifest, error) + type AppManifestRequest struct + AppID string + Channel string + FileHash string + MinSeq uint64 + RequestID string + RoomID string + Version string + type AppManifestResponse struct + Manifest *AppManifest + Offer *AttachmentMeta + RequestID string + RoomID string + type AttachmentAssembler struct + Meta AttachmentMeta + RoomKey RoomKey + func NewAttachmentAssembler(meta AttachmentMeta, roomKey RoomKey) *AttachmentAssembler + func (a *AttachmentAssembler) AddChunk(index int, packedData []byte) (bool, error) + func (a *AttachmentAssembler) Assemble() ([]byte, error) + func (a *AttachmentAssembler) Data() []byte + func (a *AttachmentAssembler) ExportRawChunks() [][]byte + func (a *AttachmentAssembler) IsComplete() bool + func (a *AttachmentAssembler) MissingChunks() []int + func (a *AttachmentAssembler) NextMissingChunks(maxInFlight int) []int + func (a *AttachmentAssembler) Progress() (int, int) + func (a *AttachmentAssembler) RawChunk(index int) []byte + func (a *AttachmentAssembler) ReceivedCount() int + func (a *AttachmentAssembler) ResetUnreceivedRequests() + func (a *AttachmentAssembler) RetryStaleRequests(timeout time.Duration) int + type AttachmentMeta struct + AuthorPubKey string + EpochID int64 + FileID string + Hash string + MIME string + Name string + RoomID string + Signature string + Size int64 + Timestamp int64 + TotalChunks int + func PrepareAttachment(roomKey RoomKey, name, mime string, data []byte) (*AttachmentMeta, [][]byte, error) + func PrepareAttachmentWithEpoch(roomKey RoomKey, epochID int64, author, name, mime string, data []byte) (*AttachmentMeta, [][]byte, error) + type BroadcastEmitFunc func(ttl int, fanout int) + type CallControlFrame struct + AuthorPub string + Ciphertext string + EpochID int64 + IsDM bool + Nonce string + ScopeID string + Signature string + Timestamp int64 + type CallOptions struct + Audio bool + ListenOnly bool + Screen bool + Video bool + type CallPeerState struct + Address string + Audio bool + CallID string + Epoch int64 + LastSeen time.Time + LeafIndex int + Screen bool + SenderEncPub string + Video bool + type CallPresencePayload struct + Action string + Audio bool + CallID string + Epoch int64 + IsDM bool + LeafIndex int + ScopeID string + Screen bool + SenderEncPub string + Video bool + type CallSignalFrame struct + Ciphertext string + EphemeralPub string + From string + FromEncPub string + Nonce string + Signature string + Target string + Timestamp int64 + type CallSignalPayload struct + CallID string + Epoch int64 + From string + IsDM bool + Kind string + Payload string + ScopeID string + type ChannelInvite struct + EpochID int64 + ExpiresAt int64 + InviteePub string + InviterPub string + ParentInvite *ChannelInvite + RoomID string + RoomKey string + RoomKeyHash string + Signature string + func (inv *ChannelInvite) KeyCommitment() string + func (inv *ChannelInvite) Redacted() *ChannelInvite + type ChannelKind int + const ChannelPrivate + const ChannelPublic + type ChannelState struct + BootstrapKey RoomKey + ChannelHash uint32 + IsAppDist bool + Kind ChannelKind + RingBuffer *RingBuffer + RoomID string + RoomKey RoomKey + type ChatPayload struct + Text string + Type string + type ChunkRequest struct + ChunkIndex int + FileID string + RoomID string + type ChunkResponse struct + ChunkIndex int + Data []byte + FileID string + RoomID string + type Config struct + BroadcastHopTimeout time.Duration + CallEpochGrace time.Duration + ChunkSize int + GossipCacheTTL time.Duration + GossipFanout int + GossipTTL int + InitialBroadcastFanout int + InitialBroadcastTTL int + InviteTTL time.Duration + MaxAnchorConnections int + MaxBroadcastTTL int + MaxPeers int + MessageTTL time.Duration + MinActivePeers int + MinAnchorConnections int + MinPrivateGroupPeers int + MinPublicGroupPeers int + PassiveViewSize int + PrivateGroupTTL int + PublicGroupTTL int + ReplayWindow time.Duration + RingBufferCapacity int + STUNServers []string + ShuffleFanout int + ShuffleInterval time.Duration + ShuffleTTL int + SyncTimeout time.Duration + func DefaultConfig() Config + func (c Config) GroupTTL(kind ChannelKind) int + func (c Config) GroupTargetPeers(kind ChannelKind) int + type DMFrame struct + Kind string + Payload []byte + type DirectInvite struct + Ciphertext string + EphemeralPub string + FromEncPub string + FromSignPub string + InviteID string + Nonce string + Signature string + Timestamp int64 + ToSignPub string + type DirectPath struct + LeafIndex int + LeafPublicKey [32]byte + Nodes []DirectPathNode + type DirectPathNode struct + EncryptedKeys map[int]HPKECipher + NodeIndex int + PublicKey [32]byte + type Envelope struct + AuthorPubKey string + Ciphertext string + EpochID int64 + MsgID string + Nonce string + RoomID string + Signature string + Timestamp int64 + func NewEnvelope(id *Identity, roomID string, roomKey RoomKey, plaintext []byte) (*Envelope, error) + func NewEnvelopeWithEpoch(id *Identity, roomID string, roomKey RoomKey, epochID int64, plaintext []byte) (*Envelope, error) + func (e *Envelope) Decrypt(roomKey RoomKey) ([]byte, error) + func (e *Envelope) ID() string + func (e *Envelope) Verify(expectedRoomID string, maxClockSkew time.Duration) error + type EpochCommit struct + AddedPeer string + CommitterInvite *ChannelInvite + EpochID int64 + EvictedPeer string + Evictor string + EvictorEncPub string + MLSCommit *MLSCommit + MLSWelcome *MLSWelcome + Reason string + RoomID string + Signature string + Timestamp int64 + type ExpandingBroadcaster struct + func NewExpandingBroadcaster(cfg Config) *ExpandingBroadcaster + func (b *ExpandingBroadcaster) MarkSatisfied(tag string) + func (b *ExpandingBroadcaster) Start(tag string, maxTTL int, emit BroadcastEmitFunc) + func (b *ExpandingBroadcaster) Stop() + type ExportedNode struct + Blank bool + Index int + JoinedEpoch uint64 + LeafIndex int + Left int + Parent int + PublicKey [32]byte + Right int + SignPubHex string + UnmergedLeaves []int + type GroupContext struct + ConfirmedTranscriptHash [32]byte + Epoch uint64 + GroupID string + TreeHash [32]byte + func (gc GroupContext) Bytes() []byte + type GroupDiscoverPayload struct + IsReply bool + RoomID string + Want int + type HPKECipher struct + Ciphertext []byte + EphemeralPub [32]byte + type Hooks struct + Log func(msg string) + OnAnchorDeficit func(currentAnchors int, activePeers int) + OnAnchorIntro func(anchors []string, fallback bool) + OnAnchorSolicit func(needed int) + OnAppBundleReady func(manifest *AppManifest, data []byte) + OnAppManifest func(manifest *AppManifest, from string) + OnAttachment func(meta *AttachmentMeta, data []byte) + OnAttachmentOffer func(meta *AttachmentMeta) + OnAttachmentProgress func(fileID string, receivedChunks, totalChunks int) + OnCallPeerClosed func(scopeID string, peerAddr string) + OnCallPresence func(scopeID string, isDM bool, from string, payload *CallPresencePayload) + OnCallSignal func(sig *CallSignalPayload) + OnChannelDiscovered func(channelID string, peer string) + OnDirectInvite func(invite *DirectInvite, payload *InvitePayload) + OnEpochCommit func(commit *EpochCommit) + OnInviteResponse func(res *InviteResponse) + OnMemberEvicted func(evictedPeer, evictor, reason string, epochID int64) + OnMessage func(env *Envelope, plaintext []byte) + OnPeerCandidate func(peers []string) + OnPeerJoined func(addr string) + OnPeerLeft func(addr string) + OnRelayPayload func(from, relayType string, payload []byte) + OnSFrameKeysUpdated func(scopeID string, isDM bool, bundle *SFrameKeyBundle) + type Identity struct + EncPriv [32]byte + EncPub [32]byte + SignPriv ed25519.PrivateKey + SignPub ed25519.PublicKey + func NewIdentity() (*Identity, error) + func NewIdentityFromSeed(seed []byte) (*Identity, error) + func (id *Identity) Address() string + func (id *Identity) EncAddress() string + func (id *Identity) Sign(msg []byte) []byte + type InvitePayload struct + CreatedAt int64 + RoomID string + RoomKey string + Title string + Type string + type InviteResponse struct + Accepted bool + FromSignPub string + InviteID string + Signature string + Timestamp int64 + ToSignPub string + type KeyPackage struct + Identity *Identity + InitKey [32]byte + InitPriv *[32]byte + SignPub string + Signature []byte + Timestamp int64 + func NewKeyPackage(id *Identity) (*KeyPackage, error) + func (kp *KeyPackage) Verify() bool + type LeafSnapshot struct + Address string + LeafIndex int + type LeaveFrame struct + Peer string + RoomID string + Signature string + Timestamp int64 + type MLSCommit struct + AddedPackage *KeyPackage + CommitterLeaf int + ConfirmationTag [32]byte + Epoch uint64 + GroupID string + Path *DirectPath + RemovedLeaf int + Signature []byte + TreeNodes []ExportedNode + func (c *MLSCommit) CanonicalBytes() []byte + func (c *MLSCommit) CanonicalBytesWithConfirmation() []byte + type MLSGroup struct + ApplicationSecret [32]byte + ConfirmationKey [32]byte + ConfirmedTranscriptHash [32]byte + Epoch uint64 + EpochSecret [32]byte + ExporterSecret [32]byte + GroupID string + InitSecret [32]byte + LocalIdentity *Identity + MyLeafIndex int + Tree *RatchetTree + func NewMLSGroup(groupID string, id *Identity) (*MLSGroup, error) + func NewMLSGroupFromWelcome(id *Identity, welcome *MLSWelcome, initPriv ...*[32]byte) (*MLSGroup, error) + func (g *MLSGroup) ApplicationSecretBytes() [32]byte + func (g *MLSGroup) CreateAddCommit(pkg *KeyPackage) (*MLSCommit, *MLSWelcome, error) + func (g *MLSGroup) CreateRemoveCommit(targetLeaf int) (*MLSCommit, error) + func (g *MLSGroup) CreateUpdateCommit() (*MLSCommit, error) + func (g *MLSGroup) EnsureMemberLeaf(signPubHex string, initKey [32]byte) int + func (g *MLSGroup) Export(label string, context []byte, length int) ([]byte, error) + func (g *MLSGroup) FindLeafByAddress(signPubHex string) int + func (g *MLSGroup) GroupContext() GroupContext + func (g *MLSGroup) ProcessCommit(commit *MLSCommit) error + func (g *MLSGroup) SnapshotForSFrame(label string, context []byte) (epoch uint64, myLeaf int, leaves []LeafSnapshot, exported []byte, err error) + type MLSWelcome struct + ConfirmationTag [32]byte + ConfirmedTranscriptHash [32]byte + EncryptedGroupSecret HPKECipher + Epoch uint64 + GroupID string + Signature []byte + SignerLeaf int + TreeHash [32]byte + TreeNodes []ExportedNode + func (w *MLSWelcome) CanonicalBytes() []byte + type Node struct + Cfg Config + Hooks Hooks + ID *Identity + Transport Transport + func NewNode(id *Identity, roomID string, roomKey RoomKey, cfg Config, tr Transport, ...) *Node + func (n *Node) ActiveCallPeers(scopeID string) []CallPeerState + func (n *Node) ActiveChannels() []string + func (n *Node) AddAnchorPeer(addr string) + func (n *Node) AddGatewayPeer(addr string) + func (n *Node) AddPeer(addr string) + func (n *Node) Address() string + func (n *Node) AnchorPeers() []string + func (n *Node) AttachmentOffers() []*AttachmentMeta + func (n *Node) BootstrapApp(cfg AppBootstrapConfig) (RoomKey, error) + func (n *Node) BroadcastPeerInfo() + func (n *Node) ChannelCurrentEpoch(channelID string) int64 + func (n *Node) ChannelInvite() *ChannelInvite + func (n *Node) ChannelPeers(channelID string) []string + func (n *Node) ChannelRingBuffer(channelID string) *RingBuffer + func (n *Node) CreateChannelInvite(ttl time.Duration) (*ChannelInvite, error) + func (n *Node) CreateChannelInviteForChannel(channelID string, ttl time.Duration, inviteePub ...string) (*ChannelInvite, error) + func (n *Node) CurrentEpoch() int64 + func (n *Node) DiscoverPeers() + func (n *Node) DownloadAttachment(fileID string) error + func (n *Node) EvictPeer(targetAddr, reason string) (*EpochCommit, error) + func (n *Node) EvictPeerInChannel(channelID, targetAddr, reason string) (*EpochCommit, error) + func (n *Node) ExportSFrameKeys(scopeID string) (*SFrameKeyBundle, error) + func (n *Node) GetAttachmentData(fileID string) ([]byte, error) + func (n *Node) HandleWire(from string, data []byte) + func (n *Node) InitChannelMLS(channelID string) error + func (n *Node) InitGenesisEpoch() error + func (n *Node) InvitedBy(peerAddr string) string + func (n *Node) IsAdmittedMember(addr string) bool + func (n *Node) IsAnchorPeer(addr string) bool + func (n *Node) IsFallbackMode() bool + func (n *Node) IsGatewayPeer(addr string) bool + func (n *Node) IsInCall(scopeID string) bool + func (n *Node) IsPeerEvicted(addr string) bool + func (n *Node) IsPeerEvictedInChannel(channelID, addr string) bool + func (n *Node) JoinAppDistChannel(roomID string, key RoomKey, pinnedPubHex string, minSeq uint64) error + func (n *Node) JoinCall(scopeID string, isDM bool, opts CallOptions) (*SFrameKeyBundle, error) + func (n *Node) JoinChannel(channelID string) error + func (n *Node) JoinChannelWithKey(channelID string, key RoomKey) error + func (n *Node) JoinPrivateChannel(roomID string, key RoomKey, invite *ChannelInvite) error + func (n *Node) JoinPublicChannel(name string, psk RoomKey) error + func (n *Node) JoinedEpoch() int64 + func (n *Node) Leave() error + func (n *Node) LeaveCall(scopeID string) error + func (n *Node) MemberJoinEpoch(addr string) int64 + func (n *Node) Overlay() *OverlayView + func (n *Node) PeerEncKeys() map[string]string + func (n *Node) Peers() []string + func (n *Node) QueryPeers() + func (n *Node) RegisterAppBundle(roomID string, key RoomKey, manifest *AppManifest, bundleBytes []byte, ...) error + func (n *Node) RegisterDMScope(roomID, peerAddr string, key RoomKey) error + func (n *Node) RemoveGatewayPeer(addr string) + func (n *Node) RemovePeer(addr string) + func (n *Node) RequestAppManifest(roomID, appID, channel string, minSeq uint64) + func (n *Node) RequestAttachment(meta AttachmentMeta) + func (n *Node) RequestCatchUp() error + func (n *Node) RequestCatchUpForChannel(channelID string) error + func (n *Node) RequestCatchUpNextBatch() ([]string, error) + func (n *Node) RequestCatchUpNextBatchForChannel(channelID string) ([]string, error) + func (n *Node) RespondDirectInvite(invite *DirectInvite, accepted bool) error + func (n *Node) RetryMissingChunks(fileID string) + func (n *Node) RotateEpochKey() (*EpochCommit, error) + func (n *Node) RotateEpochKeyInChannel(channelID string) (*EpochCommit, error) + func (n *Node) SendCallSignal(scopeID, target, kind, payload string) error + func (n *Node) SendChannelMessage(channelID, text string) (*Envelope, error) + func (n *Node) SendDirectInvite(targetSignPub, inviteType, title string) (*DirectInvite, *InvitePayload, error) + func (n *Node) SendDirectInviteWithKey(targetSignPub, targetEncPubHex, inviteType, title string) (*DirectInvite, *InvitePayload, error) + func (n *Node) SendMessage(text string) (*Envelope, error) + func (n *Node) SendViaRelay(target, frameType string, payload []byte) error + func (n *Node) SetChannelInvite(inv *ChannelInvite) + func (n *Node) SetChannelInviteForChannel(channelID string, inv *ChannelInvite) + func (n *Node) SetFallbackMode(fb bool) + func (n *Node) SetPeerEncKey(signPub, encPub string) + func (n *Node) ShareAttachment(name, mime string, data []byte) (*AttachmentMeta, error) + func (n *Node) ShareAttachmentInChannel(channelID, name, mime string, data []byte) (*AttachmentMeta, error) + func (n *Node) SolicitAnchors(needed int, excludeAnchors []string) + func (n *Node) StartMeshSupervisor(ctx context.Context, interval time.Duration) + func (n *Node) StopMeshSupervisor() + func (n *Node) UnregisterDMScope(roomID string) + func (n *Node) UpdateCallOptions(scopeID string, opts CallOptions) error + func (n *Node) VerifyChannelInvite(inv *ChannelInvite) error + type OverlayView struct + func NewOverlayView(self string, cfg Config) *OverlayView + func (v *OverlayView) ActivePeers() []string + func (v *OverlayView) AddActive(signPub string, isGateway bool) bool + func (v *OverlayView) AddPassive(desc PeerDescriptor) + func (v *OverlayView) ChannelPeerCount(chHash uint32) int + func (v *OverlayView) EncKey(signPub string) string + func (v *OverlayView) EncKeysSnapshot() map[string]string + func (v *OverlayView) MarkAnchor(signPub string, isAnchor bool) + func (v *OverlayView) MarkChannelPeer(signPub string, chHash uint32) + func (v *OverlayView) PassivePeers() []PeerDescriptor + func (v *OverlayView) PickRepairCandidates(neededChannels map[uint32]bool, limit int) []PeerDescriptor + func (v *OverlayView) PickRotationVictim(minByChannel map[uint32]int, grace time.Duration) string + func (v *OverlayView) RemoveActive(signPub string, keepInPassive bool) bool + func (v *OverlayView) RemovePassive(signPub string) + func (v *OverlayView) SampleDescriptors(limit int, exclude string) []PeerDescriptor + func (v *OverlayView) SetEncKey(signPub, encPub string) + type Packet struct + ChannelHash uint32 + Encrypted bool + EpochID int64 + From string + FromEnc string + HopLimit int + HopStart int + ID string + Payload []byte + Port Port + Signature string + Timestamp int64 + To string + func NewGroupPacket(id *Identity, to string, chHash uint32, epochID int64, key RoomKey, port Port, ...) (*Packet, error) + func NewPlainPacket(id *Identity, to string, port Port, hopLimit int, body any) (*Packet, error) + func NewUnicastPacket(id *Identity, toSignPub, toEncPub string, port Port, hopLimit int, body any) (*Packet, error) + func UnmarshalPacket(data []byte) (*Packet, error) + type PacketCache struct + func NewPacketCache(ttl time.Duration, maxSize int) *PacketCache + func (c *PacketCache) MarkSeen(id string) bool + type PeerDescriptor struct + ChannelHashes []uint32 + EncPub string + SignPub string + type PeerInfoFrame struct + EncPub string + Invite *ChannelInvite + KeyPackage *KeyPackage + RoomID string + SignPub string + Signature string + Timestamp int64 + type PeerRequestPayload struct + ChannelHashes []uint32 + KnownPeers []string + WantCount int + type PeerResponsePayload struct + Peers []PeerDescriptor + RequestID string + type Port string + const PortAnchorSolicit + const PortAppInviteReq + const PortAppManifestReq + const PortAppManifestRes + const PortAttachMeta + const PortCallCtrl + const PortCallSig + const PortChat + const PortChunkReq + const PortChunkRes + const PortDM + const PortDirectInvite + const PortDirectInviteRes + const PortEpochCommit + const PortGroupDiscover + const PortGroupPeerInfo + const PortHyParViewNeighbor + const PortHyParViewShuffle + const PortLeave + const PortPeerRequest + const PortPeerResponse + const PortRootIntro + const PortSyncReq + const PortSyncRes + const PortWebRTCSignal + type RatchetTree struct + Nodes []*TreeKEMNode + NumLeaves int + func NewRatchetTree(numLeaves int) *RatchetTree + func (t *RatchetTree) Clone() *RatchetTree + func (t *RatchetTree) CopathIndex(ancestorIdx, directChildIdx int) int + func (t *RatchetTree) DirectPathIndices(leafIdx int) []int + func (t *RatchetTree) Resolution(nodeIdx int) []int + func (t *RatchetTree) RootIndex() int + func (t *RatchetTree) TreeHash() [32]byte + type RingBuffer struct + func NewRingBuffer(capacity int, ttl time.Duration) *RingBuffer + func (rb *RingBuffer) All() []*Envelope + func (rb *RingBuffer) GetMissing(lastSeenID string, knownIDs []string) []*Envelope + func (rb *RingBuffer) GetMissingForEpochRange(lastSeenID string, knownIDs []string, minEpoch, maxEpoch int64) []*Envelope + func (rb *RingBuffer) Len() int + func (rb *RingBuffer) Push(env *Envelope) + type RoomKey [RoomKeySize]byte + func AppDistRoomKeyFor(distRoomID string) RoomKey + func DefaultAppDistRoomKey() RoomKey + func GenerateRoomKey() (RoomKey, error) + func ParseRoomKey(s string) (RoomKey, error) + func (k RoomKey) String() string + type RootIntroFrame struct + AnchorPeers []string + Anchors []PeerDescriptor + Fallback bool + IsAnchor bool + type SFrameKeyBundle struct + Epoch uint64 + LeafIndex int + Receivers []SFrameKeyEntry + ScopeID string + Sender SFrameKeyEntry + func BuildDMSFrameBundle(roomID string, key RoomKey, selfAddr, peerAddr string) (*SFrameKeyBundle, error) + func (b *SFrameKeyBundle) Zeroize() + type SFrameKeyEntry struct + Address string + Epoch uint64 + KID uint64 + Key [sframeKeySize]byte + LeafIndex int + Salt [sframeSaltSize]byte + func DeriveLeafSFrameKey(epochBaseSecret []byte, epoch uint64, leafIndex int, addr string) (SFrameKeyEntry, error) + func (e *SFrameKeyEntry) Zeroize() + type SFrameKeyring struct + func NewSFrameKeyring() *SFrameKeyring + func (kr *SFrameKeyring) Clear() + func (kr *SFrameKeyring) Decrypt(frame []byte, expectedFrom string) ([]byte, uint64, error) + func (kr *SFrameKeyring) Encrypt(plaintext []byte) ([]byte, error) + func (kr *SFrameKeyring) InstallBundle(b *SFrameKeyBundle, graceDuration time.Duration) error + func (kr *SFrameKeyring) RevokeLeaf(leafIndex int) + func (kr *SFrameKeyring) RevokePeer(peerAddr string) + type SealedData struct + Body json.RawMessage + Port Port + func OpenGroupPacket(key RoomKey, p *Packet) (*SealedData, error) + func OpenUnicastPacket(id *Identity, p *Packet) (*SealedData, error) + type SeederGroupConfig struct + Channel string + Name string + PSK string + type ShufflePayload struct + IsReply bool + Origin PeerDescriptor + Peers []PeerDescriptor + RemainingHops int + RequestID string + type SyncRequest struct + CurrentEpoch int64 + KnownIDs []string + LastSeenMsgID string + RoomID string + type SyncResponse struct + Commits []*EpochCommit + Envelopes []*Envelope + Offers []*AttachmentMeta + RoomID string + type Transport interface + Broadcast func(data []byte) + ClosePeer func(addr string) + Peers func() []string + Send func(addr string, data []byte) error + type TreeKEMNode struct + Blank bool + Identity *Identity + Index int + JoinedEpoch uint64 + LeafIndex int + Left int + Parent int + PrivateKey *[32]byte + PublicKey [32]byte + Right int + SignPubHex string + UnmergedLeaves []int + type WebRTCSignalPayload struct + Kind string + SDP string + type WebRTCTransport interface + AcceptAnswer func(peerAddr, answerSDP string) error + AcceptOffer func(peerAddr, offerSDP string) (string, error) + CreateOffer func(peerAddr string) (string, error) v0.0.0-dev6 Nov 28, 2026 v0.0.0-dev5 Nov 28, 2026 v0.0.0-dev4 Nov 28, 2026 v0.0.0-dev3 Nov 28, 2026 v0.0.0-dev2 Nov 28, 2026 v0.0.0-dev Nov 28, 2026