buzzclient

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package buzzclient implements the small Nostr protocol subset needed to post channel messages through Buzz. It deliberately owns no configuration or secret-resolution policy; callers provide a signer and a bounded message.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDeliveryError

func NewDeliveryError(kind DeliveryErrorKind, code string, cause error) error

Types

type ChannelMessage

type ChannelMessage struct {
	ChannelID string
	Content   string
	CreatedAt time.Time
}

type Client

type Client interface {
	SendChannelMessage(context.Context, nostr.Signer, ChannelMessage) (Receipt, error)
}

func New

func New(options Options) (Client, error)

type DeliveryError

type DeliveryError struct {
	Kind DeliveryErrorKind
	Code string
	// contains filtered or unexported fields
}

func (*DeliveryError) Error

func (e *DeliveryError) Error() string

func (*DeliveryError) Unwrap

func (e *DeliveryError) Unwrap() error

type DeliveryErrorKind

type DeliveryErrorKind string
const (
	DeliveryTemporary DeliveryErrorKind = "temporary"
	DeliveryPermanent DeliveryErrorKind = "permanent"
	DeliveryAmbiguous DeliveryErrorKind = "ambiguous"
)

type Options

type Options struct {
	RelayURL           string
	AllowPrivateOrigin bool
	Timeout            time.Duration
}

type Receipt

type Receipt struct {
	EventID    string
	AcceptedAt time.Time
}

Jump to

Keyboard shortcuts

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