cnct: parse onion for resolvers
With the introduction of additional payload fields for mpp, it becomes a necessity to have their values available in the on-chain resolution flow. The incoming contest resolver notifies the invoice registry of the arrival of a payment and needs to supply all parameters for the registry to validate the htlc.
This commit is contained in:
8 files changed
+137
-17
No files matched your search
@@ -1,7 +1,10 @@
|
||||
package contractcourt
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/htlcswitch/hop"
|
||||
"github.com/lightningnetwork/lnd/invoices"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
@@ -26,3 +29,10 @@ type Registry interface {
|
||||
// HodlUnsubscribeAll unsubscribes from all hodl events.
|
||||
HodlUnsubscribeAll(subscriber chan<- interface{})
|
||||
}
|
||||
|
||||
// OnionProcessor is an interface used to decode onion blobs.
|
||||
type OnionProcessor interface {
|
||||
// ReconstructHopIterator attempts to decode a valid sphinx packet from
|
||||
// the passed io.Reader instance.
|
||||
ReconstructHopIterator(r io.Reader, rHash []byte) (hop.Iterator, error)
|
||||
}
|
||||
Reference in new issue
Block a user