Documentation
¶
Index ¶
Constants ¶
View Source
const ( LND_CLIENT_TYPE = "LND" LNURL_CLIENT_TYPE = "LNURL" )
View Source
const MSAT_PER_SAT = 1000
Variables ¶
This section is empty.
Functions ¶
func DoGetRequest ¶
Types ¶
type CallbackUrlResJson ¶
type CallbackUrlResJson struct {
PR string `json:"pr"`
}
type DecodedPR ¶
type DecodedPR struct {
Currency string `json:"currency"`
CreatedAt int `json:"created_at"`
Expiry int `json:"expiry"`
Payee string `json:"payee"`
MSatoshi int64 `json:"msatoshi"`
Description string `json:"description,omitempty"`
DescriptionHash string `json:"description_hash,omitempty"`
PaymentHash string `json:"payment_hash"`
MinFinalCLTVExpiry int `json:"min_final_cltv_expiry"`
}
type LNClient ¶
type LNClient interface {
AddInvoice(ctx context.Context, lnReq *lnrpc.Invoice, httpReq *http.Request, options ...grpc.CallOption) (*lnrpc.AddInvoiceResponse, error)
}
func InitLnClient ¶
func InitLnClient(lnClientConfig *LNClientConfig) (lnClient LNClient, err error)
type LNClientConfig ¶
type LNClientConfig struct {
LNClientType string
LNDConfig LNDoptions
LNURLConfig LNURLoptions
RootKey []byte
}
type LNClientConn ¶
type LNClientConn struct {
LNClient LNClient
}
type LNDWrapper ¶
type LNDWrapper struct {
// contains filtered or unexported fields
}
func NewLNDclient ¶
func NewLNDclient(lndOptions LNDoptions) (result *LNDWrapper, err error)
func (*LNDWrapper) AddInvoice ¶
func (wrapper *LNDWrapper) AddInvoice(ctx context.Context, req *lnrpc.Invoice, httpReq *http.Request, options ...grpc.CallOption) (*lnrpc.AddInvoiceResponse, error)
type LNDoptions ¶
type LNURLoptions ¶
type LNURLoptions struct {
Address string
}
type LnAddressUrlResJson ¶
type LnAddressUrlResJson struct {
Callback string `json:"callback"`
MaxSendable uint64 `json:"maxSendable"`
MinSendable uint64 `json:"minSendable"`
Metadata string `json:"metadata"`
CommentAllowed uint `json:"commentAllowed"`
Tag string `json:"tag"`
}
func NewLNURLClient ¶
func NewLNURLClient(lnurlOptions LNURLoptions) (*LnAddressUrlResJson, error)
func (*LnAddressUrlResJson) AddInvoice ¶
func (lnAddressUrlResJson *LnAddressUrlResJson) AddInvoice(ctx context.Context, lnInvoice *lnrpc.Invoice, httpReq *http.Request, options ...grpc.CallOption) (*lnrpc.AddInvoiceResponse, error)
Click to show internal directories.
Click to hide internal directories.