claim Revoked Remote Commit Tx Outputs
fun claimRevokedRemoteCommitTxOutputs(keyManager: KeyManager, commitments: Commitments, tx: Transaction, feerates: OnChainFeerates): Pair<RevokedCommitPublished, Long>?
Content copied to clipboard
When an unexpected transaction spending the funding tx is detected:
we find out if the published transaction is one of our remote's revoked txs
and then: a) if it is a revoked tx we build a set of transactions that will punish them by stealing all their funds b) otherwise there is nothing we can do
Return
a [RevokedCommitPublished] object containing a penalty transaction for the remote's main output and the commitment number. With the commitment number, the caller should fetch information about the htlcs in this commitment and then call [claimRevokedRemoteCommitTxHtlcOutputs].