Documentation ¶
Index ¶
- Constants
- func EncodeMoneysocketNotification(msg MoneysocketNotification, toEncode map[string]interface{}) error
- func NotificationFromText(payload []byte) (base.MoneysocketMessage, base.MessageType, error)
- type BaseMoneySocketNotification
- func (b BaseMoneySocketNotification) MessageClass() base.MessageClass
- func (b BaseMoneySocketNotification) NotificationName() string
- func (b BaseMoneySocketNotification) NotificationUuid() string
- func (b BaseMoneySocketNotification) RequestReferenceUuid() string
- func (b BaseMoneySocketNotification) RequestType() base.MessageType
- type Item
- type MoneysocketNotification
- type NotifyInvoice
- type NotifyOpinionInvoice
- type NotifyOpinionSeller
- type NotifyOpinionSellerNotReady
- type NotifyPong
- type NotifyPreimage
- type NotifyProvider
- type NotifyProviderNotReady
- type Rendezvous
- type RendezvousEnd
- type RendezvousNotReady
Constants ¶
View Source
const ( NotificationUuidKey = "notification_uuid" RequestReferenceUuidKey = "request_reference_uuid" NotificationNameKey = "notification_name" )
Variables ¶
This section is empty.
Functions ¶
func EncodeMoneysocketNotification ¶
func EncodeMoneysocketNotification(msg MoneysocketNotification, toEncode map[string]interface{}) error
func NotificationFromText ¶
func NotificationFromText(payload []byte) (base.MoneysocketMessage, base.MessageType, error)
Types ¶
type BaseMoneySocketNotification ¶
type BaseMoneySocketNotification struct { base.BaseMoneysocketMessage BaseNotificationUuid string BaseRequestReferenceUuid string // contains filtered or unexported fields }
func DecodeRequest ¶
func DecodeRequest(request []byte) (b BaseMoneySocketNotification, err error)
func NewBaseMoneySocketNotification ¶
func NewBaseMoneySocketNotification(notificationType base.MessageType, requestUuid string) BaseMoneySocketNotification
func (BaseMoneySocketNotification) MessageClass ¶
func (b BaseMoneySocketNotification) MessageClass() base.MessageClass
func (BaseMoneySocketNotification) NotificationName ¶
func (b BaseMoneySocketNotification) NotificationName() string
func (BaseMoneySocketNotification) NotificationUuid ¶
func (b BaseMoneySocketNotification) NotificationUuid() string
func (BaseMoneySocketNotification) RequestReferenceUuid ¶
func (b BaseMoneySocketNotification) RequestReferenceUuid() string
func (BaseMoneySocketNotification) RequestType ¶
func (b BaseMoneySocketNotification) RequestType() base.MessageType
type Item ¶
type Item struct { // item id ItemID string `json:"item_id"` // name of the item Name string `json:"name"` // msats in the message Msats int `json:"msats"` }
item from the seller
type MoneysocketNotification ¶
type MoneysocketNotification interface { base.MoneysocketMessage // get the notification uuid NotificationUuid() string RequestReferenceUuid() string NotificationName() string RequestType() base.MessageType }
type NotifyInvoice ¶
type NotifyInvoice struct { BaseMoneySocketNotification Bolt11 string }
func DecodeNotifyInvoice ¶
func DecodeNotifyInvoice(payload []byte) (NotifyInvoice, error)
func NewNotifyInvoice ¶
func NewNotifyInvoice(bolt11, requestUuid string) NotifyInvoice
func (NotifyInvoice) IsValid ¶
func (o NotifyInvoice) IsValid() (bool, error)
func (NotifyInvoice) MustBeClearText ¶
func (o NotifyInvoice) MustBeClearText() bool
func (NotifyInvoice) ToJson ¶
func (o NotifyInvoice) ToJson() ([]byte, error)
type NotifyOpinionInvoice ¶
type NotifyOpinionInvoice struct { BaseMoneySocketNotification Bolt11 string }
func DecodeNotifyOpinionInvoice ¶
func DecodeNotifyOpinionInvoice(payload []byte) (NotifyOpinionInvoice, error)
func NewNotifyOpinionInvoice ¶
func NewNotifyOpinionInvoice(requestUuid, bolt11 string) NotifyOpinionInvoice
func (NotifyOpinionInvoice) ToJson ¶
func (n NotifyOpinionInvoice) ToJson() ([]byte, error)
type NotifyOpinionSeller ¶
type NotifyOpinionSeller struct { BaseMoneySocketNotification // contains filtered or unexported fields }
func DecodeNotifyOpinionSeller ¶
func DecodeNotifyOpinionSeller(payload []byte) (NotifyOpinionSeller, error)
func NewNotifyOpinionSeller ¶
func NewNotifyOpinionSeller(sellerUuid string, items []Item, requestReferenceUuid string) NotifyOpinionSeller
func (NotifyOpinionSeller) ToJson ¶
func (o NotifyOpinionSeller) ToJson() ([]byte, error)
type NotifyOpinionSellerNotReady ¶
type NotifyOpinionSellerNotReady struct {
BaseMoneySocketNotification
}
func DecodeNotifyOpinionSellerNotReady ¶
func DecodeNotifyOpinionSellerNotReady(payload []byte) (NotifyOpinionSellerNotReady, error)
func NewNotifyOpinionSellerNotReady ¶
func NewNotifyOpinionSellerNotReady(requestUuid string) NotifyOpinionSellerNotReady
create a new rendezvous end notification with a given rendezvous id
func (NotifyOpinionSellerNotReady) MustBeClearText ¶
func (r NotifyOpinionSellerNotReady) MustBeClearText() bool
func (NotifyOpinionSellerNotReady) ToJson ¶
func (r NotifyOpinionSellerNotReady) ToJson() ([]byte, error)
type NotifyPong ¶
type NotifyPong struct {
BaseMoneySocketNotification
}
func DecodeNotifyPong ¶
func DecodeNotifyPong(payload []byte) (NotifyPong, error)
func NewNotifyPong ¶
func NewNotifyPong(requestUuid string) NotifyPong
func (NotifyPong) ToJson ¶
func (n NotifyPong) ToJson() ([]byte, error)
type NotifyPreimage ¶
type NotifyPreimage struct { BaseMoneySocketNotification Preimage string Ext string }
func NewNotifyPreimage ¶
func NewNotifyPreimage(preimage, ext, requestUuid string) NotifyPreimage
func (NotifyPreimage) IsValid ¶
func (n NotifyPreimage) IsValid() (bool, error)
func (NotifyPreimage) MustBeClearText ¶
func (n NotifyPreimage) MustBeClearText() bool
func (NotifyPreimage) ToJson ¶
func (n NotifyPreimage) ToJson() ([]byte, error)
type NotifyProvider ¶
type NotifyProvider struct { BaseMoneySocketNotification // account uuid AccountUuid string // provider pay outgoing invoice Payer bool // provider generates invoices for incoming payments Payee bool // balance to advertize as being available Wad wad.Wad }
func NewNotifyProvider ¶
func (NotifyProvider) MustBeClearText ¶
func (n NotifyProvider) MustBeClearText() bool
func (NotifyProvider) ToJson ¶
func (n NotifyProvider) ToJson() ([]byte, error)
type NotifyProviderNotReady ¶
type NotifyProviderNotReady struct {
BaseMoneySocketNotification
}
func DecodeNotifyProviderNotReady ¶
func DecodeNotifyProviderNotReady(payload []byte) (NotifyProviderNotReady, error)
func NewNotifyProviderNotReady ¶
func NewNotifyProviderNotReady(requestUuid string) NotifyProviderNotReady
func (NotifyProviderNotReady) ToJson ¶
func (n NotifyProviderNotReady) ToJson() ([]byte, error)
type Rendezvous ¶
type Rendezvous struct { BaseMoneySocketNotification // contains filtered or unexported fields }
func DecodeRendezvous ¶
func DecodeRendezvous(payload []byte) (Rendezvous, error)
func NewNotifyRendezvous ¶
func NewNotifyRendezvous(rid, requestUuid string) Rendezvous
create a new rendezvous end notification with a given rendezvous id
func (Rendezvous) MustBeClearText ¶
func (r Rendezvous) MustBeClearText() bool
func (Rendezvous) ToJson ¶
func (r Rendezvous) ToJson() ([]byte, error)
type RendezvousEnd ¶
type RendezvousEnd struct { BaseMoneySocketNotification // contains filtered or unexported fields }
func DecodeRendezvousEnd ¶
func DecodeRendezvousEnd(payload []byte) (RendezvousEnd, error)
func NewRendezvousEnd ¶
func NewRendezvousEnd(rid, requestUuid string) RendezvousEnd
create a new rendezvous end notification with a given rendezvous id
func (RendezvousEnd) MustBeClearText ¶
func (r RendezvousEnd) MustBeClearText() bool
func (RendezvousEnd) ToJson ¶
func (r RendezvousEnd) ToJson() ([]byte, error)
type RendezvousNotReady ¶
type RendezvousNotReady struct { BaseMoneySocketNotification // contains filtered or unexported fields }
func DecodeRendezvousNotReady ¶
func DecodeRendezvousNotReady(payload []byte) (RendezvousNotReady, error)
func NewRendezvousNotReady ¶
func NewRendezvousNotReady(rid, requestUuid string) RendezvousNotReady
create a new rendezvous end notification with a given rendezvous id
func (RendezvousNotReady) MustBeClearText ¶
func (r RendezvousNotReady) MustBeClearText() bool
func (RendezvousNotReady) ToJson ¶
func (r RendezvousNotReady) ToJson() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.