Documentation ¶
Index ¶
- type ConsumerStack
- func (c *ConsumerStack) AnnounceNexus(belowNexus nexusHelper.Nexus)
- func (c *ConsumerStack) OnInvoice(transactNexus nexusHelper.Nexus, invoice string, requestReferenceUuid string)
- func (c *ConsumerStack) OnPing(transactNexus nexusHelper.Nexus, msecs int)
- func (c *ConsumerStack) OnPreImage(transactNexus nexusHelper.Nexus, preimage string, requestReferenceUuid string)
- func (c *ConsumerStack) OnProviderInfo(consumerTransactNexus nexusHelper.Nexus, ...)
- func (c *ConsumerStack) RequestInvoice(msats int64, overrideRequestUuid, description string)
- func (c *ConsumerStack) RequestPay(bolt11, overrideRequestUuid string)
- func (c *ConsumerStack) RevokeNexus(belowNexus nexusHelper.Nexus)
- func (c *ConsumerStack) SendStackEvent(layerName string, nexus nexusHelper.Nexus, event string)
- func (c *ConsumerStack) SetOnInvoice(invoice nexus_transact.OnInvoice)
- func (c *ConsumerStack) SetOnPing(ping consumerNexus.OnPingFn)
- func (c *ConsumerStack) SetOnPreimage(preimage nexus_transact.OnPreimage)
- func (c *ConsumerStack) SetOnProviderInfo(info nexus_transact.OnProviderInfo)
- func (c *ConsumerStack) SetSendStackEvent(handler layer.OnLayerEventFn)
- func (c *ConsumerStack) SetupConsumerLayer(belowLayer layer.Layer)
- func (c *ConsumerStack) SetupTransactLayer(belowLayer layer.Layer)
- type IncomingStack
- func (i *IncomingStack) AnnounceNexus(belowNexus nexusHelper.Nexus)
- func (i *IncomingStack) GetListenLocations() []location.Location
- func (i *IncomingStack) GetListenUrl() string
- func (i *IncomingStack) Listen()
- func (i *IncomingStack) RegisterAboveLayer(belowLayer layer.Layer)
- func (i *IncomingStack) RevokeNexus(nexus nexusHelper.Nexus)
- func (i *IncomingStack) SendStackEvent(layerName string, nexus nexusHelper.Nexus, event string)
- func (i *IncomingStack) SetupLocalLayer(outgoingLocalLayer *local.OutgoingLocalLayer)
- func (i *IncomingStack) SetupRelayLayer(rendezvousLayer *rendezvous.IncomingRendezvousLayer)
- func (i *IncomingStack) SetupRendezvousLayer(belowLayer1 layer.Layer, belowLayer2 layer.Layer)
- func (i *IncomingStack) SetupWebsocketLayer()
- type OutgoingConsumerStack
- type SellerStack
- func (s *SellerStack) AnnounceNexus(belowNexus nexus.Nexus)
- func (s *SellerStack) DoDisconnect()
- func (s *SellerStack) HandleInvoiceRequest(msats int64, requestUuid string)
- func (s *SellerStack) HandleOpinionInvoiceRequest(itemId string, requestUuid string)
- func (s *SellerStack) ProviderNowReadyFromApp()
- func (s *SellerStack) RevokeNexus(belowNexus nexus.Nexus)
- func (s *SellerStack) SellerNowReadyFromApp()
- func (s *SellerStack) SetHandleInvoiceRequest(handleInvoice func(msats int64, requestUuid string))
- func (s *SellerStack) SetHandleOpinionInvoiceRequest(handler func(item string, requestUuid string))
- func (s *SellerStack) SetHandlePayRequest(handlePayRequest func(msats int64, requestUuid string))
- func (s *SellerStack) SetHandleProviderInfoRequest(hpr compat.HandleProviderInfoRequest)
- func (s *SellerStack) SetHandleSellerInfoRequest(handler func() nexusSeller.SellerInfo)
- func (s *SellerStack) SetOnStackEvent(onEvent func(layerName string, nexus nexus.Nexus, status string))
- func (s *SellerStack) SetupOutgoingRendezvousLayer()
- func (s *SellerStack) SetupOutgoingWebsocketLayer()
- func (s *SellerStack) SetupProviderLayer()
- func (s *SellerStack) SetupProviderTransactLayer()
- func (s *SellerStack) SetupSellerLayer()
- func (s *SellerStack) UpdatePrices()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerStack ¶
handles various events passed from/to child classes
func NewConsumerStack ¶
func NewConsumerStack() *ConsumerStack
func (*ConsumerStack) AnnounceNexus ¶
func (c *ConsumerStack) AnnounceNexus(belowNexus nexusHelper.Nexus)
func (*ConsumerStack) OnInvoice ¶
func (c *ConsumerStack) OnInvoice(transactNexus nexusHelper.Nexus, invoice string, requestReferenceUuid string)
call on invoice function
func (*ConsumerStack) OnPing ¶
func (c *ConsumerStack) OnPing(transactNexus nexusHelper.Nexus, msecs int)
func (*ConsumerStack) OnPreImage ¶
func (c *ConsumerStack) OnPreImage(transactNexus nexusHelper.Nexus, preimage string, requestReferenceUuid string)
call on preimage function
func (*ConsumerStack) OnProviderInfo ¶
func (c *ConsumerStack) OnProviderInfo(consumerTransactNexus nexusHelper.Nexus, msg moneysocket_message.MoneysocketMessage)
func (*ConsumerStack) RequestInvoice ¶
func (c *ConsumerStack) RequestInvoice(msats int64, overrideRequestUuid, description string)
func (*ConsumerStack) RequestPay ¶
func (c *ConsumerStack) RequestPay(bolt11, overrideRequestUuid string)
func (*ConsumerStack) RevokeNexus ¶
func (c *ConsumerStack) RevokeNexus(belowNexus nexusHelper.Nexus)
func (*ConsumerStack) SendStackEvent ¶
func (c *ConsumerStack) SendStackEvent(layerName string, nexus nexusHelper.Nexus, event string)
func (*ConsumerStack) SetOnInvoice ¶
func (c *ConsumerStack) SetOnInvoice(invoice nexus_transact.OnInvoice)
set function to be called when on invoice is called
func (*ConsumerStack) SetOnPing ¶
func (c *ConsumerStack) SetOnPing(ping consumerNexus.OnPingFn)
set function to be called when onPreImage is called
func (*ConsumerStack) SetOnPreimage ¶
func (c *ConsumerStack) SetOnPreimage(preimage nexus_transact.OnPreimage)
set function to be called when onPreImage is called
func (*ConsumerStack) SetOnProviderInfo ¶
func (c *ConsumerStack) SetOnProviderInfo(info nexus_transact.OnProviderInfo)
set function to be called when OnProviderInfo is called
func (*ConsumerStack) SetSendStackEvent ¶
func (c *ConsumerStack) SetSendStackEvent(handler layer.OnLayerEventFn)
func (*ConsumerStack) SetupConsumerLayer ¶
func (c *ConsumerStack) SetupConsumerLayer(belowLayer layer.Layer)
func (*ConsumerStack) SetupTransactLayer ¶
func (c *ConsumerStack) SetupTransactLayer(belowLayer layer.Layer)
type IncomingStack ¶
TODO
func NewIncomingStack ¶
func NewIncomingStack(config *config.Config, outgoingLocalLayer *local.OutgoingLocalLayer) *IncomingStack
func (*IncomingStack) AnnounceNexus ¶
func (i *IncomingStack) AnnounceNexus(belowNexus nexusHelper.Nexus)
func (*IncomingStack) GetListenLocations ¶
func (i *IncomingStack) GetListenLocations() []location.Location
return websocket location object from config
func (*IncomingStack) GetListenUrl ¶
func (i *IncomingStack) GetListenUrl() string
func (*IncomingStack) RegisterAboveLayer ¶
func (i *IncomingStack) RegisterAboveLayer(belowLayer layer.Layer)
func (*IncomingStack) RevokeNexus ¶
func (i *IncomingStack) RevokeNexus(nexus nexusHelper.Nexus)
func (*IncomingStack) SendStackEvent ¶
func (i *IncomingStack) SendStackEvent(layerName string, nexus nexusHelper.Nexus, event string)
func (*IncomingStack) SetupLocalLayer ¶
func (i *IncomingStack) SetupLocalLayer(outgoingLocalLayer *local.OutgoingLocalLayer)
func (*IncomingStack) SetupRelayLayer ¶
func (i *IncomingStack) SetupRelayLayer(rendezvousLayer *rendezvous.IncomingRendezvousLayer)
func (*IncomingStack) SetupRendezvousLayer ¶
func (i *IncomingStack) SetupRendezvousLayer(belowLayer1 layer.Layer, belowLayer2 layer.Layer)
func (*IncomingStack) SetupWebsocketLayer ¶
func (i *IncomingStack) SetupWebsocketLayer()
type OutgoingConsumerStack ¶
type OutgoingConsumerStack struct { *ConsumerStack // contains filtered or unexported fields }
outgoing consumer stack provides an interoperable interface to connect to a given beacon currently it only supports the websocket layer
func NewOutgoingConsumerStack ¶
func NewOutgoingConsumerStack() *OutgoingConsumerStack
create and initialize an outgoing consumer stack
func (*OutgoingConsumerStack) DoConnect ¶
func (o *OutgoingConsumerStack) DoConnect(connectBeacon beacon.Beacon) error
connect to the given beacon
func (*OutgoingConsumerStack) SetupRendezvousLayer ¶
func (o *OutgoingConsumerStack) SetupRendezvousLayer(belowLayer layer.Layer)
func (*OutgoingConsumerStack) SetupWebsocketLayer ¶
func (o *OutgoingConsumerStack) SetupWebsocketLayer()
type SellerStack ¶
func NewSellerStack ¶
func NewSellerStack() *SellerStack
func (*SellerStack) AnnounceNexus ¶
func (s *SellerStack) AnnounceNexus(belowNexus nexus.Nexus)
func (*SellerStack) DoDisconnect ¶
func (s *SellerStack) DoDisconnect()
func (*SellerStack) HandleInvoiceRequest ¶
func (s *SellerStack) HandleInvoiceRequest(msats int64, requestUuid string)
func (*SellerStack) HandleOpinionInvoiceRequest ¶
func (s *SellerStack) HandleOpinionInvoiceRequest(itemId string, requestUuid string)
func (*SellerStack) ProviderNowReadyFromApp ¶
func (s *SellerStack) ProviderNowReadyFromApp()
func (*SellerStack) RevokeNexus ¶
func (s *SellerStack) RevokeNexus(belowNexus nexus.Nexus)
func (*SellerStack) SellerNowReadyFromApp ¶
func (s *SellerStack) SellerNowReadyFromApp()
func (*SellerStack) SetHandleInvoiceRequest ¶
func (s *SellerStack) SetHandleInvoiceRequest(handleInvoice func(msats int64, requestUuid string))
func (*SellerStack) SetHandleOpinionInvoiceRequest ¶
func (s *SellerStack) SetHandleOpinionInvoiceRequest(handler func(item string, requestUuid string))
func (*SellerStack) SetHandlePayRequest ¶
func (s *SellerStack) SetHandlePayRequest(handlePayRequest func(msats int64, requestUuid string))
func (*SellerStack) SetHandleProviderInfoRequest ¶
func (s *SellerStack) SetHandleProviderInfoRequest(hpr compat.HandleProviderInfoRequest)
func (*SellerStack) SetHandleSellerInfoRequest ¶
func (s *SellerStack) SetHandleSellerInfoRequest(handler func() nexusSeller.SellerInfo)
func (*SellerStack) SetOnStackEvent ¶
func (s *SellerStack) SetOnStackEvent(onEvent func(layerName string, nexus nexus.Nexus, status string))
func (*SellerStack) SetupOutgoingRendezvousLayer ¶
func (s *SellerStack) SetupOutgoingRendezvousLayer()
func (*SellerStack) SetupOutgoingWebsocketLayer ¶
func (s *SellerStack) SetupOutgoingWebsocketLayer()
func (*SellerStack) SetupProviderLayer ¶
func (s *SellerStack) SetupProviderLayer()
func (*SellerStack) SetupProviderTransactLayer ¶
func (s *SellerStack) SetupProviderTransactLayer()
func (*SellerStack) SetupSellerLayer ¶
func (s *SellerStack) SetupSellerLayer()
func (*SellerStack) UpdatePrices ¶
func (s *SellerStack) UpdatePrices()
Click to show internal directories.
Click to hide internal directories.