Drop unconditional forfeits txs in offline payment (#344)

* remove unconditionnal forfeit tx

* fix sqlite vtxo repo

* remove pendingData struct

* delete uncond_forfeits_tx table
This commit is contained in:
Louis Singer
2024-10-04 18:06:00 +02:00
committed by GitHub
parent 1d40892196
commit 7606b4cd00
33 changed files with 1654 additions and 1041 deletions

View File

@@ -42,9 +42,9 @@ type ASPClient interface {
Ping(ctx context.Context, paymentID string) (RoundEvent, error)
CreatePayment(
ctx context.Context, inputs []Input, outputs []Output,
) (string, []string, error)
) (string, error)
CompletePayment(
ctx context.Context, signedRedeemTx string, signedUnconditionalForfeitTxs []string,
ctx context.Context, signedRedeemTx string,
) error
ListVtxos(ctx context.Context, addr string) ([]Vtxo, []Vtxo, error)
GetRound(ctx context.Context, txID string) (*Round, error)
@@ -80,14 +80,13 @@ type Input struct {
type Vtxo struct {
Outpoint
Descriptor string
Amount uint64
RoundTxid string
ExpiresAt *time.Time
RedeemTx string
UnconditionalForfeitTxs []string
Pending bool
SpentBy string
Descriptor string
Amount uint64
RoundTxid string
ExpiresAt *time.Time
RedeemTx string
Pending bool
SpentBy string
}
type Output struct {