compat

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package compat provides interfaces for nexuses imported by a lyer to avoid circular imports

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumeNexusInterface

type ConsumeNexusInterface interface {
	// RequestInvoice gets an invoice from the lightning driver from msats
	RequestInvoice(msats int64, overrideRequestUUID, description string)
	// RequestPay pays a bolt 11 invoice
	RequestPay(bolt11, overrideRequestUUID string)
}

ConsumeNexusInterface is an interface that allows for requesting/paying invoices.

type HandleInvoiceRequest

type HandleInvoiceRequest func(nexus nexus.Nexus, msats int64, requestUUID string)

HandleInvoiceRequest processes an invoice request for msats.

type HandleOpinionInvoiceRequest

type HandleOpinionInvoiceRequest func(nx nexus.Nexus, itemId string, requestUUID string)

HandleOpinionInvoiceRequest pays a request for an item.

type HandlePayRequest

type HandlePayRequest func(nexus nexus.Nexus, bolt11 string, requestUUID string)

HandlePayRequest pays a bolt11 invoice.

type HandleProviderInfoRequest

type HandleProviderInfoRequest func(seed beacon.SharedSeed) account.DB

HandleProviderInfoRequest is a sesed.

type NexusBySharedSeed

type NexusBySharedSeed map[string][]nexus.Nexus

NexusBySharedSeed maps nexuses to shared seeds.

type ProviderTransactLayerInterface

type ProviderTransactLayerInterface interface {
	layer.Base
	// HandleProviderInfoRequest processes an info request with a seed
	HandleProviderInfoRequest(seed beacon.SharedSeed) account.DB
	// HandlePayRequest processes a payment request
	HandlePayRequest(nexus nexus.Nexus, bolt11 string, requestUUID string)
	// HandleInvoiceRequest processes an invoice request
	HandleInvoiceRequest(nexus nexus.Nexus, msats int64, requestUUID string)
}

ProviderTransactLayerInterface is a provider for handling provider requests.

type RevokableNexus

type RevokableNexus interface {
	nexus.Nexus
	// RevokeFromLayer revokes a nexus from a given layer
	RevokeFromLayer()
}

RevokableNexus is a nexus that can be revoked from a layer.

type SellingLayerInterface

type SellingLayerInterface interface {
	// NexusWaitingForApp registers the nexus with the NexusWaitingForApp method
	NexusWaitingForApp(seed *beacon.SharedSeed, sellerNexus nexus.Nexus)
}

SellingLayerInterface is an interface with a NexusWaitingForApp method.

type WaitingForApp

type WaitingForApp map[string]nexus.Nexus

WaitingForApp is a map of uuid->nexus.Nexus.

Jump to

Keyboard shortcuts

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