Add CreatePayment and CompletePayment (#229)

Co-authored-by: Marco Argentieri <tiero@users.noreply.github.com>

* Add claim command

* Persist pending data in sqlite repo

* Remove debug log

* Return pending data at interface level

* Fix unlocking btc wallet after restart

* Lint & Fix whitelist permissions

* Fix send command for covenant

* Update client/covenantless/claim.go

Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com>

* Fix

* Pay for min relay fee instead of estimating fees for redeem and unconf forfeit txs

* Add support for pending payments (coventanless)

* Fixes

* Fixes

* Improve verbosity

* Fix coin selection

* Fix

---------

Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com>
Co-authored-by: louisinger <louis@vulpem.com>
Co-authored-by: Marco Argentieri <tiero@users.noreply.github.com>
Co-authored-by: Marco Argentieri <3596602+tiero@users.noreply.github.com>
This commit is contained in:
Pietralberto Mazza
2024-08-10 19:18:02 +02:00
committed by GitHub
parent 57ce08f239
commit 72a7f29bab
67 changed files with 4730 additions and 769 deletions

View File

@@ -70,15 +70,19 @@ func New() interfaces.CLI {
return &clArkBitcoinCLI{}
}
func (c *clArkBitcoinCLI) Send(ctx *cli.Context) error {
return fmt.Errorf("not implemented")
}
type receiver struct {
To string `json:"to"`
Amount uint64 `json:"amount"`
}
func (r *receiver) isOnchain() bool {
_, err := btcutil.DecodeAddress(r.To, nil)
return err == nil
}
// func (r *receiver) isOnchain() bool {
// _, err := btcutil.DecodeAddress(r.To, nil)
// return err == nil
// }
func sendOnchain(ctx *cli.Context, receivers []receiver) (string, error) {
ptx, err := psbt.New(nil, nil, 2, 0, nil)