Add util fn for creating a Transaction from spendable outputs
authorMatt Corallo <git@bluematt.me>
Thu, 4 Feb 2021 00:47:36 +0000 (19:47 -0500)
committerMatt Corallo <git@bluematt.me>
Tue, 16 Feb 2021 20:58:02 +0000 (15:58 -0500)
commit325a021903aac847e018fe735d805326ebc78f32
tree02a91c2bebdfa2e9bf7772015f577f585eed3476
parent294cba45cc3d481b60fc8d0c72bf412f28f3dd76
Add util fn for creating a Transaction from spendable outputs

This adds a utility method, `KeysManager::spend_spendable_outputs`,
which constructs a Transaction from a given set of
`SpendableOutputDescriptor`s, deriving relevant keys as needed.

It also adds methods which can sign individual inputs where
channel-specific key derivation is required to
`InMemoryChannelKeys`, making it easy to sign transaction inputs
when a custom `KeysInterface` is used with `InMemoryChannelKeys`.
lightning/src/chain/keysinterface.rs