Documentation
¶
Index ¶
- Constants
- func ExtractInternalFile(ctx context.Context, container testcontainers.Container, path string) (string, error)
- func ReadDataFromReader(reader io.Reader) (string, error)
- func SetUpLightingNetworkTestEnviroment(ctx context.Context, names string) (testcontainers.Container, testcontainers.Container, testcontainers.Container, ...)
- type LNBitsData
- type LightingComms
- func (l *LightingComms) CheckIfInvoicePayed(quote string) (cashu.ACTION_STATE, string, error)
- func (l *LightingComms) LnbitsInvoiceRequest(method string, endpoint string, reqBody any, responseType any) error
- func (l *LightingComms) PayInvoice(invoice string, feeReserve uint64) (*LightningPaymentResponse, error)
- func (l *LightingComms) QueryPayment(zpayInvoice *zpay32.Invoice, invoice string) (*QueryRoutesResponse, error)
- func (l *LightingComms) RequestInvoice(amount int64) (LightningInvoiceResponse, error)
- type LightningBackend
- type LightningInvoiceRequest
- type LightningInvoiceResponse
- type LightningPaymentResponse
- type QueryRoutesResponse
Constants ¶
View Source
const ( FAKE_WALLET = "FakeWallet" LND_WALLET = "LndGrpcWallet" LND_HOST = "LND_GRPC_HOST" LND_TLS_CERT = "LND_TLS_CERT" LND_MACAROON = "LND_MACAROON" LNBITS_WALLET = "LNbitsWallet" MINT_LNBITS_ENDPOINT = "MINT_LNBITS_ENDPOINT" MINT_LNBITS_KEY = "MINT_LNBITS_KEY" )
Variables ¶
This section is empty.
Functions ¶
func ExtractInternalFile ¶
func SetUpLightingNetworkTestEnviroment ¶
func SetUpLightingNetworkTestEnviroment(ctx context.Context, names string) (testcontainers.Container, testcontainers.Container, testcontainers.Container, testcontainers.Container, error)
This is used for testing purpose returns alice, bob, btcNode, aliceLnBits, error
Types ¶
type LNBitsData ¶
type LightingComms ¶
type LightingComms struct { LndRpcClient *grpc.ClientConn Macaroon string LightningBackend LightningBackend LnBitsData LNBitsData }
func SetupLightingComms ¶
func SetupLightingComms(ctx context.Context) (*LightingComms, error)
func (*LightingComms) CheckIfInvoicePayed ¶
func (l *LightingComms) CheckIfInvoicePayed(quote string) (cashu.ACTION_STATE, string, error)
func (*LightingComms) LnbitsInvoiceRequest ¶
func (*LightingComms) PayInvoice ¶
func (l *LightingComms) PayInvoice(invoice string, feeReserve uint64) (*LightningPaymentResponse, error)
func (*LightingComms) QueryPayment ¶
func (l *LightingComms) QueryPayment(zpayInvoice *zpay32.Invoice, invoice string) (*QueryRoutesResponse, error)
func (*LightingComms) RequestInvoice ¶
func (l *LightingComms) RequestInvoice(amount int64) (LightningInvoiceResponse, error)
type LightningBackend ¶
type LightningBackend uint
const LNBITS LightningBackend = iota + 2
const LNDGRPC LightningBackend = iota + 1
type LightningInvoiceRequest ¶
type QueryRoutesResponse ¶
type QueryRoutesResponse struct {
FeeReserve uint64 `json:"fee_reserve"`
}
Click to show internal directories.
Click to hide internal directories.