Versions in this module Expand all Collapse all v0 v0.1.0 Jun 17, 2026 Changes in this version + const EndpointCapabilities + const EndpointCompromisedPubkeys + const EndpointFollowers + const EndpointMuters + const EndpointRankPubkeys + const EndpointRecommendPubkeys + const EndpointSearchPubkeys + const EndpointStatsPubkey + var Endpoints = []string + var ErrAlgorithmNotFound = errors.New("algorithm not found") + func ValidatePubkey(s string) error + func WriteError(w http.ResponseWriter, e *Error) + func WriteRetry(w http.ResponseWriter, after time.Duration) + type Algorithm struct + Description string + ID AlgorithmID + Icon string + LearnMore string + Name string + POV bool + Topic bool + func (a Algorithm) Support(pov, topic string) error + type AlgorithmID string + const SignatureProofAlgorithm + func (a AlgorithmID) Validate() error + type CapabilityDoc struct + CompromisedPubkeys []Algorithm + Followers []Algorithm + Muters []Algorithm + RankPubkeys []Algorithm + RecommendPubkeys []Algorithm + SearchPubkeys []Algorithm + StatsPubkey []Algorithm + func GetCapabilities(ctx context.Context, c *http.Client, providerURL string) (CapabilityDoc, error) + func (c *CapabilityDoc) UnmarshalJSON(data []byte) error + func (c CapabilityDoc) Algorithm(endpoint string, ID AlgorithmID) (Algorithm, error) + func (c CapabilityDoc) MarshalJSON() ([]byte, error) + func (c CapabilityDoc) Validate() error + type Client struct + func NewClient(providerURL string, httpClient *http.Client) (*Client, error) + func (c *Client) Capabilities() CapabilityDoc + func (c *Client) CompromisedPubkeys(ctx context.Context, r CompromisedPubkeysRequest, opts ...Option) (CompromisedPubkeysResponse, error) + func (c *Client) Followers(ctx context.Context, r FollowersRequest, opts ...Option) (FollowersResponse, error) + func (c *Client) Muters(ctx context.Context, r MutersRequest, opts ...Option) (MutersResponse, error) + func (c *Client) RankPubkeys(ctx context.Context, r RankPubkeysRequest, opts ...Option) (RankPubkeysResponse, error) + func (c *Client) RecommendPubkeys(ctx context.Context, r RecommendPubkeysRequest, opts ...Option) (RecommendPubkeysResponse, error) + func (c *Client) RefreshCapabilities(ctx context.Context) error + func (c *Client) SearchPubkeys(ctx context.Context, r SearchPubkeysRequest, opts ...Option) (SearchPubkeysResponse, error) + func (c *Client) StatsPubkey(ctx context.Context, r StatsPubkeyRequest, opts ...Option) (StatsPubkeyResponse, error) + type CompromisedPubkeysRequest struct + Algorithm AlgorithmID + POV string + Pubkeys []string + func (r CompromisedPubkeysRequest) Validate() error + type CompromisedPubkeysResponse map[string]compromise.Result + func (r *CompromisedPubkeysResponse) UnmarshalJSON(data []byte) error + type Error struct + Code int + Reason string + func ErrBadRequest(reason string) *Error + func ErrForbidden(reason string) *Error + func ErrInternal(reason string) *Error + func ErrNotAllowed(reason string) *Error + func ErrNotFound(reason string) *Error + func ErrNotImplemented(reason string) *Error + func ErrPaymentRequired(reason string) *Error + func ErrTooLarge(reason string) *Error + func ErrTooMany(reason string) *Error + func ErrUnauthorized(reason string) *Error + func ErrUnavailable(reason string) *Error + func ErrUnsupportedMedia(reason string) *Error + func (e *Error) Is(target error) bool + func (e Error) Error() string + func (e Error) String() string + type FollowersRequest struct + Algorithm AlgorithmID + Limit int + POV string + Pubkey string + func (r FollowersRequest) Validate() error + type FollowersResponse struct + Results []RankedPubkey + TTL *int + Total *int + type MutersRequest struct + Algorithm AlgorithmID + Limit int + POV string + Pubkey string + func (r MutersRequest) Validate() error + type MutersResponse struct + Results []RankedPubkey + TTL *int + Total *int + type Option func(r *http.Request) error + func WithAuth(e nostr.Event) Option + type RankPubkeysRequest struct + Algorithm AlgorithmID + Limit int + POV string + Pubkeys []string + func (r RankPubkeysRequest) Validate() error + type RankPubkeysResponse struct + Results []RankedPubkey + TTL *int + type RankedPubkey struct + Pubkey string + Rank float64 + type RecommendPubkeysRequest struct + Algorithm AlgorithmID + Limit int + POV string + Topic string + func (r RecommendPubkeysRequest) Validate() error + type RecommendPubkeysResponse struct + Results []RankedPubkey + TTL *int + type Retry struct + After time.Duration + func (r *Retry) Is(target error) bool + func (r Retry) Error() string + type SearchPubkeysRequest struct + Algorithm AlgorithmID + Limit int + POV string + Query string + func (r SearchPubkeysRequest) Validate() error + type SearchPubkeysResponse struct + Results []RankedPubkey + TTL *int + type StatsPubkeyRequest struct + Algorithm AlgorithmID + POV string + Pubkey string + func (r StatsPubkeyRequest) Validate() error + type StatsPubkeyResponse struct + FirstSeenAt *int64 + Followers *int + Follows *int + Muters *int + Mutes *int + Pubkey string + Rank float64 + Reporters *int + Reports *int + TTL *int