transact

package
v0.81.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ConsumerTrackNexusName = "ConsumerTrackNexus"

ConsumerTrackNexusName is the name of the ConsumerTrackNexusName.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerTrackNexus

type ConsumerTrackNexus struct {
	nexus.Nexus
	// contains filtered or unexported fields
}

ConsumerTrackNexus is used for interacting with a consumer via the ConsumerLayer.

func NewConsumerTransactNexus

func NewConsumerTransactNexus(belowNexus nexus.Nexus) *ConsumerTrackNexus

NewConsumerTransactNexus creates a ConsumerTrackNexus.

func (ConsumerTrackNexus) HandleLayerNotification

func (c ConsumerTrackNexus) HandleLayerNotification(msg notification.MoneysocketNotification)

HandleLayerNotification handles Opinion specific notifications.

func (ConsumerTrackNexus) IsLayerMessage

IsLayerMessage determines if a message needs to be handled by this layer.

func (ConsumerTrackNexus) OnBinMessage

func (c ConsumerTrackNexus) OnBinMessage(belowNexus nexus.Nexus, msg []byte)

OnBinMessage is a callback for a binary message.

func (*ConsumerTrackNexus) OnInvoice

func (c *ConsumerTrackNexus) OnInvoice(transactNexus nexus.Nexus, invoice string, requestReferenceUUID string)

OnInvoice calls on invoice function.

func (ConsumerTrackNexus) OnMessage

func (c ConsumerTrackNexus) OnMessage(belowNexus nexus.Nexus, message moneysocket_message.MoneysocketMessage)

OnMessage handles the message if relevant to this alyer.

func (*ConsumerTrackNexus) OnPreImage

func (c *ConsumerTrackNexus) OnPreImage(transactNexus nexus.Nexus, preimage string, requestReferenceUUID string)

OnPreImage calls on preimage function.

func (*ConsumerTrackNexus) OnProviderInfo

func (c *ConsumerTrackNexus) OnProviderInfo(consumerTransactNexus nexus.Nexus, msg moneysocket_message.MoneysocketMessage)

OnProviderInfo calls onProviderInfo callback.

func (ConsumerTrackNexus) RequestInvoice

func (c ConsumerTrackNexus) RequestInvoice(msats int64, description string) (uuid string)

RequestInvoice requests an invoice from the ConsumerTrackNexus.

func (ConsumerTrackNexus) RequestPay

func (c ConsumerTrackNexus) RequestPay(bolt11 string) (uuid string)

RequestPay requests a invoice from a callback.

func (*ConsumerTrackNexus) SetOnInvoice

func (c *ConsumerTrackNexus) SetOnInvoice(invoice OnInvoice)

SetOnInvoice sets a function to be called when on invoice is called.

func (*ConsumerTrackNexus) SetOnPreimage

func (c *ConsumerTrackNexus) SetOnPreimage(preimage OnPreimage)

SetOnPreimage sets function to be called when onPreImage is called.

func (*ConsumerTrackNexus) SetOnProviderInfo

func (c *ConsumerTrackNexus) SetOnProviderInfo(info OnProviderInfo)

SetOnProviderInfo sets a function to be called when OnProviderInfo is called.

type OnInvoice

type OnInvoice func(transactNexus nexus.Nexus, invoice string, requestReferenceUuid string)

OnInvoice handles an invoice request.

type OnPreimage

type OnPreimage func(transactNexus nexus.Nexus, preimage string, requestReferenceUuid string)

OnPreimage handles a preimage request.

type OnProviderInfo

type OnProviderInfo func(consumerTransactNexus nexus.Nexus, msg moneysocket_message.MoneysocketMessage)

OnProviderInfo handles a provider info request.

Jump to

Keyboard shortcuts

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