Files
realy/nwc/make_invoice_response.go
2025-02-08 16:22:53 -01:06

30 lines
628 B
Go

package nwc
type MakeInvoiceRequest struct {
Request
Amount Msat
Description []byte // optional
DescriptionHash []byte // optional
Expiry int // optional
}
func NewMakeInvoiceRequest(amount Msat, description, descriptionHash []byte,
expiry int) MakeInvoiceRequest {
return MakeInvoiceRequest{
Request{Methods.MakeInvoice},
amount,
description,
descriptionHash,
expiry,
}
}
type MakeInvoiceResponse struct {
Response
InvoiceResponse
}
func NewMakeInvoiceResponse(resp InvoiceResponse) MakeInvoiceResponse {
return MakeInvoiceResponse{Response{Type: Methods.MakeInvoice}, resp}
}