community

package
v1.37.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package community serves what Flipcash shows about the community around a currency launched on Flipcash (see communitypb.CommunityMetadata): one community per launched currency, keyed by its mint.

A community's top holder chats are the public groups gated on its currency (see chat.GatedMint) whose members hold the most of it, ranked off the holdings snapshots the chat store keeps (see chat.GroupHoldings and chat.Store.GetTopGroupsByHoldings). This package reads the ranking; it does not compute it; chat.HoldingsWorker does. A community's leader is the Flipcash user who launched its currency.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	communitypb.UnimplementedCommunityServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(
	log *zap.Logger,

	authz auth.Authorizer,

	accounts account.Store,
	chats chat.Store,
	hydrator *chat.Hydrator,
	ocpData ocp_data.Provider,
	profiles chat.ProfileReader,
) *Server

func (*Server) GetCommunity

GetCommunity returns a launched currency's community. Everything in it is public and the same for every caller: auth, when set, is verified as everywhere else, but changes nothing.

The mint must be a currency launched on Flipcash and available in OCP (see launchedCurrency); anything else, the core mint included, is NOT_FOUND. The name is the currency's, from the same OCP record, and so is the account the leader is resolved from (see leader).

The top holder chats are one read of the ranking (see chat.Store.GetTopGroupsByHoldings), projected as a public list (see chat.Hydrator.PublicGroupsMetadata), which drops a group that no longer has a record. Each group's holdings_summary is the snapshot the ranking read returned, not the one the projection reads beside it, so the order and the amounts shown always agree, even when a refresh lands between the two reads.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL