transact

package
v0.76.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerTransactLayer

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

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.

Jump to

Keyboard shortcuts

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