nostr

package
v0.0.1-20231209090649-... Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MockNostrClient = &NostrClient{}
)

Functions

This section is empty.

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
	Preimage      lntypes.Preimage `json:"preimage,omitempty"` // invoice's preimage, which will basically be filled in when the invoice settle
	Invoice       *lnrpc.Invoice
}

Jump to

Keyboard shortcuts

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