input: add new Preimage method to input.Input
In this commit, we add a new method to obtain an option of a preimage to the input.Input struct. This is useful for callers that have an Input, and want to optionally obtain the preimage.
This commit is contained in:
3 files changed
+46
-1
No files matched your search
@@ -1160,6 +1160,11 @@ func (bo *breachedOutput) SignDesc() *input.SignDescriptor {
|
||||
return &bo.signDesc
|
||||
}
|
||||
|
||||
// Preimage returns the preimage that was used to create the breached output.
|
||||
func (bo *breachedOutput) Preimage() fn.Option[lntypes.Preimage] {
|
||||
return fn.None[lntypes.Preimage]()
|
||||
}
|
||||
|
||||
// CraftInputScript computes a valid witness that allows us to spend from the
|
||||
// breached output. It does so by first generating and memoizing the witness
|
||||
// generation function, which parameterized primarily by the witness type and
|
||||
|
||||
Reference in new issue
Block a user