mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 22:50:58 +02:00
invoices: expose AMPRecord() method on Payload
This commit is contained in:
@@ -86,6 +86,10 @@ type Payload struct {
|
||||
// a TLV onion payload.
|
||||
MPP *record.MPP
|
||||
|
||||
// AMP holds the info provided in an option_amp record when parsed from
|
||||
// a TLV onion payload.
|
||||
AMP *record.AMP
|
||||
|
||||
// customRecords are user-defined records in the custom type range that
|
||||
// were included in the payload.
|
||||
customRecords record.CustomSet
|
||||
@@ -250,6 +254,12 @@ func (h *Payload) MultiPath() *record.MPP {
|
||||
return h.MPP
|
||||
}
|
||||
|
||||
// AMPRecord returns the record corresponding with option_amp parsed from the
|
||||
// onion payload.
|
||||
func (h *Payload) AMPRecord() *record.AMP {
|
||||
return h.AMP
|
||||
}
|
||||
|
||||
// CustomRecords returns the custom tlv type records that were parsed from the
|
||||
// payload.
|
||||
func (h *Payload) CustomRecords() record.CustomSet {
|
||||
|
Reference in New Issue
Block a user