From 439d178b96b08c0bb824cea6ba101ef9659d337e Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Tue, 5 Nov 2024 10:15:10 +0100 Subject: [PATCH] staticaddr: cmd listdeposits and listswaps --- cmd/loop/quote.go | 4 +- cmd/loop/staticaddr.go | 105 +++- loopd/perms/perms.go | 14 + loopd/swapclient_server.go | 360 ++++++++---- looprpc/client.pb.go | 1010 ++++++++++++++++++++++++++++++-- looprpc/client.proto | 147 ++++- looprpc/client.swagger.json | 88 +++ looprpc/client_grpc.pb.go | 84 +++ looprpc/swapclient.pb.json.go | 50 ++ staticaddr/loopin/interface.go | 3 + staticaddr/loopin/manager.go | 35 ++ 11 files changed, 1717 insertions(+), 183 deletions(-) diff --git a/cmd/loop/quote.go b/cmd/loop/quote.go index ec2cdb65..599a7fbc 100644 --- a/cmd/loop/quote.go +++ b/cmd/loop/quote.go @@ -139,8 +139,8 @@ func quoteIn(ctx *cli.Context) error { func depositAmount(ctx context.Context, client looprpc.SwapClientClient, depositOutpoints []string) (btcutil.Amount, error) { - addressSummary, err := client.GetStaticAddressSummary( - ctx, &looprpc.StaticAddressSummaryRequest{ + addressSummary, err := client.ListStaticAddressDeposits( + ctx, &looprpc.ListStaticAddressDepositsRequest{ Outpoints: depositOutpoints, }, ) diff --git a/cmd/loop/staticaddr.go b/cmd/loop/staticaddr.go index de8d3a57..f52ba47f 100644 --- a/cmd/loop/staticaddr.go +++ b/cmd/loop/staticaddr.go @@ -11,6 +11,7 @@ import ( "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/lightninglabs/loop/labels" "github.com/lightninglabs/loop/looprpc" + "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/staticaddr/loopin" "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightningnetwork/lnd/routing/route" @@ -24,6 +25,8 @@ var staticAddressCommands = cli.Command{ Subcommands: []cli.Command{ newStaticAddressCommand, listUnspentCommand, + listDepositsCommand, + listStaticAddressSwapsCommand, withdrawalCommand, summaryCommand, }, @@ -217,6 +220,36 @@ func withdraw(ctx *cli.Context) error { return nil } +var listDepositsCommand = cli.Command{ + Name: "listdeposits", + Usage: "Display a summary of static address related information.", + Description: ` + `, + Flags: []cli.Flag{ + cli.StringFlag{ + Name: "filter", + Usage: "specify a filter to only display deposits in " + + "the specified state. Leaving out the filter " + + "returns all deposits.\nThe state can be one " + + "of the following: \n" + + "deposited\nwithdrawing\nwithdrawn\n" + + "looping_in\nlooped_in\n" + + "publish_expired_deposit\n" + + "sweep_htlc_timeout\nhtlc_timeout_swept\n" + + "wait_for_expiry_sweep\nexpired\nfailed\n.", + }, + }, + Action: listDeposits, +} + +var listStaticAddressSwapsCommand = cli.Command{ + Name: "listswaps", + Usage: "Display a summary of static address related information.", + Description: ` + `, + Action: listStaticAddressSwaps, +} + var summaryCommand = cli.Command{ Name: "summary", ShortName: "s", @@ -242,10 +275,10 @@ var summaryCommand = cli.Command{ Action: summary, } -func summary(ctx *cli.Context) error { +func listDeposits(ctx *cli.Context) error { ctxb := context.Background() if ctx.NArg() > 0 { - return cli.ShowCommandHelp(ctx, "summary") + return cli.ShowCommandHelp(ctx, "listdeposits") } client, cleanup, err := getClient(ctx) @@ -293,8 +326,8 @@ func summary(ctx *cli.Context) error { filterState = looprpc.DepositState_UNKNOWN_STATE } - resp, err := client.GetStaticAddressSummary( - ctxb, &looprpc.StaticAddressSummaryRequest{ + resp, err := client.ListStaticAddressDeposits( + ctxb, &looprpc.ListStaticAddressDepositsRequest{ StateFilter: filterState, }, ) @@ -307,6 +340,54 @@ func summary(ctx *cli.Context) error { return nil } +func listStaticAddressSwaps(ctx *cli.Context) error { + ctxb := context.Background() + if ctx.NArg() > 0 { + return cli.ShowCommandHelp(ctx, "listswaps") + } + + client, cleanup, err := getClient(ctx) + if err != nil { + return err + } + defer cleanup() + + resp, err := client.ListStaticAddressSwaps( + ctxb, &looprpc.ListStaticAddressSwapsRequest{}, + ) + if err != nil { + return err + } + + printRespJSON(resp) + + return nil +} + +func summary(ctx *cli.Context) error { + ctxb := context.Background() + if ctx.NArg() > 0 { + return cli.ShowCommandHelp(ctx, "summary") + } + + client, cleanup, err := getClient(ctx) + if err != nil { + return err + } + defer cleanup() + + resp, err := client.GetStaticAddressSummary( + ctxb, &looprpc.StaticAddressSummaryRequest{}, + ) + if err != nil { + return err + } + + printRespJSON(resp) + + return nil +} + func utxosToOutpoints(utxos []string) ([]*looprpc.OutPoint, error) { outpoints := make([]*looprpc.OutPoint, 0, len(utxos)) if len(utxos) == 0 { @@ -391,8 +472,8 @@ func staticAddressLoopIn(ctx *cli.Context) error { } // Get the amount we need to quote for. - summaryResp, err := client.GetStaticAddressSummary( - ctxb, &looprpc.StaticAddressSummaryRequest{ + depositList, err := client.ListStaticAddressDeposits( + ctxb, &looprpc.ListStaticAddressDepositsRequest{ StateFilter: looprpc.DepositState_DEPOSITED, }, ) @@ -400,6 +481,14 @@ func staticAddressLoopIn(ctx *cli.Context) error { return err } + if len(depositList.FilteredDeposits) == 0 { + errString := fmt.Sprintf("no confirmed deposits available, "+ + "deposits need at least %v confirmations", + deposit.DefaultConfTarget) + + return errors.New(errString) + } + var depositOutpoints []string switch { case isAllSelected == isUtxoSelected: @@ -407,7 +496,7 @@ func staticAddressLoopIn(ctx *cli.Context) error { case isAllSelected: depositOutpoints = depositsToOutpoints( - summaryResp.FilteredDeposits, + depositList.FilteredDeposits, ) case isUtxoSelected: @@ -437,7 +526,7 @@ func staticAddressLoopIn(ctx *cli.Context) error { // populate the quote request with the sum of selected deposits and // prompt the user for acceptance. quoteReq.Amt, err = sumDeposits( - depositOutpoints, summaryResp.FilteredDeposits, + depositOutpoints, depositList.FilteredDeposits, ) if err != nil { return err diff --git a/loopd/perms/perms.go b/loopd/perms/perms.go index d47257e8..6a0586f5 100644 --- a/loopd/perms/perms.go +++ b/loopd/perms/perms.go @@ -94,6 +94,20 @@ var RequiredPermissions = map[string][]bakery.Op{ Entity: "loop", Action: "in", }}, + "/looprpc.SwapClient/ListStaticAddressDeposits": {{ + Entity: "swap", + Action: "read", + }, { + Entity: "loop", + Action: "in", + }}, + "/looprpc.SwapClient/ListStaticAddressSwaps": {{ + Entity: "swap", + Action: "read", + }, { + Entity: "loop", + Action: "in", + }}, "/looprpc.SwapClient/GetStaticAddressSummary": {{ Entity: "swap", Action: "read", diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 88500ef5..809ad7a5 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -763,11 +763,11 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context, } // Retrieve deposits to calculate their total value. - var summary *looprpc.StaticAddressSummaryResponse + var depositList *looprpc.ListStaticAddressDepositsResponse amount := btcutil.Amount(req.Amt) if len(req.DepositOutpoints) > 0 { - summary, err = s.GetStaticAddressSummary( - ctx, &looprpc.StaticAddressSummaryRequest{ + depositList, err = s.ListStaticAddressDeposits( + ctx, &looprpc.ListStaticAddressDepositsRequest{ Outpoints: req.DepositOutpoints, }, ) @@ -775,14 +775,14 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context, return nil, err } - if summary == nil { + if depositList == nil { return nil, fmt.Errorf("no summary returned for " + "deposit outpoints") } // The requested amount should be 0 here if the request // contained deposit outpoints. - if amount != 0 && len(summary.FilteredDeposits) > 0 { + if amount != 0 && len(depositList.FilteredDeposits) > 0 { return nil, fmt.Errorf("amount should be 0 for " + "deposit quotes") } @@ -790,8 +790,8 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context, // In case we quote for deposits we send the server both the // total value and the number of deposits. This is so the server // can probe the total amount and calculate the per input fee. - if amount == 0 && len(summary.FilteredDeposits) > 0 { - for _, deposit := range summary.FilteredDeposits { + if amount == 0 && len(depositList.FilteredDeposits) > 0 { + for _, deposit := range depositList.FilteredDeposits { amount += btcutil.Amount(deposit.Value) } } @@ -1459,15 +1459,16 @@ func (s *swapClientServer) WithdrawDeposits(ctx context.Context, }, err } -// GetStaticAddressSummary returns a summary static address related information. -// Amongst deposits and withdrawals and their total values it also includes a -// list of detailed deposit information filtered by their state. -func (s *swapClientServer) GetStaticAddressSummary(ctx context.Context, - req *looprpc.StaticAddressSummaryRequest) ( - *looprpc.StaticAddressSummaryResponse, error) { +// ListStaticAddressDeposits returns a list of all sufficiently confirmed +// deposits behind the static address and displays properties like value, +// state or blocks til expiry. +func (s *swapClientServer) ListStaticAddressDeposits(ctx context.Context, + req *looprpc.ListStaticAddressDepositsRequest) ( + *looprpc.ListStaticAddressDepositsResponse, error) { + outpoints := req.Outpoints if req.StateFilter != looprpc.DepositState_UNKNOWN_STATE && - len(req.Outpoints) > 0 { + len(outpoints) > 0 { return nil, fmt.Errorf("can either filter by state or " + "outpoints") @@ -1478,9 +1479,181 @@ func (s *swapClientServer) GetStaticAddressSummary(ctx context.Context, return nil, err } - return s.depositSummary( - ctx, allDeposits, req.StateFilter, req.Outpoints, + // Deposits filtered by state or outpoints. + var filteredDeposits []*looprpc.Deposit + if len(outpoints) > 0 { + f := func(d *deposit.Deposit) bool { + for _, outpoint := range outpoints { + if outpoint == d.OutPoint.String() { + return true + } + } + return false + } + filteredDeposits = filter(allDeposits, f) + + if len(outpoints) != len(filteredDeposits) { + return nil, fmt.Errorf("not all outpoints found in " + + "deposits") + } + } else { + f := func(d *deposit.Deposit) bool { + if req.StateFilter == looprpc.DepositState_UNKNOWN_STATE { + // Per default, we return deposits in all + // states. + return true + } + + return d.IsInState(toServerState(req.StateFilter)) + } + filteredDeposits = filter(allDeposits, f) + } + + // Calculate the blocks until expiry for each deposit. + lndInfo, err := s.lnd.Client.GetInfo(ctx) + if err != nil { + return nil, err + } + + bestBlockHeight := int64(lndInfo.BlockHeight) + params, err := s.staticAddressManager.GetStaticAddressParameters(ctx) + if err != nil { + return nil, err + } + for i := 0; i < len(filteredDeposits); i++ { + filteredDeposits[i].BlocksUntilExpiry = + filteredDeposits[i].ConfirmationHeight + + int64(params.Expiry) - bestBlockHeight + } + + return &looprpc.ListStaticAddressDepositsResponse{ + FilteredDeposits: filteredDeposits, + }, nil +} + +// ListStaticAddressSwaps returns a list of all swaps that are currently pending +// or previously succeeded. +func (s *swapClientServer) ListStaticAddressSwaps(ctx context.Context, + _ *looprpc.ListStaticAddressSwapsRequest) ( + *looprpc.ListStaticAddressSwapsResponse, error) { + + swaps, err := s.staticLoopInManager.GetAllSwaps(ctx) + if err != nil { + return nil, err + } + + if len(swaps) == 0 { + return &looprpc.ListStaticAddressSwapsResponse{}, nil + } + + var clientSwaps []*looprpc.StaticAddressLoopInSwap + for _, swp := range swaps { + chainParams, err := s.network.ChainParams() + if err != nil { + return nil, fmt.Errorf("error getting chain params") + } + swapPayReq, err := zpay32.Decode(swp.SwapInvoice, chainParams) + if err != nil { + return nil, fmt.Errorf("error decoding swap invoice: "+ + "%v", err) + } + swap := &looprpc.StaticAddressLoopInSwap{ + SwapHash: swp.SwapHash[:], + DepositOutpoints: swp.DepositOutpoints, + State: toClientStaticAddressLoopInState( + swp.GetState(), + ), + SwapAmountSatoshis: int64(swp.TotalDepositAmount()), + PaymentRequestAmountSatoshis: int64( + swapPayReq.MilliSat.ToSatoshis(), + ), + } + + clientSwaps = append(clientSwaps, swap) + } + + return &looprpc.ListStaticAddressSwapsResponse{ + Swaps: clientSwaps, + }, nil +} + +// GetStaticAddressSummary returns a summary static address related information. +// Amongst deposits and withdrawals and their total values it also includes a +// list of detailed deposit information filtered by their state. +func (s *swapClientServer) GetStaticAddressSummary(ctx context.Context, + _ *looprpc.StaticAddressSummaryRequest) ( + *looprpc.StaticAddressSummaryResponse, error) { + + allDeposits, err := s.depositManager.GetAllDeposits(ctx) + if err != nil { + return nil, err + } + + var ( + totalNumDeposits = len(allDeposits) + valueUnconfirmed int64 + valueDeposited int64 + valueExpired int64 + valueWithdrawn int64 + valueLoopedIn int64 + htlcTimeoutSwept int64 ) + + // Value unconfirmed. + utxos, err := s.staticAddressManager.ListUnspent( + ctx, 0, deposit.MinConfs-1, + ) + if err != nil { + return nil, err + } + for _, u := range utxos { + valueUnconfirmed += int64(u.Value) + } + + // Confirmed total values by category. + for _, d := range allDeposits { + value := int64(d.Value) + switch d.GetState() { + case deposit.Deposited: + valueDeposited += value + + case deposit.Expired: + valueExpired += value + + case deposit.Withdrawn: + valueWithdrawn += value + + case deposit.LoopedIn: + valueLoopedIn += value + + case deposit.HtlcTimeoutSwept: + htlcTimeoutSwept += value + } + } + + params, err := s.staticAddressManager.GetStaticAddressParameters(ctx) + if err != nil { + return nil, err + } + + address, err := s.staticAddressManager.GetTaprootAddress( + params.ClientPubkey, params.ServerPubkey, int64(params.Expiry), + ) + if err != nil { + return nil, err + } + + return &looprpc.StaticAddressSummaryResponse{ + StaticAddress: address.String(), + RelativeExpiryBlocks: uint64(params.Expiry), + TotalNumDeposits: uint32(totalNumDeposits), + ValueUnconfirmedSatoshis: valueUnconfirmed, + ValueDepositedSatoshis: valueDeposited, + ValueExpiredSatoshis: valueExpired, + ValueWithdrawnSatoshis: valueWithdrawn, + ValueLoopedInSatoshis: valueLoopedIn, + ValueHtlcTimeoutSweepsSatoshis: htlcTimeoutSwept, + }, nil } // StaticAddressLoopIn initiates a loop-in request using static address @@ -1534,108 +1707,6 @@ func (s *swapClientServer) StaticAddressLoopIn(ctx context.Context, }, nil } -func (s *swapClientServer) depositSummary(ctx context.Context, - deposits []*deposit.Deposit, stateFilter looprpc.DepositState, - outpointsFilter []string) (*looprpc.StaticAddressSummaryResponse, - error) { - - var ( - totalNumDeposits = len(deposits) - valueUnconfirmed int64 - valueDeposited int64 - valueExpired int64 - valueWithdrawn int64 - valueLoopedIn int64 - htlcTimeoutSwept int64 - ) - - // Value unconfirmed. - utxos, err := s.staticAddressManager.ListUnspent( - ctx, 0, deposit.MinConfs-1, - ) - if err != nil { - return nil, err - } - for _, u := range utxos { - valueUnconfirmed += int64(u.Value) - } - - // Confirmed total values by category. - for _, d := range deposits { - value := int64(d.Value) - switch d.GetState() { - case deposit.Deposited: - valueDeposited += value - - case deposit.Expired: - valueExpired += value - - case deposit.Withdrawn: - valueWithdrawn += value - - case deposit.LoopedIn: - valueLoopedIn += value - - case deposit.HtlcTimeoutSwept: - htlcTimeoutSwept += value - } - } - - // Deposits filtered by state or outpoints. - var clientDeposits []*looprpc.Deposit - if len(outpointsFilter) > 0 { - f := func(d *deposit.Deposit) bool { - for _, outpoint := range outpointsFilter { - if outpoint == d.OutPoint.String() { - return true - } - } - return false - } - clientDeposits = filter(deposits, f) - - if len(outpointsFilter) != len(clientDeposits) { - return nil, fmt.Errorf("not all outpoints found in " + - "deposits") - } - } else { - f := func(d *deposit.Deposit) bool { - if stateFilter == looprpc.DepositState_UNKNOWN_STATE { - // Per default, we return deposits in all - // states. - return true - } - - return d.IsInState(toServerState(stateFilter)) - } - clientDeposits = filter(deposits, f) - } - - params, err := s.staticAddressManager.GetStaticAddressParameters(ctx) - if err != nil { - return nil, err - } - - address, err := s.staticAddressManager.GetTaprootAddress( - params.ClientPubkey, params.ServerPubkey, int64(params.Expiry), - ) - if err != nil { - return nil, err - } - - return &looprpc.StaticAddressSummaryResponse{ - StaticAddress: address.String(), - TotalNumDeposits: uint32(totalNumDeposits), - ValueUnconfirmedSatoshis: valueUnconfirmed, - ValueDepositedSatoshis: valueDeposited, - ValueExpiredSatoshis: valueExpired, - ValueWithdrawnSatoshis: valueWithdrawn, - ValueLoopedInSatoshis: valueLoopedIn, - ValueHtlcTimeoutSweepsSatoshis: htlcTimeoutSwept, - FilteredDeposits: clientDeposits, - }, nil -} - type filterFunc func(deposits *deposit.Deposit) bool func filter(deposits []*deposit.Deposit, f filterFunc) []*looprpc.Deposit { @@ -1648,8 +1719,10 @@ func filter(deposits []*deposit.Deposit, f filterFunc) []*looprpc.Deposit { hash := d.Hash outpoint := wire.NewOutPoint(&hash, d.Index).String() deposit := &looprpc.Deposit{ - Id: d.ID[:], - State: toClientState(d.GetState()), + Id: d.ID[:], + State: toClientDepositState( + d.GetState(), + ), Outpoint: outpoint, Value: int64(d.Value), ConfirmationHeight: d.ConfirmationHeight, @@ -1661,7 +1734,7 @@ func filter(deposits []*deposit.Deposit, f filterFunc) []*looprpc.Deposit { return clientDeposits } -func toClientState(state fsm.StateType) looprpc.DepositState { +func toClientDepositState(state fsm.StateType) looprpc.DepositState { switch state { case deposit.Deposited: return looprpc.DepositState_DEPOSITED @@ -1698,6 +1771,51 @@ func toClientState(state fsm.StateType) looprpc.DepositState { } } +func toClientStaticAddressLoopInState( + state fsm.StateType) looprpc.StaticAddressLoopInSwapState { + + switch state { + case loopin.InitHtlcTx: + return looprpc.StaticAddressLoopInSwapState_INIT_HTLC + + case loopin.SignHtlcTx: + return looprpc.StaticAddressLoopInSwapState_SIGN_HTLC_TX + + case loopin.MonitorInvoiceAndHtlcTx: + return looprpc.StaticAddressLoopInSwapState_MONITOR_INVOICE_HTLC_TX + + case loopin.PaymentReceived: + return looprpc.StaticAddressLoopInSwapState_PAYMENT_RECEIVED + + case loopin.SweepHtlcTimeout: + return looprpc.StaticAddressLoopInSwapState_SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT + + case loopin.MonitorHtlcTimeoutSweep: + return looprpc.StaticAddressLoopInSwapState_MONITOR_HTLC_TIMEOUT_SWEEP + + case loopin.HtlcTimeoutSwept: + return looprpc.StaticAddressLoopInSwapState_HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT + + case loopin.FetchSignPushSweeplessSweepTx: + return looprpc.StaticAddressLoopInSwapState_FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX + + case loopin.Succeeded: + return looprpc.StaticAddressLoopInSwapState_SUCCEEDED + + case loopin.SucceededSweeplessSigFailed: + return looprpc.StaticAddressLoopInSwapState_SUCCEEDED_SWEEPLESS_SIG_FAILED + + case loopin.UnlockDeposits: + return looprpc.StaticAddressLoopInSwapState_UNLOCK_DEPOSITS + + case loopin.Failed: + return looprpc.StaticAddressLoopInSwapState_FAILED_STATIC_ADDRESS_SWAP + + default: + return looprpc.StaticAddressLoopInSwapState_UNKNOWN_STATIC_ADDRESS_SWAP_STATE + } +} + func toServerState(state looprpc.DepositState) fsm.StateType { switch state { case looprpc.DepositState_DEPOSITED: diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index 1506d54d..7d879499 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -534,6 +534,85 @@ func (DepositState) EnumDescriptor() ([]byte, []int) { return file_client_proto_rawDescGZIP(), []int{6} } +type StaticAddressLoopInSwapState int32 + +const ( + StaticAddressLoopInSwapState_UNKNOWN_STATIC_ADDRESS_SWAP_STATE StaticAddressLoopInSwapState = 0 + StaticAddressLoopInSwapState_INIT_HTLC StaticAddressLoopInSwapState = 1 + StaticAddressLoopInSwapState_SIGN_HTLC_TX StaticAddressLoopInSwapState = 2 + StaticAddressLoopInSwapState_MONITOR_INVOICE_HTLC_TX StaticAddressLoopInSwapState = 3 + StaticAddressLoopInSwapState_PAYMENT_RECEIVED StaticAddressLoopInSwapState = 4 + StaticAddressLoopInSwapState_SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT StaticAddressLoopInSwapState = 5 + StaticAddressLoopInSwapState_MONITOR_HTLC_TIMEOUT_SWEEP StaticAddressLoopInSwapState = 6 + StaticAddressLoopInSwapState_HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT StaticAddressLoopInSwapState = 7 + StaticAddressLoopInSwapState_FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX StaticAddressLoopInSwapState = 8 + StaticAddressLoopInSwapState_SUCCEEDED StaticAddressLoopInSwapState = 9 + StaticAddressLoopInSwapState_SUCCEEDED_SWEEPLESS_SIG_FAILED StaticAddressLoopInSwapState = 10 + StaticAddressLoopInSwapState_UNLOCK_DEPOSITS StaticAddressLoopInSwapState = 11 + StaticAddressLoopInSwapState_FAILED_STATIC_ADDRESS_SWAP StaticAddressLoopInSwapState = 12 +) + +// Enum value maps for StaticAddressLoopInSwapState. +var ( + StaticAddressLoopInSwapState_name = map[int32]string{ + 0: "UNKNOWN_STATIC_ADDRESS_SWAP_STATE", + 1: "INIT_HTLC", + 2: "SIGN_HTLC_TX", + 3: "MONITOR_INVOICE_HTLC_TX", + 4: "PAYMENT_RECEIVED", + 5: "SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT", + 6: "MONITOR_HTLC_TIMEOUT_SWEEP", + 7: "HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT", + 8: "FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX", + 9: "SUCCEEDED", + 10: "SUCCEEDED_SWEEPLESS_SIG_FAILED", + 11: "UNLOCK_DEPOSITS", + 12: "FAILED_STATIC_ADDRESS_SWAP", + } + StaticAddressLoopInSwapState_value = map[string]int32{ + "UNKNOWN_STATIC_ADDRESS_SWAP_STATE": 0, + "INIT_HTLC": 1, + "SIGN_HTLC_TX": 2, + "MONITOR_INVOICE_HTLC_TX": 3, + "PAYMENT_RECEIVED": 4, + "SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT": 5, + "MONITOR_HTLC_TIMEOUT_SWEEP": 6, + "HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT": 7, + "FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX": 8, + "SUCCEEDED": 9, + "SUCCEEDED_SWEEPLESS_SIG_FAILED": 10, + "UNLOCK_DEPOSITS": 11, + "FAILED_STATIC_ADDRESS_SWAP": 12, + } +) + +func (x StaticAddressLoopInSwapState) Enum() *StaticAddressLoopInSwapState { + p := new(StaticAddressLoopInSwapState) + *p = x + return p +} + +func (x StaticAddressLoopInSwapState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StaticAddressLoopInSwapState) Descriptor() protoreflect.EnumDescriptor { + return file_client_proto_enumTypes[7].Descriptor() +} + +func (StaticAddressLoopInSwapState) Type() protoreflect.EnumType { + return &file_client_proto_enumTypes[7] +} + +func (x StaticAddressLoopInSwapState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StaticAddressLoopInSwapState.Descriptor instead. +func (StaticAddressLoopInSwapState) EnumDescriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{7} +} + type ListSwapsFilter_SwapTypeFilter int32 const ( @@ -570,11 +649,11 @@ func (x ListSwapsFilter_SwapTypeFilter) String() string { } func (ListSwapsFilter_SwapTypeFilter) Descriptor() protoreflect.EnumDescriptor { - return file_client_proto_enumTypes[7].Descriptor() + return file_client_proto_enumTypes[8].Descriptor() } func (ListSwapsFilter_SwapTypeFilter) Type() protoreflect.EnumType { - return &file_client_proto_enumTypes[7] + return &file_client_proto_enumTypes[8] } func (x ListSwapsFilter_SwapTypeFilter) Number() protoreflect.EnumNumber { @@ -4521,7 +4600,7 @@ func (x *OutPoint) GetOutputIndex() uint32 { return 0 } -type StaticAddressSummaryRequest struct { +type ListStaticAddressDepositsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -4532,10 +4611,196 @@ type StaticAddressSummaryRequest struct { Outpoints []string `protobuf:"bytes,2,rep,name=outpoints,proto3" json:"outpoints,omitempty"` } +func (x *ListStaticAddressDepositsRequest) Reset() { + *x = ListStaticAddressDepositsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStaticAddressDepositsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStaticAddressDepositsRequest) ProtoMessage() {} + +func (x *ListStaticAddressDepositsRequest) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[53] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStaticAddressDepositsRequest.ProtoReflect.Descriptor instead. +func (*ListStaticAddressDepositsRequest) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{53} +} + +func (x *ListStaticAddressDepositsRequest) GetStateFilter() DepositState { + if x != nil { + return x.StateFilter + } + return DepositState_UNKNOWN_STATE +} + +func (x *ListStaticAddressDepositsRequest) GetOutpoints() []string { + if x != nil { + return x.Outpoints + } + return nil +} + +type ListStaticAddressDepositsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of all deposits that match the filtered state. + FilteredDeposits []*Deposit `protobuf:"bytes,1,rep,name=filtered_deposits,json=filteredDeposits,proto3" json:"filtered_deposits,omitempty"` +} + +func (x *ListStaticAddressDepositsResponse) Reset() { + *x = ListStaticAddressDepositsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStaticAddressDepositsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStaticAddressDepositsResponse) ProtoMessage() {} + +func (x *ListStaticAddressDepositsResponse) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[54] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStaticAddressDepositsResponse.ProtoReflect.Descriptor instead. +func (*ListStaticAddressDepositsResponse) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{54} +} + +func (x *ListStaticAddressDepositsResponse) GetFilteredDeposits() []*Deposit { + if x != nil { + return x.FilteredDeposits + } + return nil +} + +type ListStaticAddressSwapsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListStaticAddressSwapsRequest) Reset() { + *x = ListStaticAddressSwapsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStaticAddressSwapsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStaticAddressSwapsRequest) ProtoMessage() {} + +func (x *ListStaticAddressSwapsRequest) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[55] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStaticAddressSwapsRequest.ProtoReflect.Descriptor instead. +func (*ListStaticAddressSwapsRequest) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{55} +} + +type ListStaticAddressSwapsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of all swaps known static address loop-in swaps. + Swaps []*StaticAddressLoopInSwap `protobuf:"bytes,1,rep,name=swaps,proto3" json:"swaps,omitempty"` +} + +func (x *ListStaticAddressSwapsResponse) Reset() { + *x = ListStaticAddressSwapsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStaticAddressSwapsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStaticAddressSwapsResponse) ProtoMessage() {} + +func (x *ListStaticAddressSwapsResponse) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[56] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStaticAddressSwapsResponse.ProtoReflect.Descriptor instead. +func (*ListStaticAddressSwapsResponse) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{56} +} + +func (x *ListStaticAddressSwapsResponse) GetSwaps() []*StaticAddressLoopInSwap { + if x != nil { + return x.Swaps + } + return nil +} + +type StaticAddressSummaryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + func (x *StaticAddressSummaryRequest) Reset() { *x = StaticAddressSummaryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_client_proto_msgTypes[53] + mi := &file_client_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4548,7 +4813,7 @@ func (x *StaticAddressSummaryRequest) String() string { func (*StaticAddressSummaryRequest) ProtoMessage() {} func (x *StaticAddressSummaryRequest) ProtoReflect() protoreflect.Message { - mi := &file_client_proto_msgTypes[53] + mi := &file_client_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4561,21 +4826,7 @@ func (x *StaticAddressSummaryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StaticAddressSummaryRequest.ProtoReflect.Descriptor instead. func (*StaticAddressSummaryRequest) Descriptor() ([]byte, []int) { - return file_client_proto_rawDescGZIP(), []int{53} -} - -func (x *StaticAddressSummaryRequest) GetStateFilter() DepositState { - if x != nil { - return x.StateFilter - } - return DepositState_UNKNOWN_STATE -} - -func (x *StaticAddressSummaryRequest) GetOutpoints() []string { - if x != nil { - return x.Outpoints - } - return nil + return file_client_proto_rawDescGZIP(), []int{57} } type StaticAddressSummaryResponse struct { @@ -4585,9 +4836,12 @@ type StaticAddressSummaryResponse struct { // The static address of the client. StaticAddress string `protobuf:"bytes,1,opt,name=static_address,json=staticAddress,proto3" json:"static_address,omitempty"` + // The CSV expiry of the static address. + RelativeExpiryBlocks uint64 `protobuf:"varint,2,opt,name=relative_expiry_blocks,json=relativeExpiryBlocks,proto3" json:"relative_expiry_blocks,omitempty"` // The total number of deposits. - TotalNumDeposits uint32 `protobuf:"varint,2,opt,name=total_num_deposits,json=totalNumDeposits,proto3" json:"total_num_deposits,omitempty"` + TotalNumDeposits uint32 `protobuf:"varint,3,opt,name=total_num_deposits,json=totalNumDeposits,proto3" json:"total_num_deposits,omitempty"` // The total value of unconfirmed deposits. +<<<<<<< HEAD ValueUnconfirmedSatoshis int64 `protobuf:"varint,3,opt,name=value_unconfirmed_satoshis,json=valueUnconfirmedSatoshis,proto3" json:"value_unconfirmed_satoshis,omitempty"` // The total value of confirmed deposits. ValueDepositedSatoshis int64 `protobuf:"varint,4,opt,name=value_deposited_satoshis,json=valueDepositedSatoshis,proto3" json:"value_deposited_satoshis,omitempty"` @@ -4601,12 +4855,25 @@ type StaticAddressSummaryResponse struct { ValueHtlcTimeoutSweepsSatoshis int64 `protobuf:"varint,8,opt,name=value_htlc_timeout_sweeps_satoshis,json=valueHtlcTimeoutSweepsSatoshis,proto3" json:"value_htlc_timeout_sweeps_satoshis,omitempty"` // A list of all deposits that match the filtered state. FilteredDeposits []*Deposit `protobuf:"bytes,9,rep,name=filtered_deposits,json=filteredDeposits,proto3" json:"filtered_deposits,omitempty"` +======= + ValueUnconfirmedSatoshis int64 `protobuf:"varint,4,opt,name=value_unconfirmed_satoshis,json=valueUnconfirmedSatoshis,proto3" json:"value_unconfirmed_satoshis,omitempty"` + // The total value of confirmed deposits. + ValueDepositedSatoshis int64 `protobuf:"varint,5,opt,name=value_deposited_satoshis,json=valueDepositedSatoshis,proto3" json:"value_deposited_satoshis,omitempty"` + // The total value of all expired deposits. + ValueExpiredSatoshis int64 `protobuf:"varint,6,opt,name=value_expired_satoshis,json=valueExpiredSatoshis,proto3" json:"value_expired_satoshis,omitempty"` + // The total value of all deposits that have been withdrawn. + ValueWithdrawnSatoshis int64 `protobuf:"varint,7,opt,name=value_withdrawn_satoshis,json=valueWithdrawnSatoshis,proto3" json:"value_withdrawn_satoshis,omitempty"` + // The total value of all loop-ins that have been finalized. + ValueLoopedInSatoshis int64 `protobuf:"varint,8,opt,name=value_looped_in_satoshis,json=valueLoopedInSatoshis,proto3" json:"value_looped_in_satoshis,omitempty"` + // The total value of all htlc timeout sweeps that the client swept. + ValueHtlcTimeoutSweepsSatoshis int64 `protobuf:"varint,9,opt,name=value_htlc_timeout_sweeps_satoshis,json=valueHtlcTimeoutSweepsSatoshis,proto3" json:"value_htlc_timeout_sweeps_satoshis,omitempty"` +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } func (x *StaticAddressSummaryResponse) Reset() { *x = StaticAddressSummaryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_client_proto_msgTypes[54] + mi := &file_client_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4619,7 +4886,7 @@ func (x *StaticAddressSummaryResponse) String() string { func (*StaticAddressSummaryResponse) ProtoMessage() {} func (x *StaticAddressSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_client_proto_msgTypes[54] + mi := &file_client_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4632,7 +4899,7 @@ func (x *StaticAddressSummaryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StaticAddressSummaryResponse.ProtoReflect.Descriptor instead. func (*StaticAddressSummaryResponse) Descriptor() ([]byte, []int) { - return file_client_proto_rawDescGZIP(), []int{54} + return file_client_proto_rawDescGZIP(), []int{58} } func (x *StaticAddressSummaryResponse) GetStaticAddress() string { @@ -4642,6 +4909,13 @@ func (x *StaticAddressSummaryResponse) GetStaticAddress() string { return "" } +func (x *StaticAddressSummaryResponse) GetRelativeExpiryBlocks() uint64 { + if x != nil { + return x.RelativeExpiryBlocks + } + return 0 +} + func (x *StaticAddressSummaryResponse) GetTotalNumDeposits() uint32 { if x != nil { return x.TotalNumDeposits @@ -4673,6 +4947,23 @@ func (x *StaticAddressSummaryResponse) GetValueExpiredSatoshis() int64 { func (x *StaticAddressSummaryResponse) GetValueWithdrawnSatoshis() int64 { if x != nil { return x.ValueWithdrawnSatoshis +<<<<<<< HEAD + } + return 0 +} + +func (x *StaticAddressSummaryResponse) GetValueLoopedInSatoshis() int64 { + if x != nil { + return x.ValueLoopedInSatoshis + } + return 0 +} + +func (x *StaticAddressSummaryResponse) GetValueHtlcTimeoutSweepsSatoshis() int64 { + if x != nil { + return x.ValueHtlcTimeoutSweepsSatoshis +======= +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } return 0 } @@ -4691,13 +4982,6 @@ func (x *StaticAddressSummaryResponse) GetValueHtlcTimeoutSweepsSatoshis() int64 return 0 } -func (x *StaticAddressSummaryResponse) GetFilteredDeposits() []*Deposit { - if x != nil { - return x.FilteredDeposits - } - return nil -} - type Deposit struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4713,12 +4997,15 @@ type Deposit struct { Value int64 `protobuf:"varint,4,opt,name=value,proto3" json:"value,omitempty"` // The block height at which the deposit was confirmed. ConfirmationHeight int64 `protobuf:"varint,5,opt,name=confirmation_height,json=confirmationHeight,proto3" json:"confirmation_height,omitempty"` + // The number of blocks that are left until the deposit cannot be used for a + // loop-in swap anymore. + BlocksUntilExpiry int64 `protobuf:"varint,6,opt,name=blocks_until_expiry,json=blocksUntilExpiry,proto3" json:"blocks_until_expiry,omitempty"` } func (x *Deposit) Reset() { *x = Deposit{} if protoimpl.UnsafeEnabled { - mi := &file_client_proto_msgTypes[55] + mi := &file_client_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4731,7 +5018,7 @@ func (x *Deposit) String() string { func (*Deposit) ProtoMessage() {} func (x *Deposit) ProtoReflect() protoreflect.Message { - mi := &file_client_proto_msgTypes[55] + mi := &file_client_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4744,7 +5031,7 @@ func (x *Deposit) ProtoReflect() protoreflect.Message { // Deprecated: Use Deposit.ProtoReflect.Descriptor instead. func (*Deposit) Descriptor() ([]byte, []int) { - return file_client_proto_rawDescGZIP(), []int{55} + return file_client_proto_rawDescGZIP(), []int{59} } func (x *Deposit) GetId() []byte { @@ -4782,6 +5069,100 @@ func (x *Deposit) GetConfirmationHeight() int64 { return 0 } +<<<<<<< HEAD +======= +func (x *Deposit) GetBlocksUntilExpiry() int64 { + if x != nil { + return x.BlocksUntilExpiry + } + return 0 +} + +type StaticAddressLoopInSwap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The swap hash of the swap. It represents the unique identifier of the swap. + SwapHash []byte `protobuf:"bytes,1,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` + DepositOutpoints []string `protobuf:"bytes,2,rep,name=deposit_outpoints,json=depositOutpoints,proto3" json:"deposit_outpoints,omitempty"` + State StaticAddressLoopInSwapState `protobuf:"varint,3,opt,name=state,proto3,enum=looprpc.StaticAddressLoopInSwapState" json:"state,omitempty"` + // The swap amount of the swap. It is the sum of the values of the deposit + // outpoints that were used for this swap. + SwapAmountSatoshis int64 `protobuf:"varint,4,opt,name=swap_amount_satoshis,json=swapAmountSatoshis,proto3" json:"swap_amount_satoshis,omitempty"` + // The invoiced swap amount. It is the swap amount minus the quoted server + // fees. + PaymentRequestAmountSatoshis int64 `protobuf:"varint,5,opt,name=payment_request_amount_satoshis,json=paymentRequestAmountSatoshis,proto3" json:"payment_request_amount_satoshis,omitempty"` +} + +func (x *StaticAddressLoopInSwap) Reset() { + *x = StaticAddressLoopInSwap{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StaticAddressLoopInSwap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StaticAddressLoopInSwap) ProtoMessage() {} + +func (x *StaticAddressLoopInSwap) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[60] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StaticAddressLoopInSwap.ProtoReflect.Descriptor instead. +func (*StaticAddressLoopInSwap) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{60} +} + +func (x *StaticAddressLoopInSwap) GetSwapHash() []byte { + if x != nil { + return x.SwapHash + } + return nil +} + +func (x *StaticAddressLoopInSwap) GetDepositOutpoints() []string { + if x != nil { + return x.DepositOutpoints + } + return nil +} + +func (x *StaticAddressLoopInSwap) GetState() StaticAddressLoopInSwapState { + if x != nil { + return x.State + } + return StaticAddressLoopInSwapState_UNKNOWN_STATIC_ADDRESS_SWAP_STATE +} + +func (x *StaticAddressLoopInSwap) GetSwapAmountSatoshis() int64 { + if x != nil { + return x.SwapAmountSatoshis + } + return 0 +} + +func (x *StaticAddressLoopInSwap) GetPaymentRequestAmountSatoshis() int64 { + if x != nil { + return x.PaymentRequestAmountSatoshis + } + return 0 +} + +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) type StaticAddressLoopInRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4823,7 +5204,11 @@ type StaticAddressLoopInRequest struct { func (x *StaticAddressLoopInRequest) Reset() { *x = StaticAddressLoopInRequest{} if protoimpl.UnsafeEnabled { +<<<<<<< HEAD mi := &file_client_proto_msgTypes[56] +======= + mi := &file_client_proto_msgTypes[61] +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4836,7 +5221,11 @@ func (x *StaticAddressLoopInRequest) String() string { func (*StaticAddressLoopInRequest) ProtoMessage() {} func (x *StaticAddressLoopInRequest) ProtoReflect() protoreflect.Message { +<<<<<<< HEAD mi := &file_client_proto_msgTypes[56] +======= + mi := &file_client_proto_msgTypes[61] +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4849,7 +5238,11 @@ func (x *StaticAddressLoopInRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StaticAddressLoopInRequest.ProtoReflect.Descriptor instead. func (*StaticAddressLoopInRequest) Descriptor() ([]byte, []int) { +<<<<<<< HEAD return file_client_proto_rawDescGZIP(), []int{56} +======= + return file_client_proto_rawDescGZIP(), []int{61} +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } func (x *StaticAddressLoopInRequest) GetOutpoints() []string { @@ -4947,7 +5340,11 @@ type StaticAddressLoopInResponse struct { func (x *StaticAddressLoopInResponse) Reset() { *x = StaticAddressLoopInResponse{} if protoimpl.UnsafeEnabled { +<<<<<<< HEAD mi := &file_client_proto_msgTypes[57] +======= + mi := &file_client_proto_msgTypes[62] +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4960,7 +5357,11 @@ func (x *StaticAddressLoopInResponse) String() string { func (*StaticAddressLoopInResponse) ProtoMessage() {} func (x *StaticAddressLoopInResponse) ProtoReflect() protoreflect.Message { +<<<<<<< HEAD mi := &file_client_proto_msgTypes[57] +======= + mi := &file_client_proto_msgTypes[62] +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4973,7 +5374,11 @@ func (x *StaticAddressLoopInResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StaticAddressLoopInResponse.ProtoReflect.Descriptor instead. func (*StaticAddressLoopInResponse) Descriptor() ([]byte, []int) { +<<<<<<< HEAD return file_client_proto_rawDescGZIP(), []int{57} +======= + return file_client_proto_rawDescGZIP(), []int{62} +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } func (x *StaticAddressLoopInResponse) GetSwapHash() []byte { @@ -5590,6 +5995,7 @@ var file_client_proto_rawDesc = []byte{ 0x5f, 0x73, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x78, 0x69, 0x64, 0x53, 0x74, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, +<<<<<<< HEAD 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x75, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x66, @@ -5771,6 +6177,251 @@ var file_client_proto_rawDesc = []byte{ 0x08, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x0a, 0x32, 0x89, 0x10, 0x0a, 0x0a, 0x53, 0x77, +======= + 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x7a, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x22, 0x62, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x11, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x52, 0x10, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x58, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x73, 0x77, 0x61, + 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x05, 0x73, 0x77, 0x61, 0x70, + 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x96, 0x04, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2c, + 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x4e, 0x75, 0x6d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x1a, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, + 0x64, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x18, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, + 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x61, + 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, + 0x73, 0x68, 0x69, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x5f, 0x73, 0x61, + 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x53, 0x61, 0x74, 0x6f, + 0x73, 0x68, 0x69, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6c, 0x6f, + 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x6f, 0x6f, + 0x70, 0x65, 0x64, 0x49, 0x6e, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x4a, 0x0a, + 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x77, 0x65, 0x65, 0x70, 0x73, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, + 0x68, 0x69, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1e, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x48, 0x74, 0x6c, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, + 0x73, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x22, 0xd9, 0x01, 0x0a, 0x07, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, + 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x11, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x45, + 0x78, 0x70, 0x69, 0x72, 0x79, 0x22, 0x99, 0x02, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, + 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2b, + 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x77, 0x61, 0x70, + 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x73, 0x77, 0x61, 0x70, 0x41, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x45, 0x0a, 0x1f, 0x70, 0x61, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x1c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, + 0x73, 0x22, 0xc3, 0x02, 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x31, + 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, + 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, + 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, + 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x6f, 0x70, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x12, 0x33, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x48, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, + 0x36, 0x0a, 0x17, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x15, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0xb5, 0x03, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x63, 0x6c, 0x74, 0x76, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x68, 0x74, 0x6c, 0x63, 0x43, 0x6c, 0x74, 0x76, 0x12, + 0x37, 0x0a, 0x18, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, + 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x15, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x64, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, + 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, + 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, + 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, + 0x64, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x2a, + 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, + 0x0a, 0x14, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, + 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, + 0x53, 0x77, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, + 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, + 0x4e, 0x10, 0x01, 0x2a, 0x73, 0x0a, 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x15, 0x0a, 0x11, 0x50, 0x52, 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, + 0x41, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, + 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, + 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, + 0x45, 0x54, 0x54, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, + 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, + 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, + 0x45, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, + 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, + 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, + 0x57, 0x45, 0x45, 0x50, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, + 0x0a, 0x21, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, + 0x4c, 0x55, 0x45, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, + 0x59, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, + 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, + 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, + 0x4f, 0x4e, 0x45, 0x44, 0x10, 0x07, 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, + 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, + 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, + 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, + 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, + 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, + 0x57, 0x45, 0x50, 0x54, 0x10, 0x09, 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, + 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x10, 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x22, 0x0a, 0x1e, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, + 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, + 0x1e, 0x0a, 0x1a, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, + 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, + 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, + 0x4e, 0x5f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, + 0x45, 0x45, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, + 0x16, 0x0a, 0x12, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, + 0x52, 0x45, 0x50, 0x41, 0x59, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, + 0x41, 0x43, 0x4b, 0x4f, 0x46, 0x46, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, + 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, + 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, + 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, + 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, + 0x44, 0x49, 0x54, 0x59, 0x5f, 0x4f, 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, + 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, + 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, + 0x0a, 0x1c, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, + 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, + 0x2a, 0xdc, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x49, + 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, + 0x4e, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x4f, 0x4f, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x49, + 0x4e, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x4f, 0x4f, 0x50, 0x45, 0x44, 0x5f, 0x49, 0x4e, + 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x48, 0x54, 0x4c, 0x43, + 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x48, 0x54, + 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, + 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x5f, 0x45, 0x58, + 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x08, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, + 0x46, 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, + 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x0a, 0x2a, + 0x97, 0x03, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x25, 0x0a, 0x21, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, 0x5f, + 0x48, 0x54, 0x4c, 0x43, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x48, + 0x54, 0x4c, 0x43, 0x5f, 0x54, 0x58, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x4d, 0x4f, 0x4e, 0x49, + 0x54, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x48, 0x54, 0x4c, 0x43, + 0x5f, 0x54, 0x58, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54, + 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x56, 0x45, 0x44, 0x10, 0x04, 0x12, 0x25, 0x0a, 0x21, 0x53, + 0x57, 0x45, 0x45, 0x50, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, + 0x45, 0x53, 0x53, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, + 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x4d, 0x4f, 0x4e, 0x49, 0x54, 0x4f, 0x52, 0x5f, 0x48, 0x54, + 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, + 0x10, 0x06, 0x12, 0x25, 0x0a, 0x21, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, + 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, + 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, 0x07, 0x12, 0x26, 0x0a, 0x22, 0x46, 0x45, 0x54, + 0x43, 0x48, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x55, 0x53, 0x48, 0x5f, 0x53, 0x57, 0x45, + 0x45, 0x50, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x54, 0x58, 0x10, + 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x09, + 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x5f, 0x53, 0x57, + 0x45, 0x45, 0x50, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x46, 0x41, 0x49, 0x4c, + 0x45, 0x44, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x44, + 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x53, 0x10, 0x0b, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x41, 0x49, + 0x4c, 0x45, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, + 0x53, 0x53, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x10, 0x0c, 0x32, 0xe8, 0x11, 0x0a, 0x0a, 0x53, 0x77, +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, @@ -5886,6 +6537,7 @@ var file_client_proto_rawDesc = []byte{ 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, +<<<<<<< HEAD 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, @@ -5903,6 +6555,39 @@ var file_client_proto_rawDesc = []byte{ 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +======= + 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x19, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x69, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, + 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, + 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } var ( @@ -5917,6 +6602,7 @@ func file_client_proto_rawDescGZIP() []byte { return file_client_proto_rawDescData } +<<<<<<< HEAD var file_client_proto_enumTypes = make([]protoimpl.EnumInfo, 8) var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 58) var file_client_proto_goTypes = []any{ @@ -6003,11 +6689,106 @@ var file_client_proto_depIdxs = []int32{ 30, // 11: looprpc.GetInfoResponse.loop_out_stats:type_name -> looprpc.LoopStats 30, // 12: looprpc.GetInfoResponse.loop_in_stats:type_name -> looprpc.LoopStats 35, // 13: looprpc.LiquidityParameters.rules:type_name -> looprpc.LiquidityRule +======= +var file_client_proto_enumTypes = make([]protoimpl.EnumInfo, 9) +var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 63) +var file_client_proto_goTypes = []any{ + (AddressType)(0), // 0: looprpc.AddressType + (SwapType)(0), // 1: looprpc.SwapType + (SwapState)(0), // 2: looprpc.SwapState + (FailureReason)(0), // 3: looprpc.FailureReason + (LiquidityRuleType)(0), // 4: looprpc.LiquidityRuleType + (AutoReason)(0), // 5: looprpc.AutoReason + (DepositState)(0), // 6: looprpc.DepositState + (StaticAddressLoopInSwapState)(0), // 7: looprpc.StaticAddressLoopInSwapState + (ListSwapsFilter_SwapTypeFilter)(0), // 8: looprpc.ListSwapsFilter.SwapTypeFilter + (*LoopOutRequest)(nil), // 9: looprpc.LoopOutRequest + (*LoopInRequest)(nil), // 10: looprpc.LoopInRequest + (*SwapResponse)(nil), // 11: looprpc.SwapResponse + (*MonitorRequest)(nil), // 12: looprpc.MonitorRequest + (*SwapStatus)(nil), // 13: looprpc.SwapStatus + (*ListSwapsRequest)(nil), // 14: looprpc.ListSwapsRequest + (*ListSwapsFilter)(nil), // 15: looprpc.ListSwapsFilter + (*ListSwapsResponse)(nil), // 16: looprpc.ListSwapsResponse + (*SwapInfoRequest)(nil), // 17: looprpc.SwapInfoRequest + (*TermsRequest)(nil), // 18: looprpc.TermsRequest + (*InTermsResponse)(nil), // 19: looprpc.InTermsResponse + (*OutTermsResponse)(nil), // 20: looprpc.OutTermsResponse + (*QuoteRequest)(nil), // 21: looprpc.QuoteRequest + (*InQuoteResponse)(nil), // 22: looprpc.InQuoteResponse + (*OutQuoteResponse)(nil), // 23: looprpc.OutQuoteResponse + (*ProbeRequest)(nil), // 24: looprpc.ProbeRequest + (*ProbeResponse)(nil), // 25: looprpc.ProbeResponse + (*TokensRequest)(nil), // 26: looprpc.TokensRequest + (*TokensResponse)(nil), // 27: looprpc.TokensResponse + (*FetchL402TokenRequest)(nil), // 28: looprpc.FetchL402TokenRequest + (*FetchL402TokenResponse)(nil), // 29: looprpc.FetchL402TokenResponse + (*L402Token)(nil), // 30: looprpc.L402Token + (*LoopStats)(nil), // 31: looprpc.LoopStats + (*GetInfoRequest)(nil), // 32: looprpc.GetInfoRequest + (*GetInfoResponse)(nil), // 33: looprpc.GetInfoResponse + (*GetLiquidityParamsRequest)(nil), // 34: looprpc.GetLiquidityParamsRequest + (*LiquidityParameters)(nil), // 35: looprpc.LiquidityParameters + (*LiquidityRule)(nil), // 36: looprpc.LiquidityRule + (*SetLiquidityParamsRequest)(nil), // 37: looprpc.SetLiquidityParamsRequest + (*SetLiquidityParamsResponse)(nil), // 38: looprpc.SetLiquidityParamsResponse + (*SuggestSwapsRequest)(nil), // 39: looprpc.SuggestSwapsRequest + (*Disqualified)(nil), // 40: looprpc.Disqualified + (*SuggestSwapsResponse)(nil), // 41: looprpc.SuggestSwapsResponse + (*AbandonSwapRequest)(nil), // 42: looprpc.AbandonSwapRequest + (*AbandonSwapResponse)(nil), // 43: looprpc.AbandonSwapResponse + (*ListReservationsRequest)(nil), // 44: looprpc.ListReservationsRequest + (*ListReservationsResponse)(nil), // 45: looprpc.ListReservationsResponse + (*ClientReservation)(nil), // 46: looprpc.ClientReservation + (*InstantOutRequest)(nil), // 47: looprpc.InstantOutRequest + (*InstantOutResponse)(nil), // 48: looprpc.InstantOutResponse + (*InstantOutQuoteRequest)(nil), // 49: looprpc.InstantOutQuoteRequest + (*InstantOutQuoteResponse)(nil), // 50: looprpc.InstantOutQuoteResponse + (*ListInstantOutsRequest)(nil), // 51: looprpc.ListInstantOutsRequest + (*ListInstantOutsResponse)(nil), // 52: looprpc.ListInstantOutsResponse + (*InstantOut)(nil), // 53: looprpc.InstantOut + (*NewStaticAddressRequest)(nil), // 54: looprpc.NewStaticAddressRequest + (*NewStaticAddressResponse)(nil), // 55: looprpc.NewStaticAddressResponse + (*ListUnspentDepositsRequest)(nil), // 56: looprpc.ListUnspentDepositsRequest + (*ListUnspentDepositsResponse)(nil), // 57: looprpc.ListUnspentDepositsResponse + (*Utxo)(nil), // 58: looprpc.Utxo + (*WithdrawDepositsRequest)(nil), // 59: looprpc.WithdrawDepositsRequest + (*WithdrawDepositsResponse)(nil), // 60: looprpc.WithdrawDepositsResponse + (*OutPoint)(nil), // 61: looprpc.OutPoint + (*ListStaticAddressDepositsRequest)(nil), // 62: looprpc.ListStaticAddressDepositsRequest + (*ListStaticAddressDepositsResponse)(nil), // 63: looprpc.ListStaticAddressDepositsResponse + (*ListStaticAddressSwapsRequest)(nil), // 64: looprpc.ListStaticAddressSwapsRequest + (*ListStaticAddressSwapsResponse)(nil), // 65: looprpc.ListStaticAddressSwapsResponse + (*StaticAddressSummaryRequest)(nil), // 66: looprpc.StaticAddressSummaryRequest + (*StaticAddressSummaryResponse)(nil), // 67: looprpc.StaticAddressSummaryResponse + (*Deposit)(nil), // 68: looprpc.Deposit + (*StaticAddressLoopInSwap)(nil), // 69: looprpc.StaticAddressLoopInSwap + (*StaticAddressLoopInRequest)(nil), // 70: looprpc.StaticAddressLoopInRequest + (*StaticAddressLoopInResponse)(nil), // 71: looprpc.StaticAddressLoopInResponse + (*swapserverrpc.RouteHint)(nil), // 72: looprpc.RouteHint +} +var file_client_proto_depIdxs = []int32{ + 0, // 0: looprpc.LoopOutRequest.account_addr_type:type_name -> looprpc.AddressType + 72, // 1: looprpc.LoopInRequest.route_hints:type_name -> looprpc.RouteHint + 1, // 2: looprpc.SwapStatus.type:type_name -> looprpc.SwapType + 2, // 3: looprpc.SwapStatus.state:type_name -> looprpc.SwapState + 3, // 4: looprpc.SwapStatus.failure_reason:type_name -> looprpc.FailureReason + 15, // 5: looprpc.ListSwapsRequest.list_swap_filter:type_name -> looprpc.ListSwapsFilter + 8, // 6: looprpc.ListSwapsFilter.swap_type:type_name -> looprpc.ListSwapsFilter.SwapTypeFilter + 13, // 7: looprpc.ListSwapsResponse.swaps:type_name -> looprpc.SwapStatus + 72, // 8: looprpc.QuoteRequest.loop_in_route_hints:type_name -> looprpc.RouteHint + 72, // 9: looprpc.ProbeRequest.route_hints:type_name -> looprpc.RouteHint + 30, // 10: looprpc.TokensResponse.tokens:type_name -> looprpc.L402Token + 31, // 11: looprpc.GetInfoResponse.loop_out_stats:type_name -> looprpc.LoopStats + 31, // 12: looprpc.GetInfoResponse.loop_in_stats:type_name -> looprpc.LoopStats + 36, // 13: looprpc.LiquidityParameters.rules:type_name -> looprpc.LiquidityRule +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) 0, // 14: looprpc.LiquidityParameters.account_addr_type:type_name -> looprpc.AddressType 1, // 15: looprpc.LiquidityRule.swap_type:type_name -> looprpc.SwapType 4, // 16: looprpc.LiquidityRule.type:type_name -> looprpc.LiquidityRuleType - 34, // 17: looprpc.SetLiquidityParamsRequest.parameters:type_name -> looprpc.LiquidityParameters + 35, // 17: looprpc.SetLiquidityParamsRequest.parameters:type_name -> looprpc.LiquidityParameters 5, // 18: looprpc.Disqualified.reason:type_name -> looprpc.AutoReason +<<<<<<< HEAD 8, // 19: looprpc.SuggestSwapsResponse.loop_out:type_name -> looprpc.LoopOutRequest 9, // 20: looprpc.SuggestSwapsResponse.loop_in:type_name -> looprpc.LoopInRequest 39, // 21: looprpc.SuggestSwapsResponse.disqualified:type_name -> looprpc.Disqualified @@ -6078,6 +6859,84 @@ var file_client_proto_depIdxs = []int32{ 30, // [30:30] is the sub-list for extension type_name 30, // [30:30] is the sub-list for extension extendee 0, // [0:30] is the sub-list for field type_name +======= + 9, // 19: looprpc.SuggestSwapsResponse.loop_out:type_name -> looprpc.LoopOutRequest + 10, // 20: looprpc.SuggestSwapsResponse.loop_in:type_name -> looprpc.LoopInRequest + 40, // 21: looprpc.SuggestSwapsResponse.disqualified:type_name -> looprpc.Disqualified + 46, // 22: looprpc.ListReservationsResponse.reservations:type_name -> looprpc.ClientReservation + 53, // 23: looprpc.ListInstantOutsResponse.swaps:type_name -> looprpc.InstantOut + 58, // 24: looprpc.ListUnspentDepositsResponse.utxos:type_name -> looprpc.Utxo + 61, // 25: looprpc.WithdrawDepositsRequest.outpoints:type_name -> looprpc.OutPoint + 6, // 26: looprpc.ListStaticAddressDepositsRequest.state_filter:type_name -> looprpc.DepositState + 68, // 27: looprpc.ListStaticAddressDepositsResponse.filtered_deposits:type_name -> looprpc.Deposit + 69, // 28: looprpc.ListStaticAddressSwapsResponse.swaps:type_name -> looprpc.StaticAddressLoopInSwap + 6, // 29: looprpc.Deposit.state:type_name -> looprpc.DepositState + 7, // 30: looprpc.StaticAddressLoopInSwap.state:type_name -> looprpc.StaticAddressLoopInSwapState + 72, // 31: looprpc.StaticAddressLoopInRequest.route_hints:type_name -> looprpc.RouteHint + 9, // 32: looprpc.SwapClient.LoopOut:input_type -> looprpc.LoopOutRequest + 10, // 33: looprpc.SwapClient.LoopIn:input_type -> looprpc.LoopInRequest + 12, // 34: looprpc.SwapClient.Monitor:input_type -> looprpc.MonitorRequest + 14, // 35: looprpc.SwapClient.ListSwaps:input_type -> looprpc.ListSwapsRequest + 17, // 36: looprpc.SwapClient.SwapInfo:input_type -> looprpc.SwapInfoRequest + 42, // 37: looprpc.SwapClient.AbandonSwap:input_type -> looprpc.AbandonSwapRequest + 18, // 38: looprpc.SwapClient.LoopOutTerms:input_type -> looprpc.TermsRequest + 21, // 39: looprpc.SwapClient.LoopOutQuote:input_type -> looprpc.QuoteRequest + 18, // 40: looprpc.SwapClient.GetLoopInTerms:input_type -> looprpc.TermsRequest + 21, // 41: looprpc.SwapClient.GetLoopInQuote:input_type -> looprpc.QuoteRequest + 24, // 42: looprpc.SwapClient.Probe:input_type -> looprpc.ProbeRequest + 26, // 43: looprpc.SwapClient.GetL402Tokens:input_type -> looprpc.TokensRequest + 26, // 44: looprpc.SwapClient.GetLsatTokens:input_type -> looprpc.TokensRequest + 28, // 45: looprpc.SwapClient.FetchL402Token:input_type -> looprpc.FetchL402TokenRequest + 32, // 46: looprpc.SwapClient.GetInfo:input_type -> looprpc.GetInfoRequest + 34, // 47: looprpc.SwapClient.GetLiquidityParams:input_type -> looprpc.GetLiquidityParamsRequest + 37, // 48: looprpc.SwapClient.SetLiquidityParams:input_type -> looprpc.SetLiquidityParamsRequest + 39, // 49: looprpc.SwapClient.SuggestSwaps:input_type -> looprpc.SuggestSwapsRequest + 44, // 50: looprpc.SwapClient.ListReservations:input_type -> looprpc.ListReservationsRequest + 47, // 51: looprpc.SwapClient.InstantOut:input_type -> looprpc.InstantOutRequest + 49, // 52: looprpc.SwapClient.InstantOutQuote:input_type -> looprpc.InstantOutQuoteRequest + 51, // 53: looprpc.SwapClient.ListInstantOuts:input_type -> looprpc.ListInstantOutsRequest + 54, // 54: looprpc.SwapClient.NewStaticAddress:input_type -> looprpc.NewStaticAddressRequest + 56, // 55: looprpc.SwapClient.ListUnspentDeposits:input_type -> looprpc.ListUnspentDepositsRequest + 59, // 56: looprpc.SwapClient.WithdrawDeposits:input_type -> looprpc.WithdrawDepositsRequest + 62, // 57: looprpc.SwapClient.ListStaticAddressDeposits:input_type -> looprpc.ListStaticAddressDepositsRequest + 64, // 58: looprpc.SwapClient.ListStaticAddressSwaps:input_type -> looprpc.ListStaticAddressSwapsRequest + 66, // 59: looprpc.SwapClient.GetStaticAddressSummary:input_type -> looprpc.StaticAddressSummaryRequest + 70, // 60: looprpc.SwapClient.StaticAddressLoopIn:input_type -> looprpc.StaticAddressLoopInRequest + 11, // 61: looprpc.SwapClient.LoopOut:output_type -> looprpc.SwapResponse + 11, // 62: looprpc.SwapClient.LoopIn:output_type -> looprpc.SwapResponse + 13, // 63: looprpc.SwapClient.Monitor:output_type -> looprpc.SwapStatus + 16, // 64: looprpc.SwapClient.ListSwaps:output_type -> looprpc.ListSwapsResponse + 13, // 65: looprpc.SwapClient.SwapInfo:output_type -> looprpc.SwapStatus + 43, // 66: looprpc.SwapClient.AbandonSwap:output_type -> looprpc.AbandonSwapResponse + 20, // 67: looprpc.SwapClient.LoopOutTerms:output_type -> looprpc.OutTermsResponse + 23, // 68: looprpc.SwapClient.LoopOutQuote:output_type -> looprpc.OutQuoteResponse + 19, // 69: looprpc.SwapClient.GetLoopInTerms:output_type -> looprpc.InTermsResponse + 22, // 70: looprpc.SwapClient.GetLoopInQuote:output_type -> looprpc.InQuoteResponse + 25, // 71: looprpc.SwapClient.Probe:output_type -> looprpc.ProbeResponse + 27, // 72: looprpc.SwapClient.GetL402Tokens:output_type -> looprpc.TokensResponse + 27, // 73: looprpc.SwapClient.GetLsatTokens:output_type -> looprpc.TokensResponse + 29, // 74: looprpc.SwapClient.FetchL402Token:output_type -> looprpc.FetchL402TokenResponse + 33, // 75: looprpc.SwapClient.GetInfo:output_type -> looprpc.GetInfoResponse + 35, // 76: looprpc.SwapClient.GetLiquidityParams:output_type -> looprpc.LiquidityParameters + 38, // 77: looprpc.SwapClient.SetLiquidityParams:output_type -> looprpc.SetLiquidityParamsResponse + 41, // 78: looprpc.SwapClient.SuggestSwaps:output_type -> looprpc.SuggestSwapsResponse + 45, // 79: looprpc.SwapClient.ListReservations:output_type -> looprpc.ListReservationsResponse + 48, // 80: looprpc.SwapClient.InstantOut:output_type -> looprpc.InstantOutResponse + 50, // 81: looprpc.SwapClient.InstantOutQuote:output_type -> looprpc.InstantOutQuoteResponse + 52, // 82: looprpc.SwapClient.ListInstantOuts:output_type -> looprpc.ListInstantOutsResponse + 55, // 83: looprpc.SwapClient.NewStaticAddress:output_type -> looprpc.NewStaticAddressResponse + 57, // 84: looprpc.SwapClient.ListUnspentDeposits:output_type -> looprpc.ListUnspentDepositsResponse + 60, // 85: looprpc.SwapClient.WithdrawDeposits:output_type -> looprpc.WithdrawDepositsResponse + 63, // 86: looprpc.SwapClient.ListStaticAddressDeposits:output_type -> looprpc.ListStaticAddressDepositsResponse + 65, // 87: looprpc.SwapClient.ListStaticAddressSwaps:output_type -> looprpc.ListStaticAddressSwapsResponse + 67, // 88: looprpc.SwapClient.GetStaticAddressSummary:output_type -> looprpc.StaticAddressSummaryResponse + 71, // 89: looprpc.SwapClient.StaticAddressLoopIn:output_type -> looprpc.StaticAddressLoopInResponse + 61, // [61:90] is the sub-list for method output_type + 32, // [32:61] is the sub-list for method input_type + 32, // [32:32] is the sub-list for extension type_name + 32, // [32:32] is the sub-list for extension extendee + 0, // [0:32] is the sub-list for field type_name +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } func init() { file_client_proto_init() } @@ -6723,7 +7582,7 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*StaticAddressSummaryRequest); i { + switch v := v.(*ListStaticAddressDepositsRequest); i { case 0: return &v.state case 1: @@ -6735,7 +7594,7 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*StaticAddressSummaryResponse); i { + switch v := v.(*ListStaticAddressDepositsResponse); i { case 0: return &v.state case 1: @@ -6747,7 +7606,7 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*Deposit); i { + switch v := v.(*ListStaticAddressSwapsRequest); i { case 0: return &v.state case 1: @@ -6759,7 +7618,7 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*StaticAddressLoopInRequest); i { + switch v := v.(*ListStaticAddressSwapsResponse); i { case 0: return &v.state case 1: @@ -6771,6 +7630,74 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[57].Exporter = func(v any, i int) any { + switch v := v.(*StaticAddressSummaryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[58].Exporter = func(v any, i int) any { + switch v := v.(*StaticAddressSummaryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[59].Exporter = func(v any, i int) any { + switch v := v.(*Deposit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } +<<<<<<< HEAD + file_client_proto_msgTypes[56].Exporter = func(v any, i int) any { +======= + file_client_proto_msgTypes[60].Exporter = func(v any, i int) any { + switch v := v.(*StaticAddressLoopInSwap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[61].Exporter = func(v any, i int) any { +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) + switch v := v.(*StaticAddressLoopInRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } +<<<<<<< HEAD + file_client_proto_msgTypes[57].Exporter = func(v any, i int) any { +======= + file_client_proto_msgTypes[62].Exporter = func(v any, i int) any { +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) switch v := v.(*StaticAddressLoopInResponse); i { case 0: return &v.state @@ -6788,8 +7715,13 @@ func file_client_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_client_proto_rawDesc, +<<<<<<< HEAD NumEnums: 8, NumMessages: 58, +======= + NumEnums: 9, + NumMessages: 63, +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) NumExtensions: 0, NumServices: 1, }, diff --git a/looprpc/client.proto b/looprpc/client.proto index 8235f77f..f1f44c42 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -168,6 +168,20 @@ service SwapClient { rpc WithdrawDeposits (WithdrawDepositsRequest) returns (WithdrawDepositsResponse); + /* loop:`listdeposits` + ListStaticAddressDeposits returns a list of filtered static address + deposits. + */ + rpc ListStaticAddressDeposits (ListStaticAddressDepositsRequest) + returns (ListStaticAddressDepositsResponse); + + /* loop:`listswaps` + ListStaticAddressSwaps returns a list of filtered static address + swaps. + */ + rpc ListStaticAddressSwaps (ListStaticAddressSwapsRequest) + returns (ListStaticAddressSwapsResponse); + /* loop:`static summary` GetStaticAddressSummary returns a summary of static address related statistics. @@ -1599,7 +1613,7 @@ message OutPoint { uint32 output_index = 3; } -message StaticAddressSummaryRequest { +message ListStaticAddressDepositsRequest { /* Filters the list of all stored deposits by deposit state. */ @@ -1611,51 +1625,71 @@ message StaticAddressSummaryRequest { repeated string outpoints = 2; } +message ListStaticAddressDepositsResponse { + /* + A list of all deposits that match the filtered state. + */ + repeated Deposit filtered_deposits = 1; +} + +message ListStaticAddressSwapsRequest { +} + +message ListStaticAddressSwapsResponse { + /* + A list of all swaps known static address loop-in swaps. + */ + repeated StaticAddressLoopInSwap swaps = 1; +} + +message StaticAddressSummaryRequest { +} + message StaticAddressSummaryResponse { /* The static address of the client. */ string static_address = 1; + /* + The CSV expiry of the static address. + */ + uint64 relative_expiry_blocks = 2; + /* The total number of deposits. */ - uint32 total_num_deposits = 2; + uint32 total_num_deposits = 3; /* The total value of unconfirmed deposits. */ - int64 value_unconfirmed_satoshis = 3; + int64 value_unconfirmed_satoshis = 4; /* The total value of confirmed deposits. */ - int64 value_deposited_satoshis = 4; + int64 value_deposited_satoshis = 5; /* The total value of all expired deposits. */ - int64 value_expired_satoshis = 5; + int64 value_expired_satoshis = 6; /* The total value of all deposits that have been withdrawn. */ - int64 value_withdrawn_satoshis = 6; + int64 value_withdrawn_satoshis = 7; /* The total value of all loop-ins that have been finalized. */ - int64 value_looped_in_satoshis = 7; + int64 value_looped_in_satoshis = 8; /* The total value of all htlc timeout sweeps that the client swept. */ - int64 value_htlc_timeout_sweeps_satoshis = 8; - - /* - A list of all deposits that match the filtered state. - */ - repeated Deposit filtered_deposits = 9; + int64 value_htlc_timeout_sweeps_satoshis = 9; } enum DepositState { @@ -1751,6 +1785,93 @@ message Deposit { The block height at which the deposit was confirmed. */ int64 confirmation_height = 5; + + /* + The number of blocks that are left until the deposit cannot be used for a + loop-in swap anymore. + */ + int64 blocks_until_expiry = 6; +} + +message StaticAddressLoopInSwap { + /* + The swap hash of the swap. It represents the unique identifier of the swap. + */ + bytes swap_hash = 1; + + /* + */ + repeated string deposit_outpoints = 2; + + /* + */ + StaticAddressLoopInSwapState state = 3; + + /* + The swap amount of the swap. It is the sum of the values of the deposit + outpoints that were used for this swap. + */ + int64 swap_amount_satoshis = 4; + + /* + The invoiced swap amount. It is the swap amount minus the quoted server + fees. + */ + int64 payment_request_amount_satoshis = 5; +} + +enum StaticAddressLoopInSwapState { + /* + */ + UNKNOWN_STATIC_ADDRESS_SWAP_STATE = 0; + + /* + */ + INIT_HTLC = 1; + + /* + */ + SIGN_HTLC_TX = 2; + + /* + */ + MONITOR_INVOICE_HTLC_TX = 3; + + /* + */ + PAYMENT_RECEIVED = 4; + + /* + */ + SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT = 5; + + /* + */ + MONITOR_HTLC_TIMEOUT_SWEEP = 6; + + /* + */ + HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT = 7; + + /* + */ + FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX = 8; + + /* + */ + SUCCEEDED = 9; + + /* + */ + SUCCEEDED_SWEEPLESS_SIG_FAILED = 10; + + /* + */ + UNLOCK_DEPOSITS = 11; + + /* + */ + FAILED_STATIC_ADDRESS_SWAP = 12; } message StaticAddressLoopInRequest { diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index f9e56145..fa7c3e80 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -688,6 +688,11 @@ "type": "string", "format": "int64", "description": "The block height at which the deposit was confirmed." + }, + "blocks_until_expiry": { + "type": "string", + "format": "int64", + "description": "The number of blocks that are left until the deposit cannot be used for a\nloop-in swap anymore." } } }, @@ -1152,6 +1157,30 @@ } } }, + "looprpcListStaticAddressDepositsResponse": { + "type": "object", + "properties": { + "filtered_deposits": { + "type": "array", + "items": { + "$ref": "#/definitions/looprpcDeposit" + }, + "description": "A list of all deposits that match the filtered state." + } + } + }, + "looprpcListStaticAddressSwapsResponse": { + "type": "object", + "properties": { + "swaps": { + "type": "array", + "items": { + "$ref": "#/definitions/looprpcStaticAddressLoopInSwap" + }, + "description": "A list of all swaps known static address loop-in swaps." + } + } + }, "looprpcListSwapsFilter": { "type": "object", "properties": { @@ -1565,6 +1594,57 @@ } } }, +<<<<<<< HEAD +======= + "looprpcStaticAddressLoopInSwap": { + "type": "object", + "properties": { + "swap_hash": { + "type": "string", + "format": "byte", + "description": "The swap hash of the swap. It represents the unique identifier of the swap." + }, + "deposit_outpoints": { + "type": "array", + "items": { + "type": "string" + } + }, + "state": { + "$ref": "#/definitions/looprpcStaticAddressLoopInSwapState" + }, + "swap_amount_satoshis": { + "type": "string", + "format": "int64", + "description": "The swap amount of the swap. It is the sum of the values of the deposit\noutpoints that were used for this swap." + }, + "payment_request_amount_satoshis": { + "type": "string", + "format": "int64", + "description": "The invoiced swap amount. It is the swap amount minus the quoted server\nfees." + } + } + }, + "looprpcStaticAddressLoopInSwapState": { + "type": "string", + "enum": [ + "UNKNOWN_STATIC_ADDRESS_SWAP_STATE", + "INIT_HTLC", + "SIGN_HTLC_TX", + "MONITOR_INVOICE_HTLC_TX", + "PAYMENT_RECEIVED", + "SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT", + "MONITOR_HTLC_TIMEOUT_SWEEP", + "HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT", + "FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX", + "SUCCEEDED", + "SUCCEEDED_SWEEPLESS_SIG_FAILED", + "UNLOCK_DEPOSITS", + "FAILED_STATIC_ADDRESS_SWAP" + ], + "default": "UNKNOWN_STATIC_ADDRESS_SWAP_STATE" + }, +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) "looprpcStaticAddressSummaryResponse": { "type": "object", "properties": { @@ -1572,6 +1652,11 @@ "type": "string", "description": "The static address of the client." }, + "relative_expiry_blocks": { + "type": "string", + "format": "uint64", + "description": "The CSV expiry of the static address." + }, "total_num_deposits": { "type": "integer", "format": "int64", @@ -1606,6 +1691,7 @@ "type": "string", "format": "int64", "description": "The total value of all htlc timeout sweeps that the client swept." +<<<<<<< HEAD }, "filtered_deposits": { "type": "array", @@ -1613,6 +1699,8 @@ "$ref": "#/definitions/looprpcDeposit" }, "description": "A list of all deposits that match the filtered state." +======= +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } } }, diff --git a/looprpc/client_grpc.pb.go b/looprpc/client_grpc.pb.go index f482738e..9d5e3073 100644 --- a/looprpc/client_grpc.pb.go +++ b/looprpc/client_grpc.pb.go @@ -115,6 +115,14 @@ type SwapClientClient interface { // loop:`static withdraw` // WithdrawDeposits withdraws a selection or all deposits of a static address. WithdrawDeposits(ctx context.Context, in *WithdrawDepositsRequest, opts ...grpc.CallOption) (*WithdrawDepositsResponse, error) + // loop:`listdeposits` + // ListStaticAddressDeposits returns a list of filtered static address + // deposits. + ListStaticAddressDeposits(ctx context.Context, in *ListStaticAddressDepositsRequest, opts ...grpc.CallOption) (*ListStaticAddressDepositsResponse, error) + // loop:`listswaps` + // ListStaticAddressSwaps returns a list of filtered static address + // swaps. + ListStaticAddressSwaps(ctx context.Context, in *ListStaticAddressSwapsRequest, opts ...grpc.CallOption) (*ListStaticAddressSwapsResponse, error) // loop:`static summary` // GetStaticAddressSummary returns a summary of static address related // statistics. @@ -380,6 +388,24 @@ func (c *swapClientClient) WithdrawDeposits(ctx context.Context, in *WithdrawDep return out, nil } +func (c *swapClientClient) ListStaticAddressDeposits(ctx context.Context, in *ListStaticAddressDepositsRequest, opts ...grpc.CallOption) (*ListStaticAddressDepositsResponse, error) { + out := new(ListStaticAddressDepositsResponse) + err := c.cc.Invoke(ctx, "/looprpc.SwapClient/ListStaticAddressDeposits", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *swapClientClient) ListStaticAddressSwaps(ctx context.Context, in *ListStaticAddressSwapsRequest, opts ...grpc.CallOption) (*ListStaticAddressSwapsResponse, error) { + out := new(ListStaticAddressSwapsResponse) + err := c.cc.Invoke(ctx, "/looprpc.SwapClient/ListStaticAddressSwaps", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *swapClientClient) GetStaticAddressSummary(ctx context.Context, in *StaticAddressSummaryRequest, opts ...grpc.CallOption) (*StaticAddressSummaryResponse, error) { out := new(StaticAddressSummaryResponse) err := c.cc.Invoke(ctx, "/looprpc.SwapClient/GetStaticAddressSummary", in, out, opts...) @@ -499,6 +525,14 @@ type SwapClientServer interface { // loop:`static withdraw` // WithdrawDeposits withdraws a selection or all deposits of a static address. WithdrawDeposits(context.Context, *WithdrawDepositsRequest) (*WithdrawDepositsResponse, error) + // loop:`listdeposits` + // ListStaticAddressDeposits returns a list of filtered static address + // deposits. + ListStaticAddressDeposits(context.Context, *ListStaticAddressDepositsRequest) (*ListStaticAddressDepositsResponse, error) + // loop:`listswaps` + // ListStaticAddressSwaps returns a list of filtered static address + // swaps. + ListStaticAddressSwaps(context.Context, *ListStaticAddressSwapsRequest) (*ListStaticAddressSwapsResponse, error) // loop:`static summary` // GetStaticAddressSummary returns a summary of static address related // statistics. @@ -588,6 +622,12 @@ func (UnimplementedSwapClientServer) ListUnspentDeposits(context.Context, *ListU func (UnimplementedSwapClientServer) WithdrawDeposits(context.Context, *WithdrawDepositsRequest) (*WithdrawDepositsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method WithdrawDeposits not implemented") } +func (UnimplementedSwapClientServer) ListStaticAddressDeposits(context.Context, *ListStaticAddressDepositsRequest) (*ListStaticAddressDepositsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListStaticAddressDeposits not implemented") +} +func (UnimplementedSwapClientServer) ListStaticAddressSwaps(context.Context, *ListStaticAddressSwapsRequest) (*ListStaticAddressSwapsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListStaticAddressSwaps not implemented") +} func (UnimplementedSwapClientServer) GetStaticAddressSummary(context.Context, *StaticAddressSummaryRequest) (*StaticAddressSummaryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetStaticAddressSummary not implemented") } @@ -1060,6 +1100,42 @@ func _SwapClient_WithdrawDeposits_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _SwapClient_ListStaticAddressDeposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListStaticAddressDepositsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SwapClientServer).ListStaticAddressDeposits(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.SwapClient/ListStaticAddressDeposits", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SwapClientServer).ListStaticAddressDeposits(ctx, req.(*ListStaticAddressDepositsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SwapClient_ListStaticAddressSwaps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListStaticAddressSwapsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SwapClientServer).ListStaticAddressSwaps(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.SwapClient/ListStaticAddressSwaps", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SwapClientServer).ListStaticAddressSwaps(ctx, req.(*ListStaticAddressSwapsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _SwapClient_GetStaticAddressSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(StaticAddressSummaryRequest) if err := dec(in); err != nil { @@ -1199,6 +1275,14 @@ var SwapClient_ServiceDesc = grpc.ServiceDesc{ MethodName: "WithdrawDeposits", Handler: _SwapClient_WithdrawDeposits_Handler, }, + { + MethodName: "ListStaticAddressDeposits", + Handler: _SwapClient_ListStaticAddressDeposits_Handler, + }, + { + MethodName: "ListStaticAddressSwaps", + Handler: _SwapClient_ListStaticAddressSwaps_Handler, + }, { MethodName: "GetStaticAddressSummary", Handler: _SwapClient_GetStaticAddressSummary_Handler, diff --git a/looprpc/swapclient.pb.json.go b/looprpc/swapclient.pb.json.go index 41a72123..19ee76d5 100644 --- a/looprpc/swapclient.pb.json.go +++ b/looprpc/swapclient.pb.json.go @@ -663,6 +663,56 @@ func RegisterSwapClientJSONCallbacks(registry map[string]func(ctx context.Contex callback(string(respBytes), nil) } + registry["looprpc.SwapClient.ListStaticAddressDeposits"] = func(ctx context.Context, + conn *grpc.ClientConn, reqJSON string, callback func(string, error)) { + + req := &ListStaticAddressDepositsRequest{} + err := marshaler.Unmarshal([]byte(reqJSON), req) + if err != nil { + callback("", err) + return + } + + client := NewSwapClientClient(conn) + resp, err := client.ListStaticAddressDeposits(ctx, req) + if err != nil { + callback("", err) + return + } + + respBytes, err := marshaler.Marshal(resp) + if err != nil { + callback("", err) + return + } + callback(string(respBytes), nil) + } + + registry["looprpc.SwapClient.ListStaticAddressSwaps"] = func(ctx context.Context, + conn *grpc.ClientConn, reqJSON string, callback func(string, error)) { + + req := &ListStaticAddressSwapsRequest{} + err := marshaler.Unmarshal([]byte(reqJSON), req) + if err != nil { + callback("", err) + return + } + + client := NewSwapClientClient(conn) + resp, err := client.ListStaticAddressSwaps(ctx, req) + if err != nil { + callback("", err) + return + } + + respBytes, err := marshaler.Marshal(resp) + if err != nil { + callback("", err) + return + } + callback(string(respBytes), nil) + } + registry["looprpc.SwapClient.GetStaticAddressSummary"] = func(ctx context.Context, conn *grpc.ClientConn, reqJSON string, callback func(string, error)) { diff --git a/staticaddr/loopin/interface.go b/staticaddr/loopin/interface.go index 88bd543b..45310152 100644 --- a/staticaddr/loopin/interface.go +++ b/staticaddr/loopin/interface.go @@ -33,6 +33,9 @@ type AddressManager interface { // DepositManager handles the interaction of loop-ins with deposits. type DepositManager interface { + // GetAllDeposits returns all known deposits from the database store. + GetAllDeposits(ctx context.Context) ([]*deposit.Deposit, error) + // AllStringOutpointsActiveDeposits returns all deposits that have the // given outpoints and are in the given state. If any of the outpoints // does not correspond to an active deposit, the function returns false. diff --git a/staticaddr/loopin/manager.go b/staticaddr/loopin/manager.go index 35768d17..5313c29c 100644 --- a/staticaddr/loopin/manager.go +++ b/staticaddr/loopin/manager.go @@ -456,3 +456,38 @@ func (m *Manager) startLoopInFsm(ctx context.Context, return loopIn, nil } + +// GetAllSwaps returns all static address loop-in swaps from the database store. +func (m *Manager) GetAllSwaps(ctx context.Context) ([]*StaticAddressLoopIn, + error) { + + swaps, err := m.cfg.Store.GetStaticAddressLoopInSwapsByStates( + ctx, AllStates, + ) + if err != nil { + return nil, err + } + + allDeposits, err := m.cfg.DepositManager.GetAllDeposits(ctx) + if err != nil { + return nil, err + } + + var depositLookup = make(map[string]*deposit.Deposit) + for i, d := range allDeposits { + depositLookup[d.OutPoint.String()] = allDeposits[i] + } + + for i, s := range swaps { + var deposits []*deposit.Deposit + for _, outpoint := range s.DepositOutpoints { + if d, ok := depositLookup[outpoint]; ok { + deposits = append(deposits, d) + } + } + + swaps[i].Deposits = deposits + } + + return swaps, nil +}