stack

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerStack

type ConsumerStack struct {
	layer.BaseLayer
	// contains filtered or unexported fields
}

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

type IncomingStack struct {
	layer.BaseLayer
	// contains filtered or unexported fields
}

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) Listen

func (i *IncomingStack) Listen()

TODO implement tls config

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

type SellerStack struct {
	layer.BaseLayer
	// contains filtered or unexported fields
}

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()

Jump to

Keyboard shortcuts

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