mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 12:14:21 +01:00
Add support for covenant-less ASP (#214)
* scaffolding wallet * remove wallet db, add loader instead * wip * implement some wallet methods * signing and utxos * renaming * fee estimator * chain source options * config * application service * clark docker-compose * CLI refactor * v0 clark * v0.1 clark * fix SignTapscriptInput (btcwallet) * wallet.Broadcast, send via explora * fix ASP pubkey * Use lnd's btcwallet & Add rpc to get wallet staus * wip * unilateral exit * Fixes on watching for notifications and cli init * handle non-final BIP68 errors * Fixes * Fixes * Fix * a * fix onboard cosigners + revert tree validation * fix covenant e2e tests * fix covenantless e2e tests * fix container naming * fix lint error * update REAME.md * Add env var for wallet password --------- Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
This commit is contained in:
@@ -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 {
|
||||
@@ -167,3 +169,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