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 (*Server) GetCommunity ¶
func (s *Server) GetCommunity(ctx context.Context, req *communitypb.GetCommunityRequest) (*communitypb.GetCommunityResponse, error)
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.