nostr

package
v0.0.1-20231210152425-... Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Subsystem = "NSTR"

Subsystem defines the sub system name of this package.

Variables

View Source
var (
	MockNostrClient = &NostrClient{}
)

Functions

func UseLogger

func UseLogger(logger btclog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using btclog.

Types

type NostrClient

type NostrClient struct {
	// contains filtered or unexported fields
}

func NewNostrClient

func NewNostrClient(serviceNSeckey string, servicename string, serviceRelayList []string) (*NostrClient, error)

func (*NostrClient) PublishEvent

func (n *NostrClient) PublishEvent(p *NostrPublishParam) error

type NostrPublishParam

type NostrPublishParam struct {
	UserNPubkey   string   `json:"nPubkey"`
	UserRelayList []string `json:"relayList,omitempty"`
	Slug          string   `json:"slug"`  // the identifier of blog artcle
	Price         int64    `json:"price"` // invoice's price, which may be optional using BOLT12 or LNURL in the future
	Invoice       *lnrpc.Invoice
}

Jump to

Keyboard shortcuts

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