Add support for unilateral exit (#79)

* v0 unilateral redemption

* add fee outputs to congestion tree

* unilateral exit

* rework unilateral exit verbosity

* substract fee from vtxo amount

* remove unused functions and variables

* fix after reviews

* Update noah/explorer.go

Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
Signed-off-by: Louis Singer <41042567+louisinger@users.noreply.github.com>

* remove bufferutils

---------

Signed-off-by: Louis Singer <41042567+louisinger@users.noreply.github.com>
Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
This commit is contained in:
Louis Singer
2024-01-16 14:13:47 +01:00
committed by GitHub
parent b438eb638f
commit cf78fc1ab3
33 changed files with 1240 additions and 630 deletions

View File

@@ -91,6 +91,7 @@ func (b *txBuilder) BuildForfeitTxs(
// BuildPoolTx implements ports.TxBuilder.
func (b *txBuilder) BuildPoolTx(
aspPubkey *secp256k1.PublicKey, wallet ports.WalletService, payments []domain.Payment,
minRelayFee uint64,
) (poolTx string, congestionTree domain.CongestionTree, err error) {
aspScriptBytes, err := p2wpkhScript(aspPubkey, b.net)
if err != nil {