Documentation ¶
Index ¶
- type ConsumerTransactLayer
- func (c *ConsumerTransactLayer) AnnounceNexus(belowNexus nexus.Nexus)
- func (c *ConsumerTransactLayer) OnInvoice(transactNexus nexus.Nexus, invoice string, requestReferenceUUID string)
- func (c *ConsumerTransactLayer) OnPreImage(transactNexus nexus.Nexus, preimage string, requestReferenceUUID string)
- func (c *ConsumerTransactLayer) OnProviderInfo(consumerTransactNexus nexus.Nexus, msg moneysocket_message.MoneysocketMessage)
- func (c *ConsumerTransactLayer) RegisterAboveLayer(belowLayer layer.Base)
- func (c *ConsumerTransactLayer) RequestInvoice(nexusUUID uuid.UUID, msats int64, description string) (requestUUID uuid.UUID, err error)
- func (c *ConsumerTransactLayer) RequestPay(nexusUUID uuid.UUID, bolt11 string) (requestUUID uuid.UUID, err error)
- func (c *ConsumerTransactLayer) SetOnInvoice(invoice transact.OnInvoice)
- func (c *ConsumerTransactLayer) SetOnPreimage(preimage transact.OnPreimage)
- func (c *ConsumerTransactLayer) SetOnProviderInfo(info transact.OnProviderInfo)
- func (c *ConsumerTransactLayer) SetupConsumerTransactionNexus(belowNexus nexus.Nexus)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerTransactLayer ¶
ConsumerTransactLayer handles transaction.
func NewConsumerTransactLayer ¶ added in v0.63.0
func NewConsumerTransactLayer() *ConsumerTransactLayer
NewConsumerTransactLayer creates a ConsumerTransactLayer.
func (*ConsumerTransactLayer) AnnounceNexus ¶
func (c *ConsumerTransactLayer) AnnounceNexus(belowNexus nexus.Nexus)
AnnounceNexus creates a new transact.ConsumerTransactNexus and registers it.
func (*ConsumerTransactLayer) OnInvoice ¶
func (c *ConsumerTransactLayer) OnInvoice(transactNexus nexus.Nexus, invoice string, requestReferenceUUID string)
OnInvoice calls an OnInvoice function.
func (*ConsumerTransactLayer) OnPreImage ¶
func (c *ConsumerTransactLayer) OnPreImage(transactNexus nexus.Nexus, preimage string, requestReferenceUUID string)
OnPreImage calls the registered on preimage function.
func (*ConsumerTransactLayer) OnProviderInfo ¶
func (c *ConsumerTransactLayer) OnProviderInfo(consumerTransactNexus nexus.Nexus, msg moneysocket_message.MoneysocketMessage)
OnProviderInfo calls the registered ConsumerTransactLayer.OnProviderInfo.
func (*ConsumerTransactLayer) RegisterAboveLayer ¶
func (c *ConsumerTransactLayer) RegisterAboveLayer(belowLayer layer.Base)
RegisterAboveLayer registers the current nexuses announce/revoke nexuses to the below layer.
func (*ConsumerTransactLayer) RequestInvoice ¶
func (c *ConsumerTransactLayer) RequestInvoice(nexusUUID uuid.UUID, msats int64, description string) (requestUUID uuid.UUID, err error)
RequestInvoice requests an invoice.
func (*ConsumerTransactLayer) RequestPay ¶
func (c *ConsumerTransactLayer) RequestPay(nexusUUID uuid.UUID, bolt11 string) (requestUUID uuid.UUID, err error)
RequestPay requests payment for an invoice.
func (*ConsumerTransactLayer) SetOnInvoice ¶
func (c *ConsumerTransactLayer) SetOnInvoice(invoice transact.OnInvoice)
SetOnInvoice sets a function to be called when on invoice is called.
func (*ConsumerTransactLayer) SetOnPreimage ¶
func (c *ConsumerTransactLayer) SetOnPreimage(preimage transact.OnPreimage)
SetOnPreimage sets a function to be called when onPreImage is called.
func (*ConsumerTransactLayer) SetOnProviderInfo ¶
func (c *ConsumerTransactLayer) SetOnProviderInfo(info transact.OnProviderInfo)
SetOnProviderInfo sets a provider info.
func (*ConsumerTransactLayer) SetupConsumerTransactionNexus ¶
func (c *ConsumerTransactLayer) SetupConsumerTransactionNexus(belowNexus nexus.Nexus)
SetupConsumerTransactionNexus registers the consumer.ConsumerTransactNexus.