Move redeem transactions creation client-side (#388)

* move OOR transaction creation client-side

* robust redeem tx checks

* optimize GetVtxos db call

* rename CompleteAsyncPayment --> SubmitRedeemTx

* fix permissions.go
This commit is contained in:
Louis Singer
2024-11-25 13:38:04 +01:00
committed by GitHub
parent d184fc0f41
commit 12d666bfdf
67 changed files with 1772 additions and 5548 deletions

View File

@@ -9,7 +9,6 @@ import (
"github.com/ark-network/ark/common/bitcointree"
"github.com/ark-network/ark/common/tree"
"github.com/btcsuite/btcd/btcec/v2/schnorr"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/decred/dcrd/dcrec/secp256k1/v4"
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
)
@@ -47,12 +46,9 @@ type ASPClient interface {
ctx context.Context, paymentID string,
) (<-chan RoundEventChannel, func(), error)
Ping(ctx context.Context, paymentID string) error
CreatePayment(
ctx context.Context, inputs []AsyncPaymentInput, outputs []Output,
) (string, error)
CompletePayment(
SubmitRedeemTx(
ctx context.Context, signedRedeemTx string,
) error
) (string, error)
ListVtxos(ctx context.Context, addr string) ([]Vtxo, []Vtxo, error)
GetRound(ctx context.Context, txID string) (*Round, error)
GetRoundByID(ctx context.Context, roundID string) (*Round, error)
@@ -92,11 +88,6 @@ type Input struct {
Tapscripts []string
}
type AsyncPaymentInput struct {
Input
ForfeitLeafHash chainhash.Hash
}
type Vtxo struct {
Outpoint
Pubkey string