mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 12:14:21 +01:00
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:
committed by
GitHub
parent
57ce08f239
commit
72a7f29bab
@@ -45,6 +45,8 @@ type AdminService interface {
|
||||
GetScheduledSweeps(ctx context.Context) ([]ScheduledSweep, error)
|
||||
GetRoundDetails(ctx context.Context, roundId string) (*RoundDetails, error)
|
||||
GetRounds(ctx context.Context, after int64, before int64) ([]string, error)
|
||||
GetWalletAddress(ctx context.Context) (string, error)
|
||||
GetWalletStatus(ctx context.Context) (*WalletStatus, error)
|
||||
}
|
||||
|
||||
type adminService struct {
|
||||
@@ -154,3 +156,24 @@ func (a *adminService) GetScheduledSweeps(ctx context.Context) ([]ScheduledSweep
|
||||
|
||||
return scheduledSweeps, nil
|
||||
}
|
||||
|
||||
func (a *adminService) GetWalletAddress(ctx context.Context) (string, error) {
|
||||
addresses, err := a.walletSvc.DeriveAddresses(ctx, 1)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return addresses[0], nil
|
||||
}
|
||||
|
||||
func (a *adminService) GetWalletStatus(ctx context.Context) (*WalletStatus, error) {
|
||||
status, err := a.walletSvc.Status(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &WalletStatus{
|
||||
IsInitialized: status.IsInitialized(),
|
||||
IsUnlocked: status.IsUnlocked(),
|
||||
IsSynced: status.IsSynced(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user