lookupinvoice

package module
v1.2.4-0...-fa11bf4 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: Unlicense Imports: 13 Imported by: 0

README

lookupinvoice

A simple function capable of checking the status of an invoice in multiple Lightning backends.

Currently supports Sparko, LND REST and LNbits.

Usage

package main

import "github.com/bumi/lookupinvoice"

func main () {
	bolt11, err := lookupinvoice.LookupInvoice(lookupinvoice.Params{
		paymentHash: "invoice payment hash,
		Backend: LNDParams{
			Host: "https://my.lnd.com:1234",
			Macaroon: "0201036c6e640258030a10e82b814c2a3871f9753984e0f5e01ffb1201301a160a0761646472657373120472656164120577726974651a170a08696e766f69636573120472656164120577726974651a0f0a076f6e636861696e1204726561640000062087d4b068ad6b4d912680b3e0d912ca02936733a3377f246aa32bf354aa74ab2d",
		}
	})
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TorProxyURL = "socks5://127.0.0.1:9050"

Functions

This section is empty.

Types

type BackendParams

type BackendParams interface {
	// contains filtered or unexported methods
}

type Invoice

type Invoice struct {
	Settled bool
	Status  string
}

func LookupInvoice

func LookupInvoice(params Params) (invoice Invoice, err error)

type LNBitsParams

type LNBitsParams struct {
	Cert string
	Host string
	Key  string
}

type LNDParams

type LNDParams struct {
	Cert     string
	Host     string
	Macaroon string
}

type LNPayParams

type LNPayParams struct {
	PublicAccessKey  string
	WalletInvoiceKey string
}

type Params

type Params struct {
	Backend     BackendParams
	PaymentHash string
}

type SparkoParams

type SparkoParams struct {
	Cert string
	Host string
	Key  string
}

Jump to

Keyboard shortcuts

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